How to Partition the SD Card of an Android
Android phones come with internal memory and with an SD card to store downloads, video and pictures. If you want your Android to run faster, one of the things you can do is partition the SD card and direct your applications to be stored there, rather than on the internal memory. It is a simple process that gives you more flexibility in your phone use. To partition an Android SD card, you need to root your Android first. Rooting differs for each phone running the Android operating system.
Things You'll Need
- Rooted Android phone
- Android SDK on your computer
Partition the SD card using gparted. This option works well if you run a gnome based version of linux with gparted installed, or you can burn a gparted Live CD which runs on any operating system. Mount the phone on your computer over the USB or remove the SD card and insert it into a card reader attached to your computer. Back up all of the files from the SD card onto your computer. Launch gparted and select the SD card drive from the drop down menu in the upper right-hand corner. When the drive comes up in the visual, right click on it and choose "unmount" and then hit delete, which deletes all of the files on the SD card. Click the "New" button and choose the FAT32 format. This partition is for all of your photos, videos and downloads. Figure out the size for this partition by taking the maximum size of your SD card and subtracting out about 512MB for your applications and 32MB for your swap partition. The 512MB partition can be set up as an ext3 or ext4. Be sure to denote the 32MB partition as swap. Once you have all of the space on the SD card allocated to one of these three partitions, hit "Apply."
Partition the SD card with the sdparted.txt file. Back up all of your photos and videos to your computer before you begin. Download the sdparted.txt file to the C drive on your computer. Connect your Android to the computer using the USB cord and boot it in recovery mode. The way to do this may differ depending on which Android phone you have. Open the "tools" folder in the SDK folder and copy adb.exe and AdbWinApi.dll into C:\windows\system32 folder on your computer. Open a command prompt and enter the following commands: adb push /sdparted.txt /sbin/sdpartedadb shell chmod 755 /sbin/sdpartedadb shellThe next command partitions your SD card.sdparted -efs ext4Press "Y" to confirm that you want to unmount all of the current partitions on the card. Press "Y" again to confirm that you want to erase everything on the SD card. Press "Y" one more time to confirm that you want to repartition the card. Type "Exit" in the command prompt and restart your phone.
Partition the SD card using sdsplit. Boot your phone and launch the terminal application. If the ROM you put on your phone does not have a terminal application pre-installed, get one from the market. Enter the following commands:su# cd /data# wget http://18.104.22.168/bin/lib/droid/sdsplit# chmod 555 sdsplitexitFigure out the size of the partition you want. If you have an 8GB SD card and want 1GB allocated for applications, use 7GB as the size for the FAT32 partition. You have to enter it as 7000M in sdsplit.Run sdsplit by entering the following commands:# /data/sdsplit -nd -fs 7000Mexit
Tips & Warnings
- Some rooted Android phones allow you to partition the SD card from the recovery menu.
- Partitioning the SD card on your Android may void your warranty.
- Backup all of your pictures, videos, pdfs, music and anything else downloaded on your Android onto your computer before you begin repartitioning the SD card. Everything on the SD card gets erased when you repartition it.