• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[SCRIPT] Odex any ROM

Search This thread

OMJ

Recognized Developer / Recognized Contributor
Jun 11, 2007
7,840
15,971
MN
twitter.com
First, thanks to tommytomatoe for creating the awesome dexo script! I have only automated the process. For more info on the dexo script check TT's thread here.

Also, thanks to volk9029 for all the ROM testing, he tested a majority of the ROMs.

In theory, this script will re-odex any completely deodexed ROM, BUT it depends on the modifications the dev has done to their ROM. ie..if framework.jar is missing "preloaded-classes", the script will abort. preloaded-classes is needed for odex ROMs to boot.

Each of the ROMs listed below as "incompatible" have "preloaded-classes" missing from /system/framework/framework.jar. Each of these ROMs would be compatible if framework.jar is modded correctly. For more info see post # 8


Requirements:

-You need to have the HTC usb drivers installed. If you have HTC Sync installed, you're good to go.
-You need to have usb debugging enabled on your phone. Settings, Dev options, usb debugging.

-I recommend doing a backup before running this script (just in case)


Install:

-Extract zip to pc
-Phone must be booted
-connect phone to pc
-run "Odex my ROM.bat"

The script only takes a few minutes, your phone will appear frozen during the process. When the script is done, your phone will reboot.



DOWNLOAD



Compatible ROMs:

-OMJ's
-Superjelly
-meanbean 3.01
-Viper's ROM 3.10
-Hatka LTE ROM
-Digital Bath ROM
-Micromax A75
-Red Line ROM by billbowers



Incompatible ROMs:

-Flex's Stock w/ Goodies
-Tranquility ROM
-Timberwolf671 ROM


These are the only ROMs tested, if you use this script on another ROM, please post your results & I'll update the list.
 
Last edited:

HDRules

Senior Member
Jan 2, 2009
138
54
Rhode Island
Thanks so much for this. I just odexed the new HatkaLTE ROM and it's running great! I had read TT's thread but was a little intimidated by it. Great job automating this!
 

treIII

Senior Member
Jul 10, 2012
3,186
584
Google Pixel 5
Google Pixel 6
This its awesome. Great idea. I knew tommy had made the script, and now you have automated it. Nice work from both of you. Thanks. Any reversal method being designed yet? I suppose do a nandroid before using the script would be best.

Sent from my EVO using xda app-developers app
 

OMJ

Recognized Developer / Recognized Contributor
Jun 11, 2007
7,840
15,971
MN
twitter.com
some good info from TT about the preloaded-classes issue...

tommytomatoe said:
Good stuff :) To bring a little more clarification as to why those rams are in the incompatible list.

"Preloaded-classes gets accidentally compiled into classes.dex by sloppy devs :)

Framework.jar should only be modified using baksmali and smali, never apktool or any other tool.

The bad framework.jar, its classes.dex contains the code and instructions for preloaded-classes already. So when you odex, framework.odex contains preloaded-classes and classes.dex codes - which causes the system not to boot. Odex files should only contain classes.dex code.

How to resolve? Take a fresh framework.jar and baksmali it. Edit it. Then smali. This will ensure preloaded-classes were untouched, as baksmali is smart enough to leave it alone.

Another alternative is to pull classes.dex from fresh framework.jar and baksmali it. Smali when finished and insert back into jar file.

Then, when you odex, framework.jar will contain only preloaded-classes and framework.odex is the optimized classes.dex. "

Of course, autogeeks suggestion works but that is not ideal for the obvious reasons. Mods done to framework.jar would no longer be available, all dependencies on those mods would of course be broken.


...then again, I haven't touched android in a long long time. What do I know :)
 

shahabazas

Senior Member
Jun 5, 2012
370
113
Pune
Thanks for this Script i made my ROM Odexed but few of my app are not working properly may be the problem of the app as there are only few apps like Root Browser opening but not working properly giving forceclose after few clicks when i try to open system it just doesnt open and when i close the app and again try to open system it opens and when i click on app it gives forceclose, Zeam Launcher not showing dock but other then this all are working fine so thanks for the script will try to change the apps which are not working and then check if i still get the problem i think i wont and now i think that i can release my first custom ROM as i was waiting for this Odex script so that i can release the first ROM of mine in Odex version although its a ROM from another developer but i moded it and made compatible with my device thats MICROMAX A75 so will test it fully and once confirmed everything working perfectly then will release it so just wanted to know if i can release the ROM with Odexed version made by your script i will add proper credits in the credit section if you permit me to go ahead. will be waiting for your permission. Once again thanks for your script yaar its just awesome.
 

OMJ

Recognized Developer / Recognized Contributor
Jun 11, 2007
7,840
15,971
MN
twitter.com
Thanks for this Script i made my ROM Odexed but few of my app are not working properly may be the problem of the app as there are only few apps like Root Browser opening but not working properly giving forceclose after few clicks when i try to open system it just doesnt open and when i close the app and again try to open system it opens and when i click on app it gives forceclose, Zeam Launcher not showing dock but other then this all are working fine so thanks for the script will try to change the apps which are not working and then check if i still get the problem i think i wont and now i think that i can release my first custom ROM as i was waiting for this Odex script so that i can release the first ROM of mine in Odex version although its a ROM from another developer but i moded it and made compatible with my device thats MICROMAX A75 so will test it fully and once confirmed everything working perfectly then will release it so just wanted to know if i can release the ROM with Odexed version made by your script i will add proper credits in the credit section if you permit me to go ahead. will be waiting for your permission. Once again thanks for your script yaar its just awesome.

