I made this shell script to automatize the odexing process and maybe it could be useful to someone else.
It should be universal, but I only tested it on my phone.
It's not to re-odex a deodexed rom, but to make stock roms compatible odexed files from deodexed files.
Some mods won't work (signature issues I think)
How to use it:
Extract the attached zip wherever you want on your phone.
In the same directory of the script 'odexer.sh
' and the directory 'odextools
', make a directory named 'deodexed
' (actually, it's already there). Inside 'deodexed
' create two directories: 'framework
' and 'app
'. Put there your modded files, each in the respective directory.
You need the original stock odexed files (apk and odex) and all the '$BOOTCLASSPATH
' files (see the note below). The script was intended to be used on odexed rom, but I made it adaptable: in the script change the variable 'moddedpath
' with the path to the directory with the original odexed files, each inside 'app
' or 'framework
(you can directly copy '/system/framework/
' and '/system/app/
' from a stock rom if you are too lazy).
(I only tested this script on my odexed stock rom using /system
Here how the directory tree should look like:
You need to run the script as root from 'adb shell
' or 'Terminal emulator'
If you put the script in your vfat formatted sdcard, you won't be able to change its permissions, so, in order to run it, you need to pass its path to 'sh' as argument:
It will create in the same directory a directory named 'odexed-DD-MM-hh.mm.ss
The script will automatically skip files with no odex (framework-res.apk
should be always skipped, I think).
It's important to keep everything in the same place, because I used relative paths in the script.
To see your $BOOTCLASSPATH
files, run from 'adb shell
' or 'Terminal emulator
or open your /init.rc