There are a lot of articles related to the Internet. I just summarized my own decompilation methods and tools.
Download the compressed packages of the above three tools
Apktool_v1.5.1_CHS_By_b-sf.rar dex2jar.zipjd-gui-0.3.5.windows.zip
1. decompile xml and other template resource files.
Decompress the apktool package and drag and drop the decompiled apk fileApkModify. batThe file is automatically decompiled. This package automatically inherits some decompilation functions, but it may not work for java files,
I used Lofter Netease to do an experiment, and classes. dex was decompiled into a smali file.
Ii. decompile java files
Decompress the dex2jar.zip package
Change the extension name of the. apk file to. zip and decompress it to enter the dos command line mode. All the way to the directory of the dex2jar package, execute the doscommand:
dex2jar D:apksApktoollofterclasses.dex
The following path parameters must be modified to the path of your apk file after decompression.
The classes_dex2jar.jar package file is generated after compilation in a few seconds.
3. View and export the java source code
Decompress the jd-gui package, execute the jd-gui.exe program, open the classes_dex2jar.jar file generated in the second part, then you can browse the decompiled source code (of course not the original source code, variable names such as Shenma are replaced by a, B, and c, which is difficult to read)
Open the file menu of the software, and click save all sources to export all the. java source files.
Then, overwrite the java source file directory to the directory generated in the first part to completely import it to android studio or other software to generate a new project. This makes it easier to analyze the source code.
In addition, Android beginners can join my 360 file sharing group: Android,
Open invitation link: http://qun.yunpan.360.cn/38063538, enter invitation code: 1267
All android and java-related materials, tutorials, and software collected by me and other netizens