Transferred from: http://blog.csdn.net/ithomer/article/details/6727581
This period of time learning Android application development, in the thinking since it is developed in Java should be very good anti-compilation to get the source code bar, Google a bit, it is really simple, the following is my practice process.
In this solemn declaration, the purpose is not to crack people's software, is completely a learning attitude, but it seems that through this way can also go to the Chinese some foreign software.
This article Android anti-compilation tutorial, test environment:
Win7 Ultimate x64
Ubuntu 12.04 x86_x64
Anti-compilation toolkit Download (2012-10-10 update)
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, the apk file suffix to zip and unzip, get the Classes.dex, it is Java file compilation and then through the DX tool packaging, the Classes.dex copy to Dex2jar.bat directory dex2jar-0.0.9.9 folder.
Under command line, navigate to the directory where the Dex2jar.bat is located, run
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 under 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)
Transferred from: http://blog.csdn.net/ithomer/article/details/6727581