Overview
The Android Runtime (ART) Ahead-of-Time (AOT) compiler (dex2oat) compiles bytecode from DEX files into native machine code ELF files (.odex and .vdex). By default on modern Android releases, the compiler uses aggressive speed compilation profiles. While this delivers minor execution speed improvements for raw CPU operations, it expands the compiled code footprint dramatically—often ballooning /data/dalvik-cache to consume 10GB to 20GB of storage on devices with many installed apps.
Developed by ez-me, ezme-dex-space re-tunes Android’s internal package manager compiler directives systemlessly. By shifting the default compilation target from speed to space-profile, it instructs dex2oat to optimize only hot execution paths while storing the remainder in compact bytecode, freeing up significant storage space and reducing RAM pressure.
Configured Property Directives
The module systemlessly sets the following package manager compilation flags:
pm.dexopt.install=space-profile
pm.dexopt.install-bulk=space-profile
pm.dexopt.bg-dexopt=space-profile
pm.dexopt.ab-ota=space-profile
pm.dexopt.shared=space
What These Targets Mean:
space-profile: Analyzes real-time application usage profiles and compiles only the methods that are actually called during daily operation. Unused library code remains unexpanded, slashing binary sizes.space: Generates minimum-footprint code for shared system libraries, avoiding duplicate compilation overhead across secondary apps.
Re-Optimizing Existing Applications
Installing the module configures compiler directives for all future app installs and background maintenance cycles. To immediately reclaim storage from already installed applications:
- Flash ezme-dex-space via Magisk or KernelSU.
- Clear the Dalvik/ART cache using custom recovery or via terminal:
su -c rm -rf /data/dalvik-cache/* - Reboot your device.
- Android will recompile application packages using the new
space-profiletargets during first boot and subsequent idle charging cycles.
Compatibility & Verification
- Validated Systems: Confirmed working across LineageOS 18.1 and 19.1 (Android 11 and 12L) up through modern Android 14+ releases.
- Verification: Check active package manager compiler properties in a terminal shell:
All entries should displaygetprop | grep pm.dexoptspace-profileorspace.
