On Android, applications are written in Java. When the app is built, the code is compiled into a dex file for the “Dalvik Virtual Machine” that is at the heart of Android. This dex file is included inside the apk of an application (which is actually a zip file). When the device first boots or an app is first installed, this dex code gets optimized for the device and put into an area called the dalvik-cache, which lives in the /data partition. There are two disadvantages to this. Firstly the initial process for filling this cache leads to a slow first boot after a hard reset and secondly, anything on the /data partition is taking up valuable storage space. For this reasons, most manufacturer ROMs have the dex code pre optimized in odex files and stored alongside the main apk in the system partition. This is great but it does limit the customizability of a ROM, hence most custom ROMs are not odexed. If you want to take advantage of odexing on your device with a custom ROM, check out Odex Me. It is a free app that runs on a rooted device and creates the odex files, thereby saving valuable space on your /data partition. How to use it:
- Simply put the Odex Me apk (download from source link given below this post) in /system/app folder with a file browser like “Root Explorer” (the folder must be in RW mode to copy the file)
- Do a Nandroid backup in cwm and / or titanium backup of all your apps (even the system ones like Gmail), then go to the launcher
- Tap “Odex me” and follow the instructions [source]