How to realize decompilation in Android
In this article Xiaobian for you to introduce in detail "how to achieve decompilation in Android", the content is detailed, the steps are clear, the details are handled properly, I hope that this "how to achieve decompilation in Android" article can help you solve your doubts, following the editor's ideas slowly in-depth, let's learn new knowledge together.
One: the required tools:
AXMLPrinter2.jar
Dex2jar:
View the GUI tool for the Jar package
Two, take action.
1. Use AXMLPrinter2.jar to view the layout xml file in apk:
Open the apk file (put it in the tools directory for convenience) with tools such as WinRAR, and extract the res/layout/main.xml (still put it in the tools directory)
Open the main.xml file with the following contents (a bunch of astronomy):
At this point, AXMLPrinter2.jar comes in handy. Open the cmd terminal, go all the way to the tools directory, and enter the following command:
Java-jar AXMLPrinter2.jar main.xml > main.txt. (as shown in the following figure)
2: decompiled through the dex2jar tool.
Copy the class.dex in apk to the directory where dex2jar.bat is located. Running dex2jar.bat class.dex will generate classes.dex.dex2jar.jar under its folder.
3, you can rename the jar file and copy it to the GUI folder, run the JD-GUI tool (it is green without installation), open the jar file above, and you can see the source code.
Read this, "how to achieve decompilation in Android" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more about the article, welcome to follow the industry information channel.