PaulOBrien

ODEX script for unodex'd ROMs

34 posts in this topic

This script is posted here by request for those wanting to ODEX non-ODEX ROMs (such as jnwhiteh's excellent 2.1 ROMs).

To use...

- Download and extract this zip

- Push the odex directory you just extracted to the device with 'adb push odex /data/odex/'

- Run the odex script with 'adb shell /data/odex/odex.sh'

The device will reboot (and take a little while to boot as it rebuilds the dalvik-cache).

Job done! :D

Nandroid backup beforehand, use at your own risk etc. etc. :(

NOTE: You cannot apply themes if you use this.

P

PS All manner of nasty messages will appear on screen while this is running, fear not. ;)

0

Share this post


Link to post
Share on other sites

Do you see a significant increase in speed by using this? If so, I may drop it in the ROM and include a simple script or option that will run it =)

0

Share this post


Link to post
Share on other sites

guys... please dont make odex roms for god's sake. making roms odexed will prevent from changing font color and some other theming features. it will make boring roms. just quality isnt everything. we need good face with quality, too.

0

Share this post


Link to post
Share on other sites

jnwhiteh: bro how many ppl reported that your roms are significantly slow? odex files might make change but thats way to small. it wont make a lame horse to a jet plane. your roms are always fast and that fast which is very good usable. so please dont make your roms odexed. cheers

0

Share this post


Link to post
Share on other sites
jnwhiteh: bro how many ppl reported that your roms are significantly slow? odex files might make change but thats way to small. it wont make a lame horse to a jet plane. your roms are always fast and that fast which is very good usable. so please dont make your roms odexed. cheers

I never said it would be on by default. I said it would be an option that people could use.. I fail to see why that would be a problem..

0

Share this post


Link to post
Share on other sites
Do you see a significant increase in speed by using this? If so, I may drop it in the ROM and include a simple script or option that will run it =)

It saves space, as you no longer need all the system apps odex files in dalvik-cache.

P

0

Share this post


Link to post
Share on other sites
guys... please dont make odex roms for god's sake. making roms odexed will prevent from changing font color and some other theming features. it will make boring roms. just quality isnt everything. we need good face with quality, too.

It's reversible with the right tools. I personally don't apply themes, so odexing makes sense for me personally. Each to their own! ;)

P

0

Share this post


Link to post
Share on other sites

Odex'ing isn't about speed per se, it'll save some time on initial boot and save some space.

P

0

Share this post


Link to post
Share on other sites
I never said it would be on by default. I said it would be an option that people could use.. I fail to see why that would be a problem..

if that remains a choice of options on the users then its fine but otherwise many themes will be dishearted and as well as many users. i got at least 20 pm's in xda-dev from users to continue with my editing of clock and date font color but i had to tell them that as mdc 3.0 and upwards are odexed its impossible to change the services.jar.

0

Share this post


Link to post
Share on other sites
Odex'ing isn't about speed per se, it'll save some time on initial boot and save some space.

P

what will you do with that space mate? and boot time...... how much time it will save? 10 secs...... 20 secs.......... does that matter really much? and definitely we dont reboot our phones 10-15 times a day. and max people definitely want to customize their phones with themes, fonts, colors etc.

0

Share this post


Link to post
Share on other sites

You're missing the point Shaon, I don't use themes, so I have my phone odex'd.

P

0

Share this post


Link to post
Share on other sites

What is the difference between the DEX and ODEX?

I get that DEX is the format using by Dalvik VM but what is ODEX then? Is this a more heavily optimised version and does it require an updated Dalvik VM?

Just curious... ;)

Carl.

0

Share this post


Link to post
Share on other sites

An odex is an optimised DEX file which is faster than a regular dex, but it's also to the build on which it is created.

P

0

Share this post


Link to post
Share on other sites

Hi Paul

I've just run the script against my Hero running jnwhiteh's Cyanogen mod v1.0 and the last command before the reboot "rm -rf /data/dalvik-cache/*" failed with the error "rm failed for -rf, Read-only file system".

Should I have done an adb remount prior to running the shell script?

Can I just wipe the dalvik cache via the recovery tool to achieve the same result?

0

Share this post


Link to post
Share on other sites

Heh, I guess the rm command in the stock ROM doesn't support -rf. I'll fix.

Yeah, just wipe your dalvik-cache...

P

0

Share this post


Link to post
Share on other sites

Script update to fix that minor 'rm' issue.

P

0

Share this post


Link to post
Share on other sites
An odex is an optimised DEX file which is faster than a regular dex, but it's also to the build on which it is created.

P

Hi Paul,

Could you point me at some net resources I would appreciate it. Trying to understand the difference between the byte code on dex to odex.

Thanks,

Carl.

Edited by Carl_Brummy
0

Share this post


Link to post
Share on other sites

Hi Paul. Would you maybe be able to complie a deodexed version of your ROM available for those who wish to mod it?

Thanks in advance.

0

Share this post


Link to post
Share on other sites

had to add sh in shell (dunno why, looks like I lost x privilege somewhere in transfer or what), so if someone runs into this, it is: 'adb shell sh /data/odex/odex.sh'

Working fine, boot is faster at least.

0

Share this post


Link to post
Share on other sites

Is this update for MCR 3.2 (Beta 5)? I tried applying it to my Hero (which has Dalvik2SD) and I kept getting FC's constantly.

Thanks.

0

Share this post


Link to post
Share on other sites

Is it possible that some parts of system does not have correct rights for their configs? When I had to reboot, some settings were cleaned (like alarm and wifi passwords). I usually don't reboot, so no hard feelings, but it will be simple to fix it if it is all about filesystem rights.

//close issue ;) on second restart today it is all here..not sure what it was on first boot, but it is ok now.

Edited by vorcigernix
0

Share this post


Link to post
Share on other sites

I see it splits the apk's in /system/app/ into .apk and .odex files... Would it make any sense to do the same to apps in /data/app/ ?

0

Share this post


Link to post
Share on other sites
I see it splits the apk's in /system/app/ into .apk and .odex files... Would it make any sense to do the same to apps in /data/app/ ?

System apps are meant to be odexed (and they are on factory ROMs). It does not apply for other apps...it is worth try, but you should expect some troubles. If you find and report working app, it can be easily added to script.

0

Share this post


Link to post
Share on other sites

Not a good idea, things will break when you update apps.

P

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.