Here is a simple tutorial to get compcache ramswap running on the new Cyanogen 3.6.7 rom. Thanks to Cyanogen we now have a functioning swap that is fast and will not cause SSD wear.
Please make sure you have adb installed and functioning before you continue, as this tutorial will utilize adb to push the required files to the phone. Also your sd card should have a 500megish ext(2,3,4) partition as the second partition for this to work.
Download the userinit.sh.txt file attached here then:
Rename it to userinit.sh
create a directory c:\userinit
copy userinit.sh to c:\userinit
open CMD prompt
adb push c:\userinit\userinit.sh /system/sd
adb shell chmod 755 /system/sd/userinit.sh (not sure if needed being safe)
adb shell reboot
( This completes the compcache setup )
++++++++++++++++++++++++++++++++++++++++++++
To see if it is working enter: cat /proc/ramzswap in the terminal console app on the phone. You should have a XX% GoodCompress listed if it is working properly.
Hope this helps a bit. Please correct me if I made mistakes.
edit: re-uploaded the script with swappiness set to 60. You can re-push the new one the same way.
edit: removed media info from post and userinit.sh to simplify things.
edit: the following may help for those unable to get adb working. Make sure you place userinit.sh on the root of your sd (fat32 partition)
in terminal emulator:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/userinit.sh /system/sd
chmod 755 /system/sd/userinit.sh
Please make sure you have adb installed and functioning before you continue, as this tutorial will utilize adb to push the required files to the phone. Also your sd card should have a 500megish ext(2,3,4) partition as the second partition for this to work.
Download the userinit.sh.txt file attached here then:
Rename it to userinit.sh
create a directory c:\userinit
copy userinit.sh to c:\userinit
open CMD prompt
adb push c:\userinit\userinit.sh /system/sd
adb shell chmod 755 /system/sd/userinit.sh (not sure if needed being safe)
adb shell reboot
( This completes the compcache setup )
++++++++++++++++++++++++++++++++++++++++++++
To see if it is working enter: cat /proc/ramzswap in the terminal console app on the phone. You should have a XX% GoodCompress listed if it is working properly.
Hope this helps a bit. Please correct me if I made mistakes.
edit: re-uploaded the script with swappiness set to 60. You can re-push the new one the same way.
edit: removed media info from post and userinit.sh to simplify things.
edit: the following may help for those unable to get adb working. Make sure you place userinit.sh on the root of your sd (fat32 partition)
in terminal emulator:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/userinit.sh /system/sd
chmod 755 /system/sd/userinit.sh
Attachments
Last edited: