LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dex2jar

Android DEX to JAR file converter

TLDR

Convert DEX to JAR
$ d2j-dex2jar [classes.dex]
copy
Convert APK to JAR
$ d2j-dex2jar [app.apk]
copy
Specify output file
$ d2j-dex2jar -o [output.jar] [classes.dex]
copy
Force overwrite
$ d2j-dex2jar -f [classes.dex]
copy
Convert JAR to DEX
$ d2j-jar2dex [file.jar]
copy

SYNOPSIS

d2j-dex2jar [options] dex-file

DESCRIPTION

dex2jar converts Android DEX (Dalvik Executable) files to Java JAR files. This enables analysis of Android applications using standard Java decompilers.The tool is commonly used for Android reverse engineering, security analysis, and studying app behavior. It handles the differences between Dalvik bytecode and JVM bytecode.

PARAMETERS

-o file

Output JAR file name.
-f, --force
Overwrite existing output.
-e file
Output exception details to file.
-n, --not-handle-exception
Don't handle exceptions.
-nc, --no-code
Don't convert code.
-d, --debug-info
Include debug information.
-r, --reuse-reg
Reuse registers.

RELATED TOOLS

d2j-jar2dex: Convert JAR to DEXd2j-apk-sign: Sign APK filesd2j-asm-verify: Verify ASM coded2j-dex-recompute-checksum: Fix DEX checksums

CAVEATS

Conversion may not be perfect. Obfuscated code remains obfuscated. Some Dalvik features have no JVM equivalent. Legal restrictions may apply to reverse engineering.

HISTORY

dex2jar was created by Bob Pan (pxb1988) for Android reverse engineering. It became a standard tool in the Android security research community, often used alongside jd-gui for decompiling the resulting JAR files.

SEE ALSO

apktool(1), jadx(1), jd-gui(1), smali(1)

Copied to clipboard
Kai