yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] salamt:
I hope these are not too noob questions

Is the default swappiness settings differ in fresh rooms? or it has different default values every time I flash new room?

Also, I was wondering if there is a relation between linux-swap size and swappiness value?
[G1 Android Development] ultra spikey:
What does everyone use for cc_disksize and cc_memlimit?
[G1 Android Development] kingklick:
32= disk size

memlimit= ~18

differs though, those numbers worked best for ME. May be different for YOU.

:D
[G1 Android Development] prince.siraj:
If you also have backing swap enabled then but disksize to 0. Memlimit 18 seems to be the best. Possibly 32 though for hero idk
[G1 Android Development] prince.siraj:
Ooh very nice donut or hero? I would definitely look at that.
[G1 Android Development] prince.siraj:
Excellent question! Yes some roms do not have swap enabled. And the reason for this thread is to make the best overall settings that will work for most people on the most roms as possible... there is no real relationship between swap partition size and unhappiness. Some things work better by using the swap partition more, others less so.
[G1 Android Development] aaronkt:
Wanted to say thanks for this post. I have been bouncing back and forth between Cy's and the Hero mods.

I have currently took your user.conf and enabled swap to 80 with compcache enabled as well. From what i have read around here a lot of people seem to like this.

My question is this. I am a total noob and i really dont like posting since this is a dev forum but how do i verify that this is working as intended? The same way that is in the userinit.sh except change it to reflect user.conf?

"su

sh /system/sd/user.conf -s" ??

thanks a ton.
[G1 Android Development] kingklick:
first I'll answer you. Enter in terminal:

cat /proc/sys/vm/swappiness

that will show your current swappiness

also, you can type in terminal

$su
#free

This will show how much RAM/swap memory you are currently using.

secondly, use either Comp cache with backing or just swap.

comp cache with swap isnt a good thing :)
[G1 Android Development] ultra spikey:
I think I might have to disagree. I know theoretically compcache with a backing swap is the preferred way, but I've tried both, for weeks. It really feels that compcache with linux swap runs smoother, and longer. I can go a week without restarting my phone when using compcache/linux swap. But with compcache/backing swap, after about 40-50 hours, the phone starts to get sluggish.

FYI - 96mb partition. 80 swappiness.
[G1 Android Development] kingklick:
I'm just saying as a generality, its best to pick either CC with backing or swap. Most people tend to agree. thats sweet it worked great for you though :)
[G1 Android Development] prince.siraj:
yes because compcache and backing swap usually handles the swap partition better than compcache and linux swap... although linux swap is usually faster for Hero whereas compcache and backing swap is faster for the donut stuff
[G1 Android Development] Cosine:
thanks man this really helped
[G1 Android Development] kingklick:
GOOD glad I could help :D
[G1 Android Development] skrki:
Hi,

thanks for clearing that up, I was wondering the same thing...

Still, how do we execute

sh /system/bin/userinit.sh -s

I have an idea, cos I saw a validation in this file, which will output an error unless u call it with

sh /system/[B]sd[/B]/userinit.sh -s

So, if we change userinit.sh to override this validation, and set the corresponding paths to /system/bin instead of /system/sd, would it work?

EDIT: Tried this, and posted results...(it works..kinda:) )

Thanks in advance!

Regards,

Srdj
[G1 Android Development] skrki:
Ok, so I thought I'd give it a go..

I changed the third line in userinit.sh to say:

CONF_FILE="/system/bin/user.conf";

Rebooted, and I was able to execute

sh /system/bin/userinit.sh -s

...and got a whole bunch of errors.

Just to be clear at this point, I'm trying this with Modaco's 2.2 Hero port for Sapphire...

Amongst all the errors, here are a few interesting ones:

=== CompCache status ===
CompCache version 0.6+
!!!ERROR Compcache disabled
CompCache: MemLimit (system) 18432(user)
CompCache: BackingSwap (system) /dev/block/mmcblk0p3(user)
!!! Unable to set compcache cc_swappiness to user specific "80"
Current system value is "60"

=== VM status ===
ERROR!!! Set VM: page-cluster - 3(system) 0(user)
Set VM: laptop_mode - 0(system) 0(user)
ERROR!!! Set VM: dirty_expire_centisecs - 3000(system) 4500(user)
ERROR!!! Set VM: dirty_writeback_centisecs - 500(system) 750(user)
Set VM: dirty_background_ratio - 5(system) 5(user)
Set VM: dirty_ratio - 10(system) 10(user)

