[myTouch 3G Slide Android Development] lstevens86:
This article is for people with rooted Android phones and having trouble with eugene's method. Everyone else please ignore. There are dozens of ways to partition your SD card and I would like to share the one that has worked for me every time. I prefer to manually partition my SD card because it gives me complete control.

Requirements before getting started:

Already Rooted Mytouch 3G Side

Clockwork recovery

SD Card (Class 6 suggested but any will work)

Android Device Bridge(ADB): Comes with the Android SDK.

Command Prompt on your computer

These instructions apply to both the Windows command prompt and the Mac terminal. I was using Windows 7. You can partition your SD card at any time, but you might as well do it before you flash a new build of Android. As always, back up your data when performing any hacks. Partitioning your SD card will erase all data on it. Read the whole thing before starting.

I'm Not Responsible for Any Damage to your Phone or Memory Card

All commands you need to type are in bold (my comments are in parenthesis). If you do not know how to use ADB, leave a comment for help or read ADB for Dummies over in the forums.

Step 1.

Step 1: Connect your phone to your computer via USB. Reboot into Clockwork recovery mode. Make sure your phone is seen by adb. After your phone has booted into the clockwork recovery and seen on the recovery screen. Go to the partition menu and unmount sdcard.

Next:

Command: adb shell (type this after your phone has booted into the clockwork recovery and seen on the recovery screen. it should take you to a # prompt)

Step 2.

Step 2: Open parted to partition your SD card.

Command: parted /dev/block/mmcblk0 (opens parted and mounts your SD card)

Step 3.

Step 3: Check the size and partitions of your SD card. The print command will display this info. You can see the size of my SD card is 7944 MB (8 GB). I have 1 partition which is fat32. If your SD card is blank and no partitions are listed, you can skip to Step 5.

Command: print (displays SD card information)

Step 4.

Step 4: Remove all existing partitions. If you have multiple partitions, remove each one at a time.

Command: rm 1 (deletes partition number 1)

Command: rm 2 (if needed. keep going till all partitions are removed)

Command: print (check when you are done to make sure all partitions are removed)

Step 5.

Step 5: Create your new partitions. You can make these any size, but the most common setup is 32 MB linux-swap partition, 512 MB ext2 partition, and remaining free space as a fat32 partition. In order to work properly, the partitions must be created in this order: fat32, ext2, linux-swap.

The linux-swap partition is used for a swap file on some builds. Not all builds use linux-swap, but I create one just in case I ever need it.

The ext2 partition is where your apps will be installed. I use 512 MB which gives me plenty of room but you can go larger like 1024 MB if you want. Parted only creates ext2 partitions.

When using the Linux command mkpartfs, you must tell it where to start and and end each partition. This can be done by taking the total SD card size and subtracting the linux-swap then ext2 partition sizes. See the following example for my 8 GB card that came with phone.

Command: mkpartfs primary fat32 0 7400 (start is 0 and end is Total C)

Command: mkpartfs primary ext2 7400 7912 (start is Total C and end is Total B)

Command: mkpartfs primary linux-swap 7912 7944 (start is Total B and end is Total A)

7944 Total A

-32 linux-swap

7912 Total B

-512 ext2

7400 Total C

Partition sizes for a 8 GB SD card.

Step 6.

Step 6: Check the sizes of your partitions. Use the command print again to display the partition sizes. If you made any mistakes you can return to Step 4 and remove them.

command: print (displays your partition information)

Step 7.

Step 7: Exit parted. For most users this is the final step.

command: quit (exit parted and return to # prompt)

Now you have a partitioned sdcard for A2SD