Jump to content


Photo

*** How To PARTITION SDCard ***

- - - - -

  • Please log in to reply
32 replies to this topic

#1
shokka9

shokka9

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,499 posts
  • Gender:Male
  • Location:The moon
  • Interests:Everything
  • Devices:iPhone 5, HTC One
  • Twitter:@shokka9

Firstly HUGE props to androidandme.com (Taylor Wimberly) & 51dusty @ xda-developers.com for the Original post and threads at their relevant forums.

I mainly put this here, as i found lots of ways on the nternet, and none worked or worked as expected or properly....I started with Ubuntu, thinking it would be the best method. Probably is, but i kept getting crazy issues after having sucessfully doing it once.

It is ESSENTIAL that you create the partitions in the following order, if NOT FOLLOWING THE GUIDE:

1. fat32
2. ext2/3
3. linux-swap


Words from the guys above, edited slightly by ShokkA9 below.


Requirements before getting started:
  • Cyanogen Recovery Image v1.4 or greater
  • SD Card (Class 6 suggested)
  • Android Device Bridge(ADB) - See attached with Shell.cmd inside to...just double click to open cmd prompt in the right place :)
  • Android build that supports Apps2SD
Recommended to do before any updating of the ROM..

These instructions apply to both the Windows command prompt and the Mac terminal. As you can see from the screens, Windows Vista was used. 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. This guide is split into 9 steps, but it is not as difficult as it looks. Read the whole thing before starting.

..All commands mentioned below, need to be typed into the command prompt window..


Step 1
Download the attached ADB.rar; extract it; open it; i am using the PC version.
Double click shell.cmd
, to open command prompt window
Now look at the attached screen prints...the number represent the step it relates to. Easy :D

Step 2
Connect phone to computer via USB lead.
Reboot into Recovery Mode, via power on button whilst holding home button.
Or use this command:
adb shell reboot recovery
Type:
adb shell (after your phone has booted and on the recovery screen) in the cmd prompt window and in here every time you see Type:

Step 3

Type: parted /dev/block/mmcblk0
Opens parted and mounts your SD card

Step 4
Type: print
To check the size and partitions of your SD card, the example here is an 8GB card. This SD card is 7969 MB. 1 partition which is fat32. If your SD card is blank and no partitions are listed, you can skip to Step 6.

Step 5
To remove all existing partitions, use the commands below. If you have multiple partitions, remove each one at a time.
  • rm 1 (deletes partition number 1)
  • rm 2 (if needed. keep going till all partitions are removed)
  • print (check when you are done to make sure all partitions are removed)

Step 6
Creat 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 and we can convert them to ext3 later.

When using the Linux command mkpartfs, you must tell it where to start 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.

Total Size = 7969mb 'minus' 512mb(ext2) 'minus' 32mb(linux-swap) = 7425mb for fat32.

  • mkpartfs primary fat32 0 7425 (start is 0 and end is Total C)
  • mkpartfs primary ext2 7425 7937 (start is Total C and end is Total :P
  • mkpartfs primary linux-swap 7937 7969 (start is Total B and end is Total A)

Step 7

Type: print
To
check the sizes of your partitions. If you made any mistakes you can return to Step 5 and remove them. [/size]


Step 8
Exit parted and upgrade your ext2 file system to ext3. For most users this is the final step, to upgrade to ext4, look at the links at the top of this post. We suggest all users upgrade to ext3. Its main advantage over ext2 is journaling which improves reliability and eliminates the need to check the file system after an unclean shutdown.
  • quit (exit parted and return to # prompt)
  • upgrade_fs (script to upgrade from ext2 to ext3)

Step 9
Finished. Check your work with print.
  • parted /dev/block/mmcblk0 (to open parted again)
  • print (check all your system partitions and their sizes)
  • quit (exit parted)
  • reboot (reboot your system to the operating system)
Thats it, the next time you boot your Droid, it should move the apps to the ext3 partition.

I had to do this, as the ones around are not clear, except this one, and the site can be down at times also, so at least it is in this forum too.

Android rocks!!

Big respect to Paul (main man), Cyanogen, and anyone else who makes stuff work on the Droid!!


Attached Files


Edited by shokka9, 29 October 2009 - 02:48 PM.

  • 0

HTC One | Unlocked Bootloader | CWM | Root | S-OFF


#2
jonathanmusto

jonathanmusto

    Regular

  • Members
  • PipPip
  • 88 posts
  • Devices:HTC Hero
Thanks for this,

I'm currently running Modaco 2.3 but I guess all my apps are still stored in memory since I've never partitioned my SD. If I do this now will it automatically move all my apps to the SD, or will it only be new apps that I install. Will an uninstall/re-install move them to SD? ??Confused??

Thanks,
Jonathan

  • 0

#3
shokka9

shokka9

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,499 posts
  • Gender:Male
  • Location:The moon
  • Interests:Everything
  • Devices:iPhone 5, HTC One
  • Twitter:@shokka9
well, i was the same...custom ROM, but no partitions on my Sd Card.

Apparently, when you reboot your HTC (after partitioning it :)), it will move the apps automatically into the ext3 partition.

I am not 100% sure it does this.

I need a way to check, but i do not know what app to use to be able to check.

I just wanted to post this, as a lot of people have trouble doing this to their SD Card.

  • 0

HTC One | Unlocked Bootloader | CWM | Root | S-OFF


#4
jonathanmusto

jonathanmusto

    Regular

  • Members
  • PipPip
  • 88 posts
  • Devices:HTC Hero

well, i was the same...custom ROM, but no partitions on my Sd Card.

Apparently, when you reboot your HTC (after partitioning it :)), it will move the apps automatically into the ext3 partition.

I am not 100% sure it does this.

I need a way to check, but i do not know what app to use to be able to check.

I just wanted to post this, as a lot of people have trouble doing this to their SD Card.


Thanks, i'll give it a whirl tonight! I guess i should see my free space shoot up....

  • 0

#5
chuti98

chuti98

    Regular

  • Members
  • PipPip
  • 64 posts
  • Location:London
  • Devices:i900; HERO
  • Twitter:@Chuti98
Why don't you guy flash recovery image RA-hero-V1.2.2.img by amon_ra. You can find it here or at XDA. That one can partition as same as above and move cache alo program to ext3 http://android.modac...ra-hero-v1-2-2/

  • 0

#6
jonathanmusto

jonathanmusto

    Regular

  • Members
  • PipPip
  • 88 posts
  • Devices:HTC Hero

Why don't you guy flash recovery image RA-hero-V1.2.2.img by amon_ra. You can find it here or at XDA. That one can partition as same as above and move cache alo program to ext3 http://android.modac...ra-hero-v1-2-2/


Looks good, thanks, will give that a go....

  • 0

#7
Captain Jasper

Captain Jasper

    Newbie

  • Members
  • Pip
  • 18 posts
  • Gender:Male
  • Devices:T-Mobile G2 Touch
I have a 2gb sd card already installed and partitioned as stated in this post (smaller sizes obviously). I also have MCR2.3 installed and therefore apps2sd working already.

I have bought an 8gb sd card and would like to copy all my existing data from the partitions on my 2gb card over to the new 8gb card. Could anyone help me with the step by step commands to do this so I don't lose any data?

I can use Mac OSX or Windows Vista.

Thanks in advavnce.

  • 0

#8
chuti98

chuti98

    Regular

  • Members
  • PipPip
  • 64 posts
  • Location:London
  • Devices:i900; HERO
  • Twitter:@Chuti98

I have a 2gb sd card already installed and partitioned as stated in this post (smaller sizes obviously). I also have MCR2.3 installed and therefore apps2sd working already.

I have bought an 8gb sd card and would like to copy all my existing data from the partitions on my 2gb card over to the new 8gb card. Could anyone help me with the step by step commands to do this so I don't lose any data?

I can use Mac OSX or Windows Vista.

Thanks in advavnce.


I think you must use mac or linux to see all your app in ext3 and move it then

  • 0

#9
shokka9

shokka9

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,499 posts
  • Gender:Male
  • Location:The moon
  • Interests:Everything
  • Devices:iPhone 5, HTC One
  • Twitter:@shokka9
How is it possible on the Device to look in the ext3 partition to confirm if any apps are installed to there?

  • 0

HTC One | Unlocked Bootloader | CWM | Root | S-OFF


#10
chuti98

chuti98

    Regular

  • Members
  • PipPip
  • 64 posts
  • Location:London
  • Devices:i900; HERO
  • Twitter:@Chuti98

How is it possible on the Device to look in the ext3 partition to confirm if any apps are installed to there?


If you wanna see app that install on card use root explorer to browse it

  • 0

#11
Captain Jasper

Captain Jasper

    Newbie

  • Members
  • Pip
  • 18 posts
  • Gender:Male
  • Devices:T-Mobile G2 Touch
Thanks, but that wasn't what I asked. Can anyone help me with the commands to move the files from each of the three partitions on one sdcard to the new sdcard?

I think you must use mac or linux to see all your app in ext3 and move it then


  • 0

#12
keef319

keef319

    Enthusiast

  • MoDaCo Silver
  • PipPipPip
  • 162 posts
  • Gender:Male
  • Location:Stevenage, UK
  • Devices:T-mobile G2 Touch
  • Twitter:@keef319
Should I have "Apps2SD" or "Apps2SD 2" ??

  • 0

