Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I saw an application (forgot the name) on my cousin's Galaxy Mini while inside Link2SD app. It has the -Odex- text beside its name. It was the only application like that on Link2SD. I got curious so I asked him but apparently, he doesn't know either which is why I'm now turning to here, what exactly is an "odex" app?

Based on some googling, I got to the knowledge that it's some kind of broken down "thing" like its in separate pieces. They also talk about "deodexing" but they are always talking about roms and not apps. So as added question, how do I "deodex" that application? (I'm a bit OCD like that :P)

share|improve this question
1  
The first question is covered to some extent in What is the difference between odexed and deodexed roms? although that question does not cover how to deodex a ROM or app. You may find it helpful for the first part, though. –  eldarerathis Jul 23 '12 at 14:01
1  
They're talking about deodexing roms because the roms' apps are odexed not the rom itself. You can follow the same procedure. –  Richard Borcsik Jul 23 '12 at 14:13
    
So the actual name or filename of the app was something like Odex-MyCoolApp? Or is there an entry for both the app and its .odex file? –  Matthew Read Jul 23 '12 at 17:51
    
@MatthewRead It goes something like: NameOfApp -Odex- –  Propeller Jul 25 '12 at 10:21

1 Answer 1

To sum up the relevant information, let me quote from the Q&A eldarerathis linked above (all credits go to him, as this is from his answer there):

A .dex file is basically a compiled bytecode version of an app that has been built for the Dalvik VM which Android's apps run on. I believe it is short for Dalvik Executable, but I'm not sure if I'm remembering that correctly.

An .odex file is an Optimized .dex file (hence the 'o'), meaning that it has basically been pre-compiled for a specific platform. The advantage to this is that startup time is much faster since the VM doesn't have to perform any optimizing at startup/runtime. The disadvantages are 1) That it takes up some extra space and 2) An odexed app won't run properly if it's put onto another device, and it must have the associated .odex file to run at all.

When you install an app, Android will ananyze the .apk and setup the device's Dalvik Cache with an optimized version of its code, so the app will start and run faster (after a factory-reset of your device, it does so for all pre-installed apps -- and after wiping the Dalvik cache, which is possible from the recovery menu with most CustomROMs, even for all user apps -- which is why the first boot takes so much longer than subsequent boots).

However, when an "odex" is found, it would simply be copied to the Dalvik Cache. As eldarerathis pointed out, the .odex was built for specific hardware (reminds me of Assembly) -- so if that "specific hardware" is not the one used by the current device, you will certainly run into trouble.

share|improve this answer
    
nice elaboration –  vs4vijay Nov 2 '12 at 6:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.