how to make an image of android partition to your pc

hongo picture hongo · Nov 17, 2014 · Viewed 38.4k times · Source

I am trying to make a backup (a direct dd image of the partitions of my built-in memory card of my phone to my PC. I am using Linux and my phone is a Nexus 4.

Answer

ngreen picture ngreen · Mar 14, 2018

Don't install TWRP

Instead:

  1. Install android-platform-tools or android-sdk onto your computer.

  2. Download TWRP.

  3. Hold the volume down and volume up buttons and turn on your phone to start up the bootloader screen. Make sure your phone is plugged into your computer's USB port.

  4. Boot TWRP by running fastboot boot twrp-3.1.0.0.img. (No need to flash your recovery partition this way.)

  5. In TWRP, select Advanced, then Terminal, which will open a shell. Type mount and press [ENTER] to see the partitions. You're looking for the /data and possibly /sdcard mounts.

  6. Let's say your /data partition maps to /dev/mmcblk0p28. Just run adb pull /dev/block/mmcblk0p28 data.img on your computer and it will copy the partition. Expect this process to take a while since it is copying the entire partition, regardless of how many files are stored in it.