Apk decompilation and apk decompilation tutorial
Tools
Tools required for decompilation
The above are command line decompilation, and androidfly is a graphical interface, but the downloaded decompilation jar package cannot be viewed, probably because it is not the latest.
Decompilation of contributed source files
Use apktool to copy the decompiled apk to the apktool file:
Start cmd, go to the apktool directory, and run the following command (the paths are different ):
C: \ Users \ ASUS> f:
F: \> cd \ workDocument \ uncomfile_tools \ apktool
F: \ workDocument \ uncomfile_tools \ apktool> apktool. bat d-f android_libs.apk android_libs
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest. xml with resources...
I: Loading resource table from file: C: \ Users \ ASUS \ apktool \ framework \ 1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs ...'
The running result is as follows. There is more than one folder under the Directory, which contains the required resource file.
Decompilation Command Format
Apktool. bat d-f [apk file] [Output Folder]
Repackage to apk Command Format
Apktool. bat B Output Folder
Decompile java code
Rename the decompiled apk to rar or zip to the end of the file and decompress it as follows:
Copy the classes. dex under the folder to the dex2jar-0.0.9.15 and run the following command:
F: \ workDocument \ uncomfile_tools> cd dex2jar-0.0.9.15
F: \ workDocument \ uncomfile_tools \ dex2jar-0.0.9.15> dex2jar. bat classes. dex
This cmd is deprecated, use the d2j-dex2jar if possible
Dex2jar version: translator-0.0.9.15
Dex2jar classes. dex-> classes_dex2jar.jar
Done.
Generate the classes_dex2jar.jar file.
Classes_dex2jar.jarfile. Open it with jd-gui.exe.
Terror!