Android android APK decompilation reverse, Android android apk
The reverse of the android APK program is much easier than that of the WindowsPE file.
1. the android APK program is actually a zip file that can be opened with winrar. After decompression, you will see the familiar directories, AndroidManifest. xml files, and various resources and images.
2. open xml in notepad and you will see garbled characters. Therefore, you need to use the AXMLPrinter2.jar tool for processing. The command is as follows:
Java-jar AXMLPrinter2.jar AndroidManifest. xml> AndroidManifest.txt
In this case, open androidmanifest.txt and you will see that it is similar to the source code, and there is no garbled code.
3. All. java code of APK is compiled into the classes. dex file. Therefore, if you want to know the operation process and specific functions of the program, you must decompile the file and use the baksmali. jar tool.
Java-jar baksmali. jar-o classout/classes. dex
After the execution is complete, generate a classout directory and find the android directory ,. smali. java code. Let's take a look. the code in small is enough. Although it is not a standard java code, it is easy to get used to it, at least much simpler than Windows assembly...
4. Finally, after decompiling, we can change the code to the resource. After the code is changed, we have to compile it back and use the smali. jar tool.
Java-jar smali. jar classout/-o classes. dex
After this is done, plug it into the apk so that the program can still run!
5. Sometimes AXMLPrinter2.jar may not be able to process xml well and an error will be reported. It is said that the minSdkVersion of the configuration file is greater than 7. We can use APKTool
Apktoolis very simple. Use three files (aapt.exe, apktool. bat, and apktool. jar)
Apktool d <file.apk> <dir> // Decompilation
Apktool d-f <file.apk> <dir> // recompile
It's over 12 o'clock, so sleepy. I'm asleep.