Recently, someone asked me how he could backup his Android phone’s Rom manually via cmd; here it is- for easy access.
There are too many reasons why you would want to backup your Android device. It could be for backup purposes, just in case something goes wrong, or to restore it on another compatible device, for further modification/development, and so on.
How to go about this
– Make sure ADB is properly installed
– Ensure to install your device drivers
– Ensure your device has root access
Now, to the real deal!
Run CMD and point to the folder where you have your ADB files (Windows: Right-click on the folder while holding the SHIFT button, select Open command window here).
Connect your device via a usb cable
Type the following commands:
adb devices
adb shell
su
cat /proc/mtd
The above command will list your device’s partitions.
Example:
dev: size erasesize name
mtd0: 00040000 00020000 "misc"
mtd1: 00500000 00020000 "recovery"
mtd2: 00280000 00020000 "boot"
mtd3: 04380000 00020000 "system"
mtd4: 04380000 00020000 "cache"
mtd5: 04ac0000 00020000 "userdata"
Take note of the partitions you wish to backup. For instance, if it’s system partition:
Type:
cat /dev/mtd/mtd3 > /sdcard/system.img
It will be backed up to your SDcard root as system.img.
The important partitions to backup include: boot, recovery, and system. This will give your device a clean Rom if restored, with your installed apps intact but without any data.
Please leave your comments below if you experience any issues..
4 Comments
how to restore it can you tell me the procedure.
The backup can be restored via fastboot bro. Example:
fastboot flash boot boot.img
But note, only use this as a last resort as it may not restore properly on some devices.
What's the chipset of the device you wish to backup (mediatek, spreadtrum, etc)?
I have a rda8810 device karbonn a108 plus I have backup of the device using above method :
cmdline.info
config.info
cpu.info
firmware.info
mtd0.dummy.img
mtd1.system.yaffs2.img
mtd2.customer.img
mtd3.userdata.yaffs2.img
nandroid.md5
ram.info
rom.info
now I have these files after backup now how I can restore them.
Hi thnx for the tutorial. I wamt to ask what command should we write to store backedup img file to our pc instead of phone\’s sd card