Deep dive into DEX files byte-by-byte
summary
Explains DEX internals: header magic and checksums, string/type/proto/field/method tables stored as indices into shared pools, and code items holding register‑based instructions. Shows javac + d8 output and how debug builds place filenames and constructors in string and type tables. Demonstrates LEB128 encoding and that method_id.proto_idx is a 16‑bit ushort causing the 65,536 prototype limit, and how multidex classloader reflection appends secondary DEX tables to work around it.
AI-written summary · about
chapters (12)
- 0:00Introduction and contest
- 1:17DEX file overview
- 9:10DEX file header structure
- 13:08Strings and type IDs tables
- 15:41Prototypes and field IDs
- 18:33Class definitions and encoded values
- 24:02Class data and executable code
- 28:19Exception handling in DEX
- 32:37The 64K problem and multidex
- 35:56DEX vs JAR and class files
- 40:27Uncovered structures and resources
- 41:11Q&A and closing
related talks
41mDigging into D8 and R8
29mBytecode analysis for everyone!
33mReverse - Engineering apps on the device - how far can we go?
35mUnderstanding the Kotlin to Dalvik bytecode translation
27mClojure and Android
42mUnderstanding the Kotlin to Dalvik bytecode translation
31mDABiD: The Powerful Interactive Android Debugger for Android Malware Analysis
37mPack your Android: Everything you need to know about Android Boxing
