教程详情

icon
时间:2026-02-22
icon
查看:3

标题:Recovery刷入指导


注意:教程来源于用户上传,互联网收集,其中真实性注意斟酌,操作可能存在风险,请践行时注意保存资料防止丢失,如果本教程侵犯您的个人或者集体利益,请邮件fiimecn@163.com下架处理,非常感谢!


翻译:Fiime奥奥(QQ:741500926)

原文:https://xiaomi.eu/community/threads/installing-a-custom-recovery.67841/


所有自定义 Recovery 都以 IMG 文件格式提供(有些以可刷入的 ZIP 格式发布,例如 OrangeFox,但其中仍然包含 IMG 文件)。

然而,安装方法会因 Recovery ramdisk 在您设备上的具体位置而异。

如果自定义 Recovery 安装失败,会导致系统/Recovery 启动失败/故障,或卡在 Fastboot 模式。

您通常可以在此处找到适用于您设备的自定义 Recovery。


注意项:

* 切勿使用过时的 Fastboot 工具。您可以在此处获取最新版本。

* 请记住在所有 Fastboot 命令前添加“.\”(PowerShell)或“./”(Linux/macOS),除非您使用的是命令提示符。

* 本指南中,您的自定义 Recovery 镜像文件被称为“recovery.img”,但文件名可以是任何名称。


具有专用恢复分区(A/B)的设备:

这些设备具有专用的“recovery_a”和“recovery_b”分区。

自定义恢复镜像可以直接刷入“recovery_a”和“recovery_b”分区。

如果设备支持,刷入“recovery_ab”将通过一条命令同时刷入“recovery_a”和“recovery_b”分区。

对于搭载 Android 13 或更早版本系统的设备,自定义恢复镜像在 ROM 更新后仍然有效。

平台:骁龙 685、4 Gen 2、7/7s/7+/8/8s/8+ Gen 1/2/3、8 Elite/8s Gen 4/5

设备:amethyst、annibale、aurora、creek、cupid、dada、diting、fuxi、garnet、haotian、houji、ingres、ishtar、manet、marble(in)、mayfly、miro、mondrian、myron、nuwa、onyx、pandora、peridot、popsicle、pudding、sapphire(n)、shennong、sky/river、socrates、tapas/topaz、thor、unicorn、vermeer、xuanyuan、zeus、ziyi、zorn

镜像大小:100 MiB (104,857,600 字节)

安装:

代码:

fastboot flash recovery_ab recovery.img
fastboot reboot recovery

切勿尝试使用“fastboot boot”命令启动这些镜像。否则,您将收到“缓冲区大小错误”的提示,并且您的设备将卡在 fastboot 模式。

要退出 fastboot 模式,请运行以下命令:

代码:

fastboot erase misc
fastboot set_active a


然后正确安装 recovery。


启动模式为 Recovery (A/B) 的设备:

这些设备没有专用的 recovery 分区。

recovery ramdisk 位于“boot_a”和“boot_b”分区中。

系统和 recovery 使用共享内核。

因此,您绝不应将自定义 recovery 镜像直接刷入“boot_a”和/或“boot_b”分区。否则,系统将无法启动。

平台:骁龙 678/680/695/778G/778G+/780G/870/888/888+,4 Gen 1

设备:alioth、haydn、lisa、moonstone、munch、odin、psyche、redwood(in)、renoir、spes(n)、star/mars、sunny、sunstone、taoyao、thyme、venus、veux/peux、vili

镜像大小:192 MiB (201,326,592 字节),或 96/128 MiB (100,663,296/134,217,728 字节)(适用于中低端设备)

安装:

命令:

fastboot boot recovery.img


在恢复模式界面:高级 -> 安装恢复内存盘


支持厂商启动作为恢复模式的设备(A/B):

这些设备没有专用的恢复分区。

恢复内存盘位于“vendor_boot_a”和“vendor_boot_b”分区中。

恢复内存盘包含为“boot_a”和“boot_b”分区中特定内核编译的内核模块。

因此,切勿刷入为不同内核版本构建的自定义恢复镜像。否则,恢复功能将无法启动或出现故障。

巧合的是,这些设备不支持“fastboot boot”命令,因此自定义恢复镜像被设计为直接刷入“vendor_boot_a”和“vendor_boot_b”分区。

如果设备支持,刷入“vendor_boot_ab”将通过一条命令同时刷入“vendor_boot_a”和“vendor_boot_b”分区。

平台:天玑 8100/8100-Ultra/9000/9000+

设备:Daumier、Matisse、Rubens、Xaga(Pro/In)

镜像大小:64 MiB (67,108,864 字节)

安装:

命令:

fastboot flash vendor_boot_ab recovery.img
fastboot reboot recovery



具有专用 Recovery 分区的设备(非 A/B 版本):

这些设备具有专用的“recovery”分区。

自定义 Recovery 镜像可以直接刷入“recovery”分区。

自定义 Recovery 将在 ROM 更新后保留。

平台:骁龙 662/720G/730/730G/732G/750G/765G/768G/860/865

设备:apollo、cas、citrus、cmi、courbet、gauguin(pro)、lime/lemon/pomelo、lmi(pro)、monet、phoenix、picasso、surya/karna、sweet、umi、vangogh、vayu/bhima

镜像大小:128 MiB (134,217,728 字节),旧设备为 64 MiB (67,108,864 字节)


安装:

命令:

fastboot flash recovery recovery.img
fastboot reboot recovery


如果您不想安装自定义 Recovery,也可以使用“fastboot boot”命令启动这些镜像。


* 比这些设备更老的设备可以归入“具有专用恢复分区(非 A/B)的设备”类别,但映像大小不一致。








--------------------------------------以下原文-------------------------------------------


All custom recoveries come in the format of an IMG file (some are released as a flashable ZIP, like OrangeFox, but there's still an IMG inside).

However, installation method will differ, depending on where the recovery ramdisk resides on your device specifically.
Failing to install the custom recovery correctly will result in a system/recovery boot failure/malfunction or being stuck in fastboot mode.
You can usually find a custom recovery for your device HERE.

Notes:
* Never use an outdated fastboot tool. You can get the latest version HERE.
* Remember to prepend ".\" (PowerShell) or "./" (Linux/macOS) to all fastboot commands, except if you're using the Command Prompt.
* Your custom recovery image file is referred to as "recovery.img" in this guide, but the file name could be anything.

Devices with Dedicated Recovery Partitions (A/B):
These devices have dedicated "recovery_a" and "recovery_b" partitions.
The custom recovery image can be flashed to "recovery_a" and "recovery_b" partitions directly.
Flashing to "recovery_ab" will flash to both "recovery_a" and "recovery_b" with a single command, if the device supports it.
The custom recovery will persist across ROM updates for devices released with Android 13 or older.

Platforms: Snapdragon 685, 4 Gen 2, 7/7s/7+/8/8s/8+ Gen 1/2/3, 8 Elite/8s Gen 4/5
Devices: amethyst, annibale, aurora, creek, cupid, dada, diting, fuxi, garnet, haotian, houji, ingres, ishtar, manet, marble(in), mayfly, miro, mondrian, myron, nuwa, onyx, pandora, peridot, popsicle, pudding, sapphire(n), shennong, sky/river, socrates, tapas/topaz, thor, unicorn, vermeer, xuanyuan, zeus, ziyi, zorn
Image size: 100 MiB (104,857,600 bytes)
Installation:

Code:
fastboot flash recovery_ab recovery.img
fastboot reboot recovery

Never try to "fastboot boot" these images. If you do that, you will get a "Bad Buffer Size" error and your device will be stuck in fastboot mode.
To get out of being stuck in fastboot mode, run these commands:

Code:
fastboot erase misc
fastboot set_active a

Then install the recovery correctly.

Devices with Boot as Recovery (A/B):
These devices don't have a dedicated partition for recovery.
The recovery ramdisk resides in the "boot_a" and "boot_b" partitions.
A shared kernel is used for both the system and the recovery.
Due to that, you should never flash a custom recovery image directly to the "boot_a" and/or "boot_b" partitions. If you do that, the system will fail to boot.

Platforms: Snapdragon 678/680/695/778G/778G+/780G/870/888/888+, 4 Gen 1
Devices: alioth, haydn, lisa, moonstone, munch, odin, psyche, redwood(in), renoir, spes(n), star/mars, sunny, sunstone, taoyao, thyme, venus, veux/peux, vili
Image size: 192 MiB (201,326,592 bytes), or 96/128 MiB (100,663,296/134,217,728 bytes) for low-mid devices
Installation:

Code:
fastboot boot recovery.img
In the recovery interface: Advanced -> Install Recovery Ramdisk


Devices with Vendor Boot as Recovery (A/B):
These devices don't have a dedicated partition for recovery.
The recovery ramdisk resides in the "vendor_boot_a" and "vendor_boot_b" partitions.
The recovery ramdisk includes kernel modules compiled for the specific kernel that resides in the "boot_a" and "boot_b" partitions.
Due to that, you should never flash a custom recovery image that was built for a different kernel version. If you do that, the recovery will fail to boot or malfunction.
Coincidentally, these devices don't support the "fastboot boot" command, so the custom recovery images are built to be flashed to "vendor_boot_a" and "vendor_boot_b" partitions directly.
Flashing to "vendor_boot_ab" will flash to both "vendor_boot_a" and "vendor_boot_b" with a single command, if the device supports it.

Platforms: Dimensity 8100/8100-Ultra/9000/9000+
Devices: daumier, matisse, rubens, xaga(pro/in)
Image size: 64 MiB (67,108,864 bytes)
Installation:

Code:
fastboot flash vendor_boot_ab recovery.img
fastboot reboot recovery


Devices with a Dedicated Recovery Partition (non-A/B):
These devices have a dedicated "recovery" partition.
The custom recovery image can be flashed to "recovery" partition directly.
The custom recovery will persist across ROM updates.

Platforms: Snapdragon 662/720G/730/730G/732G/750G/765G/768G/860/865
Devices: apollo, cas, citrus, cmi, courbet, gauguin(pro), lime/lemon/pomelo, lmi(pro), monet, phoenix, picasso, surya/karna, sweet, umi, vangogh, vayu/bhima
Image size: 128 MiB (134,217,728 bytes), or 64 MiB (67,108,864 bytes) for old devices
Installation:

Code:
fastboot flash recovery recovery.img
fastboot reboot recovery

You may also "fastboot boot" these images if you don't want to install the custom recovery.

* Older devices than these fit into "Devices with a Dedicated Recovery Partition (non-A/B)" but the image size is inconsistent.

讨论区(0)

没有评论数据

提交我的评价


*文明理性,友善沟通.