Repository navigation
Releases
v0.1.8 — validate + merge subcommands
Two new subcommands completing the deferred items from the android-re-mcp integration review:
validate <dex>— linkage + method-body diagnostics from DexFile's ClassPath/analysis package over a self-contained classpath (framework classes are outside it and honestly not flagged): duplicate classes, super-is-interface, member-reference resolution errors (NO_SUCH_METHOD/FIELD, ILLEGAL_ACCESS, INCOMPATIBLE_CLASS_CHANGE), per-method analysis failures.--max-issues Ncaps the issue list with an honest truncation flag.merge <dex...>— the reverse of split: concatenate class lists into one dex, with class-collision detection across inputs and an era-consistent target (--api;--allow-cdexopts in to standalone cdex output, which is not PathClassLoader-loadable on-device).
Same MIT redistribution terms.
v0.1.7 — document the outline subcommand
v0.1.6 added outline <dex> --class <dotted-name> but left it out of the usage text and the README table. This release documents it: the bare invocation now lists it, and the README row describes the real output (descriptor, super, interfaces, formatted access flags, fields, methods with register counts, annotation count, dex version). Live-verified against a real M3-era framework class.
sha256 (dexfile-cli.jar): 30625bf2444d5fd273e6bd0f3458d12952444bc52ee3cbd1bee1a7a137dc175e
v0.1.6 — outline subcommand
New subcommand: outline <dex> --class <dotted-name> — per-class dex-model outline (super, interfaces, formatted access flags, fields, methods with descriptors and register counts) without decompiling. Serves android-re-mcp's dex_read_class_outline tool. Same MIT redistribution terms.
v0.1.5 — era facts corrected (per the DexFile author); odex everywhere; LegacyRewriter wired
Corrects factual errors in earlier claims, with guidance from Vladimir Kozelkov (vova7878, the DexFile author):
- dex037 was introduced in API 24 (not 26) — per DexVersion's own constants; dex038 is API 26
- the m-prefixed 009/013 instructions are the standard legacy set, not odex — the library ships LegacyRewriter to convert them, and the CLI now applies it automatically before any write from a 009/013 source
- the runtime accepts every instruction it supports regardless of the dex version carrying it — odex instructions are now enabled on every read and every write
- API levels 19 and 20 shipped both Dalvik and ART (FIRST_ART_TARGET=19, LAST_DALVIK_TARGET=20)
- cdex stores no source dex version — only a one-bit flags field (0 = source DEX035, 1 = later); the 035-vs-later difference is verification semantics (035 forbids default methods in interfaces and skips topological class ordering; 037+ requires super-before-sub)
Capabilities unlocked, verified against the real-world test corpus:
- flat dex009 (2,412 classes) and dex013 (2,910) convert to DEX037; baksmali decompiles every class
- dey odex wrappers convert with --to 035 (dalvik-era odex like invoke-direct-empty encodes only at api <= 13; 82,959 odex instructions written verbatim); --to 037 refuses with era-aware advice
- the 19 MB Android-12 boot vdex converts to DEX037 (6,293 classes, 154,424 odex instructions written verbatim); baksmali annotates quickened references
- convert/patch now report an odex_instructions count plus a note whenever odex content is written verbatim
sha256 (dexfile-cli.jar): c5482979c26498d573eb6ed3d45c2855d8f7e0606c2bacca3977c209b7615401
v0.1.4 — real-ART cdex and legacy dex reads: fix the read plumbing
Two CLI calling bugs (not library gaps) were blocking reads the jar could do all along: a stale art=true flag left behind by withTargetApi, and the magic-scan path passing the magic offset as header_offset instead of data_offset. Fixed both, added an odex-instructions fallback rung and deep materialization for model-level commands.
Verified against real-world artifacts:
- 19 MB Android-12 boot vdex (vdex019, three embedded cdex parts, 13,754 framework classes) — counts, class lists and full model all read (api-28+odex interpretation, legacy hidden-api field flags decrypting)
- real HTC Sooner M3/M5 framework dexes (dex009: 2412 classes, dex013: 2910) — flat and dey-odex-embedded
- quickened odex content still cannot be written to a standard version (de-odexing is out of scope for current DexFile) — convert/patch/split fail honestly, naming the first offending opcode (e.g. RETURN_VOID_NO_BARRIER, M_INVOKE_DIRECT); info and extract work
sha256 (dexfile-cli.jar): 14d5c00748fd2fa114f456b1924223d826e3b93f619595af7b527b7770f4e3de
v0.1.3 — cdex rewrites target DEX037, not 035
cdex 001 is Android 9 (API 28) era ART output; DEX037 — introduced in API 24 — covers the cdex era with room to spare. patch now rewrites cdex inputs to 037 instead of dropping to 035; convert --to 037 was already supported. Verified against a real cdex: baksmali reads the 037 output cleanly, content survives the round-trip.
(The original notes here said 037 was an API-26+ format; that was wrong — corrected with vova7878's guidance, see v0.1.5.)
sha256 (dexfile-cli.jar): 6925efb833a84759eb999e469abad39c196126a084bac4562d5f660fc5a0b739
v0.1.2 — README rewrite + assemble default fix
README rewritten and verified against live runs (JSON contract, DexFile-vs-CLI comparison table, patch ops with the correct dotted-name style, honest limits). assemble's default output for hello.smali is now hello.dex (was hello.smali.dex). Same MIT redistribution terms.
v0.1.1 — review-pass fixes
Fixes from the android-re-mcp review pass: honest usage error (exit 2) when split/patch receives a dex 041 container instead of an NPE; --api/--limit flag validation; 10x faster magic scan (1-byte fast reject). Same MIT redistribution terms as v0.1.0.
v0.1.0 — first release
First release: six subcommands (info/extract/convert/patch/assemble/split) over com.v7878.dex (DexFile v1.7.0 + Smali v1.7.0, MIT) as a single fat jar. Java 17+ runtime. Redistribution of DexFile/Smali/AndroidMisc (MIT, © Vladimir Kozelkov) — see LICENSE.