Decompile the APK on Mac, and decompile the MacAPK
Window for the APK decompilation is very simple, there are a lot of integration tools, select the installation package and then you can easily decompile the jar of the resource file and source code, and then use the JD-GUI to view the source code, use a text editor to view resource files. I haven't found any powerful decompilation tools since I changed my MAC. I can't help but sort out the decompilation process and share it with me.
In fact, The Decompilation tool set eventually uses several commonly used components to decompile the APK, namely, apktool: Extracts various resource files, files, la S, and various resources in the APK; dex2jar: set classes in APK. convert dex to a jar file and view the source code.
1. apktool: Extracts various resource files from the APK.
The basic syntax of apktool is:
{your path}/sh apktool.sh d {your path}/food.apk
Then, we will see a food folder in the directory of apktool. sh, which contains all the resource files. The/res/values/public. xml contains the various ID resources we have defined.
:
Https://code.google.com/p/android-apktool/
Https://code.google.com/p/android-apktool/wiki/Install
Https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.0.0rc3.jar
2. dex2jar: Convert classes. dex in the APK to a jar file.
Basic Syntax:
{your path}/sh dex2jar.sh {your path}/classes.dex
So we can see classes_dex2jar.jar in the directory of classed. dex, and then we can open it with the JD-GUI.
Classes. dex is the file we extract from the APK.
:
Https://code.google.com/p/dex2jar/
Https://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip
3, JD-GUI: View jar file this tool is relatively simple, is used to view the jar file. Use this tool to view the jar file generated by dex2jar. I did not expect the official website to provide the mac version. Big love ~
In addition, android studio has integrated JD-IntelliJ (Java Decompiler Intellij Plugin) with the latest version 0.6.
:
Http://jd.benow.ca/
Http://jd.benow.ca/jd-gui/downloads/jd-gui-0.3.5.osx.i686.dmg
The initial directory is as follows:
4. perform the following operations:
$ Sh apktools/apktool. sh d food.apk // generate a food folder in the current directory, which is the extracted resource file $ unzip-o-d tmpfood food.apk // generate a tmpfood folder in the current directory, $ sh dex2jar-0.0.9.15/dex2jar. sh tmpfood/classes. dex // generate a classes_dex2jar.jar file in the tmpfood directory. This file is the source code file.
The final file is as follows:
View the obtained jar file:
Download resources:
Http://download.csdn.net/detail/ttdevs/8317793