
Android DEX → Java decompiler in Rust — quality-first: javac-verified output, exact semantic-preserving simplification (cure), full apps in seconds, queries in milliseconds.
English | 简体中文
ddc decompiles Android DEX bytecode back into readable Java — at
real-world app scale, queryable like a database, and quality-first:
output is checked with javac's parse gate and a full Android classpath,
and every file is simplified by an exact, semantic-preserving source pass.
javac parse gate and a
full-classpath battery continuously check the output; every file also
goes through cure, an exact
simplification that cuts 15% of output lines with identical gate
results. The 39-APK validation corpus currently sits at 4,102,811 /
4,102,812 files parsing clean (one long-literal caveat, see
validation).--fast); Telegram (62 MB) in ~6.4s
(~3.9s). Pathological classes run on deadline-bounded monitored
threads instead of hanging the run.(a) -> …, Cls::name, a + b).v12; IntDef
literals render as constants (setVisibility(8) → View.GONE) with a
built-in android-37 table; Kotlin null-check noise is elided and
access$NNN bridges inline.ddc serve exposes every query over REST, OpenAPI and a streamable
/mcp endpoint; ddc mcp provides 10 MCP tools. Output formats:
text, table, markdown, JSON/JSONL.DDC_LANG=zh|en, automatic locale detection.jdc-core, shared with
jcdc.macOS (Homebrew):
brew install ejfkdev/tap/ddc
Windows (Scoop) — add the bucket once, then install by name (scoop
does not resolve a bare user/repo/app form — issue #3):
scoop bucket add ejfkdev https://github.com/ejfkdev/scoop-bucket
scoop install ddc
# or install straight from the manifest URL, no bucket needed:
scoop install https://raw.githubusercontent.com/ejfkdev/scoop-bucket/main/bucket/ddc.json
Windows (WinGet) — the package is live in microsoft/winget-pkgs:
winget install --id ejfkdev.ddc -e --source winget
Any platform (npm) — @ejfkdev/ddc is a small wrapper that downloads and
SHA-256-verifies the release binary (Node 18+); Linux glibc and fully static
musl builds are selected automatically:
npm install -g @ejfkdev/ddc
If install scripts are disabled, the ddc launcher downloads the binary on
first use. GitHub Packages is also available for users with a token that has
read:packages:
npm config set @ejfkdev:registry https://npm.pkg.github.com/
npm config set //npm.pkg.github.com/:_authToken "$GITHUB_TOKEN"
npm install -g @ejfkdev/ddc
Without any package registry:
# replace with the release you want
VERSION=0.1.35
npm install -g "https://github.com/ejfkdev/ddc/releases/download/v$VERSION/ejfkdev-ddc-$VERSION.tgz"
cargo-binstall (any platform — fetches the prebuilt release binary instead of compiling):
cargo binstall ddc-cli
Arch Linux — install the release bundle manually (requires
base-devel); it contains the same files as the ddc-bin AUR package:
# replace with the release you want
VERSION=0.1.35
curl -LO "https://github.com/ejfkdev/ddc/releases/download/v$VERSION/ddc-bin-$VERSION-1-aur.tar.gz"
tar xzf "ddc-bin-$VERSION-1-aur.tar.gz"
cd ddc-bin && makepkg -si
Binaries: every release
ships raw binaries (no archives) for linux-amd64, linux-arm64,
linux-amd64-musl, linux-arm64-musl, windows-amd64, windows-arm64,
macos-amd64 and macos-arm64 — non-macOS builds UPX-compressed. The musl
builds are fully static and run on Alpine and other musl distributions.
From source (Rust stable):
cargo install ddc-cli # from crates.io, compiles locally
# or build the checkout:
git clone https://github.com/ejfkdev/ddc && cd ddc
cargo build --release
Package manifests and release bundles are generated from
packaging/; see packaging/README.md for
AUR/WinGet/npm status and multi-program support.
ddc app.apk # full decompile → app-out/
ddc app.apk -c com.example.Foo # one class to stdout
ddc app.apk -o - | less # everything to stdout
ddc info app.apk # app context (label via arsc, package,
# version, md5) + per-dex counts
ddc listclasses app.apk # package tree with class counts
# (--full: raw names)
ddc mainactivity app.apk # entry point: package + launcher
ddc findrefs app.apk string token # every const-string "token" site
ddc getmethod app.apk Foo.toString # one method, all overloads
ddc pkg app.apk --app -o own/ # the app's own code only
Full options and examples: ddc --help (subcommand menu grouped by
workflow). The complete reference — every option's semantics, every
subcommand's output format and behavior — lives in
docs/cli.md (中文).
Seven real-world APKs, release build, measured after a cooldown (Apple Silicon, 6P+12E). The 39-APK validation corpus (4.10M decompiled files, per-APK wall time / peak RSS / javac parse gate) is in docs/validation.md (中文).