• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root A Note on Odexing

savoxis

Android Expert
Aug 10, 2010
812
708
38
Pacific NW
www.savoxis.com http
So. To all you kids that think ODEXing improves performance:

I just did a series of benchmarks, timed my startup time, then odexed, after I did the same tests. My results where lower in every aspect. The only reason I included an ODEX script in Velocity was because there was so much buzz about it. I always had my doubts. Also with dalvik2cache you save ABSOLUTELY NO space on data by odexing.



...I got sick of seeing people "Odexing to improve performance"
 
I find all my ROMs run better when I ODEX them. The benchmark numbers might not show an increase in performance, but my eye test says otherwise. I've never been a big believer in benchmark numbers to begin with. I judge things on how much smoother scrolling is, how much stutter I get when flipping through home screens or bringing down the notification bar, etc. And they all go smoother when ODEX'd.

For that reason, this 'kid' will continue to ODEX.
 
Upvote 0
I find all my ROMs run better when I ODEX them. The benchmark numbers might not show an increase in performance, but my eye test says otherwise. I've never been a big believer in benchmark numbers to begin with. I judge things on how much smoother scrolling is, how much stutter I get when flipping through home screens or bringing down the notification bar, etc. And they all go smoother when ODEX'd.

For that reason, this 'kid' will continue to ODEX.

This is just like the unthrottle your ally's speed thing. Sure you see more room on your phone but that doesn't mean better performance.

This is one of those things thats just a placebo effect if you ask me.
 
Upvote 0
I was using that as an example to say its a placebo effect people are feeling when odexing, for once can you try to stay on topic?
Hey you surly cat. You brought it up brother.

This is just like the unthrottle your ally's speed thing.
It just shows you using a topic you misunderstood before, to make your point in this topic.

This will be the last you hear from me on what you said. So I guess that opens the door for you to have the last say.

You know what they say about arguing on the Internet and all.
 
Upvote 0
I find all my ROMs run better when I ODEX them. The benchmark numbers might not show an increase in performance, but my eye test says otherwise. I've never been a big believer in benchmark numbers to begin with. I judge things on how much smoother scrolling is, how much stutter I get when flipping through home screens or bringing down the notification bar, etc. And they all go smoother when ODEX'd.

For that reason, this 'kid' will continue to ODEX.

I'm not sure how that would work.

Odexing basically pre-caches the Dalvik bytecode, which usually happens when you boot the phone (For apps that start at system boot), or at first launch of the app.

The only reason you see a couple of things happening faster at first, is because Android doesn't need to build the Dalvik cache for the app. After that, it's the exact same speed, since the dex files are just pre-done bytecode.
 
Upvote 0
I'm not sure how that would work.

Odexing basically pre-caches the Dalvik bytecode, which usually happens when you boot the phone (For apps that start at system boot), or at first launch of the app.

The only reason you see a couple of things happening faster at first, is because Android doesn't need to build the Dalvik cache for the app. After that, it's the exact same speed, since the dex files are just pre-done bytecode.

Maybe so, but as I said, I judge things by the eye test and everything runs smoother to my eyes when ODEX'd.
 
Upvote 0
How do you mathematically quantify love, compassion, or even life? You, sir, are out of reason.

On topic though, only apps that are installed should receive the benefit (if there even is one)

That's easy. Brain scans will show heightened activity from any emotional response. Differing emotional responses show different activity patterns.

I think I may have ODEX'ed my phone inadvertently whilst fiddling around with the scripts... how would I tell / how would I deodex if this is the case?

Look in /system/apps. If you see any files in there with an extension of "dex", you've odexed your phone. If you see none, then you are de-odexed :)
 
Upvote 0
FYI, there are kitchens out there to help with this so you are not forced to run the commands on each file. Also, they import not only Stock and "custom" ROM zips but usually nandroid backups as well. For instance I have a Cliq XT and use the dsixda kitchen and right under the advanced menu it asks if you want to de-odex [or odex I believe] your system/framework [and/or] system/app. Now if you want to try this I would definitely leave system/app un odexed [it changes all the time and as stated before dalvick cache will cover this on boot [even if you blank your dalvick it is re-built on next boot anyways [great for clearing FCs if you are getting a bunch and fix perms does not seem to fix em all], but a little off topic sorry. Anyways the framework on the other hand does not change so if you wanted you could leave it odexed to give a benefitted initial boot as the system would only need to gen byte codes for the apps folder while still not having nearly as many app issues [of course if your themes use framework calls you may still see some of the issues, but hey nandroid backup and test away. Also, this whole my eye is better than a benchmark BS is funny. You are most likely seeing the benefit of not building bytecode, but your phone is really no faster. You just happen to know what you should see with dexing and you are thinking you are seeing a benefit after all that work of getting your ROM and dexing and reading what some folks are saying. Benchmarks on the other hand do not care how much work you put in on your ROM or what the next guy says on the internet it just tests what is there the same way [with in reason come on if there are settings you change then obviously the results change use common sense and don't nit pick please] everytime. and btw who cares if the first boot takes an extra couple min or a boot after a ton of installs if it mmeans my ROM is smaller to save me bandwidth and space and is going to do the SAME THING anyways without adding the extra space dex files do [not much granted but space is space on a mobile platform such as a phone]. It's just like for instance if you need an example if I asked you to count to 30 - 5 times each time you would be off one way or the other prolly by a couple seconds, whereas if you ask a computer to do the samething it MIGHT be off by a mili-second [again this is for nit pickers who will say what about drift [which MOSTLY comes form heavy CPU usage and VERY rarely your crystal [quartz used to count drifts but thats like a mili second every couple years, Basically you get my point and while you may not like it the computer is WAY more accurate in counting and benching than the human eye. Also back to the subject here is example output from dsixda kitchen:


Going into system/framework ...

Trying this version of baksmali/smali:
baksmali-1.2.6.jar
smali-1.2.6.jar


NOW AT FILE 1 OF 18 IN system/framework: am.odex
Disassembling am.odex ...
java -Xmx512m -jar baksmali.jar -d ../framework -x am.odex
Assembling into classes.dex ...
java -Xmx512m -jar smali.jar -o classes.dex out
Found am.jar
Removing am.odex ...
Put classes.dex into am.jar ...
 
Upvote 0
So. To all you kids that think ODEXing improves performance:

I just did a series of benchmarks, timed my startup time, then odexed, after I did the same tests. My results where lower in every aspect. The only reason I included an ODEX script in Velocity was because there was so much buzz about it. I always had my doubts. Also with dalvik2cache you save ABSOLUTELY NO space on data by odexing.



...I got sick of seeing people "Odexing to improve performance"

the only thing ive ever heard on odexing a rom, would improve boot time, when you odex a rom, it caches everything that boots but not anything else; so benchmarks would not show an improvement unless you could bench boot times. so things that are set to boot such as your launcher would show your icons faster, nothing more nothing less. however i could be wrong...
 
Upvote 0
the only thing ive ever heard on odexing a rom, would improve boot time, when you odex a rom, it caches everything that boots but not anything else; so benchmarks would not show an improvement unless you could bench boot times. so things that are set to boot such as your launcher would show your icons faster, nothing more nothing less. however i could be wrong...

An odexed rom stores executable code in /system/app along-side the apk files.
A deodexed rom stores executable code in /data/dalvik-cache.

This is the difference.
It doesnt cache only things that boot - only applications in /system/app are odexed, and all of them are odexed. Basically odexing will rearrange the files among your partitions, allowing you for more space on mtdblock4 and makes it so you dont get force closes when you theme. Its not done for performance.

And I did time my startup speed.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones