[T-Mobile Samsung Galaxy Note II] cobraboy85:
This script will Odex your /system/framework/ directory live while booted into android. You can thank freeza for providing the original boot class path from the s3 when I was initially trying to do this on that platform. Tonight I was bored, and putting together my note II ROM and out of pure curiosity wanted to know if it would work straight across to this device as the framework directories of the two devices have similar contents... apparently the bootclasspath for the two devices are identical otherwise this script wouldn't have executed in the first place. But it did! So here we go. Devs, feel free to place this is in your ROMs as an optional add on. It should be noted that most themes for the UI are not odex compatible, and will cause boot loops if flashed. BUT... you can flash a theme, modifying your framework (as a theme does) THEN run this script :)

This is beneficial for those who flash deodexed ROMs in order to theme. The idea is simple: find your favorite theme/ROM, then optimize it using this script.

Simple instruction, this is easy to do.

Download the attached zip file...

http://db.tt/na11Ma9L

Extract the zip file (the ouput should be a folder named "odex' with some files in it)... place the odex folder it in your /data/local/tmp/ directory with a file explorer such as FX File explorer...

Use said file explorer to give the folder, and all of its file contents FULL read/write/execute permissions and root ownership. This is typically done with a file explorer by long pressing on the folder/file and selecting the appropriate options. With FX long pressing will give you an option for "permissions" select that then change all tabs on the left to say root, and check all boxes for full 0777 perms (this will need to be done individually for each file and folder, you cannot just do it to the folder because it will not change the content's)...

With root explorer you should also be able to figure out this process...

Use said file explorer to mount your /system/ directory as r/w... this is done by simply clicking the green "locked" icon while browsing the /system/ directory with FX File explorer...

with root explorer there is a grey tab at the top of the app window that says "mount as r/w"...

Download terminal emulator from the market and open it up... type the following commands:

su (hit enter and it will ask for root perms... grant it)

Then type:

/data/local/tmp/odex/odex (hit enter, it will do some things you will not be able to read so don't worry about it ;) lol

When it finishes type "reboot" without quotes and hit enter

Done. Profit.

This will work on any deodexed ROM for the note II running 4.1.1

Question: how will this benefit me?

Answer: odexed framework is more efficiently accessed by the CPU thus reducing CPU cycles and saving battery life a tick. Apps/frameworks that are odexed are opened faster, thus performance is improved - smoother UI, etc.

IMPORTANT * * * DO NOT DO THIS IF YOU HAVE ODEXED YOUR /SYSTEM/APP/ DIRECTORY WITH AN APP LIKE TITANIUM BACKUP. UNDO IT, REBOOT, RUN THIS, THEN RE-ODEX /SYSTEM/APP/ ....not doing this will likely cause you to boot loop/lock up at boot. You have been warned.