0

I created image of, for example, /data partition with

adb pull /dev/block/mmcblk0pXXX data.img

Can I use

fastboot flash data data.img
fastboot reboot

to restore it back? Or fastboot require specific, not just raw binary, image file format? If so, is it possible to convert my data.img to that specific format?

shibormot
  • 1,638
  • 2
  • 12
  • 23

1 Answers1

1

Unless you don't want to change other stuffs like boot or recovery, yes you can directly flast the data file of .img format. You are also suggested to erase the old data so that it doesn't create any previous leftover. So,

fastboot erase data
fastboot flash data file_name.img 

would be the proper way of flashing a data file.

There a good tutorial regarding Adb and Fastboot Quick Guide

Prokash Sarkar
  • 11,723
  • 1
  • 37
  • 50
  • and what if I make image of recovery or system partition with same method? And then flash recorded file to same partition? Will my phone boot propertly? – shibormot May 09 '17 at 21:26
  • It should be working properly. Just make sure you are performing backup/restore operation on the same ROM (stock/custom) – Prokash Sarkar May 10 '17 at 03:25