[T-Mobile Samsung Galaxy Note II] Admiral Sir Manley Power:
“ADMIRAL WILL YOU PLEASE COLOR CODE THAT WALL OF TEXT?” – why yes I will.

GREEN = Informational stuff about what we are doing.

BLUE = Instructions for process

RED = IMPORTANCE, PLEASE DO NOT DISREGARD

BLACK = not too important

PINK = very manly

####################################################################

DISCLAIMER – THIS WILL IMPROVE PERORMANCE (again…lolllll) AND FURTHER AND FARTHER OPTIMIZE YOUR DEVICE, SAVE STORAGE SPACE ON YOUR INTERNAL SD, AND PUT YOUR /SYSTEM/FRAMEWORK DIRECTORY AND ALL CONTENTS ON THE MOST POTENT ANABOLIC STERIODS KNOWN TO MAN. I AM NOT RESPONSIBLE IF/WHEN YOU FINISH READING THIS THREAD YOUR DEVICE RUNS OFF WITH YOUR GIRLFRIEND/WIFE/FAMILY/JOB BECAUSE IT IS NOW MORE “MANLEY” THAN YOU (see wut I did there…manley..rofl…).

####################################################################

Ok on to the serious part….

First, why odex? And what does it mean?

1.Odexing has the following benefits: Saves space in your /data directory, speeds up boot times SLIGHTLY, boosts loading of apps (in this case the apps that compose your framework), zip aligns framework and corresponding .odex files, reduced CPU cycles by optimizing framework.

2.So what is an “odex” file? Android applications similar to zip files. APK stands for “android package” and all of them contain java code, which is the second language in android aside from Linux. This code speaks to the device to execute operations that in turn speak to other system files, then ultimately the kernel, hardware, etc etc etc… we’ll not get into that. Java code is packed into a file within the APK called a “classes.dex” file and this file is parsed (copied) by the dalvik JVM and a cache of the processed classes.dex file is stored in the device’s /data/dalvik-cache directory.

An odex file is basically an already processed version of the classes.dex file that is “execution ready” for Dalvik. When xxxx application is “odexed”, the classes.dex is removed from the APK entirely and the information is converted to an odex file, and stored aside its owner APK (or in this case framework file). So rather than have two copies of the same file, and in different locations, you have one copy of that file, in the same location of the APK, all ready to go, and therefore making it more optimized for access by you – the user.

The benefits of doing this are tremendous! I have been doing this to all of my ROMs since I can remember. This process is detailed, but simple, just read carefully. I outlined the directions as simple and clear as I possibly could :)

On to the fun part>>>>>

FIRST, BEFORE YOU CONTINUE, BEAR IN MIND I DO NOT CURRENTLY HAVE A SCRIPT MADE TO UNDO THIS MOD, ONCE IT IS DONE, IT IS DONE! IT IS SAFE, HOWEVER, JUST FOLLOW DIRECTIONS CAREFULLY!

ALSO, MAKE SURE YOU ALREADY HAVE YOUR FAVORITE THEME INSTALLED! I WILL NOT BE RESPONSIBLE IF YOU APPLY THIS MOD THEN TRY TO FLASH XXXXX THEME AND GET CAUGHT IN A BOOT LOOP BECAUSE YOU COULDN’T DECIDE IF YOU WANTED GREEN OR BLUE BATTERY ICONS THEN CHANGED YOUR MIND ABOUT IT AFTER DOING THIS…..just don’t waste your time posting in this thread if you do that. But if you MUST bother such a story, here is your answer to the problem… “flash your ROM again, no need to wipe data, your device will boot now”############

Instructions:

1.Download Terminal emulator and FX file explorer and FX root add on from market.

2.Download the zip file at the end of this post named “odex.zip” to your device.

3.Open FX file explorer, find the odex.zip file, long press on it and select “open with” then select “Archive Extractor” then hit “extract here”

4.After it is done, you will then find a folder named “odex” in the same location of the downloaded “zip” version. Llong press on that folder and select copy

5.Navigate to the home screen of the FX file app, and select the red system logo (this is the one that allows you to explore as root.

6.Navigate to /data/local/tmp, when you get to tmp, select the icon at the top right corner of the app that says “clipboard” and paste the folder into /data/local/tmp

You should now have a folder there named “odex”

7.Long press on the folder, select “permissions” and check ALL of the 3 boxes for Read, Write, and Exec(ute)… if you have done this successfully the bottom left of that little popup window for setting permissions should say 0777, hit “ok” to commit the changes.

8.Now go into the odex folder, and inside of it repeat step 7 for ALL 5 files. They should all have FULL permissions.

9.After that is done, hit back until you are at the root directory, seeing “System (Root)” at the top of the FX file window with the red box with a # symbol inside of it. You’ll notice as well, the top right corner there is a yellow lock icon, inside a green box. We need that to be red, with an “unlocked” lock icon. Select it, and disregard built in FX file warning about how the world is going to end etc etc etc if you don’t know what you are doing – you know what you are doing, so no worries. If it is already red and “unlocked” then awesome, skip to step 10.

10.Scroll down a bit, and you will see “system” folder, this is your system directory. Go in there, and again make sure we are “red” and “unlocked” in the top right corner. You are a savage animal at this point, on a mission. Your device needs optimizing, disregard doomsday warnings about the T1000 enslaving the human race and how your brother will likely turn into a cylon if you unlock your /system directory (or make it read/writable… which is all this is doing)

NOW! The really fun part. You got your favorite theme? Sweet. Got your odex files all cocked and ready to rock? Check. Got your kids addicted to Teletubbies in case you mess up your ***t and you need like an hour to fix it?!?! Kidding… that won’t happen…

FIRST BEFORE YOU CONTINUE!!!!! PUT YOUR DEVICE INTO AIRPLANE MODE!!!!!!! You do

not

want to get a phone call or something while this script is executing. Interruptions will be rude and unkind… Please follow this instruction, please. For the love of the last terrible terminator movie.

11.Open terminal emulator, and type the following commands WITHOUT the quotes, hitting enter after each line:

“su” (if it asks for super user permission, grant it, obviously, if it doesn’t ask, you have already granted it)

“/data/local/tmp/odex/odex”

About 8.7 seconds later, it should be done, and you will see a little message saying “reboot to recovery and wipe cache and dalvik cache one more time” at the very end.

12.Hold power button, select “reboot options” then “recovery” hit ok, boom. If you don’t have that neat little modification to your android.policy.jar file, then power off, and boot into recovery by holding the volume up, home, and power button. In that order, until you see something on your screen. If you are NOT RUNNING EXT2… meaning you are not running Malicious ROM and/or you have not used my ext2 modificaitons…. Then simply type “reboot recovery” in terminal emulator, hit enter, and skip all the previous crap in “12”… “but then y u no say that first admiral?” … “Don’t question me son, it is for the good of the nation and humanity, and noobs who would read “oh ok reboot recovery BOOM” then they corrupt a file somewhere because of an unclean shutdown and are back at step -1 of this entire instruction which is restoring their backup… if they were pansy enough to make a backup. The admiral is manley, he has no use for backups. But he also knows what to do in case he needs one and doesn’t have one, cadet.”

ALSO IMPORTANT!!!!! Before you wipe dalvik cache again from recovery… if you are running my ext2 modification for /system /data/ and /cache…. MAKE SURE YOU VERIFY “THE BOX” is checked in twrp settings… you know which one I am talking about at this point. lol. It is the “format with yadda yadda rm command”

Wipe dalvik cache from recovery once more, then reboot the device.

DONE! Your ROM is now odexed!

-Admiral

http://db.tt/na11Ma9L