[HTC Desire S] amidabuddha:
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)​

[YOUTUBE]Y_FmiVhC2Jw[/YOUTUBE]​

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​

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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)

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​

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

Extract the archive in the folder where your fastboot executable is. This is not a flashable zip!​

or

Download 2: b2b_lib_bootimg.zip

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

Extract the archive in the folder where your fastboot executable is. This is not a flashable zip!​

NOTE: 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--)​

Procedure:

# 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)

adb reboot recovery

# 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

adb shell
mkdir /sdcard/system
cp -r /system/lib /sdcard/system

# Clean /system/lib

rm -r /system/lib

# Recreate empty /system/lib and set permissions

mkdir /system/lib
chmod 755 /system/lib

# 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

cp -r /sdcard/system/lib/* /system_lib

# Set permissions to /system/lib

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

# Remove the SDcard /system/lib folder

rm -r /sdcard/system
exit

# Unmount manually /system_lib and /sdcard from the "mounts | storage" menu of the Recovery

# Reboot to bootloader

adb reboot bootloader

# Flash the boot.img and reboot

fastboot erase boot
fastboot flash boot XXX_lib_boot.img
fastboot reboot

Now you can use the tool above without concerns about free space

Enjoy!