1. Smail code to decompile debug mode
D: \software\android\apktool\dump\apktool>java-jar Apktool.jar d-d b11842d4126d theDf16c1c1870c819c37.apk-o outI:UsingApktool2.0. 0-RC3 on b11842d4126d72df16c1c1870c819c37.apkI: Loading Resource Table ...I: Decoding Androidmanifest.xml with resources ...I: Loading Resource table from file:C: \users\topsec\apktool\framework\1.apkI: Regular Manifest Package ...I: Decoding file-resources ...I: Decoding values */* xmls ...I: Baksmaling Classes.dex ... Cleaning up unclosed ZipFile for archiveC: \users\topsec\apktool\framework\1.apkI: Copying Assets and Libs ...I: Copying Unknown files ...I: Copying Original files ...
2. In the output Out folder, open Androidmanifest.xml with the text Editing tool and set the property android:debuggable= "true" in the application node
D:\software\android\apktool\dump\apktool>java-jar Apktool.jar b-d out-o debug.apkI:Using apktool 2.0.0-rc3 on outi:checking whether sources have changed. . I:smaling Smali folder into Classes.dex ... I:checking whether resources has changed ... I:building Resources ... Warning:AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); Using existing value in manifest. I:copying Libs ... i:building apk file ... i:copying Unknown Files/dir ... Cleaning up unclosed zipfile for archive C:\users\topsec\appdata\local\temp\apktOOL5083930743852064505.TMPD:\software\android\apktool\dump\apktool>CD D:\software\android\apktool\dump\apkTool
3. Use the signature tool to sign the debug.apk file and install it after signing
d:\software \android \apktool \dump \apktool >adb install-r debug.apk1726 kb/s (14505061 bytes in 8.203s) pkg:/da Ta/local/tmp/debug.apksuccessd:\software \android \apktool \dump \apktool ;
4. Start the software to wait for debugging
5, the following starts to set up the eclipse real-time debugging environment, enters the 1th step to produce the Out folder, the inside build and Dist folder deletion, this is Apktool compiles the apk when produces.
6. Start Eclipse and build a Java project
1) Java project, Project, File---New
2) Project name is random, use the default location option removed, location selects the Out folder, and next
3) Set the Smali folder to source, then finish
7. Check the DDMS to debug the process port, and then find the Smail code where we want the breakpoint to be set breakpoint
8, select the Eclipse run->debug configurations->new a new configuration select port, click Debug Start Debugging
9. The operation of the mobile phone begins to be tracked, and the packet is captured for detailed information, and the debug trace finds the encryption and decryption algorithm for data restoration.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
"Mobile Security" Android App smail Code dynamic Tracking Debugging method