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

This is where the functional brain comes to play… 😉

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

3 Comments

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

Leave a Comment

Your email address will not be published. Required fields are marked *

It is main inner container footer text