no permission needed, anyone is free is use this script for whatever.....
 

shahabazas

Senior Member
Jun 5, 2012
370
113
Pune
Hey u can add Micromax A75 in the compatible list as i have tried this script on it and its working totally fine no problem at all.

Thanks for this amazing script yaar i was looking for it since past 6months.
 
  • Like
Reactions: OMJ

treIII

Senior Member
Jul 10, 2012
3,186
584
Google Pixel 5
Google Pixel 6
Does this work on aosp rom? I see the list of compatible and incompatible ROMs. Just didn't see if it says sense only. Thanks
I would actually assume not. But i had to ask to see if ianyone has tried

Sent from my Nexus 7 using xda app-developers app
 
Last edited:

OMJ

Recognized Developer / Recognized Contributor
Jun 11, 2007
7,840
15,971
MN
twitter.com
Does this work on aosp rom? I see the list of compatible and incompatible ROMs. Just didn't see if it says sense only. Thanks
I would actually assume not. But i had to ask to see if ianyone has tried

Sent from my Nexus 7 using xda app-developers app

I'm not sure.....all the script does is odex all the deodexed apks in /system/app & /system/framework, and this script is not specific to HTC....you could be the guinea pig :)

do a full backup & give it a try! worst case u restore your backup
 
  • Like
Reactions: volk9029

treIII

Senior Member
Jul 10, 2012
3,186
584
Google Pixel 5
Google Pixel 6
I'm not sure.....all the script does is odex all the deodexed apks in /system/app & /system/framework, and this script is not specific to HTC....you could be the guinea pig :)

do a full backup & give it a try! worst case u restore your backup

Right now. Report back in a few

Sent from my Nexus 7 using xda app-developers app

---------- Post added at 10:08 AM ---------- Previous post was at 09:49 AM ----------

Right now. Report back in a few

Sent from my Nexus 7 using xda app-developers app

I tried. USB debugging enabled. Computer noticed phone immediately and HTC sync popped up so that didnt seem to be the problem. When i tried the odex my rom bat script and it says press any key to continue nothing happened other than the cursor in the command prompt dropping down a line.

Sent from my Nexus 7 using xda app-developers app

---------- Post added at 10:13 AM ---------- Previous post was at 10:08 AM ----------

I just used titanium backup to odex system apps. It had no problem doing that. I know that doesn't involve framework though. If you have any suggestions on anything i might try to get the script to work let me know

Sent from my Nexus 7 using xda app-developers app
 
  • Like
Reactions: OMJ

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    First, thanks to tommytomatoe for creating the awesome dexo script! I have only automated the process. For more info on the dexo script check TT's thread here.

    Also, thanks to volk9029 for all the ROM testing, he tested a majority of the ROMs.

    In theory, this script will re-odex any completely deodexed ROM, BUT it depends on the modifications the dev has done to their ROM. ie..if framework.jar is missing "preloaded-classes", the script will abort. preloaded-classes is needed for odex ROMs to boot.

    Each of the ROMs listed below as "incompatible" have "preloaded-classes" missing from /system/framework/framework.jar. Each of these ROMs would be compatible if framework.jar is modded correctly. For more info see post # 8


    Requirements:

    -You need to have the HTC usb drivers installed. If you have HTC Sync installed, you're good to go.
    -You need to have usb debugging enabled on your phone. Settings, Dev options, usb debugging.

    -I recommend doing a backup before running this script (just in case)


    Install:

    -Extract zip to pc
    -Phone must be booted
    -connect phone to pc
    -run "Odex my ROM.bat"

    The script only takes a few minutes, your phone will appear frozen during the process. When the script is done, your phone will reboot.



    DOWNLOAD



    Compatible ROMs:

    -OMJ's
    -Superjelly
    -meanbean 3.01
    -Viper's ROM 3.10
    -Hatka LTE ROM
    -Digital Bath ROM
    -Micromax A75
    -Red Line ROM by billbowers



    Incompatible ROMs:

    -Flex's Stock w/ Goodies
    -Tranquility ROM
    -Timberwolf671 ROM


    These are the only ROMs tested, if you use this script on another ROM, please post your results & I'll update the list.
    7
    4
    some good info from TT about the preloaded-classes issue...

    tommytomatoe said:
    Good stuff :) To bring a little more clarification as to why those rams are in the incompatible list.

    "Preloaded-classes gets accidentally compiled into classes.dex by sloppy devs :)

    Framework.jar should only be modified using baksmali and smali, never apktool or any other tool.

    The bad framework.jar, its classes.dex contains the code and instructions for preloaded-classes already. So when you odex, framework.odex contains preloaded-classes and classes.dex codes - which causes the system not to boot. Odex files should only contain classes.dex code.

    How to resolve? Take a fresh framework.jar and baksmali it. Edit it. Then smali. This will ensure preloaded-classes were untouched, as baksmali is smart enough to leave it alone.

    Another alternative is to pull classes.dex from fresh framework.jar and baksmali it. Smali when finished and insert back into jar file.

    Then, when you odex, framework.jar will contain only preloaded-classes and framework.odex is the optimized classes.dex. "

    Of course, autogeeks suggestion works but that is not ideal for the obvious reasons. Mods done to framework.jar would no longer be available, all dependencies on those mods would of course be broken.


    ...then again, I haven't touched android in a long long time. What do I know :)
    2
    Awesome job. Thank you.

    Sent from my lair.
    2
    Whats wrong with using titanium backup to odex?

    As titanium backup doesnt odex the framework folder it only odex the apps folder.