Skip to content

v0.1.5 — era facts corrected (per the DexFile author); odex everywhere; LegacyRewriter wired

Choose a tag to compare

@FlyPhantomFly FlyPhantomFly released this 18 Nov 16:55
· 6 commits to master since this release

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