#13
Captain Jasper

Captain Jasper

    Newbie

  • Members
  • Pip
  • 18 posts
  • Gender:Male
  • Devices:T-Mobile G2 Touch

Thanks, but that wasn't what I asked. Can anyone help me with the commands to move the files from each of the three partitions on one sdcard to the new sdcard?


So, I'll answer my own question then :) .. now I have taken the pain!!

For those who might be interested on how to upgrade your sd card to one of a larger size and take all the files from the old card to the new one....

I had partioned my original card as per the instructions in this post. I then bought an 8gb card and also partioned it in the same way. The problem was that whilst copying the files from the fat32 partition was easy, I couldn't see the files that were on the ext3 partition from my Mac - essentially all those that apps2sd had put there. I downloaded Paragon ExtFS for Mac OSX which enables you to mount the ext3 partition on your sdcard so you can then copy the files onto your hard drive and then onto your new sdcard. Fully functional 10 day trial is available for download

I had to use First Aid from within the Mac Disk Utility app to repair the parttion before I could mount the partition but after that it worked.

When putting the new sdcard into the phone some of the application icons that I had on my home screens no longer linked to the apps. By going into the Market and downloading and installing the app they eventually worked. Strange thing is that this didn't apply to all the apps; Robo Defense, Droid Mini Golf, London Tube Map. On trying to re-install these I got installed failed but on subsequent attempts it worked.

End rseult is that I think I saved myself some time in not having to re-install everything but I am not sure why some apps needed re-installing, even if it was only a a few.

Didn't manage to find out how to view what was on the linux-swap partition....

  • 0

#14
wodz

wodz

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:hero MoDaCo 1.5
Thanks for posting this GREAT tutorial, it works perfectly every time!

  • 0

#15
elpelco

elpelco

    Newbie

  • Members
  • Pip
  • 18 posts
  • Gender:Female
  • Devices:HTC Hero
I tried this, and I can't get past the recovery screen. When I type 'abd shell' all I get is 'error, device not found' any ideas?

  • 0

#16
scuj1

scuj1

    Regular

  • Members
  • PipPip
  • 56 posts
  • Gender:Male
  • Location:Edinburgh
  • Devices:LG2X (CM7 Nightlies)
  • Twitter:@scuj1
Finally worked up the courage to do this. Some hairy moments doing it on a Mac, but glad to say all up and running smoothly.

Best advice, just take your time and READ! :)

  • 0

#17
paugustin

paugustin

    Enthusiast

  • Members
  • PipPipPip
  • 157 posts
  • Gender:Male
  • Devices:Acer Liquid E2
  • Twitter:@acerclubfr
Thanks a lot for this tutorial it worked great for me too :)

  • 0

#18
Clouseau

Clouseau

    Newbie

  • Members
  • Pip
  • 7 posts

If you wanna see app that install on card use root explorer to browse it


Where I have to look for the apps, if there are on the card?

thx

  • 0

#19
Fenelon

Fenelon

    Newbie

  • Members
  • Pip
  • 3 posts
  • Devices:Hero
I have Modaco 2.9 and 8gb sd parted as mentioned. (fat32+ext3+swap)
I even did a wipe and I really can't get why is it still showing 125Mb for apps in Memory panel.
It does decrease when I install new apps.

Is Apps2SD working? Can't get... Really confused!
Moreover, I can't write anything to ext partition with my Ubuntu thumb drive. Readonly.

In TheUnlockr tutorial to apps2sd it's said that Memory panel must show the SD partiton size, but not the internal one.

Paul, please! Could you explain how does a2sd in your ROM work?
And also, the Swap... eRay shows only 60Mb free when no apps running. (I thought it should be more when using swap)

  • 0

#20
kendon

kendon

    Addict

  • Members
  • PipPipPipPipPip
  • 923 posts
  • Devices:HTC Hero, ZTE Blade

Where I have to look for the apps, if there are on the card?

/data/app and /data/app-private

I have Modaco 2.9 and 8gb sd parted as mentioned. (fat32+ext3+swap)
I even did a wipe and I really can't get why is it still showing 125Mb for apps in Memory panel.
It does decrease when I install new apps.

Is Apps2SD working? Can't get... Really confused!
Moreover, I can't write anything to ext partition with my Ubuntu thumb drive. Readonly.

In TheUnlockr tutorial to apps2sd it's said that Memory panel must show the SD partiton size, but not the internal one.

Paul, please! Could you explain how does a2sd in your ROM work?
And also, the Swap... eRay shows only 60Mb free when no apps running. (I thought it should be more when using swap)

if you do a search for "apps2sd not working" you will find three topics, in at least one i explained in detail to see whether apps2sd is working or not.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users