0

How can I backup my Recovery image with the dd command? I have the PIT file, where recovery is listed as:

--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 10
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 129024
Partition Block Count: 24576
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename: 

What /dev/ file should I choose as my if?

When I cat /proc/partitions, I get some mmcblkXpXX, and mmcblkXbootX.

Since the identifier is 10, wouldn't the if be mmcblk0p10?

John K
  • 479
  • 5
  • 23

1 Answers1

0

According to files in the /dev/block/platform/*/by-name directory, my Recovery partition is in fact /dev/block/mmcblk0p10. The ending of the name of mmcblk0pX matches all the identifiers on the PIT, so thus I conclude that the identifier and the mmcblk name does match.

The command now will be dd if=/dev/block/mmcblk0p10 of=/storage/sdcard1/twrp.img bs=4096

John K
  • 479
  • 5
  • 23
  • 1
    Match the identifier in the PIT file for other partitions with the info you gathered from by-name directory. You can come to know if it is a coincidence or something else. – Firelord Feb 06 '16 at 16:52
  • @Firelord that is a logical way of doing it. I am going to do so now – John K Feb 06 '16 at 16:53