How to look up the partition structure of your android phone


This tutorial is for 1.6 only (FTM mode is not available on 2.1)

Setup

1. Download A688 Tools from
http://www.megaupload.com/?d=IFO209MS
The latest version of A688 Tools can be downloaded from
http://snowwolf725.blogspot.com/2010/04/a688a60a88.html
2. Unpack A688 Tools into C:\A688_Tools
3. Reboot your mobile to FTM mode.
4. Execute "Dos_Console.bat" in A688_Tools folder.
5. Use "mkdir sdcard" command to make sdcard folder.
6. Use "mount -t vfat /dev/block/mmcblk0p1 /sdcard" command to mount SD card to sdcard folder.


How to look up partition table of your android phone.
Use "cat /proc/mtd" command to look up partition table of mobile.
$ cat /proc/mtd
The partition table of A688 with 1.6 rom:
dev:    size   erasesize  name
 mtd0: 00500000 00020000 "boot"
 mtd1: 00200000 00020000 "misc"
 mtd2: 00080000 00020000 "splash"
 mtd3: 00500000 00020000 "recovery"
 mtd4: 00500000 00020000 "ftm"
 mtd5: 01000000 00020000 "hidden"
 mtd6: 00060000 00020000 "dbgmsk"
 mtd7: 0a000000 00020000 "system"
 mtd8: 06400000 00020000 "cache"
 mtd9: 0ac80000 00020000 "userdata"
The partition table of A688 with 2.1 rom:
dev:    size   erasesize  name
 mtd0: 00500000 00020000 "boot"
 mtd1: 00200000 00020000 "misc"
 mtd2: 00080000 00020000 "splash"
 mtd3: 00500000 00020000 "recovery"
 mtd4: 00500000 00020000 "ftm"
 mtd5: 01a00000 00020000 "hidden"
 mtd6: 00060000 00020000 "dbgmsk"
 mtd7: 0a000000 00020000 "system"
 mtd8: 00200000 00020000 "misc2"
 mtd9: 05800000 00020000 "cache"
 mtd10: 0ab80000 00020000 "userdata"



Backup Splash,Boot,Recovery,FTM partitions

It is very easy to backup these partitions into image files.
Execute "Dos_Console.bat" in A688_Tools folder, and use "cat /dev/mtd/mtd0 > /sdcard/boot.img" command to backup mtd1 partition to /sdcard/boot.img
In 1.6 mobile, the mtd0 partiton is mapping to the boot partition



Backup Userdata, System, Hidden partitions

1. Execute "Dos_Console.bat" in A688_Tools folder.
2. Using the following commands to backup these partitions into image files:
C:\A688_Tools>adb push RomRepackTools_Linux\mkyaffs2image /sbin
 C:\A688_Tools>adb shell chmod 4777 /sbin/mkyaffs2image
 C:\A688_Tools>adb shell
 # mkdir /sdcard
 # mount -t vfat /dev/block/mmcblk0p1 /sdcard
 # mount -t yaffs2 /dev/block/mtdblock7 /system
 # mkyaffs2image /system /sdcard/system.img
 
 #mkdir /data
 # mount -t yaffs2 /dev/block/mtdblock9 /data
 # mkyaffs2image /data /sdcard/data.img
 
 #mkdir /hidden
 # mount -t yaffs2 /dev/block/mtdblock5 /hidden
 # mkyaffs2image /data /sdcard/hidden.img



Restore roms by using fastboot

Important: Don't flash hidden partition by using fastboot.If you flash hidden partition by using fastboot, you will get a empty hidden partion.
1. Reboot your mobile into fastboot mode
2. Execute "Dos_Console.bat" in A688_Tools folder.
3. Use "fastboot flash [partition name] [image file name]" to flash the partition in the mobile.
For example:
"fastboot flash boot boot.img" will flash the boot partition in mobile with boot.img.
fastboot flash boot boot.img
4. Use "fastboot reboot" to reboot your mobile
Other useful commands:
Earse the specified partition
fastboot erase [partition name]
Boot with specify boot image(This command is no effect in 2.1 mobile)
fastboot boot [image name]

1 comment:

  1. Many things in this tutorial didnt work for me ..especially creating a /sdcard folder then mounting the specific partition to it.

    i was able to back up the splash and few times restore the recovery partition using this method ..posted it as a part of organizing what i came across internet in one place so all of you are benefited :)

    ReplyDelete

Featured post

Step By Step Procedure for Updating to SuperAOSP [Videocon Zeus]

I have tried almost all available custom roms for the commtiva z51 or videocon zeus (spice mi 300 , Orange Boston variant) . For 2.2 Froyo i...