feat: Add documentation for rescuing from bootloop.
- Add new link to sidebar of zh_CN documentation page - Add new link to sidebar navigation in English documentation page - Add new guide for rescuing from bootloop - Include methods for rescuing wrong module flashing - Provide mechanisms for safe mode and AB updates for module recovery
This commit is contained in:
@@ -51,6 +51,7 @@ function sidebarGuide() {
|
||||
{ text: 'Intergrate for non-GKI devices', link: '/guide/how-to-integrate-for-non-gki'},
|
||||
{ text: 'Unofficially supported devices', link: '/guide/unofficially-support-devices.md' },
|
||||
{ text: 'Module Guide', link: '/guide/module.md' },
|
||||
{ text: 'Rescue from bootloop', link: '/guide/rescue-from-bootloop.md' },
|
||||
{ text: 'FAQ', link: '/guide/faq' },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ function sidebarGuide() {
|
||||
{ text: '如何为非GKI设备集成 KernelSU', link: '/zh_CN/guide/how-to-integrate-for-non-gki'},
|
||||
{ text: '非官方支持设备', link: '/zh_CN/guide/unofficially-support-devices.md' },
|
||||
{ text: '模块开发指南', link: '/zh_CN/guide/module.md' },
|
||||
{ text: '救砖', link: '/guide/zh_CN/rescue-from-bootloop.md' },
|
||||
{ text: '常见问题', link: '/zh_CN/guide/faq' },
|
||||
]
|
||||
}
|
||||
|
||||
50
website/docs/guide/rescue-from-bootloop.md
Normal file
50
website/docs/guide/rescue-from-bootloop.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Rescue from bootloop
|
||||
|
||||
When flashing a device, we may encounter situations where the device becomes "bricked". In theory, if you only use fastboot to flash the boot partition or install unsuitable modules that cause the device to fail to boot, then this can be restored by appropriate operations. This document aims to provide some emergency methods to help you recover from a "bricked" device.
|
||||
|
||||
## Brick by flashing boot partition
|
||||
|
||||
In KernelSU, the following situations may cause boot brick when flashing the boot partition:
|
||||
|
||||
1. You flashed a boot image in the wrong format. For example, if your phone's boot format is `gz`, but you flashed an `lz4` format image, then the phone will not be able to boot.
|
||||
2. Your phone needs to disable AVB verification in order to boot properly (usually requiring wiping all data on the phone).
|
||||
3. Your kernel has some bugs or is not suitable for your phone to flash.
|
||||
|
||||
No matter what the situation is, you can recover by **flashing the stock boot image**. Therefore, at the beginning of the installation tutorial, we strongly recommend that you back up your stock boot before flashing. If you haven't backed up, you can obtain the original factory boot from other users with the same device as you or from the official firmware.
|
||||
|
||||
## Brick by modules
|
||||
|
||||
Installing modules can be a more common cause of bricking your device, but we must seriously warn you: **Do not install modules from unknown sources**! Since modules have root privileges, they can potentially cause irreversible damage to your device!
|
||||
|
||||
### Normal modules
|
||||
|
||||
If you have flashed a module that has been proven to be safe but causes your device to fail to boot, then this situation is easily recoverable in KernelSU without any worries. KernelSU has built-in mechanisms to rescue your device, including the following:
|
||||
|
||||
1. AB update
|
||||
2. Rescue by pressing Volume Down
|
||||
|
||||
#### AB update
|
||||
|
||||
KernelSU's module updates draw inspiration from the Android system's AB update mechanism used in OTA updates. If you install a new module or update an existing one, it will not directly modify the currently used module file. Instead, all modules will be built into another update image. After the system is restarted, it will attempt to start using this update image. If the Android system successfully boots up, the modules will then be truly updated.
|
||||
|
||||
Therefore, the simplest and most commonly used method to rescue your device is to **force a reboot**. If you are unable to start your system after flashing a module, you can press and hold the power button for more than 10 seconds, and the system will automatically reboot; after rebooting, it will roll back to the state before updating the module, and the previously updated modules will be automatically disabled.
|
||||
|
||||
#### Rescue by pressing Volume Down
|
||||
|
||||
If AB updates still cannot solve the problem, you can try using **Safe Mode**. In Safe Mode, all modules are disabled.
|
||||
|
||||
There are two ways to enter Safe Mode:
|
||||
|
||||
1. The built-in Safe Mode of some systems; some systems have a built-in Safe Mode that can be accessed by long-pressing the volume down button, while others (such as MIUI) can enable Safe Mode in Recovery. When entering the system's Safe Mode, KernelSU will also enter Safe Mode and automatically disable modules.
|
||||
2. The built-in Safe Mode of KernelSU; the operation method is to **press the volume down key continuously for more than three times** after the first boot screen. Note that it is press-release, press-release, press-release, not press and hold.
|
||||
|
||||
After entering safe mode, all modules on the module page of the KernelSU Manager are disabled, but you can perform "uninstall" operations to uninstall any modules that may be causing issues.
|
||||
|
||||
The built-in safe mode is implemented in the kernel, so there is no possibility of missing key events due to interception. However, for non-GKI kernels, manual integration of the code may be required, and you can refer to the official documentation for guidance.
|
||||
|
||||
### Malicious modules
|
||||
|
||||
If the above methods cannot rescue your device, it is highly likely that the module you installed has malicious operations or has damaged your device through other means. In this case, there are only two suggestions:
|
||||
|
||||
1. Wipe the data and flash the official system.
|
||||
2. Consult the after-sales service.
|
||||
50
website/docs/zh_CN/guide/rescue-from-bootloop.md
Normal file
50
website/docs/zh_CN/guide/rescue-from-bootloop.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# 救砖
|
||||
|
||||
在刷机的时候我们可能会遇到设备“变砖”的情况,理论上讲,如果你只是使用 fastboot 刷入 boot 分区或者安装不合适的模块导致设备无法启动,那么这都可以通过合适的操作恢复手机;本文档旨在提供一些急救方法让你可以在“变砖”中恢复。
|
||||
|
||||
## 刷入 boot 变砖
|
||||
|
||||
在 KernelSU 中,刷入 boot 变砖有如下可能:
|
||||
|
||||
1. 你刷入了错误格式的 boot 镜像。比如你的手机 boot 格式是 `gz` 的,但你刷入了 `lz4` 格式的镜像,那么此时手机无法启动。
|
||||
2. 你的手机需要关闭 avb 验证才能正常启动(注意这通常意味着需要清除手机所有数据)。
|
||||
3. 你的 kernel 有某些 bug 或者你的 kernel 不适合你这个手机刷入。
|
||||
|
||||
无论哪种情况,你都可以通过**刷入原厂 boot**恢复;因此,在安装教程最开始,我们已经强烈建议大家,在刷机之前备份自己的原厂 boot!如果你没有备份,那么你可以通过其他跟你相同设备的童鞋或者官方固件包获取原厂 boot。
|
||||
|
||||
## 刷入模块变砖
|
||||
|
||||
刷入模块变砖可能是大家遇到更常见的情况,但是这里必须郑重告诉大家:**请勿刷入来路不明的模块!!**。因为模块其实是有 root 权限的,它完全可能导致你的设备发生不可逆的损坏!
|
||||
|
||||
### 普通模块变砖
|
||||
|
||||
如果大家刷入某些开源的或者被证明是安全的模块使得手机无法启动,那么这种情况在 KernelSU 中非常容易恢复,完全无需担心。KernelSU 内置了如下两种机制来救砖:
|
||||
|
||||
1. AB 更新
|
||||
2. 音量键救砖
|
||||
|
||||
#### AB 更新
|
||||
|
||||
KernelSU 的模块更新借鉴了 Android 系统 OTA 更新时的 AB 更新机制,如果你安装了新模块或者对已有模块有更新操作,不会直接操作当前使用的模块文件,而是会把所有模块构建成另外一个 update 镜像;系统重启之后,会使用这个 update 镜像尝试启动一次,如果 Android 系统成功启动,才会真正更新模块。
|
||||
|
||||
因此,最简单最常用的救砖方法就是:**强制重启一次**。如果你在刷某个模块之后系统无法启动,你可以长按电源键超过 10 秒,系统会自动重启;重启之后会回滚到更新模块之前的状态,之前更新的模块会被自动禁用。
|
||||
|
||||
#### 音量键救砖
|
||||
|
||||
如果 AB 更新依然无法解决,你可以尝试使用**安全模式**。进入安全模式之后,所有的模块都会被禁用。
|
||||
|
||||
进入安全模式的方法有两种:
|
||||
|
||||
1. 某些系统自带的安全模式;有些系统是长按音量下,有些系统(比如MIUI)可以在 Recovery 中开启安全模式。进入系统的安全模式后,KernelSU 也会进入安全模式,自动禁用模块。
|
||||
2. KernelSU 内置的安全模式;操作方法:开机第一屏后,**连续按音量下键超过三次**。注意是按下-松开、按下-松开、按下-松开,不是按着不动。
|
||||
|
||||
进入安全模式以后,KernelSU 管理器的模块页面所有模块都被禁用,但你可以执行“卸载”操作,卸载可能会有问题的模块。
|
||||
|
||||
内置的安全模式是在内核里面实现的,因此不会出现按键事件被拦截导致捕获不到的情况。不过对于非 GKI 内核,可能需要手动集成代码,可以参考官网教程。
|
||||
|
||||
### 格机或其他病毒模块变砖
|
||||
|
||||
如果以上方法无法拯救你的设备,那么很有可能你装的模块有恶意操作或者通过其他方式损坏了你的设备,这种情况下,只有两个建议:
|
||||
|
||||
1. 清除数据后刷入完整刷入官方系统。
|
||||
2. 咨询售后服务。
|
||||
Reference in New Issue
Block a user