Joined
·
32 Posts
Information:
What is this? Our phones contain a partition mounted as /preinstall which contains some game demos and video tutorials. After rooted, I could delete these (useless to me) apps and data but I still had no way to use the (now) empty space. After some research, I learned that /data, /preinstall, and /cache all reside in a nand block device called movinand. Using a port of parted (linked below), repartitioned this block device and shrunk /preinstall as small as I could. I then added this empty space to the /data partition making it approx 3.5GB.
WARNING: DO NOT ATTEMPT THIS UNLESS YOU HAVE MULTIPLE BACKUPS. If not done properly, you may render your device UNUSABLE and possibly irreparable!
DISCLAIMER: I did not port or develop any of these programs or methods. I am very new at this so expect some things in this tut to be not completely obvious, inconsistent, or even completely wrong
Prerequisites:
1) Working ADB connection (http://developer.and...ex.html]Android SDK[/url]
2) ClockWorkMod (I used KnightCrusader's)
3) Download this archive and save it to your sdcard
Preparation:
1) reboot into recovery
2) open cmd in the directory with adb.exe
3) type adb shell (if your prompt is $ instead of # then type su -> enter)
4) backup your movinand with this
This can take 5-15 mins. This backup file should be approx 2.25GB
5) In CWM mounts menu, Mount USB Storage
6) On your PC, copy mmcblk0.bin from your sdcard to your pc. Then delete mmcblk0.bin from the sdcard. If you haven't already done it, copy parted.tar to your sdcard
7) In CWM, go back to main menu and enter backup restore menu and do a full backup
Instructions:
1) From the adb shell, run this
Permissions should already be set
2) Run this
3) From the parted menu, type print
You should see this:
4) Type resize then Yes to the warning
5) Enter 2 for partition number, 3600MB for Start, and 3645MB for End
6) Type resize then Yes to the warning
7) Enter 1 for partition number, 32.8kB for start, and 3600MB for End
8) Type mkfs 2 fat32
9) Type print and you should now see this:
10) Type quit
You should be able to reboot now and profit from 3GB /data and nothing in /preinstall
CREDITS:
Found the binaries here
Other Thoughts:
I suppose, we could eliminate mmcblk0p2 altogether but this would require changes to init.rc which I am not capable of ATM. Also, I would expect a factory reset to freeze if it cannot find the /preinstall partition. Thinking more about this... Maybe we could have init.rc create an empty /preinstall folder in root?
Why does /preinstall have to be 44.9MB? Every time I tried to make it smaller, I got an error during format that the partition is too small for FAT32 or FAT16
What is this? Our phones contain a partition mounted as /preinstall which contains some game demos and video tutorials. After rooted, I could delete these (useless to me) apps and data but I still had no way to use the (now) empty space. After some research, I learned that /data, /preinstall, and /cache all reside in a nand block device called movinand. Using a port of parted (linked below), repartitioned this block device and shrunk /preinstall as small as I could. I then added this empty space to the /data partition making it approx 3.5GB.
WARNING: DO NOT ATTEMPT THIS UNLESS YOU HAVE MULTIPLE BACKUPS. If not done properly, you may render your device UNUSABLE and possibly irreparable!
DISCLAIMER: I did not port or develop any of these programs or methods. I am very new at this so expect some things in this tut to be not completely obvious, inconsistent, or even completely wrong

Prerequisites:
1) Working ADB connection (http://developer.and...ex.html]Android SDK[/url]
2) ClockWorkMod (I used KnightCrusader's)
3) Download this archive and save it to your sdcard
Preparation:
1) reboot into recovery
2) open cmd in the directory with adb.exe
3) type adb shell (if your prompt is $ instead of # then type su -> enter)
4) backup your movinand with this
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/mmcblk0.bin bs=4096
5) In CWM mounts menu, Mount USB Storage
6) On your PC, copy mmcblk0.bin from your sdcard to your pc. Then delete mmcblk0.bin from the sdcard. If you haven't already done it, copy parted.tar to your sdcard
7) In CWM, go back to main menu and enter backup restore menu and do a full backup
Instructions:
1) From the adb shell, run this
Code:
cd /sbin<br />
tar -xf /sdcard/parted.tar
2) Run this
Code:
parted /dev/block/mmcblk0
You should see this:
Code:
Model: MMC M4G1FB (sd/mmc)<br />
Disk /dev/block/mmcblk0: 3959MB<br />
Sector size (logical/physical): 512B/512B<br />
Partition Table: msdos<br />
<br />
Number Start End Size Type File system Flags<br />
1 32.8kB 2357MB 2357MB primary fat32<br />
2 2357MB 3645MB 1288MB primary fat32<br />
3 3645MB 3959MB 315MB primary fat16
5) Enter 2 for partition number, 3600MB for Start, and 3645MB for End
6) Type resize then Yes to the warning
7) Enter 1 for partition number, 32.8kB for start, and 3600MB for End
8) Type mkfs 2 fat32
9) Type print and you should now see this:
Code:
Model: MMC M4G1FB (sd/mmc)<br />
Disk /dev/block/mmcblk0: 3959MB<br />
Sector size (logical/physical): 512B/512B<br />
Partition Table: msdos<br />
<br />
Number Start End Size Type File system Flags<br />
1 32.8kB 3600MB 3600MB primary fat32 lba<br />
2 3600MB 3645MB 44.9MB primary fat32 lba<br />
3 3645MB 3959MB 315MB primary fat16
You should be able to reboot now and profit from 3GB /data and nothing in /preinstall

CREDITS:
Found the binaries here
Other Thoughts:
I suppose, we could eliminate mmcblk0p2 altogether but this would require changes to init.rc which I am not capable of ATM. Also, I would expect a factory reset to freeze if it cannot find the /preinstall partition. Thinking more about this... Maybe we could have init.rc create an empty /preinstall folder in root?
Why does /preinstall have to be 44.9MB? Every time I tried to make it smaller, I got an error during format that the partition is too small for FAT32 or FAT16