MultiROM Once Again Available for the Galaxy S4

Multiboot, or the ability to select betweenmultiple operating systems on a single device at … more

Build an Impractical But Awesome Lego Mindstorm Dock

The vast majority of what we cover here on the XDA-Developers News Portal relates to … more

MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more
Post Reply

Compcache userinit.sh tutorial for Cyanogen 367

16th July 2009, 07:02 AM   |  #1  
OP Senior Member
Flag 10 5' 59" North, 84 16' 84" West
Thanks Meter: 229
 
1,865 posts
Join Date:Joined: Jun 2008
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, 3316 views)
Last edited by bkmo; 18th July 2009 at 06:51 AM.
16th July 2009, 07:16 AM   |  #2  
Senior Member
Thanks Meter: 0
 
129 posts
Join Date:Joined: Jun 2009
thanks...very helpful tuttorial
16th July 2009, 07:16 AM   |  #3  
Senior Member
Flag Azusa
Thanks Meter: 14
 
205 posts
Join Date:Joined: May 2007
More
Just did the audio push and it moved all 3 folders
16th July 2009, 07:17 AM   |  #4  
DOHCtor's Avatar
Senior Member
Flag Southern California
Thanks Meter: 118
 
1,095 posts
Join Date:Joined: Apr 2009
More
Does this mean we no longer need the linux swap partition?
16th July 2009, 07:20 AM   |  #5  
OP Senior Member
Flag 10 5' 59" North, 84 16' 84" West
Thanks Meter: 229
 
1,865 posts
Join Date:Joined: Jun 2008
Quote:
Originally Posted by DOHCtor

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.
16th July 2009, 07:23 AM   |  #6  
DOHCtor's Avatar
Senior Member
Flag Southern California
Thanks Meter: 118
 
1,095 posts
Join Date:Joined: Apr 2009
More
Quote:
Originally Posted by bkmo

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.
16th July 2009, 07:24 AM   |  #7  
OP Senior Member
Flag 10 5' 59" North, 84 16' 84" West
Thanks Meter: 229
 
1,865 posts
Join Date:Joined: Jun 2008
Quote:
Originally Posted by P_Dub_S

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 ?
16th July 2009, 07:26 AM   |  #8  
endolin's Avatar
Member
Thanks Meter: 8
 
77 posts
Join Date:Joined: Jan 2009
thanks for the tutorial
thanks for the tutorial. one questions remains. how do we disable the sd-swap?
16th July 2009, 07:26 AM   |  #9  
drpfenderson's Avatar
Senior Member
Flag Portland, OR
Thanks Meter: 37
 
730 posts
Join Date:Joined: Oct 2008
More
Thank you so much for this. Seems to be working perfectly on 3.6.7.1. Cheers!
16th July 2009, 07:26 AM   |  #10  
OP Senior Member
Flag 10 5' 59" North, 84 16' 84" West
Thanks Meter: 229
 
1,865 posts
Join Date:Joined: Jun 2008
Quote:
Originally Posted by DOHCtor

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.

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes