Decompile apk source code in windows environment

The three tools required and what they do are:

tool name Tool action Tool download address
apktoos  Decompile the apk file into the original directory file  https://code.google.com/p/android-apktool/downloads/list
dex2jar Convert the dex file to a jar file https://code.google.com/p/dex2jar/downloads/list
jd-gui Convert jar to java source code http://jd.benow.ca

Decompilation steps:

1. Put the apk to be compiled in the same folder as apktools.bat, and the path corresponding to cd /d + comes to this folder, and execute

apktools.bat d + apk name.apk The corresponding package generated contains xml resources such as res and layout and other resource files.

2. View the class source code (it has not been obfuscated and encrypted, and the decompiled java code may not be understood in the case of obfuscation and encryption)

①Change the apk suffix to zip and then decompress it, copy the decompressed classes.dex to the same folder as dex2jar.bat,

cd /d + The corresponding path comes to this folder, and classes_dex2jar.jar is generated after executing dex2jar.bat classes.dex .

Pull classes_dex2jar.jar to jd-gui.exe and open it to see the java code. 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325583044&siteId=291194637