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.
First, anti-compilation apk get Java source code
The first thing to download is two tools: Dex2jar and Jd-gui
The former converts the Classes.dex in the apk into a jar file, and Jd-gui is an anti-compilation tool that can view the source code of the jar package directly. The following are:
Dex2jar:http://laichao.googlecode.com/files/dex2jar-0.0.7-SNAPSHOT.zip
Jd-gui:http://laichao.googlecode.com/files/jdgui.zip
Specific steps:
First, the apk file, the suffix to zip, unzip, get the Classes.dex, it is the Java file compiled and then packaged with the DX tool;
Unzip the downloaded Dex2jar and copy the Classes.dex to the directory where Dex2jar.bat is located. Navigate to the directory where the Dex2jar.bat is located at the command line
Run
Dex2jar.bat Classes.dex
Generated
Classes.dex.dex2jar.jar
The following are the generated jar files:
Run Jd-gui (jd-gui.exe), open the jar package generated above, you can see the source code
Helloandroid Source code (pre-compiled apk source control) is as follows:
Second, the anti-compilation apk generator source code and pictures, XML configuration, language resources and other files
This would be especially useful if it was just a Chinese software.
The first is to download the tool, this time use is Apktool
: http://code.google.com/p/android-apktool/downloads/list
Download: apktool1.4.1.tar.bz2 and apktool-install-windows-r04-brut1.tar.bz2 (two packages are all downloaded)
Specific steps:
To extract the downloaded two packages to the same folder, there should be three files: Aapt.exe,apktool.bat,apktool.jar
Under command line, navigate to the Apktool.bat folder, and enter the following command: Apktool d c:\*.apk c:\* folder, such as:
Command line explanation: Apktool d [apk file] [output folder]
The following files are deserialized (Androidmanifest.xml, for example):
Special Note: The files you want to decompile must be placed in the root directory of the C drive.
To repackage the finished files to apk, it is very simple, enter the Apktool B c:\*** folder (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
Note: This Android anti-compilation tutorial is in Windows 7 Ultimate 64bit, tested by