• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Virtual Memory

Kouma I'd like to try the setup your using for it once you get it fine-tuned, ok??

and ok, I'm down with that, I'm using a 16gb class 4 card myself so whatever you can put together for me I'd like to try, all I'm using is sd-ext on one of the partitions on my sd card... :p

so you're using Koumamod in Data mode?
if so, do you have Internal /Data disabled?
 
No I don't, I thought that wasn't to be bothered?

And yes to data mode...

Honestly, the only reason I put that you shouldn't disable the internal /data is because if you ever take your sdcard out, there's no fallback.
granted, you'd still be in a world of shit if you did that when the phone was on no matter what, but if you turned on a phone with no /data, sdcard or internal, it won't boot.
I didn't want people blaming me if they disabled the internal /data, then turned on their phones without their sdcard in it and their phone puked all over itself.
 
KoumaKernel2.5_Upgrade_CWM.zip
here's the new KoumaKernel with the swap support in a package that doesn't overwrite your existing koumamod file.

this way the ADB users can get to experimenting.

Here are some tips.

swapon = app for activating a swapfile / partition. the syntax includes a -p option for setting the swap priority (higher priority means that swap memory gets used first. Only needed if you decide to use multiple swaps)
example: swapon -p 10 /dev/block/mmcblk0p3

swapoff = app to stop using a particular swap
example: swapoff /dev/block/mmcblk0p3

mkswap = formatting utility to make a file or device swap memory
example: mkswap /sdcard/swapfile

dd = tool for copying raw data from one location to another. useful for creating empty files to turn into swapfiles. Be careful with this, it's super powerful. It has a lot of options, do some google research if you want to fine tune your usage.
example: dd if=/dev/zero of=/sdcard/swapfile bs=1024 count=1000 (this example makes a file named swapfile in /sdcard that contains 1000 blocks, each block is 1024 bytes)

/proc/sys/vm/swappiness = 'file' that contains a number from 0 to 100 representing how much the system swaps unused data out of physical ram. write to it using echo.
example: echo 60 > /proc/sys/vm/swappiness

/proc/swaps = 'file' that contains a list of active swaps and their usage. read it using cat
example: cat /proc/swaps

free = app for displaying system memory usage. this gives visibility below that of android meaning that any gui tool you try will not be as accurate or as verbose.

happy hunting team :)



hey man, when we flash this is there a default setting that kicks in?? i flashed and without doing anything mine seems to be faster and smoother?:confused: is anything up with that??
 
hey man, when we flash this is there a default setting that kicks in?? i flashed and without doing anything mine seems to be faster and smoother?:confused: is anything up with that??

nope, nothing by default.
I'm working on some new hawness, but it might take a while, I'm learning to work with the different UI elements i need to make it work
 
nope, nothing by default.
I'm working on some new hawness, but it might take a while, I'm learning to work with the different UI elements i need to make it work

well take your time and let me know, not really sure what to do with this and want to know what it will do to make better?????
 
You been to In n Out or Farmer Boy's yet? Good cheeseburgers man
also: 23rd Annual Stater Bros. Route 66 Rendezvous
and there is a Six Flags north of you, Knotts in Buena Park, there's also an awesome pirate based dinner show there too.

there is good surfing to the west, wine country toward the north, Skiiing and snowboarding to the northeast, Baja style offroading to the southeast, and Tijuana with all it's Donkey Shows to the south :)

You sound close to me. O.O
I go eating at the chicken dinner at knotts with my girl.
I'm in Azusa.
Surrounded/close to
West covina, covina, glendora, El Monte.
That's just some... Azusa is basically a small town. Lolz.
This new mod is awesome...
I did post this idea on ctmod.
I suggested something like this..
Lolz now it has come true!
Just like when everyone told me sonic could never be on super smash brothers brawl!
 
I'm not an expert, but yeah I know how to use ADB...

I use a little program called QtADB from XDA and it has an ADB Shell in it... :p

Sent from my SPH-M820-BST using Tapatalk 2 Beta-6

Sorry man, I crashed earlier for a lil bit... :p

Hey slayer can you chuck me a link to the tptk beta 6 that you got?
Lolz just wonderin
 
You been to In n Out or Farmer Boy's yet? Good cheeseburgers man
also: 23rd Annual Stater Bros. Route 66 Rendezvous
and there is a Six Flags north of you, Knotts in Buena Park, there's also an awesome pirate based dinner show there too.

there is good surfing to the west, wine country toward the north, Skiiing and snowboarding to the northeast, Baja style offroading to the southeast, and Tijuana with all it's Donkey Shows to the south :)


Never been to an In n Out Burger til I moved out here. Man, their burgers are DA BOMB! :D

lmao @ the donkey showz.
 
Wouldnt all of that constant swapping/writing back and forth on the sdcard pretty much kill the life of the sdcard quick? (im only using a sandisk 16GB class 4)

I would think this would only happen if you constantly have a bunch of apps running instead of exiting out of them. Take my sister for example who doesn't believe in the back button.... so she constantly presses home and runs another app. She tends to have several apps on the backburner. Now the android OS is programmed to handle this as the phone was meant to do this. It will prioritize which app to keep and which to terminate.

In the situation your talking about, those apps put on the backburner would be put on swap. So yes if enough apps go in and out then the read/write max of an SD card would be met faster. I would like to note though that SD cards usually have several hundreds of thousands (maybe millions) of read/writes ;) It would take quite awhile to reach the limit.
 
You sound close to me. O.O
I go eating at the chicken dinner at knotts with my girl.
I'm in Azusa.
Surrounded/close to
West covina, covina, glendora, El Monte.
That's just some... Azusa is basically a small town. Lolz.
This new mod is awesome...
I did post this idea on ctmod.
I suggested something like this..
Lolz now it has come true!
Just like when everyone told me sonic could never be on super smash brothers brawl!

oooh, West Covina. You'll probably think I'm crazy, but they have awesome ribs at..... Ikea. My wife an I will go there just to eat at the cafe upstairs, and then walk the store, and then get cinnamon rolls on the way out :D
 
I'm not an expert, but yeah I know how to use ADB...

I use a little program called QtADB from XDA and it has an ADB Shell in it... :p

Sent from my SPH-M820-BST using Tapatalk 2 Beta-6

Sorry man, I crashed earlier for a lil bit... :p

It's cool, you just need to be familiar with getting access :)

ok, here's what you're going to do for your particular situation,
*this means for Slayer72, if you copy this and you're not Slayer72, and it messes things up for you, it's your own damn fault*

first, go into the koumamod menu and make sure internal /data is disabled.
next, reboot

ok, once booted, open a command prompt window where your adb tool is (not sure if your qtADB does this next step, probably does, but I don't know the tool)

run> adb remount
if qtADB does that, use whatever method it does for that
next, here's a list of adb shell commands, starting with launching the shell:
run> adb shell

run> mkdir /system/swap
run> mount /dev/stl13 /system/swap
run> rm -rf /system/swap/*
run> dd if=/dev/zero of=/system/swap/swapfile
run> mkswap /system/swap/swapfile

now, open a unix mode text editor (like notepad++)
copy and paste the following into it:
Code:
#!/system/bin/sh
mount /dev/stl13 /system/swap
swapon /system/swap/swapfile
echo 60 > /proc/sys/vm/swappiness
save the file as something like S90KoumaSwap
put it on your phone in /etc/init.d
the command line prompt would be:
adb push S90KoumaSwap /etc/init.d/S90KoumaSwap

then, in your adb shell:
run> chmod 777 /etc/init.d/S90KoumaSwap

and reboot one last time.
 
You ask me this question and I said ssm. Is there maybe like on answer to that???

no, there is, it's just a tough one.
I was using ssm, but i switched over to data mode but left my 3rd partition, I used that to be my sdcard swap.

with ssm mode, you still use the internal data, and all the sdcard partitions.
it means you only have the option of using a swapfile.

the question becomes, where to put it, and how big to make it
 
oooh, West Covina. You'll probably think I'm crazy, but they have awesome ribs at..... Ikea. My wife an I will go there just to eat at the cafe upstairs, and then walk the store, and then get cinnamon rolls on the way out :D

Sure sure I think you just go to hooters right next to it. Lolz.
 
Only problem I had was pushing the file to system/etc/init.d, kept telling me "No ADB" even though I was in the Gingerbread folder of ODIN Image File Creator with A Windows cmd window open and already in ADB Shell!! Weird, right?? I was in ADB Shell but it said "No ADB found", go figure... I just copied the file into system/etc/init.d then used the Terminal on my phone to chmod it at that point... Thanks again Kouma, you da man bro... :thumbup:

Lol I should have noted that you would have to drop out of the shell back to the command prompt to use adb push
 
So I've got virtual memory (aka linux swap) working on our beloved prevail. I want to know if you guys want it. If so, what is the preferred method for swapspace? I can hard code for a swap partition on the sdcard, a swapfile on the vfat, swap file in /data, all of the above, or I can add a text field to koumamod.apk so you can point to wherever you put it yourself. :)


That would be great I would like to have that ability :D
 
It's cool, you just need to be familiar with getting access :)

ok, here's what you're going to do for your particular situation,
*this means for Slayer72, if you copy this and you're not Slayer72, and it messes things up for you, it's your own damn fault*

first, go into the koumamod menu and make sure internal /data is disabled.
next, reboot

ok, once booted, open a command prompt window where your adb tool is (not sure if your qtADB does this next step, probably does, but I don't know the tool)

run> adb remount
if qtADB does that, use whatever method it does for that
next, here's a list of adb shell commands, starting with launching the shell:
run> adb shell

run> mkdir /system/swap
run> mount /dev/stl13 /system/swap
run> rm -rf /system/swap/*
run> dd if=/dev/zero of=/system/swap/swapfile
run> mkswap /system/swap/swapfile

now, open a unix mode text editor (like notepad++)
copy and paste the following into it:
Code:
#!/system/bin/sh
mount /dev/stl13 /system/swap
swapon /system/swap/swapfile
echo 60 > /proc/sys/vm/swappiness
save the file as something like S90KoumaSwap
put it on your phone in /etc/init.d
the command line prompt would be:
adb push S90KoumaSwap /etc/init.d/S90KoumaSwap

then, in your adb shell:
run> chmod 777 /etc/init.d/S90KoumaSwap

and reboot one last time.

Is this specific to your kernel, or is this universal for setting up swap on stl13?
 
Back
Top Bottom