Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
lstevens86
Old
(Last edited by lstevens86; 29th July 2010 at 03:55 PM.)
#1  
Member - OP
Thanks Meter 1
Posts: 62
Join Date: Jun 2009
Location: Detroit, MI
Thumbs up HOW TO: Manually partition your SD card for Android Apps2SD with MT3G Slide

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
White T-Mobile G1 aka Dream
Switching Roms Everyday
2.22.19.26I
1.33.205 SPL aka Danger

Red MyTouch 3g Slide Rooted
SlideMe
 
thugmafia
Old
#2  
Senior Member
Thanks Meter 1
Posts: 213
Join Date: Jul 2009
how to upgrade to EXT 3
 
lstevens86
Old
#3  
Member - OP
Thanks Meter 1
Posts: 62
Join Date: Jun 2009
Location: Detroit, MI
That's a good question. I don't think the script eugene used has the upgrade feature. I couldn't upgrade_fs to get to ext 3 neither. That's why I left it out.
White T-Mobile G1 aka Dream
Switching Roms Everyday
2.22.19.26I
1.33.205 SPL aka Danger

Red MyTouch 3g Slide Rooted
SlideMe
 
fermunky
Old
#4  
fermunky's Avatar
Senior Member
Thanks Meter 58
Posts: 1,143
Join Date: Jun 2007
Location: Tampa, FL
Some will probably want to know this as well... If I am trying to go back to a full SD card of just a FAT partition, I imagine when making the partitions, you would simply use:

Command: mkpartfs primary fat32 0 7944

And thats all, using your 8gb example size, correct?
Current:
Phone: T-Mobile Samsung Galaxy S3 (SGH-T999)
ROM: Official stock JB from T-Mobile
Recovery: Stock

Tablet: Acer Iconia A500
ROM: CM10 Jelly Bean 4.1 by waydownsouth
Recovery: Thor's 1.7 Touch Recovery of CWM

If I do not Thank your thread, it's because of the XDA Classic forum theme, sorry...
 
thugmafia
Old
#5  
Senior Member
Thanks Meter 1
Posts: 213
Join Date: Jul 2009
Quote:
Originally Posted by lstevens86 View Post
That's a good question. I don't think the script eugene used has the upgrade feature. I couldn't upgrade_fs to get to ext 3 neither. That's why I left it out.
thanks for the info. wish he added it cause i really wanted the lenged rom wit app2sd and i require ext 3 to work
 
lesstalk
Old
#6  
Member
Thanks Meter 3
Posts: 51
Join Date: Jul 2010
PS C:\androidsdk\tools> adb shell
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
/sbin/sh: parted: not found
~ #

So what do I do here? My Slide is rooted, I'm in clockwork, the SD card was unmounted (says mount /sdcard in the partitions menu)...

ADB shows the device is connected in recovery.
 
lstevens86
Old
#7  
Member - OP
Thanks Meter 1
Posts: 62
Join Date: Jun 2009
Location: Detroit, MI
Quote:
Originally Posted by fermunky View Post
Some will probably want to know this as well... If I am trying to go back to a full SD card of just a FAT partition, I imagine when making the partitions, you would simply use:

Command: mkpartfs primary fat32 0 7944

And thats all, using your 8gb example size, correct?
Yes this is correct, just make sure you rm 2 for ext 2 and rm 3 for swap

Sent from my T-Mobile myTouch 3G Slide using XDA App
White T-Mobile G1 aka Dream
Switching Roms Everyday
2.22.19.26I
1.33.205 SPL aka Danger

Red MyTouch 3g Slide Rooted
SlideMe
 
lstevens86
Old
#8  
Member - OP
Thanks Meter 1
Posts: 62
Join Date: Jun 2009
Location: Detroit, MI
Quote:
Originally Posted by lesstalk View Post
PS C:\androidsdk\tools> adb shell
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
/sbin/sh: parted: not found
~ #

So what do I do here? My Slide is rooted, I'm in clockwork, the SD card was unmounted (says mount /sdcard in the partitions menu)...

ADB shows the device is connected in recovery.
I've done 3 different sdcards so far. just make sure the card isn't mounted.

Sent from my T-Mobile myTouch 3G Slide using XDA App
White T-Mobile G1 aka Dream
Switching Roms Everyday
2.22.19.26I
1.33.205 SPL aka Danger

Red MyTouch 3g Slide Rooted
SlideMe
 
jefwallbanger
Old
#9  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Apr 2009
Location: tucson
so after i do this, and the partitions are good, how do i actually get my apps to the sd.
 
lstevens86
Old
#10  
Member - OP
Thanks Meter 1
Posts: 62
Join Date: Jun 2009
Location: Detroit, MI
Quote:
Originally Posted by jefwallbanger View Post
so after i do this, and the partitions are good, how do i actually get my apps to the sd.
Yes if the rom you install allows it
White T-Mobile G1 aka Dream
Switching Roms Everyday
2.22.19.26I
1.33.205 SPL aka Danger

Red MyTouch 3g Slide Rooted
SlideMe

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more

Learn to Edit Graphics for your Development Work

The importance of good and appropriate graphics for your development work is undeniable. Be … more