Current location - Quotes Website - Signature design - Can apktool decompile unsigned apk?
Can apktool decompile unsigned apk?

Yes, follow the steps below to try it

1. Download the decompilation tool

You need to download four tools: dex2jar, JD-GUI, apktool, apktool -install-windows-r05-ibot

dex2jar: Convert classes.dex in apk into Jar file.

JD-GUI: Decompilation tool, you can directly view the source code of the Jar package.

apktool: Decompilation tool, which can be viewed directly by decompiling the XML file in the APK.

apktool-install-windows-r05-ibot: Auxiliary windows batch processing tool.

2. Decompress the APK package

The apk file is also a common zip, and commonly used compression software can easily decompress the apk file. Use compression software to decompress the files in the apk file into a folder. The resources in the APK include XML files and classes.dex files. classes.dex is compiled from java files and packaged with the dx tool.

3. Decompile the dex file

After decompressing the apk file, you will find that the images in the res directory are not encrypted, but the java source code is compiled into a classes.dex file, which cannot be used with ordinary To process the decompile class file, dex2jar can convert the dex file into an ordinary jar package.

Unzip the downloaded dex2jar, put the unzipped folder into the system disk and directory, and add this directory to the system path variable. You can directly use: dex2jar.bat or dex2jar.sh to convert dex file.

The DOS line command is as follows: dex2jar.bat xx\classes.dex (xx is the path where the classes.dex file is located).

You will get the ordinary jar package: classes_dex2jar.jar in the same directory, and you can use the method of processing ordinary jar packages to decompile the jar package and get the original file

4. Decompile the jar Package

After getting the jar package, download your favorite decompilation tool. It is recommended to use JD-GUI. It has a relatively simple graphical interface and can decompile a single class file or a jar package, which is more convenient. .

Open the compressed file JD-GUI, run jd-gui.exe, open the jar package generated above, and you can see the source code

5. Decompile the xml file

p>

Open the decompressed res\layout directory. There are many xml files. If you want to see how the author designed the interface, you will be very disappointed because what you see is a lot of garbled characters! What we need to use at this time is apktool.

Specific operation method: Unzip the downloaded apktool and apktool-install-windows-r05-ibot packages into the same folder. This folder has three files: aapt.exe, apktool.bat , apktool.jar. Also put this folder in the root directory of the system disk and add this directory to the path variable. Take HelloWord.apk as an example:

In the DOS command line, enter: apktool d xx\HelloWord.apk HelloWord gets the HelloWord folder. The xml file in this folder is a compiled file that can be viewed normally. .

In this way, you will get the source code and XML resources that can be compiled.