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

Root Swap on, swap off (swap activation for miui & cm7)

Lordvincent 90

▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
Oct 5, 2011
5,498
4,376
grand rapids,mi
CLICK HERE

This will use stl13(internal data partition) or create a file on sdcard to be used as swap.
And give you options to create different sized swap files and levels of 'swappiness' (rate at which files are transferred to the swapfile)
Just install terminal emulator
And use these commands

Instructions

DOWNLOAD AND INSTALL ZIP AT TOP OF THIS POST VIA CWM FIRST

Open terminal emulator

First switch user:
SU

then create a swap file on your sdcard or 'data-ext' partition:

swapfileXX (size 12,24,36,64,96,128 on sdcard fat partition)
extswapXX (size 12,24,36,64,96,128 on data ext partition)



Then set swappiness:

swpXX (XX is swappiness in increments of 10 up to 90) errors in script are normal

------------------------------
Other commands

swapfile-off (stop swap file in use) errors in script are normal,

clearswapfile (stops swap file and removes all swap files created) errors in script are normal

Swapfile at boot WILL ONLY WORK FOR SWAPFILE ON DATA-EXT,

bootswapfileXX (XX is swappiness in increments of 10 up to 90) errors in script are journal

bootswapfile-off - removes bootswap
BUT AS ALWAYS MAKE A BACKUP FIRST
Sry I'm not kewl like kouma, no app, but this would not have happened this soon without his help. He showed me my mistakes, and helped me get the data portion working (ok, he got the data portion working, because I'm slow and have fat fingers and make typos) thanks kouma you tha man :)

To use the 'extswap' and 'bootswapfile' commands you must have /data on sdext as it mounts stl13 (the internal data partition) for this purpose

ERRORS ARE NORMAL
THE FILES REFERENCE BOTH sdcard and data partition...

If you choose extswap, you will see errors regarding sdcard

If you chose swapfile, you will get errors regarding /data-ext
 
its working great for me, but my sd card is on the ssm setup so when i set the swap it used my 3rd portion so i have like a gig set up for swap lol

screenshot-1336082949489.png
 
Upvote 0
That's awesome. Using swapper 2 correct? Did you have to repartition/format it to swap format out just place the file there.

And i figured this would work on ctmod as well, but since kouma is rolling out the app, i figured i would leave well enough alone, since it will be much easier to setup with his app
 
Upvote 0
That's awesome. Using swapper 2 correct? Did you have to repartition/format it to swap format out just place the file there.

And i figured this would work on ctmod as well, but since kouma is rolling out the app, i figured i would leave well enough alone, since it will be much easier to setup with his app
I am using it on the miui just use to use ctmod with ssm just left the sd card how it was. I used swapper 2 and just created the swap file and that was it i did that you listed to do with terminal and thats it. worked like a charm
 
  • Like
Reactions: Lordvincent 90
Upvote 0
I am using it on the miui just use to use ctmod with ssm just left the sd card how it was. I used swapper 2 and just created the swap file and that was it i did that you listed to do with terminal and thats it. worked like a charm

I figured that out after my reply... *Facepalm* i could add functionality for a 3 partition setup, if enough people are interested... [<vfat><ext1><ext2>]
 
Upvote 0
I figured that out after my reply... *Facepalm* i could add functionality for a 3 partition setup, if enough people are interested... [<vfat><ext1><ext2>]
It wouldn't hurt. thats what i am on right now and it works great. Its just that a lot of people don't know how to use adb to make the 3rd partition.
So for some people the less complex it is the better ya know
 
Upvote 0
You have to know that if you put something like this up, half-wits like me are going to try it. No clue what I was doing but everything on my phone still works great. May be a little better??? hard to tell, I wasn't having any lag.

tivofool-albums-screenshots-picture6088-screenshot-1336083996640.png


???

My Antutu Benchmark went from 2029 earlier in the day to 2061. That might vary too. dunno

Anyways, good job :D

Edit: oh yeah, if anyone looks at this and it looks borked tell me, I made a backup before I tried this. lol
 
  • Like
Reactions: Lordvincent 90
Upvote 0
The true test it when you try to do things that would normally bog the phone down. Like, to use kouma's example, flash games on facebook... Not to say that they will be fully functional, but you may get farther than without it.

try playing with something that usually lags the phone, and see if it acts any smoother...
 
Upvote 0
The true test it when you try to do things that would normally bog the phone down. Like, to use kouma's example, flash games on facebook... Not to say that they will be fully functional, but you may get farther than without it.

try playing with something that usually lags the phone, and see if it acts any smoother...
True what ill do is see what the "crashing" point is. Not really crashing but how much it takes for it to bog down really bad ill get back to you
 
  • Like
Reactions: Lordvincent 90
Upvote 0
I figured that out after my reply... *Facepalm* i could add functionality for a 3 partition setup, if enough people are interested... []

I'd be down
for the 3rd partition. Still have mine from ctmod on ssm.
Can confirm no more force closes since dropping it down to the extswap96 :D:D

Super snappy!

One more thing, my benchmark scores dropped since adding this I dunno :thinking:
 
  • Like
Reactions: Lordvincent 90
Upvote 0
so i went on this game website that uses flash that use to lag really bad with just the website open. it seemed to do a lot better with this swap setup. so i tried to make it like it was before swap(make it lag as much as it did) so i had skype, yahoo messenger, google+ and facebook messenger all running. it took all that to make it lag like it did before the swap..... so really i thank you tons for making swap happen:D
 
  • Like
Reactions: Lordvincent 90
Upvote 0
Mine dropped slightly too... but the actual user experience seems smoother to me... So screw the numbers :D lol

Lol I know right. Plus running CPU Master pro, if I don't use my phone much, phone will last 3 days without a charge. Man good job on the swap. I just discovered an Ubuntu installer for windows. Like maybe it runs like an application. getting ready to fire it up
 
Upvote 0
Lol I know right. Plus running CPU Master pro, if I don't use my phone much, phone will last 3 days without a charge. Man good job on the swap. I just discovered an Ubuntu installer for windows. Like maybe it runs like an application. getting ready to fire it up

I ordered a new battery from Amazon for $6.45 free shipping today. nice to have a spare.

NewSamsungBattery
 
Upvote 0
That's a Hella good idea. What kind of quality?

A reviewer that has ordered from this vendor for his prevail said that they are Samsung OEM, he has got 2010 new batteries and 2011 new. So you hope to receive the 2011, but both will work well. I like the instructions that you condition it the first 3 charges to make the battery last.(run it all the way down and fully charge) After that you don't have to worry about when you put it on a charger.
 
  • Like
Reactions: jwh42000
Upvote 0
A reviewer that has ordered from this vendor for his prevail said that they are Samsung OEM, he has got 2010 new batteries and 2011 new. So you hope to receive the 2011, but both will work well. I like the instructions that you condition it the first 3 charges to make the battery last.(run it all the way down and fully charge) After that you don't have to worry about when you put it on a charger.

hmmm, maybe I'll buy a few of those for my homebrew extended battery project... muahahaha
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones