Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,924 Members 44,988 Now Online
XDA Developers Android and Mobile Development Forum

unCoRrUpTeD SD--PARTITIONER [Partition SDCARD without losing fat32 contents] (SCRIPT)

Tip us?
 
unCoRrUpTeD
Old
(Last edited by unCoRrUpTeD; 11th May 2011 at 05:55 AM.)
#1  
unCoRrUpTeD's Avatar
Senior Member - OP
Thanks Meter 234
Posts: 1,703
Join Date: Mar 2010
Location: Fort Worth, TX

 
DONATE TO ME
Default unCoRrUpTeD SD--PARTITIONER [Partition SDCARD without losing fat32 contents] (SCRIPT)

UnCoRrUpTeD SD--PARTITIONER

I have made this really easy to partition your sdcard while preserving all data on the fat32 partition.This one is used to setup your sdcard for a2sd and swap instead of using the built in partitioning program, which will destroy all your fat32 contents. Eventually I will add support for backing up the ext partition if you want to resize the existing partitions.

You have the option of specifying the size of the partitions in /sdcard/sdpartmap.txt

To specify your own sizes and filesystem do..
Code:
c:\xxxxxx\adb shell
/ # echo 150 200 ext4 > /sdcard/sdpartmap.txt
replacing 150, 200, ext4 with your own
.
The 1st number is a2sd data partition (system/sd or sd-ext mounted at /dev/block/mmcblkXp2)
The 2nd number is swap partition. (mounted at /dev/block/mmcblkXp3)
The 3rd entry will be for ext3 or ext4 FS

It's best to do a2sd data in increments of 256MB and
swap in increments of 32MB

If you don't specify an ext type it will default to ext2.
If there is no sdpartmap.txt file the partitions will be automatically set to
a2sd data = 256
swap = 0
ext type = ext2

Make sure you have enough free space on the card to accommodate the extra partitions until I incorprate checks for that.

INSTRUCTIONS:
1. Download unCoRrUpTeD_SD--PARTITIONER.zip

2. Reboot into recovery
Code:
adb shell reboot recovery
3. Unzip the contents of sdpart.zip. There should be a folder named sdpart. Push the files inside sdpart folder to /tmp/
Code:
adb push c:\xxxxxx\sdpart /tmp/
4. run /tmp/sdpart.sh in adb shell
Code:
adb shell /tmp/sdpart.sh
If sdpart.sh doesn't run then you will have to chmod it before running it, but it should already have permission to run.

Code:
adb shell chmod 777 /tmp/sdpart.sh
If for some reason you can not push the files mount your sdcard through your phone and copy the sdpart folder to your sdcard and then

Code:
adb shell reboot recovery (might need to do adb reboot recovery or just reboot into recovery)
adb shell
mount /sdcard
cp -a /sdcard/sdpart/* /tmp
/tmp/sdpart.sh
Attached Files
File Type: zip unCoRrUpTeD_SD--PARTITIONER.zip - [Click for QR Code] (928.1 KB, 1284 views)
The Following 21 Users Say Thank You to unCoRrUpTeD For This Useful Post: [ Click to Expand ]
 
mahalocat
Old
#2  
mahalocat's Avatar
Senior Member
Thanks Meter 119
Posts: 696
Join Date: Oct 2010
Location: Honolulu
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
htc One -
Revone'd!

Gruesomes GE....flashing dis and dat




Acer Iconia A500 -
-----------------------------------------------------

\mn/


Miss you HeroC (kids gaming device)
Miss you evo3d (gtv remote)
 
unCoRrUpTeD
Old
#3  
unCoRrUpTeD's Avatar
Senior Member - OP
Thanks Meter 234
Posts: 1,703
Join Date: Mar 2010
Location: Fort Worth, TX

 
DONATE TO ME
Quote:
Originally Posted by mahalocat View Post
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
That's why I put step by step instructions. I'll have to find the flashable one.

Sent from my HERO200 using XDA App
The Following User Says Thank You to unCoRrUpTeD For This Useful Post: [ Click to Expand ]
 
arodey
Old
#4  
arodey's Avatar
Senior Member
Thanks Meter 54
Posts: 213
Join Date: Jul 2010
Location: Cincinnati, OH
Worked wonderfully!!!
Google Nexus 5 | Samsung Galaxy S4 | HTC EVO 4G LTE | HTC EVO 3D | Samsung Replenish | Barnes & Noble Nook Color | HTC Incredible | HTC Hero CDMA
 
old.ghost
Old
#5  
Senior Member
Thanks Meter 7
Posts: 156
Join Date: Aug 2010
Location: Suzhou
will try out, thanks.
 
nagasgura
Old
#6  
nagasgura's Avatar
Senior Member
Thanks Meter 326
Posts: 269
Join Date: Jul 2010

 
DONATE TO ME
Does this work for the droid incredible?
 
unCoRrUpTeD
Old
#7  
unCoRrUpTeD's Avatar
Senior Member - OP
Thanks Meter 234
Posts: 1,703
Join Date: Mar 2010
Location: Fort Worth, TX

 
DONATE TO ME
It should work on any phone, but you should back up your sdcard to a PC every once in a while just in case your sdcard gets corrupted or quits working.

Sent from my HERO200 using XDA App
The Following User Says Thank You to unCoRrUpTeD For This Useful Post: [ Click to Expand ]
 
nagasgura
Old
#8  
nagasgura's Avatar
Senior Member
Thanks Meter 326
Posts: 269
Join Date: Jul 2010

 
DONATE TO ME
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
 
unCoRrUpTeD
Old
#9  
unCoRrUpTeD's Avatar
Senior Member - OP
Thanks Meter 234
Posts: 1,703
Join Date: Mar 2010
Location: Fort Worth, TX

 
DONATE TO ME
Quote:
Originally Posted by nagasgura View Post
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
I'll add some things to the OP later today. When you run the script it should output your SD partitions before and after.

Sent from my dual-booted liquidsense 2.1
 
zeusseuz
Old
#10  
zeusseuz's Avatar
Senior Member
Thanks Meter 106
Posts: 294
Join Date: Feb 2011
how to do in te???
no pc guy/....

Tags
a2sd, ext2, fat32, partition, sdcard
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes