How to backup/extract your android phone firmware

Android Backup

Recently, someone asked me how he could backup his android phone’s Rom manually via cmd; it should be all over the internet I said to myself.
Today, I’m posting it here again for easy access.

There are too many reasons why you would want to backup your Android device. It could be for backup purpose, just incase something goes wrong, or to restore in another compatible device, for further modification/development, and on.

To go about this.
– Make sure ADB is properly installed
– Ensure to install your device drivers
– Ensure your device has root access
– You’ll need a functional brain too ­čśë

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 SHIFT button,  select Open command window here)

Connect your device via a usb cable

Type the following commands:

adb devices (click enter)
adb shell (click enter)
su (click enter)
cat /proc/mtd

The above command will list your device’s partition.

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:

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.

This is where the functional brain comes to play… ­čśë

Please leave your comments below if you experience any issues..

Comments (4)

  1. Neeraj
    Posted on May 18, 2019
  2. Collins Edim
    Posted on April 20, 2016
    • Shubhashis Biswas
      Posted on February 12, 2017
  3. Mohd Faraz
    Posted on April 20, 2016

Give a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.