[Android] apk reversing

Writing time : 2012-11-28 22:11:39

apk reversing

APK file extraction

Execute adb shell. Use the pm list packages -f command to search the package list and check the path of the desired APK.
The reason for giving the -f option is to print the path of the package.

#adb shell  
shell@android:/ $ pm list packages -f  
shell@android:/ $ exit  

Exit shell mode with exit and extract apk using adb pull command.

#adb pull /data/app//xxx.yyy.zzzz.apk d:로컬경로xxx.yyy.zzzz.apk  
3451 KB/s (10932952 bytes in 3.093s)  

Extract dex files from APK

You can find the classes.dex file by extracting the extracted APK file with Alzip.

dex file to jar file

For decomple, you need to change the dex file to jar. Download dex2jar from the link below.


Change classes.dex to classes.jar by using the command below.

#dex2jar classes.dex  
this cmd is deprecated, use the d2j-dex2jar if possible  
dex2jar version: translator-  
dex2jar classes.dex -> classes_dex2jar.jar  

After decomple the jar file classes to java, analyze the source

If you install JD-GUI from the link below and open the created jar file, you can see the java source.


files used for decomple



Reference URL and documentation

PDF document

Reference URL

Previous post

Next post