Question regarding SWAP - G1 Q&A, Help & Troubleshooting

I've heard a lot that using swap will eventually kill your sd card no matter what. Is that true ? I am currently using Cyanogen Mod 4.0.4 with 32Mb swap. I flashed JAC's hero yesterday, but reflashed the CM just after an hour cuz it was freaking SLOW. Can anyone tell me another way to speed it up ? I dun wanna reformat the entire SD card to get a bigger SWAP size or change the swappiness since they are very tiring and confusing. I would be glad if someone could show me a detailed tutorial on how to modify all the stuffs about swap like swappiness, compcache with swap, with backing swap,... ( this is really confusing ). Thanks in advance

Ok well you will most likely need to repartition to increase your swap size if you wannas go hero, I would do a 96mb swap. If you need a guide on doing that lemme know but if you did it once it's the same thing again, just change the numbers a bit to allow for a 96mb linuw-swap. Now for changing swappiness the easiest way I think is to goto Terminal Emulator and type: echo 60 > /proc/sys/vm/swappiness
That will give you a swappiness of 60, I would go with 80 or 100 though as it will speed up hero quite a bit. As for killing your sd, don't worry about it cuz it will take over a year and by then I doubt you will have the same phone or sd, and eve if you do it doesn't kill your sd it just shrinks it's maximum size, slowly.
Anything else fire away.

An sdcard can only take some much read/write cycles so eventually it will start corrupting sectors of your sd but it would prob be a long time before you would notice, sd cards are cheap and will be cheaper by the time you wear out your card, as for repartioning, you can use parted in the recovery manager, I do not have the commands for it but if you look in a few posts here, this has been covered a couple times this past week

Hey codani, long time no see, I would stay and chat but I going to play some poker, it was pushed back and I have to get going
Gridlock for president 2016!!!!!!!!!!!!

kitten time mofo

Thanks guys, for all the information. My only last concern is how to change the swap's type, I mean like swap with backing up, compcache with swap, etc
Thanks again.

Well for hero I don;t think you need to bother with anything besides a linux-swap, and honestly I have never tried anything but that myself so if you are really interested in it I would say wait for someone who knows more about backing swap and compcache to reply.
Try a 96mb linux-swap with 100 swappiness and see how that does. Oh btw when you do terminal emulator and adjust the swappiness make sure yout type su and hit enter first.

crpercodani said:
Ok well you will most likely need to repartition to increase your swap size if you wannas go hero, I would do a 96mb swap. If you need a guide on doing that lemme know but if you did it once it's the same thing again, just change the numbers a bit to allow for a 96mb linuw-swap. Now for changing swappiness the easiest way I think is to goto Terminal Emulator and type: echo 60 > /proc/sys/vm/swappiness
That will give you a swappiness of 60, I would go with 80 or 100 though as it will speed up hero quite a bit. As for killing your sd, don't worry about it cuz it will take over a year and by then I doubt you will have the same phone or sd, and eve if you do it doesn't kill your sd it just shrinks it's maximum size, slowly.
Anything else fire away.
Click to expand...
Click to collapse
I've been looking for this forever. Thank you sir!

You wouldn't change swappiness like this in JacHero
If you wish to go with Hero, the instructions on how to format your SD card are right on the first page of JacHero...
If you want a FAAAAST Hero, and I mean FAST... like, 100% usable with no lag hero.... then use 96mb linux swap with 80 swappiness... turn off backing swap and compcache. You'll be blown away at how usable it is.
To do this, format your card as per the instructions, make sure you have 96mb linux swap.... flash the Hero rom. After booting into Hero, go to the market and download "text edit" -
Then...
go to terminal and:
su
rwsystem
cp /system/bin/user.conf /sdcard/user.conf
Open up text edit, press menu, then "open" and select your sd card and open the user.conf file. and set the en_compcache_CC and backing swap to "0" instad of 1, I can't think of the specific names, but it's obvious. Then set linux-swap to 1, and linux swap swappiness to 80. Save the file.. then
back in terminal,
su
rwsystem
cp /sdcard/user.conf /system/bin/user.conf
and that's it, I don't think you need to reboot the phone, but do it anyways... it'll be laggy for about 20 seconds while the swap builds up, then bam, lightning fast.
Hope this helps.

vr24 said:
You wouldn't change swappiness like this in JacHero
If you wish to go with Hero, the instructions on how to format your SD card are right on the first page of JacHero...
If you want a FAAAAST Hero, and I mean FAST... like, 100% usable with no lag hero.... then use 96mb linux swap with 80 swappiness... turn off backing swap and compcache. You'll be blown away at how usable it is.
To do this, format your card as per the instructions, make sure you have 96mb linux swap.... flash the Hero rom. After booting into Hero, go to the market and download "text edit" -
Then...
go to terminal and:
su
rwsystem
cp /system/bin/user.conf /sdcard/user.conf
Open up text edit, press menu, then "open" and select your sd card and open the user.conf file. and set the en_compcache_CC and backing swap to "0" instad of 1, I can't think of the specific names, but it's obvious. Then set linux-swap to 1, and linux swap swappiness to 80. Save the file.. then
back in terminal,
su
rwsystem
cp /sdcard/user.conf /system/bin/user.conf
and that's it, I don't think you need to reboot the phone, but do it anyways... it'll be laggy for about 20 seconds while the swap builds up, then bam, lightning fast.
Hope this helps.
Click to expand...
Click to collapse
I tried this and I did notice a difference in speed. But it also created a problem with loading screens (which I didn't have before) But This is still good advice as now I can mess with this on my phone. Other people may have better luck with these settings. I've also noticed that what works for one, may not work for someone else

vr24 said:
You wouldn't change swappiness like this in JacHero
If you wish to go with Hero, the instructions on how to format your SD card are right on the first page of JacHero...
If you want a FAAAAST Hero, and I mean FAST... like, 100% usable with no lag hero.... then use 96mb linux swap with 80 swappiness... turn off backing swap and compcache. You'll be blown away at how usable it is.
To do this, format your card as per the instructions, make sure you have 96mb linux swap.... flash the Hero rom. After booting into Hero, go to the market and download "text edit" -
Then...
go to terminal and:
su
rwsystem
cp /system/bin/user.conf /sdcard/user.conf
Open up text edit, press menu, then "open" and select your sd card and open the user.conf file. and set the en_compcache_CC and backing swap to "0" instad of 1, I can't think of the specific names, but it's obvious. Then set linux-swap to 1, and linux swap swappiness to 80. Save the file.. then
back in terminal,
su
rwsystem
cp /sdcard/user.conf /system/bin/user.conf
and that's it, I don't think you need to reboot the phone, but do it anyways... it'll be laggy for about 20 seconds while the swap builds up, then bam, lightning fast.
Hope this helps.
Click to expand...
Click to collapse
Either way will work, only downside to how I explained it was if you reboot you will lose the setting. The OP wanted the simplest way to do it and the way you explained is a bit more complicated although it may be permanent.

How do I verify swappieness? I.e. see what it's set at now.

tsnow247 said:
How do I verify swappieness? I.e. see what it's set at now.
Click to expand...
Click to collapse
su
vi /system/etc/user.conf
That'll open the file and your looking for swappiness

tsnow247 said:
How do I verify swappieness? I.e. see what it's set at now.
Click to expand...
Click to collapse
Assuming you use userinit.sh + user.conf setup, you should be able to do the following:
Code:
adb shell sh /system/sd/userinit.sh -s
in command prompt (the location of userinit.sh script might be different on your ROM).
This will list the status of the compcache module, linux swap, etc. See documentation here.

Related

Have Hero on my G1 but have questions?

I am liking the Hero software and will diff be putting it on my Mytouch when some figures out how to root that phone.
1. I thought I would have more internal mem from the G1 after I did the part on the memory card in console? Hero running laggy and I thought the apps would run from my memory card ?
2. Bluetooth, notification lights not working when I recieve texts?
3. Laggy laggy lol it's awsome software
FenderGuy said:
I am liking the Hero software and will diff be putting it on my Mytouch when some figures out how to root that phone.
1. I thought I would have more internal mem from the G1 after I did the part on the memory card in console? Hero running laggy and I thought the apps would run from my memory card ?
2. Bluetooth, notification lights not working when I recieve texts?
3. Laggy laggy lol it's awsome software
Click to expand...
Click to collapse
1. They should run from the SD if it is correctly set up. You should be running with a linux-swap partition also. JAC says to not use anything bigger than 32mb but I have mine at 128mb with swappiness at 60 and haven't seen a loading screen since first boot.
2. BT and LED are not working in any Hero build. JAC is getting closer to getting BT fixed, and I bet LED is next.
3. The lag should abate soon after adjusting you swap settings (The swappiness is set in the a2sd.sh file)
i did a fat32, ext2, and linux-swap part in the console
Please explain #3?
So you can abd pull the a2sd.sh and adjust the swappiness settings from there and push it back?
As for A2SD still using up space, I believe the phone needs to be restarted for apps to be moved to the ext partition.
How can I tell if the apps are running the sd card? I thought the JACHeroski 2.7.4 already had the swapper in it?
I have a 8gb sc card did this Fat32 6936 Ext2 7448 Linux-swap 7576
I did take the twitter and books marks widgets off the main screen seems to be quicker...I would like optimize my G1 so the rom runs smooth, so far i like the rom
FenderGuy said:
How can I tell if the apps are running the sd card? I thought the JACHeroski 2.7.4 already had the swapper in it?
I have a 8gb sc card did this Fat32 6936 Ext2 7448 Linux-swap 7576
I did take the twitter and books marks widgets off the main screen seems to be quicker...I would like optimize my G1 so the rom runs smooth, so far i like the rom
Click to expand...
Click to collapse
If you don't have ADB, then type in the terminal:
$su
#cp /system/bin/a2sd /sdcard
Open the file in a text editor from your computer and change the echo 30 > swappiness value to whatever swapiness you want (Mine is 60 but I have a bigger swap partition. If you only have a 32mb partition I would leave it at 30, but I would recomnmend having 64mb and changing it to 60 swappiness)
then save to file back to the root of you sd card and type in terminal again:
$su
#mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
#cp /sdcard/a2sd /system/bin/a2sd
#reboot
and your swap settings are updated !
Cool thanks, I am actually going to take the 8Gb out and put in a 1gb, I am going to be selling the phone soon. Will the 1GB work for the apps to sd transfer?
FenderGuy said:
Cool thanks, I am actually going to take the 8Gb out and put in a 1gb, I am going to be selling the phone soon. Will the 1GB work for the apps to sd transfer?
Click to expand...
Click to collapse
Yes and no. It will work, but very slowly. The stock 1gb card is very slow.
Having an issue with this process:
Open the file in a text editor from your computer and change the echo 30 > swappiness value to whatever swapiness you want (Mine is 60 but I have a bigger swap partition. If you only have a 32mb partition I would leave it at 30, but I would recomnmend having 64mb and changing it to 60 swappiness)
What file is it?
FenderGuy said:
Having an issue with this process:
Open the file in a text editor from your computer and change the echo 30 > swappiness value to whatever swapiness you want (Mine is 60 but I have a bigger swap partition. If you only have a 32mb partition I would leave it at 30, but I would recomnmend having 64mb and changing it to 60 swappiness)
What file is it?
Click to expand...
Click to collapse
/system/bin/a2sd
as stated earlier, yo copy it to your sd card
Code:
su
cp /system/bin/a2sd /sdcard
Then edit the file and save it back to the card
Then use this command to push it back, then reboot.
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/a2sd /system/bin/a2sd
reboot
Just make sure that after you've edited it and want to save you don't save it as a text file, which would add .txt
AdrianK said:
/system/bin/a2sd
as stated earlier, yo copy it to your sd card
Code:
su
cp /system/bin/a2sd /sdcard
Then edit the file and save it back to the card
Then use this command to push it back, then reboot.
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/a2sd /system/bin/a2sd
reboot
Just make sure that after you've edited it and want to save you don't save it as a text file, which would add .txt
Click to expand...
Click to collapse
Don't worry about running 2.7.4 until it's completely refined. I am running 2.7.3 with a 64 mg swap partition and it is SUPERFAST with 6 home screens being used, with widgets on them all:
Crappy video quality:
http://www.youtube.com/watch?v=KxLZOhUA3R0

JacHero 2.7.4r2 Compcache? Help

So I'm currently running JACHero 2.7.4r2, and I'm still encountering long loads htc screens and lag. I'm aware that compcache starts up automatically at boot and that its supposed to reduce lag ect, and help the rom smoother and works better than Swap linux. How is it that others are having so much success with their roms performance? Am I supposed to tweak the settings of compcache?
I did some research and this is what I got...
Edit the userinit.sh file you're using. Check the proper threads for compcache in development forums.
As far as Compcache vs swap, I've gone back to no swaps, it seems snappier by itself without these methods. It could be a personal preference though depending on what apps/services you use the most.
Click to expand...
Click to collapse
How do I get to the userinit.sh file? and what are good settings to use?
Also on the first page of JACHeroski2.7.4r2 it also says...
**Please do NOT use userinit.sh for Swap it is already done in this build and that will cause you to have swap issues
Click to expand...
Click to collapse
So I'm a bit confused as to what I'm supposed to do here. I'm also running a 32 swap linux partition, should i keep it? Or Remove it?
Thanks
Mine is running really good on linux-swap.... I'm not switching to CompCache until it's 100% ironed out.
So can we enable compcache? My class 6 might not arrive before I go on holiday (Tuesday) and Im thinking linux-swap will be too slow on a class 2 :-S
AdrianK said:
So can we enable compcache? My class 6 might not arrive before I go on holiday (Tuesday) and Im thinking linux-swap will be too slow on a class 2 :-S
Click to expand...
Click to collapse
Yes, you can enable compcache, its already on by default in 2.7.4r2. He said not to use userinit.sh for linux-swap as he already added command into a2sd.sh. So that's automatic as well. You can check if they're working by going into Terminal and typing:
#cat /proc/ramzswap
#free
#cat /proc/swaps
mines working but still is slow, ect. Is it cause its only experimental?
I think i found my issue, i reset overclock to be default so its NOT overclocked anymore, and i see improvements.
h.nocturna said:
Yes, you can enable compcache, its already on by default in 2.7.4r2. He said not to use userinit.sh for linux-swap as he already added command into a2sd.sh. So that's automatic as well. You can check if they're working by going into Terminal and typing:
#cat /proc/ramzswap
#free
#cat /proc/swaps
Click to expand...
Click to collapse
So compache runs automatically? So no need for a swap partition?
If you have compcache and a swap partition, you're going to have problems. Use one or the other.
goldenarmZ said:
If you have compcache and a swap partition, you're going to have problems. Use one or the other.
Click to expand...
Click to collapse
Or you might try using linux-swap as a backing swap for the compcache. If you wanna find out more, just check out the compcache tutorial thread.
So this is why my newest jacheroski lags that much.. But in the tutorial, there's nothing about disabling the compcache. So how can I remove it, or make linux-swap backing up compcache?
edit: I'd rather disable compcache, because I'm too lazy and not willing to create linux-swap in the future again. (gah, if there's something wrong in what I wrote - sorry, but my english isn't perfect. i'm trying ;p)
BolecDST said:
So this is why my newest jacheroski lags that much.. But in the tutorial, there's nothing about disabling the compcache. So how can I remove it, or make linux-swap backing up compcache?
edit: I'd rather disable compcache, because I'm too lazy and not willing to create linux-swap in the future again. (gah, if there's something wrong in what I wrote - sorry, but my english isn't perfect. i'm trying ;p)
Click to expand...
Click to collapse
It's easier to just delete your swap partition.. boot into recovery, enter console with [alt+x] and do this:
Code:
parted /dev/block/mmcblk0 rm 3
Its easy enough to create a new swap partition in the future.. just follow the instructions in the 1st post of the jachero thread again.
I've not looked into compcache so I'm not sure how to disable that.

Useless Thread[Delete]

Deleted Thread Due to Technical Difficulties
Check
Dream Android Development
Can you change the swap size and the other while in an ROM or do you need to do it in the recovery console and then reflash your ROM?
** Just changed all my setting for swap of 96 MB. ITS SO SUPER FAST ITS UNBELIVEABLE!!!!
I don't think you need to reflash if you can replace the swap partition without affecting the others.
What I mean is I left free space on the end of my SD card so I could experiment with different swap sizes. I've been using 40 on Drizzy Personal V3 but I'm going to try 96 now and see if I notice a difference.
Thank you so much. I gave up on the Hero roms after 1 day due to the lag. Now I am running a 96 mb swap and couldn't be happier!
You should add how to create a swap partition and also how to use Compcache as it could be very helpful. Other than that this looks pretty helpful. I also dont see the need for linux swap in any CM mod since they are very stable and are very smooth. It is an option, but i dont think its at all necessary...
EDIT: Also add how to change swapiness manualy . That would be very helpful...
wow... yha, so like um... well its totaly... like ...you know... ok..? ok
that was like trying to folow a bad paulie shore movie... ( like there were good ones)
+1 for write up on how to set-up and run swap (preferrably for dummies and n00bs)
i updated the thread with how to partition your sd whatever
but
im working on the command for terminal to set swappiness
because i used adb to push a user.conf
learned it~many thanks~and howabout 128M?and how much perfect swapiness value for 96m is?
Ayerwin said:
learned it~many thanks~and howabout 128M?and how much perfect swapiness value for 96m is?
Click to expand...
Click to collapse
128 is not good
i really didnt like its overall performamnce
oh and for 96 i use 60 for swappiness
????
i get the swapper some one asked if you could just change the file size with out reformating ill prolly reformat just to make a clean hero build the other ? is when you set 96 what do u mean by 60 isnt the whole 96 being used?
frost785 said:
i get the swapper some one asked if you could just change the file size with out reformating ill prolly reformat just to make a clean hero build the other ? is when you set 96 what do u mean by 60 isnt the whole 96 being used?
Click to expand...
Click to collapse
Well if you you instsll any build the settings on that build are default "i think"
32 swapiness or 20 cant remember and what want to do is set it to 60 so it wont lag and is faster
cuz if you leave it on 32/96 it gets laggy but with 60/96 its the "sweet spot"
jf4888 said:
128 is not good
i really didnt like its overall performamnce
oh and for 96 i use 60 for swappiness
Click to expand...
Click to collapse
thx sir,i'll try it with v4hero this weekend hah
more ?
ok then i must not get it i know how to change the partition format thats basic but how do i change the swappiness i know they have a program on the market but that doest do it befor start up after is this. sh /system/bin/swap -s i know this is the comand but not sure where to enter it and does it auto give me my default swapness thanks for your help ill keep reading
thanks jf4888, your tutorial helped me more the the other ones.
force closes
I get plenty of force closes with CM's 4.01. I have compcache. My brother did the linux-swap and said it's been so much better. Some people say CM's rom doesn't need swap??? That boggles my mind. I love his roms and get less force closes than JF, but it's far from perfect when force closes are involved.
you might want to include how to update your ext3 to ext4 for those that so desire it. other than that, great guide.
frost785 said:
ok then i must not get it i know how to change the partition format thats basic but how do i change the swappiness i know they have a program on the market but that doest do it befor start up after is this. sh /system/bin/swap -s i know this is the comand but not sure where to enter it and does it auto give me my default swapness thanks for your help ill keep reading
Click to expand...
Click to collapse
i put up the command to set swap through terminal it should work considering i tried it myself
usernam3 said:
thanks jf4888, your tutorial helped me more the the other ones.
Click to expand...
Click to collapse
Here welcome
Oh and for now on start directing people to
The ultimate newb thread
Its a wip(work in progress)
And we hope for it to become a sticky so others
When they have a problem with anything
And I mean anything can go there and have any question answered
install swap partition without formatting whole sd?
Thanks for the great guide. Noob here I already formtted my sd card and have apps2sd etc but would like to create a swap partition (running cyonogen 4.0.1 with ext2, ext3)
Is there a way to create a swap partition without having to format the whole sd and recreating ext2 and 3?

need help pls dont kill me!

hello all first post and hopefully last post... I have tried to search and search and read and read but still confused on some things. I just have a few questions the confusion comes from instructions how to do things but no reason or explanation why. so anyways here goes I started with no knowledge of any of this so I dont need help with root, and flashing roms or installing and using adb... I have a G1 with pvt board I also plan on using just the linux-swap for now not the compcache one so here goes
1) what is the difference in partitions (ext2 ext3) what is each needed or used for? like your main fat32 is for storing apps and data? one is a ram swap kinda like virtual memory? I just not sure if I would need ext 2 or ext3 or both...I am using hero roms... does the linux-swap partition count as a ext2 or 3? and lastly why do u need to convert a ext2 to and ext3 you cant just create an ext3 off the bat?
2) how do I know if the rom does not say what type of swap it is using as in comp or linux swap? I have read about the user.cfg file but kinda unclear in that... do I have to edit it or just check it from the zip file and see the settings? if so I see downloads for a user.cfg (of course prolly not the settings I need for that rom) but I just edit it and throw it on fat32 partition and it should work automatically? if the rom has compcache working can I still disable it and just use a linux-swap and just change the size of the swap?
3) what is the difference between the user.cfg and userinit.sh?
4) after the rom is flashed (my update.zip) it is ok to delete it off the sdcard?
5) so lastly if I want to put pics / music / videos do I just throw them on the fat32 partition but in what folder so it recognizes it? or do I need to download some kind of file manager to get into the flashed rom so I can see the correct media / download / camera folders and place them there? if I have to go the latter route do I need to do the whole adb "push" thing to get them in there? reason why I ask is with a normal G1 when you connect it with the data cable to your computer i can just see the folders but when rooted and flashed obvioulsy there is nothing to see
6)apps2sd runs and saves on what partition?
please dont kill me I honestly did search and read all over just seems confusing most of the "guides" tell me how to do things but I dont know why those things are usefull or needed to be done
Devious12345 said:
hello all first post and hopefully last post... I have tried to search and search and read and read but still confused on some things. I just have a few questions the confusion comes from instructions how to do things but no reason or explanation why. so anyways here goes I started with no knowledge of any of this so I dont need help with root, and flashing roms or installing and using adb... I have a G1 with pvt board I also plan on using just the linux-swap for now not the compcache one so here goes
1) what is the difference in partitions (ext2 ext3) what is each needed or used for? like your main fat32 is for storing apps and data? one is a ram swap kinda like virtual memory? I just not sure if I would need ext 2 or ext3 or both...I am using hero roms... does the linux-swap partition count as a ext2 or 3? and lastly why do u need to convert a ext2 to and ext3 you cant just create an ext3 off the bat?
2) how do I know if the rom does not say what type of swap it is using as in comp or linux swap? I have read about the user.cfg file but kinda unclear in that... do I have to edit it or just check it from the zip file and see the settings? if so I see downloads for a user.cfg (of course prolly not the settings I need for that rom) but I just edit it and throw it on fat32 partition and it should work automatically? if the rom has compcache working can I still disable it and just use a linux-swap and just change the size of the swap?
3) what is the difference between the user.cfg and userinit.sh?
4) after the rom is flashed (my update.zip) it is ok to delete it off the sdcard?
5) so lastly if I want to put pics / music / videos do I just throw them on the fat32 partition but in what folder so it recognizes it? or do I need to download some kind of file manager to get into the flashed rom so I can see the correct media / download / camera folders and place them there? if I have to go the latter route do I need to do the whole adb "push" thing to get them in there? reason why I ask is with a normal G1 when you connect it with the data cable to your computer i can just see the folders but when rooted and flashed obvioulsy there is nothing to see
6)apps2sd runs and saves on what partition?
please dont kill me I honestly did search and read all over just seems confusing most of the "guides" tell me how to do things but I dont know why those things are usefull or needed to be done
Click to expand...
Click to collapse
ill answer the 4th question coz im a lazy dawg,
and the answer is.......... YES!
Devious12345 said:
hello all first post and hopefully last post... I have tried to search and search and read and read but still confused on some things. I just have a few questions the confusion comes from instructions how to do things but no reason or explanation why. so anyways here goes I started with no knowledge of any of this so I dont need help with root, and flashing roms or installing and using adb... I have a G1 with pvt board I also plan on using just the linux-swap for now not the compcache one so here goes
1) what is the difference in partitions (ext2 ext3) what is each needed or used for? like your main fat32 is for storing apps and data? one is a ram swap kinda like virtual memory? I just not sure if I would need ext 2 or ext3 or both...I am using hero roms... does the linux-swap partition count as a ext2 or 3? and lastly why do u need to convert a ext2 to and ext3 you cant just create an ext3 off the bat?
2) how do I know if the rom does not say what type of swap it is using as in comp or linux swap? I have read about the user.cfg file but kinda unclear in that... do I have to edit it or just check it from the zip file and see the settings? if so I see downloads for a user.cfg (of course prolly not the settings I need for that rom) but I just edit it and throw it on fat32 partition and it should work automatically? if the rom has compcache working can I still disable it and just use a linux-swap and just change the size of the swap?
3) what is the difference between the user.cfg and userinit.sh?
4) after the rom is flashed (my update.zip) it is ok to delete it off the sdcard?
5) so lastly if I want to put pics / music / videos do I just throw them on the fat32 partition but in what folder so it recognizes it? or do I need to download some kind of file manager to get into the flashed rom so I can see the correct media / download / camera folders and place them there? if I have to go the latter route do I need to do the whole adb "push" thing to get them in there? reason why I ask is with a normal G1 when you connect it with the data cable to your computer i can just see the folders but when rooted and flashed obvioulsy there is nothing to see
6)apps2sd runs and saves on what partition?
please dont kill me I honestly did search and read all over just seems confusing most of the "guides" tell me how to do things but I dont know why those things are usefull or needed to be done
Click to expand...
Click to collapse
1) EXT2 and EXT3 are linux filesystems. If you have an EXT partition on your SD card then this is where apps will be stored. You may notice that if you're running a Hero ROM with no A2SD (/Apps2SD) you will only have about 20mb left for apps. You can make this linux partition as big as you want (within reason). Most people use 512mb, because it's all the space you will ever need for apps.
On to the differences between ext2, ext3 and ext4. Most people use ext3, the reason being is it uses journalling, making it faster and more efficient than ext2. There's nothing wrong with ext2, but ext3 is just a bit better. All ROMs with A2SD support will lit you use ext2 and ext3. Ext4 is less well supported. Personally I use it, just because it's newer than 3, but it's not supported by all ROMs.
So, just got for ext3.
Linux swap is totally different from ext filesystems. As you suggested it is virtual memory, which is essential on Hero ROMs. Personally I use a 64mb partition.
So my 8GB card looks like this
FAT32 - 7.5GB
EXT4 - 500mb
Linux-Swap - 64
2) I think you mean user.conf and userinit.sh. These files tell the ROM what settings to use for Swap and CompCache. It's not essential, just ignore it.
3) user.conf and userinit.sh work together. userinit.sh is one you edit, and user.conf initiates userinit.sh. Again, no ROMs require this, don't worry about it.
4) yeah you can delete update.zip. Personally I keep all my ROMs on the root of the sdcard so I can flash/reflash whenever I want to.
5) You put media on the phones Sd the same way as if it was not rooted. Connect the cable, pull down the notification bar, choose "mount" and drag and drop your files over. Windows won't see your ext partition btw.
6) Apps to sd saves to your ext partition, be it ext2/3/4 ect.
Sorry for the long post just wanted to make sure I answered everything.
3) user.conf and userinit.sh work together. userinit.sh is one you edit, and user.conf initiates userinit.sh. Again, no ROMs require this, don't worry about it.
should be user.conf you edit
If you are willing to learn you can go here http://forum.xda-developers.com/showthread.php?t=542899
AdrianK is right though its not needed ,but it good to know all your options.
AdrianK said:
3) user.conf and userinit.sh work together. userinit.sh is one you edit, and user.conf initiates userinit.sh. Again, no ROMs require this, don't worry about it.
Click to expand...
Click to collapse
actually i think you have this one backwards Adrian. the userinit.sh is what the a2sd script makes a call to upon every boot to activate your linux-swap partition and it uses the various system defaults usually, the userinit.sh then makes a call to the user.conf to see what values it is suppose to use for the various things if they are different then the system default values, and will use the ones in the user.conf. user.conf is the one you edit to change the various values.
or at least this is my understanding of how it works.
ok so basically I just open the zipped rom and see if there is a userinit.sh file in there which means apps2sd is already in the rom... then look at the user.cfg... but do I try to edit the user.cfg before I flash the rom and re-zip it then flash or am I able to edit the user.cfg after I have flashed the rom... I know I believe I am supposed to use the notepad++ to edit it from unbuntu live or is there another way to do it? when I connect and mount my phone in normal working mode not (terminal or console mode) all I see is the update.zip file on there I can not see any of the ext partitions is that normal? as in you can only see your fat32 and what files (music pics) that you put on there? is there any way to view the ext partitions?
like I said if I have an edited user.cfg file with the settings I need do I need to "push" it to the flashed rom via adb? or would it be easier to just edit it then re-zip then flash? oh and by the way what is the direct path to the user.cfg and userinit.sh? as in what folders do they normally reside in?
THANKS you guys are seriously helping me alot soon I will be cooking my own roms.... I just need an understanding of these things not just guides telling me to type stuff even though they work doesnt mean I know whats going on
btw I am trying to use MLIGN-HeroV2.1.6 rom and super laggy for me so I know the partoition sizes are wrong or not working correctly or swap is not enabled....and yes I have an 8g transcend class 6 card... all the others in the thread say its very fast with no major home screen lag and such so I messed up on settings and partions
you must put the userinit.sh and user.conf in /system/sd (your ext3) and chmod 755 both of them.
there are good instructions for using and editing them in the link dan0zone gave you.
the userinit.sh and user.conf (as far as i know) do not come standard in roms, the a2sd scripts reads and runs them on the first boot, more technically the a2sd sends a call out to see if there is a userinit.sh then if there is and if it is the userinit.sh from that link, it then looks at the user.conf to see what values it uses.
i always use pspad to edit my user.conf (and any other android related file) in windows. here is a link to pspad.
Adrian had it right except for the flip flop between user.conf and userinit.sh. You don't want to edit userinit.sh unless you know what you are doing. The user.conf and userinit.sh files are not in the ROM itself. They need to be pushed to /system/sd via adb or terminal emulator. See my signature for the link to the details.
You will not see your ext3 or linux-swap partitions in Windows. You can use adb shell, terminal emulator, a root explorer or Droid Explorer to see those.
Also, if you'd like to edit your user.conf right on your phone, download Text Edit free from the Market.
Here's a big tip. Investigate two scripts. One is called switchrom.sh and the other is called bart.sh which is an update to switchrom.sh. It will save you a lot of headaches later on.
Hope I got it all.
man you guys are great thanks for the replies I think I understand it all now. I will try the pspad and see how that works out although the text edit free seems like a more easier way if your not around a computer... the question I have if I path to /system/sd what if I have an ext 3 and 4 which one would it end up in? ext2 it wont I assume? in some guide I read they say to just put it on the sd card like as in the fat32 part which I know is wrong! or they just didnt explain in further details.... oh god didnt want to get into the chmod 755 cause I didnt think I needed to do that now I will have to go figure out what that does and its purpose... there has been many thread arguments over wether to use chmod 755 I just thought a linux-swap about 96 or so with a swappiness setting of say 60 would be fine didnt think I would need to enable or set up chmod 755
thanks so much!!
dan0zone's link I have read before i can download the userinit.sh file but have no user.cfg to play with are the user.cfg all standard or generic until I or someone else edits them? where can I get a user.cfg file was not in the link dan0zone posted
chmod 755 = -rwxr-xr-x = for a regular file whose user class has full permissions and whose group and others classes have only the read and execute permissions.
there you go. /system/sd is what the directory associated with /dev/block/mmcblk0p2 which is what your ext2/3/4 (doesn't matter) is.
the only thing you need to chmod 755 are the userinit.sh and the user.conf after you place them in your ext2/3/4 partition, and the reason is so that they may run after being called by the a2sd script at boot up.
ok thanks about the chmod 755 I believe i get it seems to be a permissions thing....
any answer on the user.cfg file if it is a generic template file or where to get one unedited?
thanks for the switchrom and bart tip I totally understand that but for now I dont have anything I need to save and backup just doing it bare but in the future i will use those on ce I get better at all of this.... which thanks to all of you i am understanding this ALOT better.....
you can get one from the link that was provided earlier, it shows what the system defaults are beside each of the settings, so if you want to set it all to the system defaults then you can.
ah sorry I am stupid I just saw the title of the userint.sh file I didnt open it too see there was a user.cfg in it.... thanks
I plan to repartition and setup the userinit and user.cfg all over again this is probably the worst question yet but I just plan to stick my sd in my computer and reformat the whole card is that enuff to completly wipe it or will the ext and linux-swap still be in there?
if you are using windows then it will only format the fat32 partition, to get your card back to one partition, you can use parted in the recovery console to rm your partitions then make a single fat32 partition or just rm all partitions then re-make them to whatever size you want.
You can also format your sd card (wipe everything including partitons) by going to Settings, SD Card, Unmount, Format/Erase (not sure what it's called). This seems to work sometimes. You should use parted anyway since you will need to repatition your card there so no need for the extra step. BTW, it's user.CONF not user.CFG. just a heads up if you plan on searching. My signature has all the necessary links to pretty much everything you will need.
AFAIK if the rom has a2sd included, you wont have an option to unmount the sd card.
knowfear said:
AFAIK if the rom has a2sd included, you wont have an option to unmount the sd card.
Click to expand...
Click to collapse
Indeed you are correct, sir. I haven't done it this way since the JF1.51 days. I use either parted command line or GParted on Ubuntu so I didn't even check the settings when I wrote that.

CM5 T5: Disabling SWAP, HELP!?

I am having touble disabling swap. I turned off swapper, deleted the .swp file, turned swappiness to 0 in swapper to disable it.
I even tried
su
swapoff /dev/block/mmcblk0p3
Click to expand...
Click to collapse
In terminal, and nothing...
When I go into terminal and check.
su
free
Click to expand...
Click to collapse
It shows I still have swap on.
Can anyone point me into right direction. Or tell me how I can grab userconf file and edit that to disable it.
I really dont want to repartition all over again...
First do
cat /proc/swaps
to make sure that swap in in the the correct place. When i did it I found that it was not in the same place as it was before.
Mines in /dev/block/ramzswap0 not /dev/block/mmcblk0p3
dont have to fully repartition, just grab a ubuntu live cd, and use gparted to blank out the swap partition.... if theres no swap partiton, and no swap file, then there's NO WAY to have swap on... or if you know what your doing boot into recovery and use the CLI gparted there to blank the swap space...
garz said:
I am having touble disabling swap. I turned off swapper, deleted the .swp file, turned swappiness to 0 in swapper to disable it.
I even tried
In terminal, and nothing...
When I go into terminal and check.
It shows I still have swap on.
Can anyone point me into right direction. Or tell me how I can grab userconf file and edit that to disable it.
I really dont want to repartition all over again...
Click to expand...
Click to collapse
Typically, to disable swap, you need to undo what you did to ENABLE it.
And CM does NOT automatically set up swap, so you would have had to intervene manually.
ALTERNATIVELY, you have, not swap, but COMPCACHE -- is you "swap" showing as 24 MB? If it is, you can just go into spare parts to disable it.
I'll ditto that
lbcoder said:
Typically, to disable swap, you need to undo what you did to ENABLE it.
And CM does NOT automatically set up swap, so you would have had to intervene manually.
ALTERNATIVELY, you have, not swap, but COMPCACHE -- is you "swap" showing as 24 MB? If it is, you can just go into spare parts to disable it.
Click to expand...
Click to collapse
Yup, same here with CM7.2, was amazed to find that swap was supposedly still on, but it was compcache I was really worried I'd have a wrecked sd card on my hands

Categories

Resources