=== CPU status ===
ERROR!!! Set CPU: scaling_min_freq - 384000(system) 383000(user)
Set CPU: scaling_max_freq - 528000(system) 528000(user)
ERROR!!! Set CPU: sampling_rate - 2000000(system) 3000000(user)
ERROR!!! Set CPU: powersave_bias - 200(system) 0(user)
ERROR!!! Set CPU: up_threshold - 40(system) 30(user)

Just reporting, comments are welcome! :)
[G1 Android Development] skrki:
Hi again,

I made compcache error go away by doing this:

# modprobe ramzswap
modprobe ramzswap
# rzscontrol /dev/block/ramzswap0 --init
rzscontrol /dev/block/ramzswap0 --init
# swapon /dev/block/ramzswap0
swapon /dev/block/ramzswap0

then, "free" gave me this result:

# free
free
total used free shared buffers
Mem: 97928 92644 5284 0 180
Swap: 24476 288 24188
Total: 122404 92932 29472

...and Compcache error I posted above went away, when I ran sh /system/bin/userinit.sh -s.

CPU and VM errors are still there...

Regards
[G1 Android Development] unk2009:
Hey King...We know your busy with the Awesome ROM(It's great work by the way) but I was wondering, are you still going make a how to for NooBs like myself ? I personally like to try dofferent ROM's and when I tried to use Edit user.conf I it wouldn't allow me to do so...(I don't know how to use Notepad++, Iam new at adb, but I'm getting the hang of it....lol) Are there commands to allow me to use adb ? (Im sure there is) could you please post, Thank you for all your hard word and taking time to help n00bs like myself and thanks for the awesome ROM's looking forward to trying more of your work :D
[G1 Android Development] alritewhadeva:
just type "adb" in cmd for a list of commands and their functions. To edit a file with notepad++ right click it and press edit with notepad++
[G1 Android Development] unk2009:
Thank you, thank you,thank you..As always you have been a great help...Thanks to all the members @ XDa, the Devs,and especially Alrite, King, Amon,Drizzy and twisted for your quick responses to all my questions..You guys are Great...
[G1 Android Development] unk2009:
These are the commands that I entered in Terminal and the results

$su

#sh /system/bin/rwsystem

#cp -f sdcard/user.conf /system/bin/user.conf

After doing this command I get... "cp: cannot stat 'sdcard/user.conf' : No such file or directory"

mount -o remount,rw /dev/mtd/mtdblock3 /system

And when I enter this command nothing happens(I entered reboot and it states that reboot not permitted

Maybe this info can be helpful in the future for other users as well as myself...:D
[G1 Android Development] cmsweet21:
after typing the codes in the terminal nothings happen..
[G1 Android Development] kingklick:
lol reboot your phone. nothing "happens"
[G1 Android Development] Godson1227:
I'm really green when it comes to this userinit and user.conf stuff. and everytime I push the script in the first post I get the black htc screen for the slightest thing need help on this subject
[G1 Android Development] no6969el:
Im getting the same thing except the reboot part.. how do i get this to work.. will it not work if its allready done? I am on the 1.6 version of the KINGxkxrom

also if apps 2 sd is on by default, should I see the size of the EXt partion in the SD card option in settings.....like you do on non-hero roms..
[G1 Android Development] kingklick:
Changing the user.conf's on my ROMs isnt necessary

also reboot" command doesnt work on any hero ROM
[G1 Android Development] BrutalHoe:
i need help with my user file i don't know what CC or back swap all i know i use the same CPU settings with setCPU app and that i have 150MB linux swap partition, maybe some1 can PM their user config file so i can play around with it?

Im on KiNgxKxROM Version 1.6
[G1 Android Development] prince.siraj:
ok: these are the optimal settings... just unzip the file onto your desktop and copy it onto your sd card.
[G1 Android Development] akagoffer:
i usually just use vi to edit... makes things easier.
[G1 Android Development] BrutalHoe:
ty prince ill checkit out tmrw kinda drunk rnow lol ty thou hahah every1 gnight lolz
[G1 Android Development] mizceo:
Assitance with using Swapper App and Set CPU App

Good afternoon i just recently rooted my phone and im currently using a hero ROM and and for some crazy reason my internal memory is at 30mb instead of 70MB but i have a 8GiG SD MEMORY CARD but my phone is running extremely slow plus i can hardly do anything because i keep getting the prompt saying internal MEMORY is Full.I've heard pretty good things a bout these 2 apps Swapper and Set CPU App.I would like to know if i can get some advice on how to use the swapper app and the Set CPU app, i don't understand the settings and what to set it to...can any please give me any info on how please and thanks in advance....:)
[G1 Android Development] BrutalHoe:
how do i know it worked lol?

it doesnt give any kind of conformation or anything.....
[G1 Android Development] BrutalHoe:
sounds like u don't have ur sd partitioned properly.... try this http://xdaforums.com/showpost.php?p=4502330&postcount=9228

setCPU info http://www.pokedev.com/setcpu/

Swapper try this http://xdaforums.com/showthread.php?t=483110&highlight=swapper+settings but really i dont think u ned neither of apps if u got a user.conf
[G1 Android Development] Rawdi:
if i put this user.config onto my root sd card and then type in the commends in the terminal, will it make my hero rom faster and smoother? sorry guys im a a bit of a newbie. i am using kings 1.8 rom.
[G1 Android Development] jmon777:
not trying to be jerk but you could of asked in this the thread you started.

and it should unless the rom you are running has it already incorporated into i dont really care for hero roms so i am not in the know of which if any builds have this, but user configs do wonders on cm roms.
[G1 Android Development] Rawdi:
Im am very sorry. please excuse me
[G1 Android Development] largo79:
How do you remove your user.conf? I think I must have done something wrong to it and I keep getting boot screens on Drizzy's Final Hero after I use any app. Thanks in advance.
[G1 Android Development] Joe333x:
Quick question and figured it would be better to post here than making a nerw thread. What is the difference between using user.conf and userinit.sh? Do you use them together or choose to use one or the other?
[G1 Android Development] Joe333x:
So i did a little searching and i think i answered my own question but if someone could confirm i would appreciate it. From what i searched it seems that the userinit.sh just allows you to change your user.conf from the terminal, is this correct?
[G1 Android Development] Grooby97:
you use userinit.sh and user.conf in conjunction. userinit.sh has some default value but you can change those values trough user.conf.
[G1 Android Development] tman7510:
non hero roms have an auto odex and odex apks option in the user.conf. Is there an odex option in kingklicks rom. Can I user the userint.sh 1.5.3 with kingklix 2.0 rom?
[G1 Android Development] Shatterv2:
Help PLEASE!!!!!!!!!

Your new 2.0 ROM is great!

A bit laggy on my 4GB SDHC Class 4

What swap do I need for your ROM and how can i set tht up?

What swappiness do i need for your ROM and how might i set that up?

The Linux swap what is all of this lol.

I am a noob forgive me. :-)

Thank you for helping in making this forum what it is today!
[G1 Android Development] Iman07:
how come every time i edit my user.conf file and restart nothing changes. i check the swappiness via terminal and i even copy the user.conf file back to my sd card to see if the changes are there and they are NOT! im using eugene's hero rom. i bought this new 6class 8gig sd card to play with swappiness and get a better understanding but im getting frustrated at this not working. whats the issue?
[G1 Android Development] acejoker25000:
i found another way to change the user.conf file!

first i would open the .zip and go into system then bin the scroll down to user.conf and open it! scroll to the section u want to change such as compache=0 change the 0 to a 1 to activate it then scroll to linux-swap=1 and change 1 to 0 to deactivate and so on and so forth!! then save the changes and update the archive!!

now u want to resign the .zip update!! i would search the forum for signing zips! it has an easy app that once activated and completed u can right click the .zips to resign them then flash and wa la u have an edited user.conf before u even flash the update!! might not be the easiest way to do things but u dont have to push ne files and also if u have a .conf that u like and has your settings then u can just add it and sign then flash!! kinda long winded but i find this way to be just as easy!! maybe thats just me though!! lol

*edit: search the theme section for Signing Made Easy!! it has the program the lets u sign zips with a right-click
[G1 Android Development] prince.siraj:
yeah... um if you download text edit from the market that's the fastest.
[G1 Android Development] acejoker25000:
lol well thats true to!!! but i go ahead and edit it before i even flash an update!!
[G1 Android Development] SxxxA:
You are making a mistake somewhere.

First, it is a general rule that userinit.sh and user.conf go into /system/bin in Hero ROMs.

Second, in order to successfully copy them there, you have to have your /system mounted as read-write. This can be accomplished by:

adb remount

Third, you have to make sure that your userinit and user.conf are in fact for a Hero, otherwise they won't work. There is a line in each of these files, that checks the location, and generally this location is set to /system/sd, in which case the script userinit.sh will fail, because it needs to be located in /system/bin.

I can't think of anything else right now...

To check if the changes you made are reflected you should do:

cat /system/bin/user.conf

from Linux shell.

Let me know if it worked, and if not, post as many details as you can, i.e. exact steps you took, response from the system, etc.
[G1 Android Development] Iman07:
Thank you so much for those helpful tidbits. I wasnt aware of the location of the files on a hero rom. ok well here is what i did and i think i was doing it correctly the whole time but i was using this command:

cat /proc/sys/vm/swappiness

which was showing me the swappiness for the backswapping cc which was set at 60 (which i never altered). but after using the command you provided to see the actual user.conf file in the terminal:

cat /system/bin/user.conf

it showed that my swappiness was in fact 80! that was the value i set it at but it was never showing up. does this sound like a problem that i would have encountered if i used the command above (the one to check swappiness, not the whole user.conf file)? if so, then i guess i was doing it the right way. ill be sure to use the remounting command next time. maybe that was the fix, not sure. here are my steps just in case:

adb remount
adb shell
su
cp /system/bin/user.conf /sdcard
then i altered the swappiness to 80
cp /sdcard/user.conf /system/bin
reboot
cat /system/bin/user.conf
saw that it was at 80

DONE!

how does that look? as long as it has the changes when i do

cat /system/bin/user.conf

im fine right? thanks again for all your help!
[G1 Android Development] endre_dude:
:|

You guys, this is soooo confusing..:(

some rom chefs say it's best to use compcache and user.conf...others say it's better to just use a 128 Mb linux swap and a 512 Mb ext4

Plus: you say in the first post that user.conf is to just be conveniently placed in the root of the sdcard, and now SxxxA is saying :

"First, it is a general rule that userinit.sh and user.conf go into /system/bin in Hero ROMs."

:| so..what's really best for your 2.2 rom ? keeping in mind that i have a 4 gig class 6 card...

thanks for your time..
[G1 Android Development] bobbybooshay:
^im in the same boat.

i was bored at work today and decided to throw the default user.conf file attached to the OP onto my g1 also using a 4gb class6 card running King's 2.2 hero. bad idea, it made it run worse... so i restored it to the default config via nandroid and it is back to speed.

i was wondering if anyone could inform us of the optimal settings to use on this user.conf file for King's 2.2 Hero on a G1...thanks
[G1 Android Development] SxxxA:
Hi,

From what you wrote, it looks like you are really confused. That's OK though, we all once were!

1. EXT4 is not to be confused with any speed improvements we try to accomplish with these two files. For now, just leave it alone.

2. "Conveniently in the root of the SD card"" means you should just put the user.conf there so you can easily edit it, and easily transfer it to either /system/sd OR /system/bin. This largely depends on which ROM you are using.

I suggest, when you flash a Hero ROM, always check /system/bin for these two files. If you find them, you can pull out the user.conf and edit it. Don't ever touch the userinit.sh (for now:D).

In Cupcake/Donut (Google) builds, the files are to be stored in /system/sd. They aren't initially there (this also depends on the developer), but if you place them there, the system will read them and adjust the settings accordingly.

3. For any Hero ROM (so this applies to King's 2.2 as well) I would make a 96 or 128M swap partition, and activate linux swap on it. Swappiness set to, say 60. However, swappiness that works best for you, depends on how you use your device. If you use fewer apps simultaneously, then set swappiness to a lower number. If you use a relatively large number of apps, then set it higher (up to 80). 60 seems to be the optimal number on Hero, while 40(or less) seems to work well on Donut. Again, this is up to you..the best is to try it, you won't brake anything. ;)

A few general rules (again)...

My recommendation is, from what I have gathered in XDA, and tested myself, either use Compcache with Backing swap, OR just linux swap. Don't mix CC and linux swap. Also, more and more developers are dropping CC, and just going for linux swap. It is up to you, to see what works best on your device.

Finally, always make sure you are using correct userinit.sh script for your chosen ROM. You can not use a Hero script on a Donut build, for example. Usually the dev, or other skilled members provide the script somewhere along the ROM thread.

I hope this helps you, as well as the remaining posts in this thread. You just have to read it carefully. This was my initial reading, and I've learned 90% of what I know from this, and similar threads.

So, I'd like to take this opportunity to thank everyone for sharing useful information :)

Good luck!

I think so! :D
[G1 Android Development] SxxxA:
You didn't need to restore the whole nandroid. Simply delete the files you've put in there - unless you've overwritten them, in which case, don't do that in the future.;)

Don't touch userinit at all, just do an ADB PULL on the user.conf, edit it, then put it back with ADB PUSH.
[G1 Android Development] endre_dude:
Ok, thanks ! it's a good thing it's not absolutely necessary to do the user.conf editing, as it wasn't really something i was keen on :) Especially since i thought i'd have to put it in its place using adb, which is a pain in the arse if you're using win 7, like I am. So..I guess I'll just stick to the setup i have now ( 4 gb class 6 - 128 swap / 512 ext / rest fat 32 ) with kingclick's 2.2
[G1 Android Development] wanthony127:
question on pushing to system

*If your ROM does not support "rwsystem"* use:

mount -o remount,rw /dev/mtd/mtdblock3 /system

CHeErs :cool:[/QUOTE]

Hi im relatively new to working with the terminal and I was trying to enter this command, but when i got to the 3 the terminal emulator on my phone refused to enter in a number. Is there something I am doing wrong?
[G1 Android Development] skrki:
Thats a known issue with terminal emulator. Use better terminal instead, or do the whole thing through adb.
[myTouch 3G, Magic General] ripmeck:
im trying to partition my memory card . its a 8gb class 6 microsd . i did the one click root and got the amon ra recovery . i dont want to use the recovery to partition it because it gives me a 32 swap size and i need a 96. i flashed on there cyanogenmod 4.0.4 for now. i believe i did the adb way the right way . but when i typed in adb shell i get a # sign. then i type in parted /dev/block/mmcblk0 and it says parted: not found. what am i doing wrong? is there any way i can partition it myself?
[myTouch 3G, Magic General] rockin_mod:
The way i do it is the easiest in my opion. U can do it 2 ways. 1 u can install a linux distro and use partition editor and have a bad os too.. Thats what i did. 2 u can just use linux in live mood then use the partition editor that way. Linux partition editor makes any size, and or type. Plus super super easy.
[myTouch 3G, Magic General] dekeijzer:
you can also install a recovery image that can partition your SD. That's what I did. No pc was even needed to partition the card.
[myTouch 3G, Magic General] mt3g:
in the OP he said he doesn't want to use the Amon Ra recovery image to part I'm in the same boat as he is axactly same boat lol I'm watching this thread closely...
[myTouch 3G, Magic General] ripmeck:
ok i found out how to do it. in order for gparted to work in adb you need to be on the recovery console. i have the amon ra. Make sure you have cyanogenmod 4.0.4. then type in adb shell and if you see / # then it worked. then from there gparted worked
[myTouch 3G, Magic General] st0kes:
The best/easiest method is explained here:

http://xdaforums.com/showthread.php?t=535914
[Touch Pro2, Tilt 2 Themes and Apps] zcarman:
I am very interested to see if there is a way to run the VZW Vcast Music service on a TP2. I have read some rumors of people using the Rhapsody to go on the TP2's Memory Card, but I would love a confirmation on this.

I am using Rhapsody on my BB Storm currently and have my TP2 due here Friday.

Anyone?
[Touch Pro2, Tilt 2 Themes and Apps] brent372:
The TP2 is not a VCast capable phone.

I have looked on the Imagio for a CAB file for it, but could not find one.

On that same note, I used to have a Moto Q9m which had VCast Music.

I copied the CAB to my Ozone and although it installed, all I get when I run it is "Connect Error. Request Timed Out."

Sorry...
[Touch Pro2, Tilt 2 Themes and Apps] zcarman:
Actually, the TP2 will sync just fine with Verizon's Rhapsody to Go service, but it does not have the standalone apps for downloading direct to phone or song ID...

So in essence, it works for 90% of the Rhapsody service...
[Touch Pro2, Tilt 2 Themes and Apps] brent372:
Yes, with Rhapsody it will work, but it won't run the VCast Music app / service.
[myTouch 3G, Magic Themes and Wallpapers] SLEZ:
Is it possible for a theme to slow down the actual phone?
[myTouch 3G, Magic Themes and Wallpapers] htcclay:
In my experience sometimes...

But its somewhat expected depending on what's been added or changed.

HTC music for example has a really cool UI but it takes up a bunch of space and it's processor hungry.

New launchers and browsers may cause problems or slow things up a bit as well depending on how stable they are.

In my opinion that is.
[myTouch 3G, Magic Themes and Wallpapers] thfoster:
Here's a question...

Can a theme be applied to the default ROM? I have a G1 which is rooted and running Cyanogen's stable release. But I've been hesitant to flash a new ROM to my new myTouch 3G. In fact I'm pretty happy with the one I've got. But I would like to apply some of the themes out there to it.

I know that themes are ROM-dependent, so I realize I can't just apply ANY old theme to any ROM. Anyone making themes for the default ROM? (Kspec... I'm looking at you...)