unCoRrUpTeD SD--PARTITIONER [Partition SDCARD without losing fat32 contents] (SCRIPT)
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..
/ # 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.
1. Download unCoRrUpTeD_SD--PARTITIONER.zip
2. Reboot into recovery
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/
adb push c:\xxxxxx\sdpart /tmp/
4. run /tmp/sdpart.sh in adb shell
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.
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
adb shell reboot recovery (might need to do adb reboot recovery or just reboot into recovery)
cp -a /sdcard/sdpart/* /tmp