Preface:

Recently in the imitation write an APP, unfortunately only APK, did not find the source, had to decomcompile, special record here, for reference.

Test environment: Win10 64-bit

Tools:

Apktool (link: Baidu web disk please input extraction code ** password: tyol) **

Get resource files, extract image files, layout files, and some XML resource files

Dex2jar (link: Baidu web disk please input extraction code ** password: 392Z) **

Function: decompile APk into Java source (classes.dex into jar files)

Jd-gui (link: Baidu web disk please input extraction code ** password: GCCT) **

Use APK to convert classes.dex into a jar file

Apk decompilation to obtain resources:

Bat and apktool.jar files, along with the APK files, to a folder:

Open the CMD command line window and enter:

* in the following command line, change the name of your apK file to apktool.bat d binghuo. Apk

apktool.bat d *.apk
Copy the code

Apk decompilation to get Java source code:

Download dex2jar and JD-GUI from the above tools and unzip them

Change the decompressed APK to.rar or.zip and unzip it to get the classes.dex file (which is the Java file compiled and packaged with the dx tool). Put the classes.dex file into the dex2jar-2.0 folder.

On the CLI, locate the dex2jar.bat directory and enter

d2j-dex2jar.bat   classes.dex
Copy the code

The effect is as follows:

Jd-gui-windows-1.4.0: < classes_dex2jjar > < classes_dex2jjar > < classes_dex2jjar > < classes_dex2jjar > < classes_dex2jjar > < classes_dex2jjar > < classes_dex2jjar > The effect is as follows:

PS: obfuscated renderings (class file names and method names inside will be a, B,c…. “).