0

I managed to run commands like dd if=/dev/block/mmcblk0 to make a full backup of my android phone's internal storage, and pass the data directly to PC connecting through USB.

But I worry that this may corrupt the data. Bucause backup process happens when the phone's system is running, and /dev/block/mmcblk0 includes the system and data partition. If the phone system makes disk modification when the backup process is not finished(when the dd command is still running), is it possible that the output data is corrupted? The internal storage is 10GB, and the backup takes a long time.

And 1 more question. Will it avoid such data corruption if I specify the block size(bs) to be the same as the storage size?

About bs from wiki:

Using large blocks requires more RAM and can complicate error recovery.

I don't fully understand this sentence, but I infer that if I run dd command with bs specified with the size of the whole storage(around 10GB), my PC must have at least 10GB RAM.

So, if there is no way to ensure synchronized data copying using dd, I think I'll have to do the backup under recovery mode and having /dev/block/mmcblk0 unmounted.

1
  • 3
    This is what happens when you build an image sequentially and your source can change: panorama fail. Imagine it happens to your binary data. Commented Feb 27, 2018 at 6:08

1 Answer 1

4

If the phone system makes disk modification when the backup process is not finished(when the dd command is still running), is it possible that the output data is corrupted? The internal storage is 10GB, and the backup takes a long time.

Yes.

And 1 more question. Will it avoid such data corruption if I specify the block size(bs) to be the same as the storage size?

No. That won't make an enormous read atomic.

Using large blocks requires more RAM and can complicate error recovery.

I don't fully understand this sentence, but I infer that if I run dd command with bs specified with the size of the whole storage(around 10GB), my PC must have at least 10GB RAM.

Correct.

So, if there is no way to ensure synchronized data copying using dd, I think I'll have to do the backup under recovery mode and having /dev/block/mmcblk0 unmounted.

That would be my recommendation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .