LinuxCommandLibrary

jadx

Decompile Android DEX and APK files

TLDR

Decompile a Dex file into a directory

$ jadx [path/to/file]
copy

Decompile a Dex file into a specific directory
$ jadx [[-d|--output-dir]] [path/to/directory] [path/to/file]
copy

SYNOPSIS

jadx [options]

PARAMETERS

-d, --output-dir


    Specifies the output directory where decompiled files will be saved. If not provided, output goes to the current directory.

-s, --show-bad-code
    Enables showing of decompiled code even if errors occurred during processing, potentially resulting in incomplete or less accurate output.

-v, --verbose
    Increases the verbosity of output, providing more detailed information about the decompilation progress.

-j, --threads
    Sets the number of threads to use for parallel decompilation, which can significantly speed up the process on multi-core systems.

--no-src
    Prevents the decompilation of source code, only extracting resources from the input file.

--no-res
    Prevents the extraction of resources, only decompiling source code from the input file.

--deobf
    Activates the deobfuscation engine, attempting to rename obfuscated class, method, and field names to more meaningful ones.

--log-level
    Sets the minimum log level for messages displayed on the console (e.g., DEBUG, INFO, WARN, ERROR).

--skip-resources
    Allows skipping specific resources or resource directories from being extracted, specified as a path pattern.

--version
    Displays the jadx version information and then exits.

-h, --help
    Shows the command-line help message with all available options and their descriptions.

DESCRIPTION

Jadx (Java And Dalvik eXtractoR) is a powerful open-source tool for decompiling Android applications (APKs) and Java bytecode (JAR, DEX, CLASS files) into readable Java source code. It serves as an invaluable utility for reverse engineering, security analysis, and understanding the functionality of compiled applications. Jadx aims to reconstruct the original source code as accurately as possible by performing various optimizations and transformations during the decompilation process, including inlining, renaming obfuscated elements, and reconstructing control flow.

It supports various obfuscation techniques and provides a rich set of command-line options to fine-tune the decompilation output. Besides its command-line interface, Jadx also offers a graphical user interface (GUI) for more interactive exploration of compiled code and resources.

CAVEATS

While jadx is highly effective, highly obfuscated or encrypted applications may still produce hard-to-read or partially incorrect output. Decompilation is an approximation, and the reconstructed code might not be byte-for-byte identical to the original source. Large APKs with many resources can consume significant disk space and processing time during extraction.

GUI VERSION

Jadx also provides a graphical user interface, invoked via the jadx-gui command, which offers an interactive environment for browsing classes, methods, and resources. This GUI makes the reverse engineering process more intuitive for many users by providing navigation, search, and syntax highlighting features.

CROSS-PLATFORM COMPATIBILITY

Built with Java, jadx is inherently cross-platform and can run seamlessly on Linux, Windows, and macOS. It only requires a Java Runtime Environment (JRE) version 11 or higher to operate, ensuring broad accessibility for users across different operating systems.

HISTORY

Jadx was created by Skylot and first released around 2015. It quickly gained popularity as a robust and actively maintained decompiler, particularly for Android applications, filling a crucial gap for a reliable open-source tool that could handle both Java bytecode and Dalvik executables effectively. Its continuous development has added support for newer Java and Android features, improved decompilation accuracy, and enhanced its deobfuscation capabilities, making it a staple in the reverse engineering community.

SEE ALSO

apktool(1), dex2jar(1), smali(1), baksmali(1), jd-gui(1)

Copied to clipboard