CDEX Format Package

We are happy to announce support for the Android ART CompactDex (CDEX) format. The new CDEX Format package parses CompactDex containers and rebuilds them as standard DEX files so existing tools (decompilers, disassemblers and analyzers) can operate on the bytecode that ART writes inside VDEX containers.

CompactDex is the ART internal DEX variant introduced in Android 9 (Pie). The dex2oat compiler emits it whenever it produces an OAT/VDEX pair, and ART runtime reads it natively at class-load time. The format is undocumented in the public DEX specification (it is part of ART’s internal compiled-code pipeline) and existing DEX tools refuse to load CompactDex.

The new CDEX Format package fills that gap. It parses every CompactDex structure, walks the CompactOffsetTable to recover per-method debug info, and emits a clean, valid DEX 035 file with all offsets reflowed, all CodeItems expanded back to the 16-byte standard layout, all class_data leb128 entries rewritten, the SHA-1 signature and Adler-32 checksum recomputed, and a fresh map_list at the end. When a CompactDex is encountered inside a VDEX container, the package automatically pulls the parent VDEX’s quickening info and unquickens bytecode in place, restoring the original opcode and the field/method index from the per-method QuickenInfoTable.

Leave a Reply

Your email address will not be published. Required fields are marked *