During this time, I was learning about Android Application Development. I was thinking that since Java was used for development, it should be a good decompilation to get the source code. Google is actually very simple. Here is my practice process. I solemnly declare that the purpose of the post is not to crack the software of other people, but it is completely a learning attitude, but it seems that some foreign software can be customized in this way.
1. decompile APK to get the Java source code
First download two tools: dex2jar and JD-GUI, the former is to convert the APK classes. Dex into a jar file, while the JD-GUI is a decompilation tool, you can directly view the source code of the jar package.
The following are:
Dex2jar: http://laichao.googlecode.com/files/dex2jar-0.0.7-SNAPSHOT.zip
JD-GUI: http://laichao.googlecode.com/files/jdgui.zip
Procedure:
- First, change the suffix of the APK file to zip, decompress it, and obtain the classes. Dex, which is compiled by the Java file and then packaged by the DX tool;
- Decompress the downloaded dex2jar and copy classes. Dex to the directory where dex2jar. bat is located. Locate the directory of dex2jar. bat in the command line and run
dex2jar.bat classes.dex
Generate classes. Dex. dex2jar. Jar
- Run the JD-GUI, open the jar package generated above, you can see the source code.
Ii. decompile the source code and images, xml configuration, language resources, and other files of the APK Generation Program
This is especially useful if it is just a Chinese software. First, download the tool. This time we use apktool ,:
Bytes.
Procedure:
- Decompress the downloaded two packages to the same folder. There should be three files: aapt.exe, apktool. bat, and apktool. jar;
- Go to the apktool. Bat folder under the command line and enter the following command:
Apktool d c: \ ***. APK c: \ *** folder
Command Line explanation: apktool d [the APK file to be decompiled] [Output Folder]. Note: The files to be decompiled must be placed in the root directory of drive C;
- Re-package the decompiled file into an APK. It is easy to enter the apktool B c: \ *** folder (you can compile the folder.
Article transferred from:
Http://www.maxhis.info/androiding/android-apk-decompile/