Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Assistance with making a swap partition

OP TheReduxPL

7th February 2014, 03:57 PM   |  #1  
TheReduxPL's Avatar
OP Senior Member
Thanks Meter: 20
 
190 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Hi!
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, 04:28 AM   |  #2  
bradley_e_smith's Avatar
Senior Member
Flag Florida
Thanks Meter: 70
 
522 posts
Join Date:Joined: Oct 2009
More
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).

-brad

===filename: 90cachswap
#!/system/bin/sh
# 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
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes