android reverse preparations

0, author readme

To be honest, for Android reverse, I just start commissioning in the development stage, but it is malware and rogue events stand in Android, I intend to simply reverse Andrews. The goal is to remove the beginning of ad pages in the app (now very difficult to find)!

1, the installation environment reverse Andrews

1.1 jdk installation

jdk installation guide is really a lot, but still have a word of warning here, jdk installation is not jre!

Reference: https://jingyan.baidu.com/article/0202781175839b1bcc9ce529.html

1.2 Android Studio installed

Now looks like a lot of books and online tips are recommended to use ADT, ADT bundle that is then installed after you install Eclipse (includes SDK), which intermediate configuration is extremely cumbersome, and many online guide recommendations are outdated, after all, Google has been canceled for ADT the support, recommended only Android Studio. If you did not give up, that you install in addition to the above, you also need to install a native development kit (NDK).

But if you install Android Studio, these can be configured quickly finished! Which contains SDK_Manager, AVD_Manager and other tools.

1.3 Use of simulators

In fact, I am already using Android Studio, and after comparing the current version 1.0 and 3.0, I found that Android Studio biggest improvement is accelerating the startup of the simulator. This should allow many developers fall in love with the original ecological development editor. Simulator biggest problem now is that the use of "window title bar" disappeared, you can not drag and drop, not directly off, I'm really going crazy!

So I found online a lot, and finally decided to use Genymotion night god simulator!

1.3.1 Genymotion installation and configuration

Genymotion support multiple versions of the phone, it is more suitable for development. However, it is not worthy of praise.

I do not know when you install Genymotion whether to log error occurs, download thief slow bizarre problems that had delayed me half a day. Of course, the most vexing question is:

Question A: Genymotion Virtualbox based platform, but appear when you start the emulator from Genymotion in the "Unable to start the Virtual Device ... " error, I finally locked the problem is virtualbox version less stable, for a restart of the computer ;

Question b: I successfully launched Genymotion in the simulator, but I just dragged into the applications are not installed, suggesting "An error occured while deploying the file This probably means that the app contains ARM native code and your Genymotion device. can not run ARM instructions. You should either build your native code to x86 or install an ARM translation tool in your device. " error, in fact, this is because there is no Genymotion-ARM-Translation.zip . This requires us to open the simulator, this simulator dragged into a zip file, has been clicking yes, you can finally use.

Problems c: While some applications already running on the emulator Genymotion, but there are many applications not running, such as micro-channel, known almost like. Said another low online version sdk simulator can be, found a few, still have such problems. Comparison of metaphysics, not pop star!

Question d: Since we are using the Android Studio to develop, then how do we let the simulator find it? First find genymotion plug-in Android Studio-> File-> Settings-> Plugins, followed by the installation and reboot. Then click on Android Studio-> View-> ToolBar, you'll see a red Genymotion management tool icon in the toolbar, and now basically no problem.

Question e: How to run the project in Genymotion simulator? Just click the green run icon, and select Edit Configuration in the Target as "Open Select Deployment Target Dialog", then click on the run, select genymotion the simulator (this simulator already open before running the project).

As you can see, genymotion configuration and installation of a lot of problems, but is not fully resolved, basically every configuration must spend an hour or two a bit more harm than good, so I very much recommend the use of a god simulator.

1.3.2 Installation and Configuration night God simulator

Yagami Simulator installation is basically no problem, so here they talk about configuration issues.

(1) run night God simulator,

(2) Open a command line window,

Big Box   android reverse preparations >

(3) open to a god installation directory (eg cd D: Program Files (x86) NOXNoxbin),

(4) Run: nox_adb.exe connect 127.0.0.1:62001, connected to the simulator,

(5) If the connection is not Android Studio Shangye God, you can restart the simulator.

This five-step can make even the Android Studio Shangye God simulator and run fast.

However, we found that seemingly can not find this simulator android-sdkplatform-tooladb devices, which caused some difficulties to the test. Depending on the version, currently adb (a god) version running on the server side, (SDK) is lower than the version of the client, so the system put the service is currently running to kill.

solution:

  • 1, turn off the god simulator AS and night. At the same time look to the Task Manager, adb.exe and nox_adb.exe these two processes have not running? Some words off the end.
  • 2, find a directory and a god simulator of the SDK, the SDK will adb.exe file directory, the directory is copied to the night God simulator God simulator because the night adb directory under the original file name is nox_adb.exe Therefore after the last copy was also renamed nox_adb.exe.
  • 3, so will AS adb adb files and files in the directory of the simulator fully synchronized, and consistent with the version number.

2, entry-level operations

2.1 AVD operation

      
      
1
2
3
4
5
6
7
8
9
10
      
      
# Mirror list system can be used
android-sdk/tools/android list targets
# Create AVD
android-sdk/tools/android create avd -n [name of your new avd]
android-sdk / tools / android create avd -n [avd device name] -t [image id] -c [size] [K | M]
Run AVD #
android-sdk / tools / emulator -avd [avd name]
android-sdk/tools/emulator -avd [avd的名字] -partition-size [size in MBs]

2.2 ADB debugging

      
      
1
2
3
4
5
6
7
8
9
10
11
      
      
Run AVD #
android-sdk / tools / emulator -avd [avd name]
#### bridge connection using Android (ADB) to interact with the AVD ####
# Get all android devices connected
android-sdk/platform-tools/adb devices
# Android device connected to the
android-sdk / platform-tools / adb shell (if only when a device)
android-sdk / platform-tools / adb shell -s [specified device] (when there are multiple devices)
At this point, we enter the back-end android device, it can be used with linux operating

2.3 Copy AVD out from / into the document

      
      
1
2
3
4
5
      
      
# Copy the files from the avd
[Local path out of the store copy file] android-sdk / platform-tools / adb {parameter} pull [file path to copy]
# Copy the file to the avd
android-sdk / platform-tools / adb {parameter} push [files to be copied in the local path] [path to storage of the file in avd]

2.4 mounted in the AVD by ADB app

      
      
1
2
3
4
5
      
      
# Installed on your computer apk
Parameter adb {} install [apk storage path]
# Use the specified device command, narrow the scope of equipment to be installed APK
adb {-e | -d | -p} install [apk storage path]

Guess you like

Origin www.cnblogs.com/sanxiandoupi/p/11699168.html