![](/style/images/good.png)
![](/style/images/bad.png)
Extracting stock Boot, Recovery and Persist images
source link: https://forum.xda-developers.com/t/extracting-stock-boot-recovery-and-persist-images.4058447/#post-88382421
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Extracting stock Boot, Recovery and Persist images
zgfg
Senior Member
Also, boot image is needed for patching from Magisk Manager (and flashing by Fastboot), as a preferable way to install Magisk.
Stock Recovery is needed if you want to revert from the custom one, and stock Persist is important because it contains certificate for Widevine L1 (needed for Full HD in eg Netflix)
From Recovery (zip) firmware
Download the Recovery (zip) image from:
https://c.mi.com/oc/miuidownload/detail?device=1700361
Extract the archive and find the boot.img inside.
However, it does not contain recovery.img
From Fastboot (tgz) firmware
Similarly, download the Fastboot (tgz) image from:
https://c.mi.com/oc/miuidownload/detail?guide=2
(check Desktop site if opening from the mobile browser)
Extract the archive, find the images folder with boot.img and recovery.img inside
From TWRP or OrangeBox
Boot and Persist images can be disk-dumped from TWRP or OrangeFox, from its Terminal, with the command:
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Note:
Observe that if Magisk was installed, dumped Boot image won't be the stock one but the one already patched by Magisk
We could similarly dump the Recovery image, but since we must dump from TWRP or OorangeFox,
the dumped image won't be the stock one but the image of the installed custom Recovery
From Terminal Emulator app
Similarly, Recovery and Persist mages can be disk-dumped from Terminal emulator app:
su
dd if=/dev/block/bootdevice/by-name/recovery of=/sdcard/recovery.img
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Finally, Recovery and Persist images can be also disk-dumped from ADB:
adb shell
su
dd if=/dev/block/bootdevice/by-name/recovery of=/sdcard/recovery.img
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
PC must be authorized from the phone once they get connected by USB cable
Finally, after the su command, root privilege must be granted to the Terminal emulator app before proceeding with dd command
Take care not to miss the authorization and root granting pop-ups on the phone if screen was switched of
Notes:
Observe that in both cases of Terminal emulator app and ADB, if custom Recovery was already installed, then you will be dumping the image of that custom Recovery
We can similarly dump the Bot image from Terminal emulator app or by ADB - but the root (Magisk) was prerequisite, hence the dumped image will be the Boot image already patched by Magisk
Recommend
-
6
Extracting high resolution images from hostile web sites I have a friend in the printed media business. He gets to handle weird requests for technical things which have to happen, no matter what it entails. Sometimes this means...
-
7
Reading Time: 4 minutes In this blog, we will look at various ways in which storage from the host machine can be mounted to containers. Also, it can be seen as a way of communication in case the networking is disabled for your containers. So...
-
4
Fedora Linux into EmergencyHow can I boot CentOS 8 / RHEL 8 Linux machine into recovery / emergency mode?. As a Linux Administrator, there are instances you may want to troubleshoot and repair boot problems. This is often achieved by booting...
-
13
[Stock/Rooted Boot Images] Pixel 4a [NOV 02...
-
1
HARDBRICKED REDMI 9C ANGELICA NO BOOT NO RECOVERY NO FASTBOOT ONLY VIBRATES ...
-
12
Question Stuck in boot loop no access to recovery or fastboot ...
-
47
[STOCK][RMX1971EX][RMX1971]Firmware, Boot,...
-
3
General [DISCONTINUED][OOS & PA] OnePlus 9 stock/patched boot images ...
-
4
General [DISCONTINUED][OOS & PA] OnePlus 9...
-
6
Frank Xie June 29, 2023 1 minute read
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK