What is the difference between odexed and deodexed ROMs? Which is the standard (stock) ROMs that ship use?
ROMs are typically released in deodexed form because they can be themed and modified fairly easily, whereas theming/modifying an odexed ROM is basically impossible (at best things would crash like crazy). Some people also choose to release their ROMs in odexed versions for people who would prefer the performance gains.
Most of the stock ROMs I've seen are odexed, I assume because the carriers/manufacturers want the performance boost. They also don't have any kind of official theming methods, so they probably don't care if you can't change the colors of your status icons or your system text or whatnot. Plus they have the advantage of knowing what device they want their system to run on, so they can pre-compile the
Edit: Since I just realized that I was not very explicit about the difference here - an "odexed" ROM is one where the apps have been precompiled, and thus contain associated
I personally wanted to know the answer to this a little while ago. Here is what I came up with:
Odexed and Deodexed
A standard ROM is supposed to be odexed for release which provides smoother and faster loading of apps into memory. Each .apk has a corresponding .odex. When the application is used by either the system or the user, the .odex is used to start loading the app. A ROM that is deodexed has only the .apk file. When the application is called into memory from only pulling the data from it’s .apk, this takes longer due to not being optimized for easier retrieval from the system.
Common questions that I get asked way too often are:
To answer these questions it comes down to one word, themability. If you talk to anyone that themes ROM’s they will tell you that it’s extremely easier to theme a deodexed ROM. Since we started using deodexed ROM’s, themers could now create themes to apply to a ROM rather than the tedious option to theme the ROM itself (release a custom ROM for a theme). If you use a odexed ROM and try to apply themes, it will not work or only theme some visual aspects, which will give you a terrible user interface to experience.
I bet you are now wondering why… why is there even an option to download a custom ROM that is odexed? The answer to that is speed. Remember how I said that odexed files are optimized for easier retrieval? Simply put… it’s optimized (like indexing a data table) so the system can open the .apk faster.
Deodex and zipalign
Everyone wanted the best of both worlds so quickly after the deodexed trend started to peak, these savvy ROM developers came up with a solution to zipalign at boot. This optimizes each .apk on every reboot which then allows the system to access applications more efficiently and most importantly, faster. Of course, the disadvantage is slightly slower boot times.
If you have a choice to download the custom ROM odexed or deodexed, I would just go with the deodex ROM. You never know when you would want to try out a theme or do some modifications yourself and it’s nice to have easy options rather than flashing a whole new ROM. With newer devices you may not even see a noticeable difference to zipalign on boot. If your device is pretty slow and outdated, well then I would suggest to think about this a little harder. I would bet some of you would prefer to get a nice minimal optimized (odexed) ROM for better performance and speed over customizing the user interface.
If you're new the subject you can find some common terms located on my original write-up here: http://codeversed.com/deodexed-vs-odexed-rom
Otherwise, the above shows you everything you need to know. If I missed anything, please let me know :)
A .dex (dalvik executable) file is basically similar to Windows' .exe files (except in Dalvik VM's language, instead of compiled code). Basically, .odex (optimized dalvik executable) and deodex (de-optimized dalvik executable) relates to how resource files are handled in the applications. The .odex is a .dex file that have been optimized by the dexopt program: http://www.netmite.com/android/mydroid/dalvik/docs/dexopt.html