One can’t stress enough on the importance of backups and when it comes to tinkering with your Android phone, a backup of your system, recovery and boot partitions can save you a lot of hassle that you might otherwise have to go through if you mess things up and need those stock images. In this guide, we will tell you how to take these backups using a free tool called RomDump.
Although you can find these backups on the internet, those have been taken by other users and you never know if they have been modified to contain malicious code or not. Secondly, you can’t be too sure if they would work with the exact specifications of your phone or not, as even for the same phone model, there can be differences depending on the phone’s regions, intended carriers and other similar factors, and flashing a wrong boot, system or recovery image to your phone can most likely brick it. Therefore, it is always a great idea to take backup images of these partitions of your device yourself before you attempt to modify them, so that they can be recovered later if anything goes wrong.
RomDump is a free tool that lets you do just that. It is quite easy to use for anyone who is comfortable with typing a few commands, and effectively creates backup images of your Android phone’s boot, recovery and system partitions. It requires your phone to be rooted first and you will either need ADB installed on your computer or a terminal application installed on your Android device.
Now that we have had an overview, let’s proceed to actually getting things done.
Before you proceed:
Now proceed according to the method that you chose.
ADB Method:
adb push install /data/local/ adb shell chmod 04755 /data/local/install adb shell /data/local/install
adb shell romdump
Terminal Method:
su cat /sdcard/install >/data/local/install chmod 04755 /data/local/install /data/local/install
/system/bin/romdump
If you have completed the above steps for any of the two methods successfully, you will find a folder named ‘romdump’ on the root of your SD card
that contains a subfolder by the name of your device model. This folder will contain the boot, system and recovery partition images.
Alternative Method If The Above Does Not Work:
If this method does not work for you and all you need to backup is your recovery and boot images, you can simply do so as follows.
Note: Do NOT attempt to backup the system partition using this method as the system image it produces this way
will NOT be a valid system image to be used later to restore your system partition. Use it only for the recovery and boot partition images.
adb shell
If you are using Terminal Emulator instead, just launch it on your Android phone and enter the following command
and agree to grant any permissions you’re prompted for:
su
The remaining process will be the same for both ADB and Terminal Emulator.
cat proc/mtd/proc/mtd: No such file or directory
That doesn't exist on your device.
It doesn't on my Vibrant either, though I can get somewhat similar info viacat /proc/partitions
dev: size erasesize name mtd0: 000a0000 00020000 "misc" mtd1: 00480000 00020000 "recovery" mtd2: 00300000 00020000 "boot" mtd3: 0fa00000 00020000 "system" mtd4: 02800000 00020000 "cache" mtd5: 093a0000 00020000 "userdata"
dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img bs=4096
dd if=/dev/mtd/mtd2 of=/sdcard/boot.img bs=4096
That’s it – you now have recovery.img and boot.img backed up on the root of your SD card.