[APP] 'ODEX ME': Odexing deodexed roms for a BOOST IN PERFORMANCE

Search This thread

ArmanUV

Senior Member
Jan 26, 2012
839
220
Grrr. Did you really try before saying these things too?

I am a long time android user, was on i7500, then i9000, had an Asus transformer, and now have a galaxy nexus and transformer prime.

I read the same articles than yours. But you know what, I did my experience though, in reality and with day to day use.

And you know what is my own experience? My devices were all smoother when odexed than when deodexed. Ok?

So please let the users who want to try and have their own experience do their things...

+ +

Sent from my Galaxy Nexus using xda premium

I'm not holding anyone back. I am just inviting everyone to know the true pros and cons of something they are gonna flash on their 500+ phone. If you read the articles and still want to ignore all the technical evidence, then that's your choice.
And no, I didn't try it because i use the black exedus theme and I don't want to worry about messing everything up everytime I want to update it.
And remember stock is odexed and all the roms like aokp are not. Which one is smoother in your experience?
 

flolep

Senior Member
Aug 24, 2010
652
244
I'm not holding anyone back. I am just inviting everyone to know the true pros and cons of something they are gonna flash on their 500+ phone. If you read the articles and still want to ignore all the technical evidence, then that's your choice.
And no, I didn't try it because i use the black exedus theme and I don't want to worry about messing everything up everytime I want to update it.
And remember stock is odexed and all the roms like aokp are not. Which one is smoother in your experience?

AOKP is smoother for sure but the reasons are not about deodexing...

Stock would be even slower if it wasn't odexed...

And AOKP is smoother when odexed.

The pros and cons are in the article I quoted just before.

++
 

frantic912

Senior Member
Jan 22, 2011
141
13
Putrajaya
Can you describe what exact configuration you have in rom control of aokp on status bar and navigation / soft keys so I could try it to see what is the culprit?
(screenshots would be good too...)

now it working..just don't mod transparent status bar, that is the problem before....:thumbup:

Sent from my Galaxy Nexus using Tapatalk
 
  • Like
Reactions: flolep

Mekrel

Senior Member
Apr 20, 2010
374
136
Buckinghamshire
Grrr. Did you really try before saying these things too?

I am a long time android user, was on i7500, then i9000, had an Asus transformer, and now have a galaxy nexus and transformer prime.

I read the same articles than yours. But you know what, I did my experience though, in reality and with day to day use.

And you know what is my own experience? My devices were all smoother when odexed than when deodexed. Ok?

So please let the users who want to try and have their own experience do their things...

+ +

Sent from my Galaxy Nexus using xda premium

It doesn't matter if you're a long time Android user. There are no measurable benefits to having odexed system/app directory apart from boot up time and space.

How do I know? I took Paul's script and amended it to odex the /system/framework directory before odexing the /system/app. The /system/app/ dex files are dependent on the framework files which is why the framework requires odexing before the system/app directory.

