Nvidia and Robotics w/ Barrett Williams – XDA:DevCon 2014

Robotics continues to dominate our videos from this years XDA:DevCon 2014 in … more

Speed Up Deodexing with JoelDroid Batch Deodexer

Android 5.0 Lollipop brings many under-the-hood changes like changing the default compiler … more

Top 5 Apps for 2014 + Top Xposed Mod of 2014 – XDA TV

Its that time of year where you look back and remember the things that happened … more

NVIDIA SHIELD Tablet Gets Android 5.0.1, OTA Available

The NVIDIA SHIELD Tablet is the latest Android-powered device released by famed GPU … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Compcache userinit.sh tutorial for Cyanogen 367

OP bkmo

16th July 2009, 08: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, 3328 views)
Last edited by bkmo; 18th July 2009 at 07:51 AM.
16th July 2009, 08:16 AM   |  #2  
Senior Member
Thanks Meter: 0
 
129 posts
Join Date:Joined: Jun 2009
thanks...very helpful tuttorial
16th July 2009, 08: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, 08:17 AM   |  #4  
DOHCtor's Avatar
Senior Member
Flag Southern California
Thanks Meter: 122
 
1,105 posts
Join Date:Joined: Apr 2009
More
Does this mean we no longer need the linux swap partition?
16th July 2009, 08: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, 08:23 AM   |  #6  
DOHCtor's Avatar
Senior Member
Flag Southern California
Thanks Meter: 122
 
1,105 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, 08: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, 08: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, 08:26 AM   |  #9  
drpfenderson's Avatar
Senior Member
Flag Portland, OR
Thanks Meter: 37
 
734 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, 08: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