[Q] Odex vs. Deodex - what's better?

Search This thread

G0belet

Senior Member
Mar 30, 2010
127
36
Nice
Hello,

I was wondering, what are the advantages of deodexing, aside from theming?

I've done some tests with my everyday stock ROM and found an odex ROM was faster. I understand that odex files are basically classes.dex, but specifically made for my platform, Android version and is not compressed, thus accelerating the start times.

I went as far as pushing the system apps updates in /system directly (by hand, I can tell you it gets old fast). But I still had low memory in /data. Then I remembered, automatic odex files are stored in dalvik-cache, and thus, when Maps, which has a very big odex file or so, first starts, even if it's on /system, you end up still needing space in /data to start.

So I searched how I could hand-do these odex files, and came across dexopt-wrapper. I loaded it up on my phone, and started odexing all these system apps that used to be odexed.

All in all, you lose room in /system (because odex+apk is slightly larger than the apk, but you're not supposed to have /system writable anyway), or you lose valuable space in /data, where you could put all your apps.

Basically:
  • I backed up my stuff with Titanium (after cleaning the cache). I was on Geo411m's ROM. I had around 25MB left on my phone.
  • I then reflashed FRG33 from the PASSIMG.zip
  • then updated with the FRG83D OTA (straight from Google, not through update.zip)
  • I updated all system apps through the Market
  • I used rageagainstthecage to shell root, to read the system and data partitions
  • I used dexopt-wrapper to create odex files for all the updated apks I had
  • I pushed everything in /system
  • Finally, I restarted. Before this, I booted Amon-RA's recovery to clear all the user data

I rooted (permanently this time), restored all my apps through Titanium Backup. I had 65 MB left. That's a 40 MB difference, just by odexing.

So now I wonder, knowing I don't plan on theming, is deodexing useful outside of this, and should I give up some space for something that eluded me?

Sorry for the lonnnnnng post :)

Thanks!
 

RogerPodacter

Senior Member
Apr 12, 2010
5,654
425
Los Angeles, CA
i've heard people say there is definitely a performance difference between the two, but i really dont know from personal experience. it probably doesnt matter for general usage...
 

danger-rat

Senior Member
Feb 14, 2010
2,218
316
USA
I believe you're right, deodex takes up more of your internal space, which to me is a problem

Sent from my Nexus One using XDA App
 

kingdragonfly

Member
Jun 27, 2011
21
0
hefei
When I first flash a new rom from recovery the odex rom will start faster,but I cant feel any difference between odex and deodex rom on speed when my defy is on.
 

Jack_R1

Senior Member
Aug 9, 2009
4,362
964
Aside from the first load, deodexed system runs at the same speed as odexed, or with negligible differences (not 100% sure if system-odexed files that are created in Dalvik-cache are the same as .odex that are in the apks).

The disadvantage of deodexed system is extra size of Dalvik-cache. While it can be quite a difference for those using N1's tiny internal space w/o any sort of A2SD solution, it's negligible for those running A2SD or on phones with proper internal memory size.

The advantage of deodexed system is being able to modify the apps themselves, and the framework. In addition to theming, it allows for different kinds of modifications - like trackball wake, or RTL (Hebrew/Arabic) framework patching.


Quite an old thread you managed to dig...
 
  • Like
Reactions: gomangoo

rszasz

Member
Mar 25, 2004
38
7
Napa
I don't know about a 2 year bump, but a 1 year bump to agree that this is a nice simple thread that is exactly what it says on the tin.
 

solberg13

Senior Member
Mar 12, 2014
57
3
Hi

I would like to start automatically my Htc n1 when i put in the charger.

There are some methods on the internet,for some other phones.

Can someone tell me wich and how the folder i must modify?

My phone doesn't start when it's plugged in and take the battery out and put it back(i dont know why).

Sorry to write to you here, but I see you are very good at what you do.
I thought you could help me.

Thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    When I first flash a new rom from recovery the odex rom will start faster,but I cant feel any difference between odex and deodex rom on speed when my defy is on.

    Way to bump a 1.5 years old thread, lol.
    1
    Aside from the first load, deodexed system runs at the same speed as odexed, or with negligible differences (not 100% sure if system-odexed files that are created in Dalvik-cache are the same as .odex that are in the apks).

    The disadvantage of deodexed system is extra size of Dalvik-cache. While it can be quite a difference for those using N1's tiny internal space w/o any sort of A2SD solution, it's negligible for those running A2SD or on phones with proper internal memory size.

    The advantage of deodexed system is being able to modify the apps themselves, and the framework. In addition to theming, it allows for different kinds of modifications - like trackball wake, or RTL (Hebrew/Arabic) framework patching.


    Quite an old thread you managed to dig...
    1
    Way to bump a 1.5 years old thread, lol.

    maybe because you all people tell noobs to serch and don't ask. and when i find 4 years old thread is still very usefull

    Sent from my Nexus 5 using Tapatalk