Apk file decompilation, the required tool apktool (decompilation resource file) and dex2jar-0.0.7.9-SNAPSHOT (decompilation source code) 1. configure apktool and enter the following command in the command line (only enter the command statement after $) www.linuxidc.com @ linuxidc :~ $ Sudoln-s/home/ww/apktool (location of your apktool file)/usr/bin/apk
Apk file decompilation, the required tools apktool (decompilation resource files) and dex2jar-0.0.7.9-SNAPSHOT (decompilation source code)
1. Configure apktool
Enter the following command in the command line (only enter the command statement after $)
Www.linuxidc.com @ linuxidc :~ $ Sudo ln-s/home/ww/apktool (location of your apktool file)/usr/bin/apktool (global configuration)
Www.linuxidc.com @ linuxidc :~ $ Apktool
(Note:
1. If some configuration commands are printed in the command line at this time, apktool has been configured successfully.
2. if an exception is thrown under the command line at this time, it indicates that the jdk version of the current computer is too low. configure it as suitable for apktool.
Exception in thread "main" java. lang. UnsupportedClassVersionError: Bad version number in. class file
At java. lang. ClassLoader. defineClass1 (Native Method)
At java. lang. ClassLoader. defineClass (ClassLoader. java: 621)
At java. security. SecureClassLoader. defineClass (SecureClassLoader. java: 124)
At java.net. URLClassLoader. defineClass (URLClassLoader. java: 260)
At java.net. URLClassLoader. access $100 (URLClassLoader. java: 56)
At java.net. URLClassLoader $ 1.run( URLClassLoader. java: 195)
At java. security. AccessController. doPrivileged (Native Method)
At java.net. URLClassLoader. findClass (URLClassLoader. java: 188)
At java. lang. ClassLoader. loadClass (ClassLoader. java: 307)
At sun. misc. Launcher $ AppClassLoader. loadClass (Launcher. java: 268)
At java. lang. ClassLoader. loadClass (ClassLoader. java: 252)
At java. lang. ClassLoader. loadClassInternal (ClassLoader. java: 320)
)
2. decompile the target apk File
1) decompile the resource file
Run the command line to enter the folder where the apk file to be decompiled is located.
Www.linuxidc.com @ linuxidc :~ $ Apktool d xxx.apk (apk path) ABC)
2). decompilation source code (decompilation class. dex)
Command Line to enter the dex2jar-0.0.7.9-SNAPSHOT root folder
First, extract the target apk file to get class. dex. Copy class. dex to a dex2jar-0.0.7.9-SNAPSHOT folder
Command Line execution
Www.linuxidc.com @ linuxidc :~ $ Sh dex2jar. sh classes. dex
After the execution is complete, a file named classes. dex. dex2jar. jar is generated in the dex2jar-0.0.7.9-SNAPSHOT folder, which is the compressed file of The Decompilation source code.
3. view the decompiled source code
Because the source code after decompilation is A. class file, you must use proprietary software.
Unzip the classes. dex. dex2jar. jar file and use the JD-GUI tool to view it.