5,594,805 Members 37,200 Now Online
XDA Developers Android and Mobile Development Forum

Compcache userinit.sh tutorial for Cyanogen 367

Tip us?
 
bkmo
Old
(Last edited by bkmo; 18th July 2009 at 06:51 AM.)
#1  
Senior Member - OP
Thanks Meter 230
Posts: 1,865
Join Date: Jun 2008
Location: 10 5' 59" North, 84 16' 84" West
Default Compcache userinit.sh tutorial for Cyanogen 367

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
Attached Files
File Type: txt userinit.sh.txt - [Click for QR Code] (267 Bytes, 3304 views)
ATT HOXL ViperXL Rom
Att S3 747z Rom
Asus Transformer TF101 ARHD 3.4.2 ROM
 
jay22are
Old
#2  
Senior Member
Thanks Meter 0
Posts: 128
Join Date: Jun 2009
thanks...very helpful tuttorial
Phone: T-Mobile G1
Theme: HERO by Nabz
ROM Build: Cyanogen's Mod 3.9.7
Recovery Menu: Cyanogen's Recovery 1.4
Radio: 2.22.19.26I
SPL: Haykuro's SPL
SDCard: 4GB Class 4 500EXT3 COMPCACHE W/ BACKUP AUTO SWAP
 
P_Dub_S
Old
#3  
Senior Member
Thanks Meter 14
Posts: 204
Join Date: May 2007
Location: Azusa
Just did the audio push and it moved all 3 folders
 
DOHCtor
Old
#4  
DOHCtor's Avatar
Senior Member
Thanks Meter 117
Posts: 1,095
Join Date: Apr 2009
Location: Southern California
Does this mean we no longer need the linux swap partition?




T-Mobile G1 - First
MyTouch 3G - Second
Nexus One - Third
Nexus S - Fourth
Galaxy Nexus - Fifth
Nexus 7 - Sixth
Nexus 4 - Seventh
Nexus 5 - Current

I'm a Google Fan
 
bkmo
Old
#5  
Senior Member - OP
Thanks Meter 230
Posts: 1,865
Join Date: Jun 2008
Location: 10 5' 59" North, 84 16' 84" West
Quote:
Originally Posted by DOHCtor View Post
Does this mean we no longer need the linux swap partition?
It is no longer needed. Compcache should work better, but time will tell I guess.
ATT HOXL ViperXL Rom
Att S3 747z Rom
Asus Transformer TF101 ARHD 3.4.2 ROM
 
DOHCtor
Old
#6  
DOHCtor's Avatar
Senior Member
Thanks Meter 117
Posts: 1,095
Join Date: Apr 2009
Location: Southern California
Quote:
Originally Posted by bkmo View Post
It is no longer needed. Compcache should work better, but time will tell I guess.
I'll just leave my linux swap partition there for now then.

I notice when I run #free it shows total swap size around 24mb. With the linux swap, I get 32mb.




T-Mobile G1 - First
MyTouch 3G - Second
Nexus One - Third
Nexus S - Fourth
Galaxy Nexus - Fifth
Nexus 7 - Sixth
Nexus 4 - Seventh
Nexus 5 - Current

I'm a Google Fan
 
bkmo
Old
#7  
Senior Member - OP
Thanks Meter 230
Posts: 1,865
Join Date: Jun 2008
Location: 10 5' 59" North, 84 16' 84" West
Quote:
Originally Posted by P_Dub_S View Post
Just did the audio push and it moved all 3 folders
so you are saying on your sd card you now have:
/system/sd/media with subfolders of ringtones, alarms, notifications, ui ?
ATT HOXL ViperXL Rom
Att S3 747z Rom
Asus Transformer TF101 ARHD 3.4.2 ROM
 
endolin
Old
#8  
endolin's Avatar
Member
Thanks Meter 8
Posts: 77
Join Date: Jan 2009
Default thanks for the tutorial

thanks for the tutorial. one questions remains. how do we disable the sd-swap?
 
drpfenderson
Old
#9  
drpfenderson's Avatar
Senior Member
Thanks Meter 37
Posts: 730
Join Date: Oct 2008
Location: Portland, OR
Thank you so much for this. Seems to be working perfectly on 3.6.7.1. Cheers!
Follow me on the web
:: Phone: Google Nexus 4 - ROM: CyanogenMod 10.1.2 - Recovery: TWRP 2.6.0.0 ::
:: Tablet: Google Nexus 7 2013 - ROM: STOCK - Recovery: TWRP 2.6.0.0 ::
Search, search, search BEFORE posting, please.
 
bkmo
Old
#10  
Senior Member - OP
Thanks Meter 230
Posts: 1,865
Join Date: Jun 2008
Location: 10 5' 59" North, 84 16' 84" West
Quote:
Originally Posted by DOHCtor View Post
I'll just leave my linux swap partition there for now then.

I notice when I run #free it shows total swap size around 24mb. With the linux swap, I get 32mb.
Good, it is working fine then. I believe that the 24mb is pre-compiled by Cyanogen and is not user configurable right now.
ATT HOXL ViperXL Rom
Att S3 747z Rom
Asus Transformer TF101 ARHD 3.4.2 ROM

Tags
compcache, userinit.sh
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...