Android applications are developed in Java, through Google's guidance, to achieve and summarize the APK file anti-compilation process, not difficult, need the appropriate tools.
One, APK anti-compilation get Java source code
Download the anti-compilation toolkit above, open the dex2jar-0.0.9.9 folder under the Apk2java directory, including the APK decompile to Java source Tools, as well as the Source view tool.
APK Anti-compilation tool Dex2jar, is to convert the Classes.dex in the apk into a jar file
Source View tool Jdgui, is an anti-compilation tool that can directly view the source code of the anti-compiled jar package
Dex2jar and Jdgui The latest version of the download, see Google Code:
Dex2jar (Google Code)
Jdgui (Google code), the latest version please see the official
Specific steps:
First, change the apk file suffix to zip and unzip, Get the Classes.dex, it is the Java file compiled and then packaged by the DX tool, the Classes.dex copy to D2j-dex2jar.bat directory dex2jar-0.0.9.9 folder.
Under command line, navigate to the directory where the D2j-dex2jar.bat is located, run
D2j-dex2jar.bat Classes.dex
Generated
Classes_dex2jar.jar
Then, go to the Jdgui folder double-click Jd-gui.exe, open the above generated jar package Classes_dex2jar.jar, you can see the source code, such as:
Helloandroid source code in the anti-compilation before and after the comparison is as follows:
The source code and pictures, XML configuration, language resources and other files of apk decompile Generator
This is especially useful if you have a Chinese software.
The first is to download the above anti-compilation toolkit, where the latest apktool, please go to google code download
Apktool (Google Code)
Specific steps:
Download the anti-compilation toolkit above, open the apktool1.4.1 folder in the Apk2java directory, containing three files: Aapt.exe,apktool.bat,apktool.jar
Note: The Apktool_bk.jar inside is the old version of the backup, preferably with the latest Apktool.jar
Under command line, navigate to the Apktool.bat folder and enter the following command:apktool.bat d-f abc123.apk abc123, such as:
, Apktool.bat command line explanation: Apktool.bat d-f [apk file] [output folder]
The following files are deserialized (Androidmanifest.xml, for example):
To repackage the finished file into an apk, it is easy to enter Apktool.bat b abc123(you compiled the folder), the command is as follows:
After packaging the apk file under directory C:\HelloAndroid, two folders were generated:
Build
Dist
wherein, the package generated helloandroid.apk, in the above Dist folder, Ok
Three, graphical anti-compilation apk
Step one or two above describes the command-line anti-compilation apk, which now provides a graphical anti-compilation tool: Androidfby
First, download the Anti-compilation toolkit above, open the Androidfby directory, double-click the Android Anti-compilation tool,. exe, you can browse to open the apk you want to decompile
This article compiles the history version of the Toolkit:
Android Anti-compilation Toolkit (upgrade) (2012-10-10)
Android Anti-compilation tool (2012-08-21)
Android Anti-compilation tool (2011-08-28)
Reference recommendation:
How Android prevents the APK program from being recompiled