Remove All Ads from XDA

Assistance with making a swap partition

447 posts
Thanks Meter: 106
By TheReduxPL, Senior Member on 7th February 2014, 02:57 PM
Post Reply Email Thread
Since my phone's memory amount doesn't seem to be enough even for browsing, I've decided to create a swap partition. But I need your assistance since I got many questions.
- Do I have to format the whole SD card and then split it to two partitions? Isn't that possible to just change the size of the existing partition and make a new one from free space acquired because of that?
- Is my SD card good for that? It's AData 32GB MicroSDHC Class 10.
- What's the risk of potential data loss because of swap being enabled?
- Will that break the apps that are moved to SD card?
and last:
- Which method will work with the newest build of CM 10.1 by NeverGone/RU?
Will really appreciate any assistance!

Wysłane z mojego HTC Vision przy użyciu Tapatalka
8th February 2014, 03:28 AM |#2  
bradley_e_smith's Avatar
Senior Member
Flag Florida
Thanks Meter: 110
While I don't think swap is needed (I have run both ways), when I did use swap (ICS,JB,KITKAT) I put the swap on the /cache mount point. I figured that putting swap on the sdcard might be slower and wear out the sdcard faster. Plus it appears that on 4.0+ Android the /cache file system is not used as much anymore.

So having said this, I would copy the file below to the /system/etc/init.d directory (making sure the permissions are correct).


===filename: 90cachswap
# Enables swap on data partition

# file is /cache/swap

# POI: this can be used along with sdcard swap partition
# the load will be automatically evenly divided between the two locations
mv /cache/swap /cache/swap.old
busybox dd if=/dev/zero of=/cache/swap bs=1M count=128
chmod 0600 /cache/swap
mkswap /cache/swap
busybox swapon /cache/swap
rm /cache/swap.old
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes