Address: http://blog.csdn.net/ariesjzj/article/details/7311340
Two popular methods are described here.
The advantage of method 1 is that byte code can be decompiled into code form, but after all, it is reverse engineering and sometimes some byte code will be inserted, I also encountered some files that were opened through disassembly and crash, but after all, there were a few. In addition, the disassembly of XML and resource files does not seem powerful. This method is much better. Method 2: The decompiled items are relatively regular. The disadvantage is that the Java code is smali's byte code. Generally, I use the first method, but I cannot use the second method. In most cases, we need to combine them.
Method 1: JD-Gui + dex2jar
Decompress the APK with unzip. After converting windows to. Zip, decompress it. In fact, if you use 7-zip, you don't need to forcibly decompress it. in Linux, unzip will work, for example:
$ Unzip abc.apk-D unpack
Among them, abc.apk is the APK name, and unpack is the directory where the extracted content is stored. After decompression, there is a classes. Dex file in the directory. Use dex2jar. Sh in the dex2jar tool to convert it into a jar file (dex2jar. BAT in Windows ):
$ Dex2jar. Sh classes. Dex
Finally, open the jar using JD-Gui.
Second: apktool. Another advantage of this method is that it can be packaged after being decompressed. Although I have never used the packaging function.
APK unpack:
$ Apktool D abc.apk <directory>
The advantage of extracting this method is that the configuration files androidmanifest. XML are all readable, and the preceding method becomes garbled. The disadvantage is that the Java code is smali Code and is not easy to read. Therefore, it is better to combine the two methods.
APK packaging:
Apktool B <directory>
After decompression, there may be a. So file called by JNI In the lib directory, so let's take objdump and readelf honestly.