IDA Debug Android

Source: Internet
Author: User

Recently have been learning some anti-compiling android related things, in fact, there are many tutorials on the Internet to debug Android with IDA process, mainly record the pit I encountered

First, if the Android phone is rooted,

It is also important to note that the Androidmanifest.xml in the APK is debuggable to True

1. Install the APK on the phone and execute the command line:

ADB shell am start-d-N "com.gabo.test/com.unity3d.player.unityplayeractivity"

The last parameter is "package name/activity to run"

2. Find the port number of the running app and execute the command: adb forward tcp:5005 jdwp:9973

3, first open IDA in the Dbgsrv folder, the inside of the android_server to get on the phone:

ADB push android_server/data/local/tmp

4. Running Android_server

ADB shell

chmod 755 Android_server

5. Open another CMD window, run adb forward tcp:23946 tcp23946

6. Run IDA, set debugger

Choose android Debugger

Enter hostname for localhost, click the Debug Options button settings

And then determine

If there are other errors found, it may be because there is no third step or the port number is wrong, or failure, in the operation of the 5th step, and then the 6th step will be

If you find the following problem, you may be running a 64-bit IAD and re-running the 32-bit Ida

Above is 32 bit, below 64 bit, re-run the above re-operation a change on it can be. I was the window, and now it's just a hint of the error.

After the above problem is resolved, the window will pop up, then select the process we want, click OK.

7. At the end of the 6th step, IDA will automatically pause and execute Jdb-connect com.sun.jdi.socketattach:hostname=127.0.0.1,port=5005

Because the ADB shell am start-d-n command is running on it, the application running on the device will continue to execute after additional debugging, the JDB command above is for the application to continue to execute

8, then back to IDA, you can find the breakpoint you want to set a good breakpoint, press F9 continue to execute, just the JDB command will see the results

And then it's over.

Ida

Link: http://pan.baidu.com/s/1kV2JRZx Password: s59q

IDA Debug Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.