DISCLAIMER: I am not the author of this tool!
All credits goes to tommytomatoe and you can press thanks in this thread because there is no dedicated thread for DEXO @xda (at least I found none)
All credits goes to tommytomatoe and you can press thanks in this thread because there is no dedicated thread for DEXO @xda (at least I found none)
Because it splits the .apk (app package) into two parts, the .apk and a .odex file. Usually, for the phone to use an app, it has to decompile the .apk and get the parts it needs to run the app. With the odex files, which stands for "Optimized Dex" the startup time is much faster since the phone doesn't have to perform any optimizing at startup/runtime, and because of that, it also uses less CPU power, and thus makes it faster, smoother, and battery life is increased.Why does it give better battery life? Thank you.![]()
OK. So what is this tool?
This tool doesn’t deal with partially odexed ROMs. This tool is for odexing a ROM that is completely DEODEX.
The benefits? Faster boot, smaller imprint on /data/ partition, overall faster feeling
The myths? I can’t theme ODEX! WRONG! You can theme odex just fine! Just use baksmali and smali.
Requirements:
Of the author:
- adb
- Linux, Mac OS X, Windows
- Android device with busybox
- Four minutes of your day
Added by me:
- You have finally settled on a ROM that you want to use for some time without an intention to modify it further
- You will need about 100 MB free space on system (my free space decreased from 160 MB to 96 MB after the completion of the process) To free some you can delete some apps from /system/app or move them to /data/app with a root file explorer (do not forget to set the correct permissions afterwards) or even better: to move your /system/lib folder to the lib partition without reflashing the ROM (see below for details)
- Tested on Fallout 5.0 and Virtuous Infinity 1.35 with my Tweaked3 8.6 kernel. If you are using this it is at your own will and risk
- NOT WORKING on CoolDroid and Sabsa Prime 6.5, probably because they have mixed framework from different Sense versions! Do not do on other similar ROMs only on ones with an original (even modded) framework!
Procedure:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Go here and read carefully. It is basically some adb commands.
Out of respect to the author I will not mirror his link nor the instructions
Out of respect to the author I will not mirror his link nor the instructions
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to free about 120 MB space on /system by moving the lib folder to its dedicated partition without reflashing the ROM
This is only for ICS Sense ROMs. AOSP ROMs have enough free space to run the script without issues. I am not sure about the GB Sense ROMs, but if I remember correct they have enough free space on /system too. (if I am wrong please PM me to add GB Sense boot.img)
orNOTE: your ROM has to be on the same version of the kernel before the procedure, otherwise your WiFi will stop working. Or you will need to download the zip from the kernel thread and copy the modules to /system/lib/modules manually giving them right permissions (644 or -rw-r--r--)
Enjoy!
This is only for ICS Sense ROMs. AOSP ROMs have enough free space to run the script without issues. I am not sure about the GB Sense ROMs, but if I remember correct they have enough free space on /system too. (if I am wrong please PM me to add GB Sense boot.img)
Requirements:
- Bootloader with /system/lib support: 2.xx or 7.xx
- 150 MB free space on your SDcard
- adb drivers installed (link in my signature)
- 4EXT Recovery (or any other recovery that has a menu entry for mounting /system/lib partition)
- good attention while copy/paste the commands from here. One typo will lead to a bootloop
Download Tweaked3: XI_lib_bootimg.zip
md5sum: 1bc1d645b8212cdb2e4e949c6b7b3312
Download Patched: 3089_lib_bootimg.zip
md5sum: f1ae0228eb4057b4e4c4934a1e8a0515
md5sum: 1bc1d645b8212cdb2e4e949c6b7b3312
Download Patched: 3089_lib_bootimg.zip
md5sum: f1ae0228eb4057b4e4c4934a1e8a0515
The zips contain boot images of my Tweaked3 and Patched kernels with /system/lib support (I am not advertising them but this are the files I have ready, you can use a Stock kernel as well). There are 4 of them:
- Sense4_lib_boot.img - for ALL Sense 4 ROMs (except VIrtuous Infinity)
- Sense36_exp_lib_boot.img - for custom Sense 3.6 ROMs with experimental WiFi driver (Experimental kernel)
- Sense36_lib_boot.img - for custom Sense 3.6 ROMs with stock WiFi driver (Stable kernel)
- Virtuous_lib_boot.img - the name speaks for itself
Download 2: b2b_lib_bootimg.zip
md5sum: 4bb4d44506eae5f247b69f9c5663e3a8
md5sum: 4bb4d44506eae5f247b69f9c5663e3a8
The zip contains boot images of my B2B kernel with /system/lib support (I am not advertising it but this are the files I have ready, you can use a Stock kernel as well). There are 2 of them:
- Sense4_lib_boot.img - for ALL Sense 4 ROMs (except VIrtuous Infinity)
- Sense36_lib_boot.img - for custom Sense 3.6 ROMs
Procedure:
Now you can use the tool above without concerns about free space# Connect the device to PC, open Command Prompt (cmd) and browse to the folder where are your adb and fastboot executables are (example: cd C:\android-tools)
# Reboot to Recovery (4EXT recommended)
# Make a Nandroid backup
# Mount manually /system and /sdcard from the "mounts | storage" menu of the Recovery
# Copy the content of /system/lib to the SDcard
# Clean /system/lib
# Recreate empty /system/lib and set permissions
# Unmount manually /system from the "mounts | storage" menu of the Recovery
# Mount manually /system_lib from the "mounts | storage" menu of the Recovery
# Copy the lib contents to /system/lib
# Set permissions to /system/lib
# Remove the SDcard /system/lib folder
# Unmount manually /system_lib and /sdcard from the "mounts | storage" menu of the Recovery
# Reboot to bootloader
# Flash the boot.img and reboot
# Reboot to Recovery (4EXT recommended)
Code:
adb reboot recovery
# Mount manually /system and /sdcard from the "mounts | storage" menu of the Recovery
# Copy the content of /system/lib to the SDcard
Code:
adb shell
mkdir /sdcard/system
cp -r /system/lib /sdcard/system
Code:
rm -r /system/lib
Code:
mkdir /system/lib
chmod 755 /system/lib
# Mount manually /system_lib from the "mounts | storage" menu of the Recovery
# Copy the lib contents to /system/lib
Code:
cp -r /sdcard/system/lib/* /system_lib
Code:
cd /system_lib
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
[I]# Creating symlinks [COLOR=Red]Only for Virtuous Infinity![/COLOR][/I]
ln -s libhtc_ril.so librilswitch.so
cd hw
ln -s copybit.msm8660.so copybit.msm7x30.so
ln -s gralloc.msm8660.so gralloc.msm7x30.so
ln -s lights.msm8660.so lights.msm7x30.so
Code:
rm -r /sdcard/system
exit
# Reboot to bootloader
Code:
adb reboot bootloader
Code:
fastboot erase boot
fastboot flash boot XXX_lib_boot.img
fastboot reboot
Enjoy!
Last edited: