HOWTO: Partition Your SDCard for A2SD

Last Updated:

  1. savoxis

    savoxis Well-Known Member Developer

    UPDATED 10/8

    Velocity III is here!

    Now lets get that A2SD working

    So with the release of Velocity 0.3 (thanks Trident) I would imagine allot inquiry as to how to properly use the APPS2SD feature. Lets start with a little explanation:

    The A2SD in Velocity is setup as a semi-intelligent script that runs at boot, it will check to make sure that your SDCARD has a second partition available (/dev/block/mmcblk0p2) that is formatted as an EXT file system, then it will move all of your application files from /data/app to your SDCARDs second partition, which is located at /system/sd, the script will then create a shortcut (symlink) from /data/app -> /system/sd so all newly installed applications will be placed on the SDCARD.

    The easiest way to accomplish this is through the ROM Manager application available in the Marketplace:

    1. Plug your phone into a PC and copy all data you want to save off of your SDCARD onto a temporary folder on your PC, When you are done backing up either unmount your sdcard, or unplug the phone from the PC

    2. Open ROM Manager and be sure that you have the latest ClockworkMod Recovery installed. It will be apparent in the top RECOVERY section of the program

    3. Scroll down to the UTILITIES section and select Partition SD Card, this will give you a menu allowing you to select the size in which you want your EXT partition on the SDCARD to be, Personally I would recommend using at least 128mb although there is no downside (other than losing an equal amount of space on your 1st partition) in making it as large as allows.

    4. The ROM Manager will then ask if you would like to create another partition to use as SWAP, I would NOT recommend creating one (select 0mb) unless you have a Class 6 SDCARD. The constant writing to SWAP can cause problems with class 4 cards. If you still have the card that came with your Ally. Its Class 4

    5. The ROM Manger will now reboot into Recovery to partition your Card, it will take a few moments for it to complete and afterwards you can reboot. You will notice that you have nothing on your SDCARD, you can now plug the phone back into the PC and copy all the data that you backed up in Step 1 to the sdcard.

    Partitioning Your SDCard With the AmonRA (Drellisdee's) Recovery

    1. Plug your phone into a PC and copy all data you want to save off of your SDCARD onto a temporary folder on your PC, When you are done backing up either unmount your sdcard, or unplug the phone from the PC

    2. Boot up into recovery by holding down the SEND MENU and END buttons.

    3. Select "Partition SDCard" Then Partition SDCard Again

    4. I will ask for the size of the SWAP Partition, 32MB is default, 0 is no swap. If you plan on using a program like swapper to enable swap2sd then use 32MB, if you have a slower (class 4 or 2) SDCard, you will probably want to select 0 here. Use the "trackball" (arrow keys around OK button)

    5. It will ask for EXT Size. I would recommend allowing for 128MB or more. I personally use 512 because I have a large SDCard.

    6. It should now partition your card (if someone can PM me a verification that would be great, this is as far as I went since I don't want to RE-Partition my card lol)

    7. Reboot into recovery again, and go to partition SD Card, you can now select ext2-3 then 3-4 for faster file system.

    8. If you have Velocity 3 flashed already it will automatically enable A2SD on your first boot. Otherwise you will need to flash Velocity 3, or use Killertonez to install darktremmors a2sd

    Please Note I write this section up mostly on memory and whatnot, so if you see any discrepancies, PLEASE contact me so I can correct this.


    So I partitioned my card without errors and rebooted Velocity 0.3 how can I tell A2SD is working?
    You can test a2sd by opening a terminal emulator and doing the following
    Code (Text):
    2. su
    3. ls /system/sd
    4. ls -l /data
    5. df
    If it is installed correctly you will see all your apps located in /system/sd and you will see a symlink from /data/app => /system/sd and df will show disk usage by partition.

    My system takes longer to boot why?
    The downside to having a2sd enabled is the system will have to check the filesystem for errors and mount the sdcard before it boots, this will add a few seconds to your boot time and your first boot may take a few minutes if you have allot of apps

    All my apps in /system/app are still there
    The script does not copy your system apks to the sdcard, it is not a good idea because then you would not be able to remove the sdcard without the system crashing

    When I install a app from the marketplace my internal phone memory still goes down a little bit.
    This is due to the dalvik cache for these apks still being stored in internal storage, at this time it may cause damage to lower quality (class 4) cards to store these files on sd.

    ClockworkMod has a problem mounting the partition it created :). When wiping data you will see an error like this:
    Code (Text):
    2. mount: mounting /dev/block/mmcblk0p2 on /sd-ext failed: Invalid argument
    3. E:Can't mount /dev/block/mmcblk0p2
    4. (File exists)
    This means that it DID NOT wipe the 2nd partition on your SDCARD, if you just made the partition, ignore this message because it is blank anyway. But if you are reflashing you WILL need to wipe this information. For the time being you can wipe it through adb or a terminal emulator on your phone, there are better ways but this is quick and easy:
    open a adb shell to your phone or a terminal emulator if you can and:
    1. su
    2. umount /dev/block/mmcblk0p1
    3. mount /dev/block/mmcblk0p2 /sdcard
    4. ls /sdcard
    5. rm -R /sdcard/*
    6. umount /dev/block/mmcblk0p2

    Or you can flash to Drellisdee's Recovery until Koush releases an update to ClockworkMod

    Written but not proof read -Savox

    Madd Dogg, Nemesiis, jdmc and 11 others like this.
  2. Trident

    Trident VIP Member VIP Member

    You're the man! :)
  3. That's why I love this forum. Great, helpful information that even I can understand!
  4. mattrb

    mattrb Well-Known Member

    So how do force apps to go on the internal storage and not app2sd. For example live wallpaper, hand cent, or dialer one.
  5. jetblack

    jetblack Well-Known Member

    Because this symlinks /data/app to the partition on your sdcard, anything that installs to /data/app (which is anything you get from the market, for instance) will be on the sdcard. The only way to force things onto internal storage is to install them to /system/app. I'm pretty sure the dialer and live wallpaper apps will be there by default. You'll have to move handcent to /system/app manually, either from the command line or with something like Root Explorer.

    If you decide to move apps to /system/app, remember that you must first remount the /system partition read-write. You will also have to update them manually - updates will automatically install to /data/app.
    savoxis likes this.
  6. dvanlinton

    dvanlinton Well-Known Member

    ok works like a charm... thanks.. one question though how do you force apps to go on to internal storage for example hand cent...
  7. wgbeatty

    wgbeatty Well-Known Member

    Great guide, thanks! I followed instructions and thought all went well, but something isn't right. I'm using ROM Manager and paritioned the SD card as instructed. When the phone rebooted, the Velocity (I just flashed v0.3 today) logo came up is now blinking every 5 seconds or so. Phone isn't booting completely.

    Not sure what happened exactly, but am wondering what a next step would be.

    EDIT: Didn't work right, but I'm doing a recovery now and will try again! Sorry about the post.
  8. Oblivious72

    Oblivious72 Well-Known Member

    i bought an 8Gb Sd card not thinking about the class. So i think i messed up an now i have a class 4 sd card. can/should i partition my sd card for apps2sd? will i still be able to flash velocity .3 with out the partition?
  9. savoxis

    savoxis Well-Known Member Developer

    The class dictates the speed. Using a class 4 card for a2sd isnt horrible it will just run slower than a class 6 card. Having a fast card is not so much important for a2sd as it is for swap2sd
    Oblivious72 likes this.
  10. Oblivious72

    Oblivious72 Well-Known Member

    ok thanks, i will try it and see what happens

    EDIT: so what does apps2sd do? in a nut shell. does it free up space on my internal storage? is that all?
  11. savoxis

    savoxis Well-Known Member Developer

    Well yes, it frees up internal storage space which is very important on the Ally since it uses mtdblock5 (/data/) as RAM/Swap space, so the more apps you have installed in internal memory the slower the phone will run. Putting them on a partition on your SDCard lets you install a whole lot of apps (way more than allowed on the internal storage) without slowing down the phone as much
    darkxsun and Oblivious72 like this.
  12. Oblivious72

    Oblivious72 Well-Known Member

    awesome, i will try it and hopefully its sweet
  13. Oblivious72

    Oblivious72 Well-Known Member

    i did what you said to do in order to partition, but when i go to terminal emulator and type
    ls /system/sd
    i get
    /system/sd: no such file or directory

  14. getitnowmarketing

    getitnowmarketing Well-Known Member Developer

    Can you do a how to with my Ra recovery too? Its a bit easier.
  15. Eridger

    Eridger Member

    Why are people having problems with creating an ext3/4 partition? Really all you'd need to do is download gparted, an ubuntu livecd, or something else with a partitioner installed and add an ext partition to your sdcard.
  16. savoxis

    savoxis Well-Known Member Developer

    I quickly made a guide using AmonRa, it may not be exact but it is the general idea. If you see any errors let me know
    msjudie likes this.
  17. netizenmt

    netizenmt Well-Known Member

    Not sure what I am doing wrong. Every time I install (running Velocity 0.2 and GNM_Turbo4), I end up with the Droid loop. And yes, I cleared the cache and the Dalvik-cache.

    Any suggestions? Thanks!
  18. dots

    dots Well-Known Member

    Since you are on velocity 0.2 you have to flash first then
    netizenmt likes this.
  19. Matthewisbomb

    Matthewisbomb Well-Known Member

    If someone could private message me to help would be greatly appreciated
  20. woowoowooty

    woowoowooty New Member

    According to xda, partitioning does NOT work through ROM Manager. It didn't work for me. I am having the hardest time getting my card partitioned. Any suggestions before I go crazy??
  21. flyinjoe13

    flyinjoe13 Well-Known Member

    It worked through ROM Manager for me or at least I think it did. Before partitioning, I had 92mb of internal space. After partitioning apps2sd, I had 112mb of internal space. I assumed that meant it had worked.

    When you say it doesn't work, what exactly do you mean? Does it go through the process, like rebooting into recovery, but when it finishes it hasn't done anything? Or do you get some error message in ROM Manager when you try to partition it?
  22. flyinjoe13

    flyinjoe13 Well-Known Member

    Mine says the same thing, but it did work. I tested it by downloading a 6mb app from the market and it installed and worked fine and I lost no internal storage space in the process.

    On a similar note, how do you see how much space you have left on the sdcard for apps with a2sd since it's not listed in the stock storage space menu?
  23. dots

    dots Well-Known Member

    Use drellisdee's recovery. Works flawlessly for me.
  24. mattrb

    mattrb Well-Known Member

    ROM manager works with partitioning. The xda post you are looking at is old. Use drellisdees recovery if you have issues. It takes 2 minutes to fastboot a recovery.
  25. Matthewisbomb

    Matthewisbomb Well-Known Member

    I know i followed the directions i just wanted to make sure that it worked. I can tell that when i install and app my sd card memory goes down but my internal also goes down a little is that suppose to happen?

Share This Page