How to partition your Androids SD card to install apps on it

This tutorial will take you step by step through the process of partitioning the SD card in your Android phone so that you can save (and run) applications on/from it.

The process of installing programs on your SD card – knows as Apps2SD, App2SD and A2SD – not only allows you to install many more programs on your Android phone, but it keeps internal memory free so your device runs faster.

This tutorial will show you how to partition your SD card so that you can run programs from it.

  1. Before you even get started, here are the disclaimers. First, you’re going to be wiping your SD card completely clean. That means that every file you currently have saved on it, should be backed up before you even get started. Second, you’re going to need a rooted Android phone in order to take advantage of the partitioned SD card. Luckily we have a detailed tutorial that shows you just how to do that, if you haven’t already. Finally, you’ll need to have the Android SDK installed on your PC. And as you may have guessed, we have a tutorial for that as well (NOTE: you only need to follow the first 10 steps in the previously mentioned tutorial to install the SDK).
  2. Now that you’ve backed up your SD card, rooted and installed CyanogenMod (or any other mod that includes Apps2SD by default) and have the Android SDK installed on your PC – lets get started.

    Right-click on this link and save the file (sdparted.txt) to the root of your C:\ drive. Note: don’t save it to you’re My Documents folder, your Downloads folder or your Desktop. It needs to be saved right on your C:\ drive. This script (sdparted.txt) was developed by “51dusty” at the xda-developers forums. You may want to visit this thread at the xda forums and download the latest version of sdparted.txt, as it is updated somewhat frequently. The version I’ve provided is v0.5.2.

  3. sdparted.txt in the root of C:\

  4. Connect your Android phone to your PC via USB. Boot into cm-recovery by holding down the Home button on your phone when you hit the Power button. This should bring you into cm-recovery (see image below).
  5. Now locate your Android SDK folder. Inside the tools folder, copy the two files adb.exe and AdbWinApi.dll to your C:\windows\system32 folder.
  6. Now open a Windows Command Prompt (click Start > Run > enter cmd and click OK). At the prompt, type:

    adb push /sdparted.txt /sbin/sdparted

    Then enter:

    adb shell chmod 755 /sbin/sdparted

  7. click to enlarge

  8. Now enter the command adb shell. You should get a ‘new’ prompt as seen in the screenshot below.

  9. click to enlarge

  10. At this point you issue the command to partition your SD card. There are a number of ways to do this, but the most common is sdparted -efs ext4

    This will create a swap that’s 32MB, an ext4 partition that’s 512MB and the remainder of your card will be a fast32 partition. This allows for 512MB of apps to be installed on your SD card – which is plenty of space. If you’d like to set your card up differently, see all of the options listed here. For the sake of this tutorial, we’ll run:

    sdparted -efs ext4

    Right away you’ll be asked to confirm this action. Type Y and hit enter. Note: it’s important that you type a capital Y, not a lower case y.

  11. click to enlarge

  12. Again, you’ll be asked to confirm your action. Type Y.

  13. click to enlarge

  14. And yet again you’ll be asked to confirm your action. Type Y.

  15. click to enlarge

  16. Now you’ll be presented with a ‘print out’ of your newly partitioned SD card. It should look similar to the screenshot below (but not exact, unless you have an 8GB SD card, as I do). Type exit to leave the adb shell. Restart your phone.

  17. click to enlarge

  18. That’s it! You’re done! When you install apps now, they’ll be installed to your SD card instead of the interal phone memory – allowing you to install many, many more. You should also see a nice improvement in your phones speed.

Home » Mobile Phones » Android » How to partition your Androids SD card to install apps on it

36 thoughts on “How to partition your Androids SD card to install apps on it”

  1. Looking at doing this when my phone is rooted, will the partition essentially be looked at as part of the phones internal memory, so I can install apps to it that usually will not go on a card?

  2. Pingback: SD Karte partitionieren -

  3. Hi I download mini tool for Partition but i can not partition plz tell me how i do it it really need to do but i am very new to android
    device=micromax a60

  4. I already copied AdbWinApi.dll to my C:\windows\system32 folder cheked and they are there… but when i run the cmd thing it says they are not there and closes…

    what can I do?

  5. Pingback: Braucht man noch eine sd-ext Partition? - Seite 2 -

  6. Pingback: Help me please with rooting my phone - Android Forums

  7. Después de tanto buscar y buscar hay les dejo los nombres de los programas q se usan para guardar apps en la sd y para hacer la partición en la sd espero y les sirvan ya q a mi m funcionaron muy bien

    link2sd: para guardar las apps en la sd.
    MiniTool Partition Wizard Home Edition: para hacer la partición de la sd
    Los otros programas como el norton partition magic etc… Son basura te ponen muchas trabas o no arranca o no reconoce la sd bueno los dejo y saludos chavos hehe

  8. Pingback: Saving Android Apps. to SD card « Mukut Saha

  9. @Thomas/Julia-

    I was running ClockworkMod Recoery for a while on an HTC Magic (32B) not knowing that maybe it was unstable — memory issues I think. ROM Manager on the phone itself allowed me to reinstall what I upgraded from before RA-sapphire-v1.7.0G. Getting back into recovery with this, allowed me to get sdparted to work.

    Hope that helps — your same error was driving me crazy for several days.

  10. Pingback: SD partition - Android Forums

  11. Pingback: Partitionieren der sd-Karte im Recovery schl

  12. Pingback: Como instalar o Android 2.1 no Motorola Dext | Droid Brasil

  13. before i go ahead and try all this ….feedback would be nice if anyones done it one a HTC Desire running droid 2.1

  14. I got stuck at ‘adb devices’ with a “create process failure error 2” … it turns out that you don’t need step 4 IF when, after installing the Android SDK, you added it to the System Environment Path. If you do copy it to the windows system32 you get this error message. So I deleted both adb.exe and the DLL from that folder, and it worked fine.

  15. I already do this procedure successful but not using the adb.

    1. copy the sdparted.txt in my sdcard.
    2. power off the my G1 and enter to recovery (home+end call)
    3. enter console (alt+x)
    4. hit enter once then i type “mount /sdcard”
    5. mv /sdcard/sdparted.txt /sbin/sdparted
    6. chmod 755 /sbin/sdparted
    7. i type “sdparted” then anwer some question with “Y” no “y”
    8. reboot my G1

    when i checked my secondary storage it says “Unavailable”

    Anyone can fixed this annoying output.


  16. Pingback: rooting my G1 and flashing to CyanogenMod « Teh Tech Blogz0r by Luke Meyer

  17. @ xenophone… excellent instructions. Worked perfectly on my G1 with cyanogen 4.1999 with a 8GB sd card. Thanks much!

  18. hello thanks for all your help im runnining cyanogen 4.199. Im am trying to partition my 88 gig trascend sd card
    when i type the above command on console i get ” no such file or directory” i have verified that the sdparted file is on root. What can i do. thanks.

  19. two tips might work. Found them at
    a. before typing adb push, enter console on the phone(ALT-X)

    b. Skip the pc altogether and copy the file to sd card and then to the phone. This method worked for me..not requiring any SDK/Java installs on the computer. Method listed on the link above. Also posted here (thanks to 51Dusty for this method!)
    1. download sdparted.txt below to root of sdcard. (get downloadcrutch if needed*thnx lycoln)
    2. boot into cm-recovery-v1.4, goto console(alt-x)
    3. at # prompt type: mount /sdcard
    4. then, mv /sdcard/sdparted.txt /sbin/sdparted
    5. then, chmod 755 /sbin/sdparted
    6. you can now run script (ie. sdparted -efs ext4).

  20. Okay, a while ago I was messing with my phone and setting it up to act as a proxy server while plugged in. Here are 2 tips I found.

    First, be sure you’re using the USB cord that came WITH the phone, others fit it and have No problem transferring files, charging and what not. But, the cord (as you can see if you compare) is actually different and is a better cord than standard. For development modes and doing this you’ll need to use the real cord.

    Second, if you’re using Vista (I use Ultimate x64) there is NO true, proper driver and thus the device is Not found. Yes, your device is plugged in, you can transfer files normally on SD Card, BUT for the developer stuff it doesn’t.

    Now, there is a driver someone put out, which does work However you can’t run it in normal vista, you have to boot vista into a safe mode deal that will have notifiers on the edges of your computer screen. THEN the drive will be allowed use (this is due to the person not wanting to pay to sign the drivers, and vista only using unsigned drivers in this mode).

    So if you’re using Vista (I’m running Windows 7 right now and will Assume it has the same problem) be sure that you’re using the proper cord, the x64 updated driver, in the special mode. Then, and only then, will your device be found in console as such (and you’re right on track to using your phone as a proxy server if its any use to you).

    Otherwise, if you’re on XP x86, I have no clue why it’d not find the device property.

  21. ^ I’m having the same issue.

    adb push /sdparted.txt /sbin/sdparted works fine, but adb shell chmod 755 /sbin/sdparted gives me a “device not found” error

Leave a Comment

Your email address will not be published. Required fields are marked *