Post Reply

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

OP unCoRrUpTeD

27th January 2011, 04:14 PM   |  #1  
unCoRrUpTeD's Avatar
OP Senior Member
Flag Fort Worth, TX
Thanks Meter: 235
 
1,703 posts
Join Date:Joined: Mar 2010
Donate to Me
More
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, 1288 views)
Last edited by unCoRrUpTeD; 11th May 2011 at 05:55 AM.
The Following 21 Users Say Thank You to unCoRrUpTeD For This Useful Post: [ View ]
27th January 2011, 09:00 PM   |  #2  
mahalocat's Avatar
Senior Member
Flag Honolulu
Thanks Meter: 119
 
696 posts
Join Date:Joined: Oct 2010
More
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
27th January 2011, 09:28 PM   |  #3  
unCoRrUpTeD's Avatar
OP Senior Member
Flag Fort Worth, TX
Thanks Meter: 235
 
1,703 posts
Join Date:Joined: Mar 2010
Donate to Me
More
Quote:
Originally Posted by mahalocat

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: [ View ]
28th January 2011, 08:02 PM   |  #4  
arodey's Avatar
Senior Member
Flag Cincinnati, OH
Thanks Meter: 54
 
214 posts
Join Date:Joined: Jul 2010
More
Worked wonderfully!!!
29th January 2011, 04:29 PM   |  #5  
Senior Member
Flag Suzhou
Thanks Meter: 7
 
156 posts
Join Date:Joined: Aug 2010
More
will try out, thanks.
13th February 2011, 11:33 PM   |  #6  
nagasgura's Avatar
Senior Member
Thanks Meter: 326
 
269 posts
Join Date:Joined: Jul 2010
Donate to Me
More
Does this work for the droid incredible?
14th February 2011, 01:17 AM   |  #7  
unCoRrUpTeD's Avatar
OP Senior Member
Flag Fort Worth, TX
Thanks Meter: 235
 
1,703 posts
Join Date:Joined: Mar 2010
Donate to Me
More
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: [ View ]
20th February 2011, 02:29 PM   |  #8  
nagasgura's Avatar
Senior Member
Thanks Meter: 326
 
269 posts
Join Date:Joined: Jul 2010
Donate to Me
More
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
20th February 2011, 07:17 PM   |  #9  
unCoRrUpTeD's Avatar
OP Senior Member
Flag Fort Worth, TX
Thanks Meter: 235
 
1,703 posts
Join Date:Joined: Mar 2010
Donate to Me
More
Quote:
Originally Posted by nagasgura

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
19th February 2012, 07:46 PM   |  #10  
zeusseuz's Avatar
Senior Member
Thanks Meter: 107
 
295 posts
Join Date:Joined: Feb 2011
More
how to do in te???
no pc guy/....

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes


Top Threads in Android Software Development by ThreadRank