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..