Jump to content
Nytro

HowTo: Debug Android APKs with Eclipse and DDMS

Recommended Posts

Posted

HowTo: Debug Android APKs with Eclipse and DDMS

Source: http://blog.dornea.nu/2014/08/21/howto-debug-android-apks-with-eclipse-and-ddms/

1. Download apktool

git clone git://github.com/iBotPeaches/Apktool.git find . -name "apktool-cli.jar" cp ./brut.apktool/apktool-cli/build/libs/apktool-cli.jar /tmp

2. Dump APK

java -jar /tmp/apktool-cli.jar d -d FakeBanker.apk -o source

3. Make Application to debug mode

If you want to do it manually open the AndroidManifest.xml file and search for the application tag. Then insert new attribute android:debuggable='true' like I did:

4. Build new app

# java -jar /tmp/apktool-cli.jar b -d source FakeBanker.Debug.apk

5. Unzip debug application and make jar file

unzip FakeBanker.Debug.apk -d unpacked cd unpacked # dex2jar classes.dex -> classes-dex2jar.jar 6. Using jd-gui for save all source of jar

7. Sign the application

git clone https://github.com/appium/sign

# java -jar sign/dist/signapk.jar sign/testkey.x509.pem sign/testkey.pk8 FakeBanker.Debug.apk FakeBanker.Debug.Signed.apk

8. Install Application to your mobile

# adb devices -l # adb install FakeBanker.Debug.Signed.apk

For add some source into app

# mkdir source/src

# unzip classes-dex2jar.src.zip -d source/src Debug Settings Go to Device Settings -> Select debug app. Also make sure you have Wait for debugger Create new Java project in Eclipse

1. create a new Java project and use source as the location of the project

2. Add src folder to build path

3. Check project properties

4. Set breakpoints

5. And run (Switching to debug mode).

Sursa: HowTo: Debug Android APKs with Eclipse and DDMS | Offensive Security Blog V2.0

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...