dex2jar README

The project's README from github.com/pxb1988/dex2jar. As one markdown file: README.md.

dex2jar

Project move to GitHub

_ Mirror Wiki Downloads Issues
gh https://github.com/pxb1988/dex2jar Wiki Releases Issues
sf https://sourceforge.net/p/dex2jar old old old
bb https://bitbucket.org/pxb1988/dex2jar old old old
gc https://code.google.com/p/dex2jar old old old

Tools to work with android .dex and java .class files

  1. dex-reader/writer: Read/write the Dalvik Executable (.dex) file. It has a light weight API similar with ASM.
  2. d2j-dex2jar: Convert .dex file to .class files (zipped as jar)
  3. 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;"
  4. other tools: d2j-decrypt-string

Usage

  1. In the root directory run: ./gradlew distZip
  2. cd dex-tools/build/distributions
  3. Unzip the file dex-tools-2.1-SNAPSHOT.zip (file size should be ~5 MB)
  4. 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.

Need help ?

post on issue trackers list above.

License

Apache 2.0

dex2jar (pxb1988/dex2jar)

Searching Database…

13.1K ·GitHub
What is this?A set of command-line tools for working with Android .dex and Java .class files, best known for converting the dex bytecode inside an APK into a jar you can open in a Java decompiler.
Is this a command-line tool, or a library I'd build my own code on?Both. Everyday use is the command line (d2j-dex2jar.sh and friends), but the package also ships dex-reader/writer, a lightweight Java API for reading and writing .dex files, modeled on ASM.
How do I get a working copy?Build from source: run ./gradlew distZip in the repo root, take dex-tools-2.1-SNAPSHOT.zip from dex-tools/build/distributions, unzip it (~5 MB) and run the d2j-*.sh scripts from that folder.
What do I need installed before I can run anything?A JDK: the tools are Java programs, built with the bundled Gradle wrapper and launched through shell scripts. The README doesn't name a minimum Java version.
Does it hand me readable Java source code?Not by itself: d2j-dex2jar turns .dex into .class files zipped as a jar, so you still feed that jar to a Java decompiler to get readable source.
Does it run on Windows, or is it a Linux/macOS thing?The README only shows shell-script usage (sh d2j-dex2jar.sh), so Linux and macOS are the documented environments; as plain Java it runs wherever a JVM does, though no Windows launcher is mentioned.
What is smali, and when would I want it instead of a decompiler?smali is an assembly-style, human-readable form of Dalvik bytecode. baksmali turns a dex into .smali files you can read or edit, and smali assembles them back into a dex — so you can patch an app's code, not just inspect it.
Can I point it at a whole APK, or only bare .dex files?APKs work directly: the README example passes an APK path straight to the script — sh d2j-dex2jar.sh -f ~/path/to/apktodecompile.apk — and writes out apktodecompile-dex2jar.jar.
How does its smali/baksmali differ from the well-known originals?It's an independent implementation with the same syntax, extended to support escapes in type descriptors — useful when class names contain unusual characters that the usual tooling chokes on.
Are there ready-made binaries, or do I have to build it?GitHub Releases are linked at the top of the README, but the documented route is building the zip yourself: ./gradlew distZip produces dex-tools-2.1-SNAPSHOT.zip (~5 MB), which you unzip and run.
Creator
pxb1988
Size
8.5 MB
Stars
13.1K
Age
11y
Commits · 90 Days