Apk decompilation tool-apktool and apk decompilation-apktool
Apk is easily decompiled. This article briefly introduces the apktool decompilation tool.
(1) Advantages of Decompilation
1. Be able to learn other people's excellent code
Look at the excellent apk, Their Naming rules for string and color, and see how layout and layout can be learned.
2. simple modification and Secondary packaging
(2) Use of apktool
APKTool is an APK compilation tool provided by GOOGLE. JDK 2.0, JDK 2.0, and JDK must be installed for versions earlier.
This is apktool. decompress the three files (aapt.exe, apktool. bat, and apktool. jar) in the downloaded apktoolto any directory.
The decode command is used to decompile the apk file. The general usage is
Apktool d <file.apk> <dir>
<File.apk> indicates the path of the apk file to be decompiled. It is best to write an absolute path, such as C: \ MusicPlayer.apk.
<Dir> represents the storage location of decompiled files, such as C: \ MusicPlayer.
Every time you input a command, it is too troublesome. I wrote a bat automatic processing file, put all the apktool, the bat file, and the apk in the same folder, and double-click bat to run it.
(3) apk security and anti-cracking
In order to deal with various decompilation tools, there are also a lot of encryption security for apk, such as preventing tool decompilation, APK compressed package intentional destruction, spending instructions, signature verification, etc, for more information, see this blog.
Why does it mean that I have changed some files when decompiling the apk with apktool but cannot compile them back? Expert advice?
It cannot be modified ..
Such as binary code, resources, and configuration files...
Apk decompilation Tool
Apk decompilation tool: www.laixiaxia.com/tools/3273.html
Apktool instructions:
Normal APK:
1. Place apkto the apktooldirectory and change it to 123.apk.
2. Open APKTool and select 1. After the decompilation operation is complete, an apk folder is generated. You can modify the code and change the icon!
3. After the modification is complete, select number 3 for recompilation and signature. The generated apk can be directly installed!
Of course, you can also select 2 to only perform the re-compilation operation (in this case, the APK cannot be installed without a signature)
4. Select 4 for separate signature!
System APK:
Release the system apkand framework-res.apkto the apktooldirectory, and rename the system apkas 123.apk.