Now I can't recall how Paul specifies the bootclass path in his script as I'm at work and do not have the resources to decompile his application, but if he hardcoded the bootclass path into the script; there's a likely hood the app won't be 100% reliable on the Nexus due to the bootclass path most likely being different (especially as they're different versions of Android, with 4.0 being vastly different).

In my script, the bootclass path is hardcoded as there's a strict file sequence that needs to be odexed in order when it comes to odexing the framework. This isn't my latest version either, as I eventually went on to making the script check for deodexed system applications on boot and odexing them.

Warning: Don't use the script on the Galaxy Nexus, it was my script I used on the Galaxy SII
Code:
#!/system/bin/sh

chmod 755 /system/bin/dexopt-wrapper
chmod 755 /system/bin/zip
chmod -R 777 /data/original-framework/*.odex

coreframework="/system/framework/core.jar /system/framework/bouncycastle.jar /system/framework/ext.jar /system/framework/framework.jar /system/framework/android.policy.jar /system/framework/services.jar /system/framework/core-junit.jar"

echo "Odexing /system/framework/*jar files"

for i in $coreframework
do	
	filename=$(basename $i .jar)
	dexopt-wrapper $i /system/framework/$filename.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
	zip -d $i classes.dex
	busybox dd if=/data/original-framework/$filename.odex of=/system/framework/$filename.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
done


for i in /system/framework/*.jar
do
	if [ $i == "/system/framework/core.jar" -o $i == "/system/framework/bouncycastle.jar" -o $i == "/system/framework/ext.jar" -o $i == "/system/framework/framework.jar" -o $i == "/system/framework/android.policy.jar" -o $i == "/system/framework/services.jar" -o $i == "/system/framework/core-junit.jar" ]
		then
			echo "Already odexed in sequence"
		else
			filename=$(basename $i .jar)
			dexopt-wrapper $i /system/framework/$filename.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
			zip -d $i classes.dex
			busybox dd if=/data/original-framework/$filename.odex of=/system/framework/$filename.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
	fi
done

echo "Giving permissions to all *odex files"

chmod -R 777 /system/framework/*.odex

rm -r /data/dalvik-cache/*

I made all my own ROMs for the Galaxy SII and always odexed them but I never experienced a smoother phone, just quicker boot up times and space was never an issue for the Galaxy SII as it had plenty.
 

flolep

Senior Member
Aug 24, 2010
652
244
It doesn't matter if you're a long time Android user. There are no measurable benefits to having odexed system/app directory apart from boot up time and space.

How do I know? I took Paul's script and amended it to odex the /system/framework directory before odexing the /system/app. The /system/app/ dex files are dependent on the framework files which is why the framework requires odexing before the system/app directory.

Now I can't recall how Paul specifies the bootclass path in his script as I'm at work and do not have the resources to decompile his application, but if he hardcoded the bootclass path into the script; there's a likely hood the app won't be 100% reliable on the Nexus due to the bootclass path most likely being different (especially as they're different versions of Android, with 4.0 being vastly different).

In my script, the bootclass path is hardcoded as there's a strict file sequence that needs to be odexed in order when it comes to odexing the framework. This isn't my latest version either, as I eventually went on to making the script check for deodexed system applications on boot and odexing them.

Warning: Don't use the script on the Galaxy Nexus, it was my script I used on the Galaxy SII
Code:
#!/system/bin/sh

chmod 755 /system/bin/dexopt-wrapper
chmod 755 /system/bin/zip
chmod -R 777 /data/original-framework/*.odex

coreframework="/system/framework/core.jar /system/framework/bouncycastle.jar /system/framework/ext.jar /system/framework/framework.jar /system/framework/android.policy.jar /system/framework/services.jar /system/framework/core-junit.jar"

echo "Odexing /system/framework/*jar files"

for i in $coreframework
do	
	filename=$(basename $i .jar)
	dexopt-wrapper $i /system/framework/$filename.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
	zip -d $i classes.dex
	busybox dd if=/data/original-framework/$filename.odex of=/system/framework/$filename.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
done


for i in /system/framework/*.jar
do
	if [ $i == "/system/framework/core.jar" -o $i == "/system/framework/bouncycastle.jar" -o $i == "/system/framework/ext.jar" -o $i == "/system/framework/framework.jar" -o $i == "/system/framework/android.policy.jar" -o $i == "/system/framework/services.jar" -o $i == "/system/framework/core-junit.jar" ]
		then
			echo "Already odexed in sequence"
		else
			filename=$(basename $i .jar)
			dexopt-wrapper $i /system/framework/$filename.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
			zip -d $i classes.dex
			busybox dd if=/data/original-framework/$filename.odex of=/system/framework/$filename.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
	fi
done

echo "Giving permissions to all *odex files"

chmod -R 777 /system/framework/*.odex

rm -r /data/dalvik-cache/*

I made all my own ROMs for the Galaxy SII and always odexed them but I never experienced a smoother phone, just quicker boot up times and space was never an issue for the Galaxy SII as it had plenty.

Thank you for your interesting explanations.
 

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
Grrr. Did you really try before saying these things too?

I am a long time android user, was on i7500, then i9000, had an Asus transformer, and now have a galaxy nexus and transformer prime.

I read the same articles than yours. But you know what, I did my experience though, in reality and with day to day use.

And you know what is my own experience? My devices were all smoother when odexed than when deodexed. Ok?

So please let the users who want to try and have their own experience do their things...

+ +

Sent from my Galaxy Nexus using xda premium


If you can show me technical info on the difference, I will listen. Otherwise, I am just going to keep rolling my eyes. :rolleyes:
 

flolep

Senior Member
Aug 24, 2010
652
244
If you can show me technical info on the difference, I will listen. Otherwise, I am just going to keep rolling my eyes. :rolleyes:

Lol. So keep rolling your eyes :p

It's just a subjective point of view.

My own and sincere feeling, through all the roms I have tried since my first i7500 android device, is that my experience was always smoother when the rom was odexed.

I couldn't even try any other rom on my i9000 if it wasn't odexed.

But before arriving to this conclusion, I tried several deodexed roms...

When I first tried an odexed one, I didn't understand why it was smoother... I just thought it was only the rom I was trying...

But I understood that it was the odex factor when I tried another deodexed one and then another odexed one.

Then I documented myself about that and I saw that other people were convinced about that too.

But for sure I saw the debates about this everywhere.

The only thing I kept about these is that, for myself, and I think for some other people too (that is why I share here my experience), an odexed rom is smoother than a deodexed one.

The link here http://android.stackexchange.com/qu...e-difference-between-odexed-and-deodexed-roms comforts myself in that opinion, and of course it boots more quickly, but I think it is not the only good consequence: I feel that every odexed system app is launching faster, thus, impacting a bit the whole system, as every system app is launched, then killed by lmk, then launched again...etc.

++
 

naerok

Senior Member
Oct 3, 2011
149
103
If any odex fans have a gsm device, check the gsm cm nightly thread. Posted a CM build compiled from source as odexed. Should have proper odexing of both system/app and system/framework
 
  • Like
Reactions: flolep

ArmanUV

Senior Member
Jan 26, 2012
839
220
Lol. So keep rolling your eyes :p

It's just a subjective point of view.

My own and sincere feeling, through all the roms I have tried since my first i7500 android device, is that my experience was always smoother when the rom was odexed.

I couldn't even try any other rom on my i9000 if it wasn't odexed.

But before arriving to this conclusion, I tried several deodexed roms...

When I first tried an odexed one, I didn't understand why it was smoother... I just thought it was only the rom I was trying...

But I understood that it was the odex factor when I tried another deodexed one and then another odexed one.

Then I documented myself about that and I saw that other people were convinced about that too.

But for sure I saw the debates about this everywhere.

The only thing I kept about these is that, for myself, and I think for some other people too (that is why I share here my experience), an odexed rom is smoother than a deodexed one.

The link here http://android.stackexchange.com/qu...e-difference-between-odexed-and-deodexed-roms comforts myself in that opinion, and of course it boots more quickly, but I think it is not the only good consequence: I feel that every odexed system app is launching faster, thus, impacting a bit the whole system, as every system app is launched, then killed by lmk, then launched again...etc.

++

Your source consists of the opinion of one person. All the articles I read about this say the opposite:
http://www.addictivetips.com/mobile/what-is-odex-and-deodex-in-android-complete-guide/
I think what you experience may be a placebo effect. Even if it's real, the disadvantages outweigh the potential benefits.
 

luckylui

Senior Member
Aug 14, 2010
4,556
555
Chi-Town
OnePlus 9 Pro
Odex is faster than deo. If anyone needed to know.
Talk to the main man amikam over at evo land, he will tell you the scoop. ;)
If devs only knew how to theme odex everything be speedy. But not all devs know how to work with tweaking odex cause its more work than deodexed.

Sent from my Galaxy Nexus
 
  • Like
Reactions: flolep

flolep

Senior Member
Aug 24, 2010
652
244
Your source consists of the opinion of one person. All the articles I read about this say the opposite:
http://www.addictivetips.com/mobile/what-is-odex-and-deodex-in-android-complete-guide/
I think what you experience may be a placebo effect. Even if it's real, the disadvantages outweigh the potential benefits.

Well. Always the same old debate :)

I really think it's only subjective and MY point of view is that an odexed rom is smoother than a deodexed one.

There is the same amount of articles for both parts :p

Here are 3 other articles saying odexed roms are smoother... But of course they are not a proof (but your article neither...) :p

http://androidallies.com/2011/11/02/a-quick-lesson-in-android-part-2-odex-and-deodex/

http://modmymobile.com/forums/561-m...dexed-vs-deodexed-odexed-more-responsive.html

http://www.lg-phones.org/lg-android-tips-getting-more-ram-and-faster-responses.html

Sent from my Galaxy Nexus using xda premium
 

luckylui

Senior Member
Aug 14, 2010
4,556
555
Chi-Town
OnePlus 9 Pro
Flo,

No doubt odex is faster. Why do you think everything is odex to begin with..OTAs? ;)
Deodexed is for pretty much easier theming as odex has the speed and even theming, if a dev knows how to work with it.

Aamikam at evo 3D ville started as a deo dev and as time passed, he tested out odex and never returned to deo. Simply because he knew he could theme it and still keep the speed within the system. Check it out over there and read. Odex is super fast and better. It just lacks dev work, like I said cause its a tougher cookie to crack.

Sent from my Galaxy Nexus
 

flolep

Senior Member
Aug 24, 2010
652
244
Flo,

No doubt odex is faster. Why do you think everything is odex to begin with..OTAs? ;)
Deodexed is for pretty much easier theming as odex has the speed and even theming, if a dev knows how to work with it.

Aamikam at evo 3D ville started as a deo dev and as time passed, he tested out odex and never returned to deo. Simply because he knew he could theme it and still keep the speed within the system. Check it out over there and read. Odex is super fast and better. It just lacks dev work, like I said cause its a tougher cookie to crack.

Sent from my Galaxy Nexus

Yep. Totally agree. And don't worry, I already made my mind about that a long time ago :)

I saw several devs in the sgs i9000 development thread that had the same way of evolution :)

The beginning is a deodexed rom, the perfection is an odexed one :p

Sent from my Galaxy Nexus using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 50
    Hello Galaxy Nexus Xda Users!

    Informations:

    Here is a simple apk to odex automatically, easily and securely deodexed roms.

    This apk has been coded by the famous Paul Obrien from Modaco Roms and Forums.

    This guy is just a genious.

    The original apk has been done for Galaxy S II but it works on Galaxy Nexus (tested working). --> Original thread: http://xdaforums.com/showthread.php?t=1215271

    Paul is even using it in his own Galaxy Nexus 4.0.4 Custom Rom here: http://xdaforums.com/showthread.php?t=1487056

    But I tested the apk on other 4.0.3 deodexed roms that you can find in the development section of the Galaxy Nexus and it is working perfectly (Aokp odexed rom is wonderful...)

    Odexing a deodexed rom is giving you a boost in smoothness (you can see it in the launcher or in scrolling through system apps), performance and battery.

    It gives you the flexibility to have a custom rom with modified system, framework and design AND all the tweaks that come with a custom rom in addition to the performance of an odexed stock rom.

    To use it:

    1) make sure you have a custom rooted rom / kernel with init.d support (scripts must be able to run at boot: it is a folder in /system/etc). It is very important or it won't run pre-boot scripts... Thanks to open1your1eyes0 who remarked it.

    You can try this useful application to add init.d support to your ROM / kernel: http://xdaforums.com/showthread.php?t=1933849

    2) make sure that you don't have transparent status bar before odexing or you will loose your bar after odexing... (for AOKP users for example). Thanks to frantic912 who noticed it.

    3) simply put the apk in /system/app folder with a file browser like "Root Explorer" (the folder must be in RW mode to copy the file)

    4) do a nandroid backup in cwm and / or titanium backup of all your apps (even the system ones like Gmail)

    5) then go to the launcher

    6) tap "Odex me"

    7) follow the instructions

    It will:

    1) reboot your phone

    2) odex all the system staying on a black screen or on the Google screen a bit longer than normally (but it's normal)

    3) put a ".odex" file with each app in /system/app

    4) reboot again

    5) go back to home

    --> You will then see your boost in smoothness!

    For people who are not convinced: check that: http://android.stackexchange.com/qu...e-difference-between-odexed-and-deodexed-roms

    To see if it worked:

    - Go to /system/app folder and see if there is a ".odex extension" for each system apk.

    I attached the apk to this thread for ease of use.

    Please write here your tests, opinions, questions, and thank Paul (and me for giving you this info :p) for this wonderful and simple apk.

    P.S. Please read reports from other users in the thread before trying the apk as some users seem to loose their status bar if they set transparency effects or some of them are having "force closes" if the rom they are using is too much themed...

    P.S.2. Pay attention please, as androidphone2012 intelligently noticed, this apk can only odex *.apk files. The system framework is not odexed by it. To odex the framework too, please use the following script instead. It odexes *.apk files and Framework *.jar files too.

    --> http://xdaforums.com/showthread.php?t=2278586

    If you already ran the apk to odex apk files, do not flash that zip: re-flash your ROM, GApps and MODs you're using and then flash the zip.

    For your information, I tested the CM10.1 zip from the thread on my AOKP latest nightly build version and it worked flawlessly.
    2
    FYI, that app can odex only *.apk.


    This Script can also odex *.jar.

    http://xdaforums.com/showthread.php?t=2278586


    If you already ran that app in OP, do not flash that zip. Re-flash the ROM, GApps and MODs you're using and then flash.

    Because the rest jars / the system apps produce dalvik-cache according to the core jar and can be odexed the same way. For the complete odex, we have to take turns "the core jars -> the rest jars and apks".

    Thank you for your contribution, androidphone2012.

    I tested the zip in this thread.

    It worked flawlessly on AOKP latest nightly version so I will update the OP to reflect what you said.
    2
    Disregard previous post...

    Did not have init.d support. Very important or it won't run pre-boot scripts!
    2
    Hello, I tried your application but it does not work ...
    I'm on S3, deodexed stock Rom with siyah kernel 1.8.9, I put the folder init.d in system / etc, I start your application, it asks me to reboot the system odexed, but nothing that password ...
    Have I missed something??

    Thank you in advance for your answer.

    Maybe Siyah kernel doesn't have init.d support... Ask them in the Siyah Kernel thread...

    Or you can try to add init.d support by using this useful application : http://xdaforums.com/showthread.php?t=1933849 (edited OP to add this url)

    ++
    2
    What should I be careful about if I odex my PA ROM???

    Seems to good to be true about better performance. What are the catches of odex??? Please put it in dumby definition please.
    --------------------------------------------------
    If I have helped you.... hit that sexy thanks button. ^_^

    You won't be able to flash anything until you de-odex, that includes new versions of your current ROM and mods.