As an Android newbie, what bothered me most was coming across terminology beyond my comprehension. Not coming from a Linux background it became hard to keep up with the oh-so-commonly-used words spread all across the development community. Likewise, since I didn’t understand the terms, consequently I was unable to determine is something was of any use to me or not. From what I have seen, this problem extends to many novice and even average users.
One commonly occurring word when playing with custom ROMs and firmware, and even themes is deodexed and odexed. Most users fail to understand what these terms actually imply, and while developers would boast again and again about their themes and ROMs being deodexed, the average user is left clueless as to what is going on.

In this article, we’ll try to explain what odexed and deodexed means, and what implications does it bring to a casual user.
WHAT IS AN ODEX FILE?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
HOW THIS WORKS
For the more geeky amongst us, Android OS uses a Java-based virtual machine for running applications, called the Dalvik Virtual Machine. A deodexed, or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK. An .odex file, on the other hand, is an optimized version of this same .dex file that is stored next to the APK as opposed to inside it. Android applies this technique by default to all the system applications.
Now, when an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages. Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
ADVANTAGES & DISADVANTAGES
The advantage of deodexing is in modification possibilities. This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first, since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times. However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used. Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Was this article helpful? If you are confused with some other terms and want us to help explain them, please let us know in the comments.



Pingback: What Is zipalign In Android And How It Works [Complete Guide]
Pingback: What Is Odex And Deodex In Android [A Complete Guide] « The Droid X Blog
Pingback: Install Rooted Android 2.2 Froyo J29 ROM On Samsung Epic 4G
Pingback: Currently Done Hacks to DPro - root & deodexed - Android Forums
Pingback: Indicatore batteria circolare - Pagina 2 - Forum Android Italiano
Pingback: [ROM] TrulyEpic v2.06.12.10 - Page 6 - Android Forums
Pingback: Install Android 2.3 Gingerbread UI ROM On Motorola Defy
Pingback: Install eVoKINGS Android 2.3 Gingerbread ROM On HTC EVO 4G
Pingback: Has anyone rooted their HTC Android phone?
Pingback: [MOD] روش deodex کردن رام
Pingback: Install EViO Shift Rooted Android 2.2 FroYo ROM on HTC EVO 4G
Pingback: And again: Droid 2/X Gingerbread Rooted and now Deodexed! | adroidblog
Pingback: FOLLOW UP: Motorola DROID X Gingerbread Update Issues Exposed [Update 2: Root & Deodex] | Android Headlines
Pingback: Is Froyo finally officially here??!!
Pingback: Deodexed, odexes, and zipalign
Pingback: Install Rooted Android 2.3.3 Gingerbread ROM on S-OFF HTC Incredible S
Pingback: Assembly 101 on Android Dalvik Code « zen online journal
Pingback: Official Samsung Galaxy SL (i9003) Thread - Page 4 - Digit Technology Discussion Forum
Pingback: Olika varianter av MIUI | Swedroid
Pingback: ROM: Cognition S2 - Sidan 43 | Swedroid
Pingback: Toshiba Thrive Custom CW Restore - Page 2
Pingback: Anonymous
Pingback: 3rd Party ROM: SicOpaT. Pros and Cons - Android Forums
Pingback: Gingerbread 2.3.5 - I9000XXJVS - Seite 7
Pingback: First Droid Bionic ROM Released! (Deodexed and Debloated) - Android Forums
Pingback: Noob Question...
Pingback: Energiesteuerung Widget - Seite 3 - Android-Hilfe.de
Pingback: APKs selbst modifizieren - Android-Hilfe.de
Pingback: Gain Root On Amaze 4G By Installing Pre-Rooted ROM [Guide]
Pingback: [ROM] Xplod E4G Android 2.3.7 AOSP - Page 5 - Android Forums
Pingback: [ROM][STOCK][10/25/11] 4.54.651.1 (w/ security ota)(rooted) - Android Forums
Pingback: اگه تازه گلکسی اس 2 خریدید این تاپیک را مطالع
Pingback: What exactly is "deodexed"? - Android Forums
Pingback: Droid Charge Gingerbread EP4P Leak - Page 2
Pingback: Titanium Backup: Integrate Dalvik into ROM? - Android Forums
Pingback: Odys Loox / Xpress rooten und Image bearbeiten - Seite 11 - Android-Hilfe.de
Pingback: [ROM] Runnymede 5.0 Offizielle Sensation Sense 3.5 - Seite 55 - Android-Hilfe.de
Pingback: apps in sd occupy internal storage - Android Forums
Pingback: Galaxy Nexus Watering Hole - Page 38 - Android Forums
Pingback: [MOD] Extended Power Menu v1 - Android Forums
Pingback: Newbs Guide to Android Forums and it's terminology....ABC's of Android
Pingback: How do you unlock the su command? - Android Forums
Pingback: Got Root, CWM Recovery.. but.. - Android Forums
Pingback: [Firmware] N7000XXLA1 (Android 2.3.6) Die erste 2012 Firmware Seite 2 - Galaxy Note Root und ROM - Android Forum
Pingback: Page One Kaskus Galaxy Ace - deodex | zipalign | haptic feedback
Pingback: Default browser apk? - Android Forums
Pingback: The Newbie's Guide to Hacking the Galaxy Nexus
Pingback: STOCKROM(Deodexed) [BO-RAI MOD] - Android Forums
Pingback: MIUI - un ochi râde, celălalt plange | nepotu.ro
Pingback: Flashing cook rom ( Magnolia v1.0 beta ) for Galaxy Tab 7.7 « Benny Lee MN's RANTS
Pingback: [FIRMWARE] I9100XXLPQ ics kies official - Pagina 124 - Forum Android Italiano