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

Root SWAP RAM - Anyone found an app that actually does it.

niteryder

Member
Dec 4, 2009
59
35
Since our phone emulates the SD many of the apps that are suppose to increase your swap by moving it to the external sd card don't work. Anyone find a working way to increase the swap file?

I also believe some require the kernel module swappiness to be in place. Which, I believe it is.
 
Swapiton works great. I just set it to use my /system partition with a 500MB swap file size, with swappiness set to 75, minfree value set to kickasskernelizer values and no Z99Swapon delay. You must have SuperSU or equivalent installed, even on lollipop.
Just set this up. Seems to be working. Didn't break the phone at least. We'll see how it runs. Might move the swap to my external SD though since I have a class 10 card and lots of space.
 
  • Like
Reactions: Bad_MOFO_33
Upvote 0
Swapiton works great. I just set it to use my /system partition with a 500MB swap file size, with swappiness set to 75, minfree value set to kickasskernelizer values and no Z99Swapon delay. You must have SuperSU or equivalent installed, even on lollipop.


Thanks! I must be holding my mouth wrong because it errors out Missing /etc/init.d - no swap for you!
 
Upvote 0
Just wanted to note, I tried to put the swap on the external SD using the custom location option and it did not like it. Errored out saying the path (/storage/external_SD/) was an invalid argument, so I converted some apps (only things that can be installed from the store) to user apps to give myself some more room in system. Now have a 460MB swap with 512MB free in system. :) Games do seem to be running smoother.
 
  • Like
Reactions: Sands207
Upvote 0
Just wanted to note, I tried to put the swap on the external SD using the custom location option and it did not like it. Errored out saying the path (/storage/external_SD/) was an invalid argument, so I converted some apps (only things that can be installed from the store) to user apps to give myself some more room in system. Now have a 460MB swap with 512MB free in system. :) Games do seem to be running smoother.

The external SD worked for me. Did you try it without the trailing slash?
 
Upvote 0
Hey all..I've finally made an account so I can help the community out. As far as our volts, swap depends on kernal. I got Cm12 on mine courtesy of Bad_moFo_33. I used ram expander for swap. No init.d editing needed. I also got link2sd, and created a second partition on my SD card, ext4 formatted of course. From there had link2sd mount the partition and then had ramexpander create a swap file using the mount point for the second partition /data/sdext2. AND BOOM! my swapfile is located on the ext4 formatted partition along with everything that I send with link2sd. Using a class 10, 32 gb SD card, I got it split that 20 GB, fat 32 formatted is for my external SD card needs and the other roughly 12 gb is the ext4 formatted used for swap and app, data, cache storage. I still got that tiny space on my internal Sd without the limitations of app install due to space....
 

Attachments

  • Screenshot_2015-04-22-15-38-52.png
    Screenshot_2015-04-22-15-38-52.png
    118.3 KB · Views: 237
  • Screenshot_2015-04-22-15-39-19.png
    Screenshot_2015-04-22-15-39-19.png
    109.3 KB · Views: 153
Last edited:
Upvote 0
And in theory you don't need ramexpander. You can create a init.d script that turns on swap, with it linking it to the link2sd partition mount /data/sdext2. There's many ways around a mountain, you just got to choose one. Also everything is running smooth for me, using a 1.5 gb swapfile, which is overkill but has every game I got on my volt runner smooth as butter, with no slowdowns or stutters. Its up to you by testing swapfile sizes to see what works for you best
 
Last edited:
Upvote 0
Just for cautionary measures, just remember that using a swap file will cause your memory (either the nand or SD Card you have the file situated on) to die quicker. Unlike magnetic media such as your normal hard disk drives, flash media does have a limited amount of writes in it's lifetime, a swap file will constantly be writing to the memory as well.

Just wanted to make sure that gets said in here so people know the risks when doing this.
 
  • Like
Reactions: EarlyMon
Upvote 0
That is true Toxus, but the way technology is, I've had a tablet and been using swap for years on the same SD card and haven't witnessed any problems with SD card degration. Maybe when we were dealing with class 4 SD cards, but when you dealing with class 10 sd cards and who knows what other classes will be created, they will improve on r/w stats for the card. As far as our volts, although we were not blessed on the specs details as let's say the G3, using a disposable weak point such as an external SD card, which can be easily replaced, we can have a pretty BA phone.
 
Last edited:
Upvote 0
Also, we'll probably be replacing these phones within 3 years. It's not like this is a long term device that has to last us a decade. Pending an upcoming interview, I may be switching carriers soon, probably to Verizon (I don't like it, but they seem to have better coverage in my area than Sprint, unless we get crippled service for being on an MVNO).
 
Upvote 0
Hey all..I've finally made an account so I can help the community out. As far as our volts, swap depends on kernal. I got Cm12 on mine courtesy of Bad_moFo_33. I used ram expander for swap. No init.d editing needed. I also got link2sd, and created a second partition on my SD card, ext4 formatted of course. From there had link2sd mount the partition and then had ramexpander create a swap file using the mount point for the second partition /data/sdext2. AND BOOM! my swapfile is located on the ext4 formatted partition along with everything that I send with link2sd. Using a class 10, 32 gb SD card, I got it split that 20 GB, fat 32 formatted is for my external SD card needs and the other roughly 12 gb is the ext4 formatted used for swap and app, data, cache storage. I still got that tiny space on my internal Sd without the limitations of app install due to space....


So I understand what You did, however you confused Me when you mentioned "/data/sdext2"? Is that the name of your swap file? Or is that where You directed your swap file to go? Why is it ext2 instead of ext4 like youryour SD card partition is?

Im backing up my sd card now so I can partition it into half fat32 and half ext4 then use the ext4 for link2sd and new ram swap file like You've done. Know any scripts that do this so i can avoid paying $10 for the ramExpander?
 
Upvote 0
So I understand what You did, however you confused Me when you mentioned "/data/sdext2"? Is that the name of your swap file? Or is that where You directed your swap file to go? Why is it ext2 instead of ext4 like youryour SD card partition is?

Im backing up my sd card now so I can partition it into half fat32 and half ext4 then use the ext4 for link2sd and new ram swap file like You've done. Know any scripts that do this so i can avoid paying $10 for the ramExpander?

Perhaps I just figured out why you had "/data/sdext2" mentioned..is that where your internal/obb files are pointing to and booting from?
 
Upvote 0
Obzerve, /data/sdext2 is just what link2sd decided to call the mount point. Sure they can call it sdext4, but I believe it was just old coding that never changed. It is where link2sd is sending all files for the apps that you link. As far as a script, google swapon scripts for android. The scripts are out there...also you can use terminal to create the swapfile needed. I flash my phones and tablets a lot, so the combination of ramexpander and link2sd saves me time creating everything
 
Upvote 0
Obzerve, /data/sdext2 is just what link2sd decided to call the mount point. Sure they can call it sdext4, but I believe it was just old coding that never changed. It is where link2sd is sending all files for the apps that you link. As far as a script, google
swapon scripts for android. The scripts are out there...also you can use terminal to create the swapfile needed. I flash my phones and tablets a lot, so the combination of ramexpander and link2sd saves me time creating everything

So does the ext4 partition/swap file show up in the drive list in RAM Expander? I was reading the updates on the app and it says that the partition needed to be FAT32 so it could be read in the drive list?

What's the advantage of having your swap file put on the ext4 partition rather than letting it be on a FAT32?
 
Upvote 0
Obzerve, the sdext2 will not show on the drive list, but you can manually enter the path /data/sdext2. When you do that, it will telect when ramexpander shows the SD card space, which is the top bar. As far as difference between ext4 and fat 32 is that ext is native for android/linux, as the internal system drive/partition is formated to ext2 or ext4 in most android phones, which allows the read/write speed to be a little but better. And you don't have to worry when you plug in your phone to PC since the first partition is used
 
Upvote 0
Obzerve, the sdext2 will not show on the drive list, but you can manually enter the path /data/sdext2. When you do that, it will telect when ramexpander shows the SD card space, which is the top bar. As far as difference between ext4 and fat 32 is that ext is native for android/linux, as the internal system drive/partition is formated to ext2 or ext4 in most android phones, which allows the read/write speed to be a little but better. And you don't have to worry when you plug in your phone to PC since the first partition is used


Good answer. I assume it would be quicker by a small margin, besides I will end up sending it to ext4 anyways because my laptop is partitioned with elementaryOS and our desktop PC runs Kubuntu OS on it with most of the HD being used by linux anyways.

Thanks again for clarifying everything. You'd think I wouldn't need pointers with the linux knowledge I have. However lately Ive been skiddish ever since I bricked my wifes LG Lucid 2 and had to go out and buy a quick Droid Maxx ;-)
 
Upvote 0
Is there anyway to adjust the swap settings without having to go through the whole setup again? I made some changes to my swap (moved location and set swapiness to 0 to reduce battery drain and read/write cycles), and now I want to tweak the swapiness setting to like 25.

I think You can just deactive the program in left upper corner, then adjust the swapiness. The only time the program is running is when you click "SwapActive" button, then your VMEM shoots up to whatever is allowed. But I am still playing with it as well so could be wrong.
 
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