http://blog.csdn.net/lostinai/article/details/44201971
http://blog.csdn.net/stay_foolish_one/article/details/41659723
first, using Apktool to decompile and compile the method
Evaluation: It will only decompile dex files into Smali source code; XML files can generate a plaintext format, and good!
at the command line, navigate to the Apktool.bat folder and use the command to decompile it!
command format:Apktool.bat d-f[apk file] [output folder]
For example: Apktool.bat d-f serialport.apk SerialPort
It 's also easy to repackage the finished files into apk.
command format:Apktool.bat b[Folder for anti-compilation output]
For example: Apktool.bat b SerialPort
Android-apktool's official website:
Https://code.google.com/p/android-apktool/downloads/list
Second, 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.
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
APK's anti-compilation tool, Apktool,dex2jar,jd-gui, etc. use