Possible to dump the stock recovery

xpirt

Recognized Developer / Recognized Contributor
Feb 19, 2013
5,070
21,205
263
Yes using adb shell command: "dd if=PARTITION_OF_RECOVERY of =/sdcard/recovery.img" then copy recovery.img from sdcard to your PC.
It will have 13mbs, if you extract it with cygwin and then repack it will have 4mb.
To know the partition of recovery, adb shell "cat /proc/partitions"

xpirt
 

johnsk

Senior Member
Sep 11, 2010
164
5
0
Erfurt
Yes using adb shell command: "dd if=PARTITION_OF_RECOVERY of =/sdcard/recovery.img" then copy recovery.img from sdcard to your PC.
It will have 13mbs, if you extract it with cygwin and then repack it will have 4mb.
To know the partition of recovery, adb shell "cat /proc/partitions"

xpirt
Okay i will get the partition name with this cmd?
"adb shell "cat /proc/partitions"

And the result i fill in the name here for this term: "PARTITION_OF_RECOVERY " ?
 
Last edited:

xpirt

Recognized Developer / Recognized Contributor
Feb 19, 2013
5,070
21,205
263
Okay i will get the partition name with this cmd?
cat /proc/partitions

And the result i fill in the name here for this term: "PARTITION_OF_RECOVERY " ?
Open cmd into adb path, type "adb shell" then type "cat /proc/partitions", save recovery partition.
Then type "dd if=XXXXXXXXX of=/sdcard/recovery.img".

xpirt
 
  • Like
Reactions: johnsk

johnsk

Senior Member
Sep 11, 2010
164
5
0
Erfurt
Open cmd into adb path, type "adb shell" then type "cat /proc/partitions", save recovery partition.
Then type "dd if=XXXXXXXXX of=/sdcard/recovery.img".

xpirt
Ui nice.
And now?

Code:
major minor  #blocks  name

   7        0      45770 loop0
   7        1      16664 loop1
   7        2       5229 loop2
   7        3      12506 loop3
   7        4      27059 loop4
   7        5       9387 loop5
   7        6      24980 loop6
   7        7      26019 loop7
 179        0   15267840 mmcblk0
 179        1        128 mmcblk0p1
 179        2        256 mmcblk0p2
 179        3     130671 mmcblk0p3
 179        4          1 mmcblk0p4
 179        5         16 mmcblk0p5
 179        6        256 mmcblk0p6
 179        7      15577 mmcblk0p7
 179        8        256 mmcblk0p8
 179        9       1024 mmcblk0p9
 179       10        256 mmcblk0p10
 179       11       2048 mmcblk0p11
 179       12       2080 mmcblk0p12
 179       13       5120 mmcblk0p13
 179       14       1024 mmcblk0p14
 179       15       1024 mmcblk0p15
 179       16      46080 mmcblk0p16
 179       17      10240 mmcblk0p17
 179       18       5120 mmcblk0p18
 179       19       8190 mmcblk0p19
 179       20       4096 mmcblk0p20
 179       21       1022 mmcblk0p21
 179       22       4096 mmcblk0p22
 179       23       4096 mmcblk0p23
 179       24      20480 mmcblk0p24
 179       25          4 mmcblk0p25
 179       26        256 mmcblk0p26
 179       27         16 mmcblk0p27
 179       28       1280 mmcblk0p28
 179       29         64 mmcblk0p29
 179       30      32767 mmcblk0p30
 179       31      16384 mmcblk0p31
 179       32      16383 mmcblk0p32
 179       33    2195455 mmcblk0p33
 179       34     688127 mmcblk0p34
 179       35   11927552 mmcblk0p35
 254        0      45769 dm-0
 254        1      16663 dm-1
 254        2       5229 dm-2
 254        3      12505 dm-3
 254        4      27058 dm-4
 254        5       9387 dm-5
 254        6      24979 dm-6
 254        7      26019 dm-7
   7        8       2111 loop8
 254        8       2110 dm-8
   7        9      24980 loop9
 254        9      24979 dm-9
   7       10       2111 loop10
 254       10       2110 dm-10
   7       11      22901 loop11
 254       11      22900 dm-11
   7       12       2111 loop12
 254       12       2110 dm-12
[email protected]:/ $
 

xpirt

Recognized Developer / Recognized Contributor
Feb 19, 2013
5,070
21,205
263
Ui nice.
And now?

Code:
major minor  #blocks  name

   7        0      45770 loop0
   7        1      16664 loop1
   7        2       5229 loop2
   7        3      12506 loop3
   7        4      27059 loop4
   7        5       9387 loop5
   7        6      24980 loop6
   7        7      26019 loop7
 179        0   15267840 mmcblk0
 179        1        128 mmcblk0p1
 179        2        256 mmcblk0p2
 179        3     130671 mmcblk0p3
 179        4          1 mmcblk0p4
 179        5         16 mmcblk0p5
 179        6        256 mmcblk0p6
 179        7      15577 mmcblk0p7
 179        8        256 mmcblk0p8
 179        9       1024 mmcblk0p9
 179       10        256 mmcblk0p10
 179       11       2048 mmcblk0p11
 179       12       2080 mmcblk0p12
 179       13       5120 mmcblk0p13
 179       14       1024 mmcblk0p14
 179       15       1024 mmcblk0p15
 179       16      46080 mmcblk0p16
 179       17      10240 mmcblk0p17
 179       18       5120 mmcblk0p18
 179       19       8190 mmcblk0p19
 179       20       4096 mmcblk0p20
 179       21       1022 mmcblk0p21
 179       22       4096 mmcblk0p22
 179       23       4096 mmcblk0p23
 179       24      20480 mmcblk0p24
 179       25          4 mmcblk0p25
 179       26        256 mmcblk0p26
 179       27         16 mmcblk0p27
 179       28       1280 mmcblk0p28
 179       29         64 mmcblk0p29
 179       30      32767 mmcblk0p30
 179       31      16384 mmcblk0p31
 179       32      16383 mmcblk0p32
 179       33    2195455 mmcblk0p33
 179       34     688127 mmcblk0p34
 179       35   11927552 mmcblk0p35
 254        0      45769 dm-0
 254        1      16663 dm-1
 254        2       5229 dm-2
 254        3      12505 dm-3
 254        4      27058 dm-4
 254        5       9387 dm-5
 254        6      24979 dm-6
 254        7      26019 dm-7
   7        8       2111 loop8
 254        8       2110 dm-8
   7        9      24980 loop9
 254        9      24979 dm-9
   7       10       2111 loop10
 254       10       2110 dm-10
   7       11      22901 loop11
 254       11      22900 dm-11
   7       12       2111 loop12
 254       12       2110 dm-12
[email protected]:/ $
Sorry was "cat /proc/emmc"

xpirt
 
  • Like
Reactions: johnsk

johnsk

Senior Member
Sep 11, 2010
164
5
0
Erfurt
Sorry was "cat /proc/emmc"

xpirt
Code:
cat /proc/emmc
dev:        size     erasesize name
mmcblk0p21: 000ffa00 00000200 "misc"
mmcblk0p32: 00fffe00 00000200 "recovery"
mmcblk0p31: 01000000 00000200 "boot"
mmcblk0p33: 85fffc00 00000200 "system"
mmcblk0p28: 00140200 00000200 "local"
mmcblk0p34: 29fffe00 00000200 "cache"
mmcblk0p35: 2d8000000 00000200 "userdata"
mmcblk0p24: 01400000 00000200 "devlog"
mmcblk0p26: 00040000 00000200 "pdata"
mmcblk0p29: 00010000 00000200 "extra"
mmcblk0p16: 02d00000 00000200 "radio"
mmcblk0p17: 00a00000 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p18: 00500000 00000200 "wcnss"
mmcblk0p19: 007ffa00 00000200 "radio_config"
mmcblk0p22: 00400000 00000200 "modem_st1"
mmcblk0p23: 00400000 00000200 "modem_st2"
mmcblk0p30: 01fffc00 00000200 "reserve"
[email protected]:/ $
Is this right?
dd if=mmcblk0p32 of=/sdcard/recovery.img
 

xpirt

Recognized Developer / Recognized Contributor
Feb 19, 2013
5,070
21,205
263
Code:
cat /proc/emmc
dev:        size     erasesize name
mmcblk0p21: 000ffa00 00000200 "misc"
mmcblk0p32: 00fffe00 00000200 "recovery"
mmcblk0p31: 01000000 00000200 "boot"
mmcblk0p33: 85fffc00 00000200 "system"
mmcblk0p28: 00140200 00000200 "local"
mmcblk0p34: 29fffe00 00000200 "cache"
mmcblk0p35: 2d8000000 00000200 "userdata"
mmcblk0p24: 01400000 00000200 "devlog"
mmcblk0p26: 00040000 00000200 "pdata"
mmcblk0p29: 00010000 00000200 "extra"
mmcblk0p16: 02d00000 00000200 "radio"
mmcblk0p17: 00a00000 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p18: 00500000 00000200 "wcnss"
mmcblk0p19: 007ffa00 00000200 "radio_config"
mmcblk0p22: 00400000 00000200 "modem_st1"
mmcblk0p23: 00400000 00000200 "modem_st2"
mmcblk0p30: 01fffc00 00000200 "reserve"
[email protected]:/ $
Is this right?
dd if=mmcblk0p32 of=/sdcard/recovery.img
Now type "dd if=mmcblk0p32 of=/sdcard/recovery.img" then copy recovery.img from sdcard to pc.

xpirt
 
  • Like
Reactions: johnsk

johnsk

Senior Member
Sep 11, 2010
164
5
0
Erfurt
Sorry again xD This is correct; "dd if=/dev/block/mmcblk0p32 of=/sdcard/recovery.img".

xpirt
No problem.


Permission denied...

[email protected]:/ $ dd if=/dev/block/mmcblk0p32 of=/sdcard/recovery.img
dd if=/dev/block/mmcblk0p32 of=/sdcard/recovery.img
/dev/block/mmcblk0p32: cannot open for read: Permission denied
1|[email protected]:/ $
The Device is running in Android, S-OFF!, Bootloader is locked and USB Debugging is on.
 

xpirt

Recognized Developer / Recognized Contributor
Feb 19, 2013
5,070
21,205
263
No problem.


Permission denied...


The Device is running in Android, S-OFF!, Bootloader is locked and USB Debugging is on.
Type "su" and then "dd if=/dev/block/mmcblk0p32 of=/sdcard/recovery.img".

xpirt
 
  • Like
Reactions: johnsk

johnsk

Senior Member
Sep 11, 2010
164
5
0
Erfurt
You have to be rooted... I thought if you s-offed you rotted too.. Btw it's not possible to backup stock recovery without root.

xpirt
This device is a test device from htc for the press.
It arrived with S-Off and without root offcourse. ;)
I want to flash TWRP to root the device but before i want to backup the stock recovery.
 

xpirt

Recognized Developer / Recognized Contributor
Feb 19, 2013
5,070
21,205
263
This device is a test device from htc for the press.
It arrived with S-Off and without root offcourse. ;)
I want to flash TWRP to root the device but before i want to backup the stock recovery.
OK so download TWRP.img, reboot into fastboot mode and into folder with adb type "fastboot boot twrp_downloaded.img".
It will boot into TWRP so backup partitions you want ;)

xpirt
 
  • Like
Reactions: johnsk

johnsk

Senior Member
Sep 11, 2010
164
5
0
Erfurt
OK so download TWRP.img, reboot into fastboot mode and into folder with adb type "fastboot boot twrp_downloaded.img".
It will boot into TWRP so backup partitions you want ;)

xpirt

Okay next error ^^
C:\Android>fastboot boot Twrp-2.6.0.0.img
downloading 'boot.img'...
OKAY [ 1.103s]
booting...
FAILED (remote: not allowed)
finished. total time: 1.106s