[SCRIPT TO ODEX] Universal Odex Script Version 6.4.2 (02-19-2014)(MM-dd-yyyy)

Do you prefer an odexed rom or deodexed rom?


  • Total voters
    360
Search This thread

MatrixDJ96

Senior Member
Nov 9, 2012
1,065
2,502
Genova
Would you like to speed up your rom, more stability, more battery life, no lag to open system app and better ram utilization? Now you can! (Only For Rooted Phone And Deodexed Rom)

IF YOU TRIED AN OLD VERSION AND YOUR PHONE STUCK IN BOOTLOOP, YOU SHOULD DOWNLOAD LAST VERSION AND YOU SHOULD TRY AGAIN

This is possible with my Universal Odex Script Version 6.4.2 created by me (for base I used script dexo from Universal Dexo 3.1).
I worked 8 mounth to modifie and complete this script to make it "Universal" and now I want to share it with you.
The difference between by my script and the orginal is:
- Added Commands To Odex What Do You Want
- You Can Do It Without Computer
- More Universal Than Original
- Very Simple To Use
- This Script Is Supported By Me And I Add New Features On Every Update
- Flashable Zip By Recovery
- All Tools Included In My Zip


What is ODEX and DEODEX?

In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These odex files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applicationsdifficult because a part of the coding has already been extracted to another location before execution.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating theworry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity. So:
Odex = +speed -customization
Deodex = -speed +customization
I think that you like more speed and less customization (less costumization for dev because is to difficult mod an odex file) :) and for this reason you press thank and download my work!

Another explanation is this:

If you odex the rom, you'll have also more space in data (this is important because if you don't have partition ext4 in sdcard, you won't have too free space), increase battery life, more stability and increase perfomance( the Rom is more faster to load system and app) but you can't modifie apk after odex (you can't mod program with classes.dex).
Infact ODEX is an OPTIMIZED-DEX and Android load system and app faster than deodexed (DEOPTIMIZED-DEX) app and system.
When you have a deodex file (a lot of roms are deodexed) you have File.apk in system/app and in data/dalvik-cache system@app@File.apk@classes.dex, but with odex file you have File.apk in system/app and File.odex in system/app


My script DO (it depends by option):
- odex framework
- odex app in system
- odex app in preload (if your phone has preload partition for device like Galaxy S2)
- odex app in data
- remove classes.dex from framework, app in system, app in preload and app in data
- zipalign from app in system, app in preload and app in data
- remove libs from app in system and app in preload because are useless (android wants libs in system/lib not in the apk) to make more free space to odex
- delete dalvik of system, of preload, of data and of framework from data/dalvik-cache


How to odex:
- download file
- go to recovery
- install zip
- reboot
- open terminal emulator (will be installed automaticaly)
- type su to obtain root permission
- type dexo -h to show possible commands for your phone
- type dexo -one of the option that you have decided


Type 'dexo -(one of the option that you have decided) -log' to create a log on sdcard

Command For Dexo:
+ dexo -bs (odex only boot file, bootstrap, of framework)
+ dexo -fr (odex all framework)
+ dexo -csa (odex only specific app in system
+ dexo -sys (odex all app in system)
+ dexo -fcs (odex all framework and specific app in system)
+ dexo -pa (odex preload partition)
+ dexo -cpa (odex only specific app in preload
+ dexo -all (odex all rom) (bootstrap, framework, system, preload) (NOT DATA!)
+ dexo -dat (odex app in data)

To Use dexo -csa and dexo -fcs you must create a file called csa.txt in your sdcard
In this file you write the name of apk that you want to odex, like this:
Phone.apk Browser.apk Mms.apk Dialer.apk


To Use dexo -cpa you must create a file called cpa.txt in your sdcard
In this file you write the name of apk that you want to odex, like this:
Browser.apk Mms.apk Gmail.apk Vending.apk


IMPORTANT TO ODEX YOUR ROM
To Odex Bootstrap (Command 'dexo -bs') You Must Have At Least 10% Of Free Space In System.
To Odex Framework (Command 'dexo -fr') You Must Have At Least 15% Of Free Space In System.
To Odex System Apps (Command 'dexo -sys') You Must Have At Least 20% Of Free Space In System.
To Odex Preload Apps (Command 'dexo -pa') You Must Have At Least 25% Of Free Space In Preload.

For More Info Contact Me By Email: mattyro96@gmail.com


WORKING IN ALL ROM (Froyo, GingerBread, IceCreamSandwich and JellyBean) NOT KITKAT
AOSP
AOKP
CM
PA
PAC
BASE STOCK
ALL!


Changelog:
Universal Odex Version 6.4.2
- Fixed Minor Bug
----------------------------------
Universal Odex Version 6.4.1
- Fixed Bugs Of V6.4
----------------------------------
Universal Odex Version 6.4
- Important Update
- Updated Terminal Emulator
- Remove Possibility To Odex KitKat
- Added Script To Remove Useless Odex In Data/App
----------------------------------
Universal Odex Version 6.3.1
- Minor Bugs Fixed
- CSA Fixed
- Skip Odex Of Jkay Deluxe Settings
----------------------------------
Universal Odex Version 6.3
- A Lot Of Bugs Fixed
----------------------------------
Universal Odex Version 6.2
- Added 1 New Command To Odex Your Rom
> Now You Can Odex:
+ Only Specific Preload Apps ('dexo -cpa')
----------------------------------
Universal Odex Version 6.1 Private
- Fixed Minor Bug
- Rewritten Script
- Changed Command 'dexo -psa' In 'dexo -pa'
----------------------------------
Universal Odex Version 6.0 Private
- Added Controll Of Free Space In System
- Added New Command To Activate Log
> Type 'dexo -(one of the option that you have decided) -log'
----------------------------------
Universal Odex Version 5.2 Private
- Removed 'fixbox' Script Because Now There Aren't Necessary Symlink Of BusyBox
- Added Check Of Root Permission
- Updated Command 'dexo -all' To Odex Also Preload Apps
----------------------------------
Universal Odex Version 5.1
- Fixed Bug Of Odex System And Preload
----------------------------------
Universal Odex Version 5.0
- Added 1 New Command To Odex Your Rom
> Now You Can Odex:
+ Only Preload Apps ('dexo -psa') (if your phone has preload partition)
- Skipped Odex Of RootExplorer If Is Installed In System Or Preload Or Data (beacause old version can't be odexed and i prefer old version)
- Fixed A Lot Of Bug
- Changed A Little Bit The Interface
- More Universal Now
- Add New Script (Type 'fixbox') To Fix Error Of Busybox (Like clear: not found)
----------------------------------
Universal Odex Version 4.2.3
- Added 1 New Command To Odex Your Rom
> Now You Can Odex:
+ App In Data ('dexo -dat')
----------------------------------
Universal Odex Version 4.2.2
- Fixed Grep Of 'dexo -csa' And 'dexo -fcs'
----------------------------------
Universal Odex Version 4.2.1
- Fixed Bug Of Commands 'dexo -csa' And 'dexo -fcs'
----------------------------------
Universal Odex Version 4.2 Beta
- Added 2 New Command To Odex Your Rom
> Now You Can Odex:
+ Only Specific App ('dexo -csa')
+ Framework With Specific App ('dexo -fcs')
----------------------------------
Universal Odex Version 4.1.3
- Fixed BootLoop On Device Like Galaxy S2 (Fixed Permission)
----------------------------------
Universal Odex Version 4.1.2
- Updated Android Terminal Emulator
----------------------------------
Universal Odex Version 4.1.1.1
- More Compatible
----------------------------------
Universal Odex Version 4.1.1
- Fixed Remove Temp File
- Fixed Zipalign For ICS And JB
- System Now Is Mounted By Busybox
- Add Info For Android JB 4.3 And KLP 5.0
- System Apps Now Have The BCP For Odex
----------------------------------
Universal Odex Version 4.0.1
- Edited Script To Fix Some Words
----------------------------------
Universal Odex Version 4.0
- Added 4 New Command To Odex Your Rom:
> Now You Can Odex:
+ Only Bootstrap ('dexo -bs')
+ Bootstrap and Framework ('dexo -fr')
+ Only System Apps ('dexo -sys')
+ All Rom ('dexo -all')


To Devs
If you want to use this script to odex your ROM, please give me credit in your ROM thread.
Thanks for the cooperation


Credits:
- Tommy Nguyen (For Universal Dexo Version 3.1)
- @MatrixDJ96 (Creator Of Universal Odex Version 6.2)
- MrTony68 (Beta Tester)
- @angel.sea (For Support)
- You (For Your Download)

Download link:
Universal Odex Script

++++++++++++++++++++++++++++++++++++++++++++++++

ENJOY WITH MORE STABILITY, SPEED AND BATTERY LIFE!!!

Please, Give Me A Thank If You Like My Work And Give Feedback About Odex


By MatrixDJ96
 
Last edited:

MatrixDJ96

Senior Member
Nov 9, 2012
1,065
2,502
Genova
Important
During the odexing process some apps will go in force close. It's normal
After reboot you can lost widget and google account. It's normal
 

Attachments

  • uploadfromtaptalk1375493918556.jpg
    uploadfromtaptalk1375493918556.jpg
    20.1 KB · Views: 12,278
Last edited:

UnitedOceanic

Senior Member
Nov 14, 2010
342
118
i tried you tool today. It was scary to see all the apps force close.

Is it possible to run the the tool in TWRP?

I have two feature requests.

#1 create a log file

#2 since a system app need its libraries in /system/libs we can remove them from the apk. doing this will give even more free space. as far as i know there is only one app (titanium backup) that breaks when removing the libs.
 

eryzerz

Senior Member
Aug 14, 2012
532
373
Success fully odexed my galaxy wonder. Its really give me more ram free. Without side effect!:D

Sent from my GT-I8150 using xda premium
 

MatrixDJ96

Senior Member
Nov 9, 2012
1,065
2,502
Genova
i tried you tool today. It was scary to see all the apps force close.

Is it possible to run the the tool in TWRP?

I have two feature requests.

#1 create a log file

#2 since a system app need its libraries in /system/libs we can remove them from the apk. doing this will give even more free space. as far as i know there is only one app (titanium backup) that breaks when removing the libs.

Yes I think that you can do it in TWRP and... Fantatics Ideas!! Remove lib :) i add this in new version
Ps:in v6 i add checking for root permission, checking free space in system and add log.. Now I'm testing and in a few days i share it with you
 

Natedog1

Senior Member
Mar 6, 2009
325
129
Google Pixel 6 Pro
How long does it take to boot after odexing all? Mine sat about the boot animation for 10-15 minutes before I restored a nandroid.

Sent from my SPH-L900 using xda premium
 

will_chrome

Senior Member
Oct 9, 2012
204
23
Bandung
sorry just download your zip file. but when I try to install it rhough normal reovery, it always show install aborted (both enable and disable signature). maybe I miss something?

my ROM is 4.1.2 odex and AOSP. thanks
 

jasonkhoo87

Senior Member
Feb 14, 2011
428
22
in odex rom, no more dalvik cache but it will have odex file for each apps. i wonder where will the odex store? can it be move to somewhere else?

Because i using sd2ext and my dalvik cache already move to ext partition.
 

MatrixDJ96

Senior Member
Nov 9, 2012
1,065
2,502
Genova
in odex rom, no more dalvik cache but it will have odex file for each apps. i wonder where will the odex store? can it be move to somewhere else?

Because i using sd2ext and my dalvik cache already move to ext partition.

When you have a deodex app in system you have:
/system/app/Phone.apk
/data/dalvik-cache/system@app@Phone.apk@classes.dex

When you have odexed app in system you have:
/system/app/Phone.apk
/system/app/Phone.odex

So you mustn't change location of odex file because if you moved odex file in sd-ext (manually with symlink) you'd lose the benefit of odex (no more speed)
 

jasonkhoo87

Senior Member
Feb 14, 2011
428
22
When you have a deodex app in system you have:
/system/app/Phone.apk
/data/dalvik-cache/system@app@Phone.apk@classes.dex

When you have odexed app in system you have:
/system/app/Phone.apk
/system/app/Phone.odex

So you mustn't change location of odex file because if you moved odex file in sd-ext (manually with symlink) you'd lose the benefit of odex (no more speed)

Now i understand, i think for now its very risky for me.. because i have a lot of apps, worry that when i convert to odex, my internal cannot support all odex files put inside same partition...
 
  • Like
Reactions: bloodraven174

noellenchris

Inactive Recognized Developer / Retired Moderator
May 11, 2007
2,604
890
Marlton, NJ
Thanks, ran the script on my old Frosty GN2 rom with xposed framework and it worked great. I did the dexo -all, do I still need to do the -dat option? Thanks again.

Noellenchris

EDIT: I see after browsing the file system that I will need to do the dexo -dat also as they are not odex'd. I will give this a shot as well and see how it goes. Still seems nice, it did update my apps on 2nd boot as well, wonder if it will keep doing that on each reboot.
 
Last edited:

Simone

Senior Member
Jan 7, 2012
1,895
773
Hi,

So basically, I just used the dexo -all to Odex all of the following options?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 386
    Would you like to speed up your rom, more stability, more battery life, no lag to open system app and better ram utilization? Now you can! (Only For Rooted Phone And Deodexed Rom)

    IF YOU TRIED AN OLD VERSION AND YOUR PHONE STUCK IN BOOTLOOP, YOU SHOULD DOWNLOAD LAST VERSION AND YOU SHOULD TRY AGAIN

    This is possible with my Universal Odex Script Version 6.4.2 created by me (for base I used script dexo from Universal Dexo 3.1).
    I worked 8 mounth to modifie and complete this script to make it "Universal" and now I want to share it with you.
    The difference between by my script and the orginal is:
    - Added Commands To Odex What Do You Want
    - You Can Do It Without Computer
    - More Universal Than Original
    - Very Simple To Use
    - This Script Is Supported By Me And I Add New Features On Every Update
    - Flashable Zip By Recovery
    - All Tools Included In My Zip


    What is ODEX and DEODEX?

    In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These odex files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applicationsdifficult because a part of the coding has already been extracted to another location before execution.
    THEN COMES DEODEX
    Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating theworry of a modified APK conflicting with some separate odexed parts.
    In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity. So:
    Odex = +speed -customization
    Deodex = -speed +customization
    I think that you like more speed and less customization (less costumization for dev because is to difficult mod an odex file) :) and for this reason you press thank and download my work!

    Another explanation is this:

    If you odex the rom, you'll have also more space in data (this is important because if you don't have partition ext4 in sdcard, you won't have too free space), increase battery life, more stability and increase perfomance( the Rom is more faster to load system and app) but you can't modifie apk after odex (you can't mod program with classes.dex).
    Infact ODEX is an OPTIMIZED-DEX and Android load system and app faster than deodexed (DEOPTIMIZED-DEX) app and system.
    When you have a deodex file (a lot of roms are deodexed) you have File.apk in system/app and in data/dalvik-cache system@app@File.apk@classes.dex, but with odex file you have File.apk in system/app and File.odex in system/app


    My script DO (it depends by option):
    - odex framework
    - odex app in system
    - odex app in preload (if your phone has preload partition for device like Galaxy S2)
    - odex app in data
    - remove classes.dex from framework, app in system, app in preload and app in data
    - zipalign from app in system, app in preload and app in data
    - remove libs from app in system and app in preload because are useless (android wants libs in system/lib not in the apk) to make more free space to odex
    - delete dalvik of system, of preload, of data and of framework from data/dalvik-cache


    How to odex:
    - download file
    - go to recovery
    - install zip
    - reboot
    - open terminal emulator (will be installed automaticaly)
    - type su to obtain root permission
    - type dexo -h to show possible commands for your phone
    - type dexo -one of the option that you have decided


    Type 'dexo -(one of the option that you have decided) -log' to create a log on sdcard

    Command For Dexo:
    + dexo -bs (odex only boot file, bootstrap, of framework)
    + dexo -fr (odex all framework)
    + dexo -csa (odex only specific app in system
    + dexo -sys (odex all app in system)
    + dexo -fcs (odex all framework and specific app in system)
    + dexo -pa (odex preload partition)
    + dexo -cpa (odex only specific app in preload
    + dexo -all (odex all rom) (bootstrap, framework, system, preload) (NOT DATA!)
    + dexo -dat (odex app in data)

    To Use dexo -csa and dexo -fcs you must create a file called csa.txt in your sdcard
    In this file you write the name of apk that you want to odex, like this:
    Phone.apk Browser.apk Mms.apk Dialer.apk


    To Use dexo -cpa you must create a file called cpa.txt in your sdcard
    In this file you write the name of apk that you want to odex, like this:
    Browser.apk Mms.apk Gmail.apk Vending.apk


    IMPORTANT TO ODEX YOUR ROM
    To Odex Bootstrap (Command 'dexo -bs') You Must Have At Least 10% Of Free Space In System.
    To Odex Framework (Command 'dexo -fr') You Must Have At Least 15% Of Free Space In System.
    To Odex System Apps (Command 'dexo -sys') You Must Have At Least 20% Of Free Space In System.
    To Odex Preload Apps (Command 'dexo -pa') You Must Have At Least 25% Of Free Space In Preload.

    For More Info Contact Me By Email: mattyro96@gmail.com


    WORKING IN ALL ROM (Froyo, GingerBread, IceCreamSandwich and JellyBean) NOT KITKAT
    AOSP
    AOKP
    CM
    PA
    PAC
    BASE STOCK
    ALL!


    Changelog:
    Universal Odex Version 6.4.2
    - Fixed Minor Bug
    ----------------------------------
    Universal Odex Version 6.4.1
    - Fixed Bugs Of V6.4
    ----------------------------------
    Universal Odex Version 6.4
    - Important Update
    - Updated Terminal Emulator
    - Remove Possibility To Odex KitKat
    - Added Script To Remove Useless Odex In Data/App
    ----------------------------------
    Universal Odex Version 6.3.1
    - Minor Bugs Fixed
    - CSA Fixed
    - Skip Odex Of Jkay Deluxe Settings
    ----------------------------------
    Universal Odex Version 6.3
    - A Lot Of Bugs Fixed
    ----------------------------------
    Universal Odex Version 6.2
    - Added 1 New Command To Odex Your Rom
    > Now You Can Odex:
    + Only Specific Preload Apps ('dexo -cpa')
    ----------------------------------
    Universal Odex Version 6.1 Private
    - Fixed Minor Bug
    - Rewritten Script
    - Changed Command 'dexo -psa' In 'dexo -pa'
    ----------------------------------
    Universal Odex Version 6.0 Private
    - Added Controll Of Free Space In System
    - Added New Command To Activate Log
    > Type 'dexo -(one of the option that you have decided) -log'
    ----------------------------------
    Universal Odex Version 5.2 Private
    - Removed 'fixbox' Script Because Now There Aren't Necessary Symlink Of BusyBox
    - Added Check Of Root Permission
    - Updated Command 'dexo -all' To Odex Also Preload Apps
    ----------------------------------
    Universal Odex Version 5.1
    - Fixed Bug Of Odex System And Preload
    ----------------------------------
    Universal Odex Version 5.0
    - Added 1 New Command To Odex Your Rom
    > Now You Can Odex:
    + Only Preload Apps ('dexo -psa') (if your phone has preload partition)
    - Skipped Odex Of RootExplorer If Is Installed In System Or Preload Or Data (beacause old version can't be odexed and i prefer old version)
    - Fixed A Lot Of Bug
    - Changed A Little Bit The Interface
    - More Universal Now
    - Add New Script (Type 'fixbox') To Fix Error Of Busybox (Like clear: not found)
    ----------------------------------
    Universal Odex Version 4.2.3
    - Added 1 New Command To Odex Your Rom
    > Now You Can Odex:
    + App In Data ('dexo -dat')
    ----------------------------------
    Universal Odex Version 4.2.2
    - Fixed Grep Of 'dexo -csa' And 'dexo -fcs'
    ----------------------------------
    Universal Odex Version 4.2.1
    - Fixed Bug Of Commands 'dexo -csa' And 'dexo -fcs'
    ----------------------------------
    Universal Odex Version 4.2 Beta
    - Added 2 New Command To Odex Your Rom
    > Now You Can Odex:
    + Only Specific App ('dexo -csa')
    + Framework With Specific App ('dexo -fcs')
    ----------------------------------
    Universal Odex Version 4.1.3
    - Fixed BootLoop On Device Like Galaxy S2 (Fixed Permission)
    ----------------------------------
    Universal Odex Version 4.1.2
    - Updated Android Terminal Emulator
    ----------------------------------
    Universal Odex Version 4.1.1.1
    - More Compatible
    ----------------------------------
    Universal Odex Version 4.1.1
    - Fixed Remove Temp File
    - Fixed Zipalign For ICS And JB
    - System Now Is Mounted By Busybox
    - Add Info For Android JB 4.3 And KLP 5.0
    - System Apps Now Have The BCP For Odex
    ----------------------------------
    Universal Odex Version 4.0.1
    - Edited Script To Fix Some Words
    ----------------------------------
    Universal Odex Version 4.0
    - Added 4 New Command To Odex Your Rom:
    > Now You Can Odex:
    + Only Bootstrap ('dexo -bs')
    + Bootstrap and Framework ('dexo -fr')
    + Only System Apps ('dexo -sys')
    + All Rom ('dexo -all')


    To Devs
    If you want to use this script to odex your ROM, please give me credit in your ROM thread.
    Thanks for the cooperation


    Credits:
    - Tommy Nguyen (For Universal Dexo Version 3.1)
    - @MatrixDJ96 (Creator Of Universal Odex Version 6.2)
    - MrTony68 (Beta Tester)
    - @angel.sea (For Support)
    - You (For Your Download)

    Download link:
    Universal Odex Script

    ++++++++++++++++++++++++++++++++++++++++++++++++

    ENJOY WITH MORE STABILITY, SPEED AND BATTERY LIFE!!!

    Please, Give Me A Thank If You Like My Work And Give Feedback About Odex


    By MatrixDJ96
    43
    Important
    During the odexing process some apps will go in force close. It's normal
    After reboot you can lost widget and google account. It's normal
    31
    9
    Await version 6.4 for support of kitkat
    8
    i tried you tool today. It was scary to see all the apps force close.

    Is it possible to run the the tool in TWRP?

    I have two feature requests.

    #1 create a log file

    #2 since a system app need its libraries in /system/libs we can remove them from the apk. doing this will give even more free space. as far as i know there is only one app (titanium backup) that breaks when removing the libs.

    Yes I think that you can do it in TWRP and... Fantatics Ideas!! Remove lib :) i add this in new version
    Ps:in v6 i add checking for root permission, checking free space in system and add log.. Now I'm testing and in a few days i share it with you