Actively used before the appearance of ART, Optimized Dalvik EXecutable (ODEX) files are the result of optimizations made to DEX on the device in order to improve performance and decrease the result size. ODEX files consist of the already described DEX layout wrapped with a short ODEX header:
typedef struct DexOptHeader {
u1 magic[8];
u4 dexOffset;
u4 dexLength;
u4 depsOffset;
u4 depsLength;
u4 auxOffset;
u4 auxLength;
u4 flags;
u4 padding;
} DexOptHeader;
The header magic value is the same as for DEX, but features a slightly different first 3-byte signature, dey (\x64\x65\x79) rather than dex. This format is defined in the DexFile.h source code file.