- download tools
- [[apktool]]
- [[dex2jar]]
- [[java-decompiler-gui]]
- download apk
eg: com.baidu.tieba_mini_123205.apk
- decompile
apktool d com.baidu.tieba_mini_123205.apkmv com.baidu.tieba_mini_123205.apk com.baidu.tieba_mini_123205.zipunzip com.baidu.tieba_mini_123205.zipgotclasses.dexfilemv classes.dex dex2jar-you-version-dir/andd2j-dex2jar.sh classes.dex- use [[java-decompiler-gui]] open classes-dex2jar.jar
Quick Check
- Is at least Java 1.8 installed?
- Does executing java -version on command line / command prompt return 1.8 or greater?
- If not, please install Java 8+ and make it the default. (Java 7 will also work at this time)
Installation for Apktool
Windows:
- Download Windows wrapper script (Right click, Save Link As
apktool.bat) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar - Move both files (
apktool.jar&apktool.bat) to your Windows directory (UsuallyC://Windows) - If you do not have access to
C://Windows, you may place the two files anywhere then add that directory to your Environment Variables System PATH variable. - Try running apktool via command prompt
- Download Windows wrapper script (Right click, Save Link As
Linux:
- Download Linux wrapper script (Right click, Save Link As
apktool) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar - Move both files (
apktool.jar&apktool) to/usr/local/bin(root needed) - Make sure both files are executable (
chmod +x) - Try running apktool via cli
- Download Linux wrapper script (Right click, Save Link As
macOS:
- Download Mac wrapper script (Right click, Save Link As
apktool) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar - Move both files (
apktool.jar&apktool) to/usr/local/bin(root needed) - Make sure both files are executable (
chmod +x) - Try running apktool via cli
Or you can install apktool via Homebrew:
- Install Homebrew as described in this page
- Execute command
brew install apktoolin terminal (no root needed). The latest version will be installed in/usr/local/Cellar/apktool/[version]/and linked to/usr/local/bin/apktool. - Try running apktool via cli
- Download Mac wrapper script (Right click, Save Link As
Note - Wrapper scripts are not needed, but helpful so you don’t have to type java -jar apktool.jar over and over.
WebSite
Project move to GitHub
Tools to work with android .dex and java .class files
- dex-reader/writer: Read/write the Dalvik Executable (.dex) file. It has a light weight API similar with ASM.
- d2j-dex2jar: Convert .dex file to .class files (zipped as jar)
- smali/baksmali: disassemble dex to smali files and assemble dex from smali files. different implementation to smali/baksmali, same syntax, but we support escape in type desc “Lcom/dex2jar\t\u1234;”
- other tools: d2j-decrypt-string
Usage
- In the root directory run: ./gradlew distZip
- cd dex-tools/build/distributions
- Unzip the file dex-tools-2.1-SNAPSHOT.zip (file size should be ~5 MB)
- Run d2j-dex2jar.sh from the unzipped directory
Example usage:
sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
And the output file will be apk_to_decompile-dex2jar.jar.
JD-GUI
JD-GUI, a standalone graphical utility that displays Java sources from CLASS files.

- Java Decompiler projects home page: http://java-decompiler.github.io
- JD-GUI source code: https://github.com/java-decompiler/jd-gui
Description
JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.
How to build JD-GUI ?
> git clone https://github.com/java-decompiler/jd-gui.git
> cd jd-gui
> ./gradlew build
generate :
- “build/libs/jd-gui-x.y.z.jar”
- “build/libs/jd-gui-x.y.z-min.jar”
- “build/distributions/jd-gui-windows-x.y.z.zip”
- “build/distributions/jd-gui-osx-x.y.z.tar”
- “build/distributions/jd-gui-x.y.z.deb”
- “build/distributions/jd-gui-x.y.z.rpm”
How to launch JD-GUI ?
- Double-click on “jd-gui-x.y.z.jar”
- Double-click on “jd-gui.exe” application from Windows
- Double-click on “JD-GUI” application from Mac OSX
- Execute “java -jar jd-gui-x.y.z.jar” or “java -classpath jd-gui-x.y.z.jar org.jd.gui.App”
How to use JD-GUI ?
- Open a file with menu “File > Open File…”
- Open recent files with menu “File > Recent Files”
- Drag and drop files from your file explorer
How to extend JD-GUI ?
> ./gradlew idea
generate Idea Intellij project
> ./gradlew eclipse
generate Eclipse project
> java -classpath jd-gui-x.y.z.jar;myextension1.jar;myextension2.jar org.jd.gui.App
launch JD-GUI with your extensions
How to uninstall JD-GUI ?
- Java: Delete “jd-gui-x.y.z.jar” and “jd-gui.cfg”.
- Mac OSX: Drag and drop “JD-GUI” application into the trash.
- Windows: Delete “jd-gui.exe” and “jd-gui.cfg”.
License
Released under the GNU GPL v3.
Donations
Did JD-GUI help you to solve a critical situation? Do you use JD-Eclipse daily? What about making a donation?

