WHAT IS EXACTLY 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 The odexed file structure works well as an optimization tool. Since these .odex files contain preliminary load information about each system app, the OS knows what to expect when it’s booting up, and consequently, loads all these apps faster.
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.
For instance, on a non-rooted device you’ll find
system/app/Phone.apk ===> as well as ===> system/app/Phone.odex
AND NOW THE DEODEX FILE ?
It’s the process to take all the packages out from .odex file and reassemble them all together in classes.dex file which is kept inside the APK file. 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.
on the same device but rooted now, you’ll find this:
system/app/Phone.apk ===> but no longer the corresponding .odex file. The reassembled files become classes.dex
CONCLUSION: ADVANTAGES & DISADVANTAGES FOR BOTH SYSTEM FILES
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, that’s why developers prefer it and most, if not all, of the custom ROMs come pre-deodexed.
The advantage of .odex file is the faster load time of the app and 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.
And finally rooting need not necessarily mean your device is deodexed, rather that almost all stock ROMs are odexed to some extent, and usually most custom ROMs are deodexed for easy theming.
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.
" IF YOU DO NOTHING, THEN NOTHING WILL HAPPEN "
Samsung Note 2 1605
Kernel: 3.0.31 Blu3 Cheez
Phone: Samsung T959 Vibrant/FFC Mod
ROM: ICZENWICH RC 1.7 Build IMM741
Kernel Version: 3.1.10_SubZero-1.2 Yars Revenge#80
GPS: Using ROM's Install