The implementers related to Low-level, Rooting, Zygisk, Riru, and Frameworks are stored here.
The following tutorial is applicable to the deployment of KernelSU (and its variants), Magisk (and its variants), and Apatch (and its variants) on Android devices. For users who wish to deploy KernelSU or one of its variants, please check whether the kernel of the target Android device is a GKI kernel and supported by the rooting solution. For users who wish to deploy Magisk (or one of its variants) or Apatch (or one of its variants), please check whether the Android version of the target Android device is larger than or equal to the minimum required Android version. Throughout the whole tutorials, there is only a computer and an Android device, where the Android device is the one to be rooted. If you have completed a step, please skip it directly.
- Define
- The following
patched_init_boot.imgrefers to the path to the patchedinit_bootimage file on the computer (please use double quotes to enclose the path if it is necessary) - The following
original_init_boot.imgrefers to the path to the originalinit_bootimage file on the computer (please use double quotes to enclose the path if it is necessary) - The following
patched_boot.imgrefers to the path to the patchedbootimage file on the computer (please use double quotes to enclose the path if it is necessary) - The following
original_boot.imgrefers to the path to the originalbootimage file on the computer (please use double quotes to enclose the path if it is necessary) - The following
third_party_recovery.imgrefers to the path to the third-partyrecoveryimage file on the computer (please use double quotes to enclose the path if it is necessary) - The following
original_recovery.imgrefers to the path to the originalrecoveryimage file on the computer (please use double quotes to enclose the path if it is necessary)
- The following
- If this is the first time for the target Android device to be rooted
- Deploy the environments of the latest platform tools on the computer and make sure the
adbandfastbootin the search path(s) - Install the corresponding drivers for the target Android device on the computer
- Boot the target Android device normally into the system and connect it to the computer via a satisfactory USB data cable
- Unlock the bootloader of the target Android device (this will clear all the data of the target Android device if the status of the bootloader is locked)
- Enable the developer mode on the target Android device by clicking the system or kernel version at least 5 times
- Enable the
allow OEM unlockingoption in the developer options of the target Android device - Reboot the target Android device to the bootloader (the following details will not be repeated in the subsequent steps)
- If the target Android device supports advanced rebooting, then just reboot to the bootloader via the advanced rebooting menu
- Otherwise
- Enable the USB debugging option in the developer options of the target Android device
- Execute
adb deviceson the computer - Grant permissions to the computer for adb debugging on the target Android device
- Execute
adb reboot bootloaderon the computer - Disable the USB debugging option in the developer options of the target Android device
- Execute
fastboot oem unlockorfastboot flashing unlockon the computer (different fastboot versions and Android devices will have different instructions) - Reboot the target Android device normally into the system
- Root the target Android device (please use either one of the following methods)
- Method 1: By flashing a patched partition image file
- If KernelSU or one of its variants is used
- Install and launch the latest root manager on the target Android device
- Record the kernel version shown in the root manager (note that the Android version indicated at the beginning of the kernel version can be different from the one of the target Android device)
- Use either one of the following modes to patch and flash the partition image file (the GKI mode will take effect if both modes are used)
- LKM mode (recommended for those have an
init_bootpartition and under this condition there must be an A/B architecture)- Prepare the patched
init_boot.img(please use either of the following ways)- Patch manually (recommended)
- Extract the
init_boot.imgfrom the 9008, flashing, or OTA package corresponding to the ROM or the active slot of the target Android device - Copy the extracted
init_boot.imgto the external storage of the target Android device - Turn to the main tab of the root manager on the target Android device
- If the root manager shows
InstalledorNot Installed- Click on the element where the statement
InstalledorNot Installedlays - Click
Select a filein the root manager - Use the file manager to select the
init_boot.imgplaced in the external storage of the target Android device - Select the recorded kernel version
- Click
Patchand wait for the patching procedure to complete
- Click on the element where the statement
- Otherwise, please consider using Magisk (or one of its variants) or Apatch (or one of its variants)
- Find the patched
init_boot.imgunder the Download directory of the target Android device and copy or move it to the computer
- Extract the
- Search and fetch a corresponding patched
init_boot.imgfrom the Internet or the ROM variants based on the same originalinit_boot.img
- Patch manually (recommended)
- Reboot the target Android device to the bootloader
- Execute
fastboot getvar current-sloton the computer to view the current active slot - Execute
fastboot flash init_boot_a patched_init_boot.img(ifais active) orfastboot flash init_boot_b patched_init_boot.img(ifbis active) on the computer - Reboot the target Android device normally (by selecting the green
STARTvia +/- and pressing the power key on the target Android device or by executingfastboot rebooton the computer) - If the above flashing command fails, please stop here and consider using the GKI mode, Magisk (or one of its variants), or Apatch (or one of its variants)
- If the target Android device boots normally into the system
- Launch the corresponding root manager to check whether the target Android device is rooted
- If not, please retry, consider using the GKI mode, Magisk (or one of its variants), or Apatch (or one of its variants), or give up rooting (remember to restore to the original partitions)
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Execute
fastboot flash init_boot_a original_init_boot.img(ifais active) orfastboot flash init_boot_b original_init_boot.img(ifbis active) on the computer - Reboot the target Android device normally into the system
- Retry, consider using the GKI mode, Magisk (or one of its variants), or Apatch (or one of its variants), or give up rooting
- Prepare the patched
- For the GKI mode, please refer to the subsequent tutorials on how to root the target Android device via Magisk (or one of its variants) or Apatch (or one of its variants) for the first time
- LKM mode (recommended for those have an
- If the GKI mode of KernelSU (or one of its variants), Magisk (or one of its variants), or Apatch (or one of its variants) is used
- Install and launch the latest root manager on the target Android device
- Prepare the patched
boot.imt(please use either of the following ways)- Patch manually (recommended)
- Extract the
boot.imgfrom the 9008, flashing, or OTA package corresponding to the ROM or the active slot of the target Android device - Copy the extracted
boot.imgto the external storage of the target Android device - If patching the
boot.imgby KernelSU or one of its variants- Turn to the main tab of the root manager on the target Android device
- If the root manager shows
InstalledorNot Installed- Click on the element where the statement
InstalledorNot Installedlays - Click
Select a filein the root manager - Use the file manager to select the
boot.imgplaced in the external storage of the target Android device - Select the recorded kernel version
- Click
Patchand wait for the patching procedure to complete
- Click on the element where the statement
- Otherwise, please consider using Magisk (or one of its variants) or Apatch (or one of its variants)
- If patching the
boot.imgby Magisk or one of its variants- Turn to the main tab of the root manager on the target Android device
- Click the first
Installbutton in the root manager - Click
Select and patch a filein the root manager - Use the file manager to select the
boot.imgplaced in the external storage of the target Android device - Click
Startand wait for the patching procedure to complete
- If patching the
boot.imgby Apatch or one of its variants- Turn to the main tab of the root manager on the target Android device
- Click the
Installbutton in the root manager - Click
Select and patch a filein the root manager - Use the file manager to select the
boot.imgplaced in the external storage of the target Android device - Embed the Cherish Peekaboo kernel module if you wish to
- Set a password
- Click
Patchand wait for the patching procedure to complete
- Find the patched
boot.imgunder the Download directory of the target Android device and copy or move it to the computer
- Extract the
- Patch via an OTA link by Magisk or one of its variants
- Turn to the main tab of the root manager on the target Android device
- Click the first
Installbutton in the root manager - Click
Download and patch an imagein the root manager - Enter the OTA link and confirm
- Search and fetch a corresponding patched
boot.imgfrom the Internet or the ROM variants based on the same originalboot.img
- Patch manually (recommended)
- Reboot the target Android device to the bootloader
- If the target Android device runs on the non-A/B architecture
- Execute
fastboot boot patched_boot.imgon the computer - If the target Android device boots normally into the system after the above command
- Execute
fastboot flash boot patched_boot.imgon the computer - Reboot the target Android device (by selecting the green
STARTvia +/- and pressing the power key on the target Android device or by executingfastboot rebooton the computer) - If the above flashing command fails, please stop here and consider retrying or giving up
- If the target Android device boots normally into the system
- Launch the corresponding root manager to check whether the target Android device is rooted
- If not, please retry or give up rooting (remember to restore to the original partitions)
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Execute
fastboot flash boot original_boot.imgon the computer - Reboot the target Android device normally into the system
- Retry or give up rooting
- Execute
- Otherwise, consider retrying or giving up rooting
- Execute
- If the target Android device runs on the legacy A/B architecture
- Execute
fastboot getvar current-sloton the computer to view the current active slot - Execute
fastboot boot patched_boot.imgon the computer - If the target Android device boots normally into the system after the above command
- Execute
fastboot flash boot_a patched_boot.img(ifais active) orfastboot flash boot_b patched_boot.img(ifbis active) on the computer - Reboot the target Android device (by selecting the green
STARTvia +/- and pressing the power key on the target Android device or by executingfastboot rebooton the computer) - If the above flashing command fails, please stop here and consider retrying or giving up
- If the target Android device boots normally into the system
- Launch the corresponding root manager to check whether the target Android device is rooted
- If not, please retry or give up rooting (remember to restore to the original partitions)
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Execute
fastboot flash boot_a original_boot.img(ifais active) orfastboot flash boot_b original_boot.img(ifbis active) on the computer - Reboot the target Android device normally into the system
- Retry or give up rooting
- Execute
- Otherwise, consider retrying or giving up rooting
- Execute
- If the target Android device runs on the virtual A/B architecture
- Execute
fastboot getvar current-sloton the computer to view the current active slot - Execute
fastboot flash boot_a patched_boot.img(ifais active) orfastboot flash boot_b patched_boot.img(ifbis active) on the computer - Reboot the target Android device (by selecting the green
STARTvia +/- and pressing the power key on the target Android device or by executingfastboot rebooton the computer) - If the above flashing command fails, please stop here and consider retrying or giving up
- If the target Android device boots normally into the system
- Launch the corresponding root manager to check whether the target Android device is rooted
- If not, please retry or give up rooting (remember to restore to the original partitions)
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Execute
fastboot flash boot_a original_boot.img(ifais active) orfastboot flash boot_b original_boot.img(ifbis active) on the computer - Reboot the target Android device normally into the system
- Retry or give up rooting
- Execute
- If KernelSU or one of its variants is used
- Method 2: Via a third-party recovery (only applicable to Magisk and its variants)
- Rename the APK of the latest Magisk or one of its variants to
magisk.zipand copy it to the target Android device - Find and download the third-party recovery image file (like TWRP and OrangeFox) for the target Android device
- Reboot the target Android device to the bootloader
- If the target Android device runs on the virtual A/B architecture
- Execute
fastboot getvar current-sloton the computer to view the current active slot - Try to back up the original recovery partition
- Execute
fastboot flash recovery_a third_party_recovery.img(ifais active) orfastboot flash recovery_b third_party_recovery.img(ifbis active) on the computer - Reboot the target Android device (by selecting the red
RECOVERYvia +/- and pressing the power key on the target Android device or by executingfastboot reboot recoveryon the computer) - If the target Android device boots into the recovery mode and can decrypt the
/datapartition after inputting the correct password- Flash the OrangeFox ZIP in the third-party recovery if using OrangeFox
- Flash the
magisk.zipin the third-party recovery - Reboot the target Android device normally into the system via the third-party recovery
- If the target Android device boots normally into the system
- Launch the corresponding root manager to check whether the target Android device is rooted
- If not, please retry or give up rooting (remember to restore to the original partitions)
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Reboot the target Android device (by selecting the red
RECOVERYvia +/- and pressing the power key on the target Android device or by executingfastboot reboot recoveryon the computer) - Rename the
magisk.zipon the target Android device touninstall.zipin the third-party recovery - Flash the
uninstall.zipin the third-party recovery - Rename the
uninstall.zipon the target Android device back tomagisk.zipin the third-party recovery - Reboot the target Android device normally into the system
- Retry or give up rooting
- Otherwise
- Execute
fastboot flash recovery_a original_recovery.img(ifais active) orfastboot flash recovery_b original_recovery.img(ifbis active) on the computer - Search another third-party recovery, retry, or give up rooting
- Execute
- Execute
- Otherwise
- Execute
fastboot boot third_party_recovery.imgon the computer to make the target Android device temporarily boot into the recovery mode powered by the third-party recovery - If the target Android device boots into the recovery mode and can decrypt the
/datapartition after inputting the correct password- Flash current TWRP (if using TWRP) or the OrangeFox ZIP (if using OrangeFox) in the third-party recovery and test it if you wish to make the third-party recovery permanent
- Flash the
magisk.zipin the third-party recovery - Reboot the target Android device normally into the system via the third-party recovery
- If the target Android device boots normally into the system
- Launch the corresponding root manager to check whether the target Android device is rooted
- If not, please retry or give up rooting (remember to restore to the original partitions)
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Reboot the target Android device (by selecting the red
RECOVERYvia +/- and pressing the power key on the target Android device or by executingfastboot reboot recoveryon the computer) - Rename the
magisk.zipon the target Android device touninstall.zipin the third-party recovery - Flash the
uninstall.zipin the third-party recovery - Rename the
uninstall.zipon the target Android device back tomagisk.zipin the third-party recovery - Reboot the target Android device normally into the system
- Retry or give up rooting
- Otherwise, search for another third-party recovery, retry, or give up rooting
- Execute
- Rename the APK of the latest Magisk or one of its variants to
- Method 1: By flashing a patched partition image file
- Remove the USB data cable
- Deploy the environments of the latest platform tools on the computer and make sure the
- Otherwise (please use either one of the following methods)
- Method 1: Please refer to either of the methods in the first-time rooting
- Method 2: Install directly in the root manager that already has root privileges on the target Android device and reboot the target Android device normally into the system (recommended)
- Method 3: Use Kernel Flasher
- Install Kernel Flasher on the target Android device
- Grant root privileges to Kernel Flasher in the root manager that already has root privileges
- Back up the
/bootpartition via Kernel Flasher and copy or move it to the computer - Search and download the corresponding AnyKernel3 (AK3) from the GitHub
- Flash the AK3 via Kernel Flasher (the kernel is in the
/bootpartition) - Reboot the target Android device normally into the system
- If the target Android device boots normally into the system
- Install and launch the latest root manager corresponding to the new kernel to check whether the target Android device is rooted (this may be converted from the LKM mode to the GKI mode)
- If not, please try other methods to root the target Android device
- Otherwise
- Long-press the power key and the volume key(s) accordingly to force the target Android device reboot into the bootloader
- Deploy the environments of the latest platform tools and make sure the commands
adbandfastbootin the search path(s) - Install the corresponding drivers for the target Android device on the computer
- Execute
fastboot flash original_boot.imgon the computer - Reboot the target Android device normally into the system
- Use other methods to root the target Android device
The compatibility analysis of some implementations and modules is as follows, where "Y" means compatible and "N" means incompatible.
| Compatibility | Official Magisk and all variants of KSU | Magisk Alpha | Apatch | Zygisk Next | ReZygisk | NeoZygisk | Shamiko | NoHello | Zygisk Assistant |
|---|---|---|---|---|---|---|---|---|---|
| Official Magisk and all variants of KSU | - | N | N | Y | Y | Y | Y | Y | Y |
| Magisk Alpha | N | - | N | Y | N | Y | Y | Y | Y |
| Apatch | N | N | - | Y | Y | Y | N | Y | Y |
| Zygisk Next | Y | Y | Y | - | N | N | Y | Y | Y |
| ReZygisk | Y | N | Y | N | - | N | Y | Y | Y |
| NeoZygisk | Y | Y | Y | N | N | - | N | N | Y |
| Shamiko | Y | Y | N | Y | Y | N | - | N | Y |
| NoHello | Y | Y | Y | Y | Y | N | N | - | N |
| Zygisk Assistant | Y | Y | Y | Y | Y | Y | Y | N | - |
Therefore, there are the following collocations (partly), where "P" means passed and "F" means failed. For detailed steps of bypassing, please refer to Bypassers.
| Combination | Native Root Detector | Native Test |
|---|---|---|
| Magisk Alpha + Zygisk Next + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + Zygisk Next + NoHello + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + Zygisk Next + Shamiko + PIF + TS + VBMeta Fixer | P | P |
| Magisk Alpha + Zygisk Next + Shamiko + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | P | F |
| Magisk + Zygisk Next + Shamiko + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + built-in Zygisk + Shamiko + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + built-in Zygisk + Shamiko + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + built-in Zygisk + NoHello + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + built-in Zygisk + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + NeoZygisk + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + NeoZygisk + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | P | F |
It is worth noting that Zygisk Next integrates most of Shamiko's functionalities starting from version 1.3.0 and is compatible with all root implementations. Currently, SukiSU-Ultra or Magisk Alpha, with Zygisk Next 1.3.0 or higher versions, may be the optimal upstream setup.
与底层、root、Zygisk、riru 和框架相关的部署工具在此处存储。
以下教程适用于在安卓设备上部署 KernelSU 及其变体、Magisk 及其变体和 Apatch 及其变体。对于希望部署 KernelSU 或其变体之一的用户,请检查目标安卓设备的内核是否为通用内核映像并被 root 方案支持。 对于希望部署 Magisk(或其变体之一)或 Apatch(或其变体之一)的用户,请检查目标安卓设备的安卓版本是否达到最低的安卓版本要求。 教程全文仅提及一台计算机和一台安卓设备,其中的安卓设备即为目标安卓设备。如果某个步骤已被完成,请直接跳过。
- 定义
- 下文的
patched_init_boot.img代指位于计算机中的修补后的init_boot镜像文件路径(请在必要时在路径两端添加一对英文双引号) - 下文的
original_init_boot.img代指位于计算机中的原始的init_boot镜像文件路径(请在必要时在路径两端添加一对英文双引号) - 下文的
patched_boot.img代指位于计算机中的修补后的boot镜像文件路径(请在必要时在路径两端添加一对英文双引号) - 下文的
original_boot.img代指位于计算机中的原始的boot镜像文件路径(请在必要时在路径两端添加一对英文双引号) - 下文的
third_party_recovery.img代指位于计算机中的第三方recovery镜像文件路径(请在必要时在路径两端添加一对英文双引号) - 下文的
original_recovery.img代指位于计算机中的原始recovery镜像文件路径(请在必要时在路径两端添加一对英文双引号)
- 下文的
- 如果这是首次 root 目标安卓设备(不是指人的首次操作)
- 在计算机上部署最新的 platform tools 环境并确保
adb和fastboot在搜索路径中 - 在计算机上为目标安卓设备安装相应的驱动
- 启动目标安卓设备使其正常进入系统并使用一条优质的 USB 数据线将计算机和目标安卓设备进行连接
- 为目标安卓设备解锁 bootloader(将 bootloader 从锁定状态变成解锁状态会清空目标安卓设备上的所有数据)
- 通过至少 5 次连续点击系统版本或内核版本来为目标安卓设备启用开发者模式
- 在目标安卓设备中的开发者选项里启用
允许 OEM 解锁 - 重启目标安卓设备到 bootloader(在后续步骤中以下细节不再赘述)
- 如果目标安卓设备支持高级重启,那么可以直接通过高级重启菜单重启目标安卓设备到 bootloader
- 否则
- 在目标安卓设备中的开发者选项里启用 USB 调试选项
- 在计算机上执行
adb devices - 在目标安卓设备中允许计算机执行 adb 调试
- 在计算机上执行
adb reboot bootloader - 在目标安卓设备中的开发者选项里停用 USB 调试选项
- 在计算机上执行
fastboot oem unlock或fastboot flashing unlock(不同的 fastboot 版本和安卓设备会有不同的指令) - 重启目标安卓设备使其正常进入系统
- Root 目标安卓设备(请使用下列方法中的任一方法)
- 方法 1:通过刷入一个修补后的分区镜像文件
- 如果使用的是 KernelSU 或其变体之一
- 在目标安卓设备上安装并启动最新版 root 管理器
- 记录 root 管理器中显示的内核版本(注意内核版本起始位置指示的安卓版本可以和目标安卓设备的安卓版本不同)
- 使用以下模式中的任一模式来修补和刷入分区镜像文件(如果同时使用了两个模式则以 GKI 模式为准)
- LKM 模式(推荐有
init_boot分区的安卓设备使用,在此条件下,该安卓设备一定是 A/B 架构)- 准备修补后的
init_boot.img(请使用下列方式中的任一方式)- 手动修补(推荐)
- 从对应于目标安卓设备 ROM 或活动槽位的 9008 包、线刷包或全量包(卡刷包)中提取
init_boot.img - 将提取的
init_boot.img复制到目标安卓设备的外部存储中 - 在目标安卓设备上转到 root 管理器的首页
- 如果 root 管理器显示
已安装或未安装- 点击显示
已安装或未安装文字所在的元素 - 在 root 管理器中点击
选择一个文件 - 使用文件管理器选择放置在目标安卓设备的外部存储中的
init_boot.img - 选择之前记录的内核版本
- 点击
修补并等待修补过程完成
- 点击显示
- 否则,请考虑使用 Magisk(或其变体之一)或 Apatch(或其变体之一)
- 在目标安卓设备的下载目录下找到修补后的
init_boot.img并复制或移动它到计算机上
- 从对应于目标安卓设备 ROM 或活动槽位的 9008 包、线刷包或全量包(卡刷包)中提取
- 从互联网或基于同一原始
init_boot.img的 ROM 的变体中搜索并获取一个对应的修补后的init_boot.img
- 手动修补(推荐)
- 重启目标安卓设备到 bootloader
- 在计算机上执行
fastboot getvar current-slot来查看当前的活动槽位 - 在计算机上执行
fastboot flash init_boot_a patched_init_boot.img(如果槽位 A 活跃)或fastboot flash init_boot_b patched_init_boot.img(如果槽位 B 活跃) - 重启目标安卓设备使其正常进入系统(在目标安卓设备上通过音量 +/- 键选中绿色的
START并按下电源键或在计算机上执行fastboot reboot) - 如果上述刷入命令失败,请在此停止并考虑使用 GKI 模式、Magisk(或其变体之一)或 Apatch(或其变体之一)
- 如果目标安卓设备能够正常进入系统
- 启动相应的 root 管理器并检查目标安卓设备是否已成功 root
- 如未 root,请重试,考虑使用 GKI 模式、Magisk(或其变体之一)或 Apatch(或其变体之一),或放弃 root(请记得将全部分区还原为原始分区)
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 在计算机上执行
fastboot flash init_boot_a original_init_boot.img(如果槽位 A 活跃)或fastboot flash init_boot_b original_init_boot.img(如果槽位 B 活跃) - 重启目标安卓设备使其正常进入系统
- 重试,考虑使用 GKI 模式、Magisk(或其变体之一)或 Apatch(或其变体之一),或放弃 root
- 准备修补后的
- 对于 GKI 模式,请参阅后续有关如何通过 Magisk(或其变体之一)或 Apatch(或其变体之一)首次 root 目标安卓设备的教程
- LKM 模式(推荐有
- 如果使用的是 KernelSU(或其变体之一)的 GKI 模式、Magisk(或其变体之一)或 Apatch(或其变体之一)
- 在目标安卓设备上安装并启动最新版 root 管理器
- 准备修补后的
boot.img(请使用下列方式中的任一方式)- 手动修补(推荐)
- 从对应于目标安卓设备 ROM 或活动槽位的 9008 包、线刷包或全量包(卡刷包)中提取
boot.img - 将提取的
boot.img复制到目标安卓设备的外部存储中 - 如果通过 KernelSU 或其变体之一来修补
boot.img- 在目标安卓设备上转到 root 管理器的首页
- 如果 root 管理器显示
已安装或未安装- 点击显示
已安装或未安装文字所在的元素 - 在 root 管理器中点击
选择一个文件 - 使用文件管理器选择放置在目标安卓设备的外部存储中的
boot.img - 选择之前记录的内核版本
- 点击显示
- 否则,请考虑使用 Magisk(或其变体之一)或 Apatch(或其变体之一)
- 如果通过 Magisk 或其变体之一来修补
boot.img- 在目标安卓设备上转到 root 管理器的首页
- 点击 root 管理器中的第一个
安装按钮 - 点击 root 管理器中的
选择并修补文件 - 使用文件管理器选择放置在目标安卓设备的外部存储中的
boot.img - 点击
开始并等待修补过程完成
- 如果通过 Apatch 或其变体之一来修补
boot.img- 在目标安卓设备上转到 root 管理器的首页
- 点击 root 管理器中的
安装按钮 - 点击 root 管理器中的
选择并修补文件 - 使用文件管理器选择放置在目标安卓设备的外部存储中的
boot.img - 如有需要可嵌入 Cherish Peekaboo 内核模块
- 设置密码
- 点击
修补并等待修补过程完成
- 在目标安卓设备的下载目录下找到修补后的
boot.img并复制或移动它到计算机上
- 从对应于目标安卓设备 ROM 或活动槽位的 9008 包、线刷包或全量包(卡刷包)中提取
- 通过 Magisk 或其变体之一的 OTA 链接下载并修补镜像
- 在目标安卓设备上转到 root 管理器的首页
- 点击 root 管理器中的第一个
安装按钮 - 点击 root 管理器中的
下载并修补映像 - 输入 OTA 链接并确认
- 从互联网或基于同一原始
boot.img的 ROM 的变体中搜索并获取一个对应的修补后的boot.img
- 手动修补(推荐)
- 重启目标安卓设备到 bootloader
- 如果目标安卓设备在 non-A/B 架构上运行
- 在计算机上执行
fastboot boot patched_boot.img - 如果目标安卓设备在执行上述命令后正常启动进入系统
- 在计算机上执行
fastboot flash boot patched_boot.img - 重启目标安卓设备使其正常进入系统(在目标安卓设备上通过音量 +/- 键选中绿色的
START并按下电源键或在计算机上执行fastboot reboot) - 如果上述刷入命令失败,请在此停止并考虑重试或放弃
- 如果目标安卓设备能够正常进入系统
- 启动相应的 root 管理器并检查目标安卓设备是否已成功 root
- 如未 root,请重试或放弃 root(请记得将全部分区还原为原始分区)
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 在计算机上执行
fastboot flash boot original_boot.img - 重启目标安卓设备使其正常进入系统
- 重试或放弃 root
- 在计算机上执行
- 否则,请考虑重试或放弃 root
- 在计算机上执行
- 如果目标安卓设备在 legacy A/B 架构上运行
- 在计算机上执行
fastboot getvar current-slot来查看当前的活动槽位 - 在计算机上执行
fastboot boot patched_boot.img - 如果目标安卓设备在执行上述命令后正常启动进入系统
- 在计算机上执行
fastboot flash boot_a patched_boot.img(如果槽位 A 活跃)或fastboot flash boot_b patched_boot.img(如果槽位 B 活跃) - 重启目标安卓设备使其正常进入系统(在目标安卓设备上通过音量 +/- 键选中绿色的
START并按下电源键或在计算机上执行fastboot reboot) - 如果上述刷入命令失败,请在此停止并考虑重试或放弃
- 如果目标安卓设备能够正常进入系统
- 启动相应的 root 管理器并检查目标安卓设备是否已成功 root
- 如未 root,请重试或放弃 root(请记得将全部分区还原为原始分区)
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 在计算机上执行
fastboot flash boot_a original_boot.img(如果槽位 A 活跃)或fastboot flash boot_b original_boot.img(如果槽位 B 活跃) - 重启目标安卓设备使其正常进入系统
- 重试或放弃 root
- 在计算机上执行
- 否则,请考虑重试或放弃 root
- 在计算机上执行
- 如果目标安卓设备在 virtual A/B 架构上运行
- 在计算机上执行
fastboot getvar current-slot来查看当前的活动槽位 - 在计算机上执行
fastboot flash boot_a patched_boot.img(如果槽位 A 活跃)或fastboot flash boot_b patched_boot.img(如果槽位 B 活跃) - 重启目标安卓设备使其正常进入系统(在目标安卓设备上通过音量 +/- 键选中绿色的
START并按下电源键或在计算机上执行fastboot reboot) - 如果上述刷入命令失败,请在此停止并考虑重试或放弃
- 如果目标安卓设备能够正常进入系统
- 启动相应的 root 管理器并检查目标安卓设备是否已成功 root
- 如未 root,请重试或放弃 root(请记得将全部分区还原为原始分区)
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 在计算机上执行
fastboot flash boot_a original_boot.img(如果槽位 A 活跃)或fastboot flash boot_b original_boot.img(如果槽位 B 活跃) - 重启目标安卓设备使其正常进入系统
- 重试或放弃 root
- 在计算机上执行
- 如果使用的是 KernelSU 或其变体之一
- 方法 2:通过第三方恢复(仅对 Magisk 及其变体生效)
- 将最新版 Magisk 或其变体之一的 APK 重命名为
magisk.zip并复制到目标安卓设备上 - 为目标安卓设备查找并下载第三方恢复镜像文件(例如 TWRP 和 OrangeFox)
- 重启目标安卓设备到 bootloader
- 如果目标安卓设备在 virtual A/B 架构上运行
- 在计算机上执行
fastboot getvar current-slot来查看当前的活动槽位 - 尝试备份原始恢复分区
- 在计算机上执行
fastboot flash recovery_a third_party_recovery.img(如果槽位 A 活跃)或fastboot flash recovery_b third_party_recovery.img(如果槽位 B 活跃) - 重启目标安卓设备使其进入恢复模式(在目标安卓设备上通过音量 +/- 键选中红色的
RECOVERY并按下电源键或在计算机上执行fastboot reboot recovery) - 如果目标安卓设备启动到恢复模式并能够在输入正确的密码后解密
/data分区- 如果正在使用 OrangeFox 请在第三方恢复中刷入 OrangeFox 的 ZIP 包
- 在第三方恢复中刷入
magisk.zip - 通过第三方恢复将目标安卓设备重启至系统
- 如果目标安卓设备能够正常进入系统
- 启动相应的 root 管理器并检查目标安卓设备是否已成功 root
- 如未 root,请重试或放弃 root(请记得将全部分区还原为原始分区)
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 重启目标安卓设备使其进入恢复模式(在目标安卓设备上通过音量 +/- 键选中红色的
RECOVERY并按下电源键或在计算机上执行fastboot reboot recovery) - 通过第三方恢复将目标安卓设备中的
magisk.zip重命名为uninstall.zip - 通过第三方恢复刷入
uninstall.zip - 通过第三方恢复将目标安卓设备中的
uninstall.zip重命名回magisk.zip - 重启目标安卓设备使其正常进入系统
- 重试或放弃 root
- 否则
- 在计算机上执行
fastboot flash recovery_a original_recovery.img(如果槽位 A 活跃)或fastboot flash recovery_b original_recovery.img(如果槽位 B 活跃) - 搜索其它第三方恢复、重试或放弃 root
- 在计算机上执行
- 在计算机上执行
- 否则
- 在计算机中执行
fastboot boot third_party_recovery.img以使得目标安卓设备临时启动到由第三方恢复实现的恢复模式 - 如果目标安卓设备启动到恢复模式并能够在输入正确的密码后解密
/data分区- 如希望将第三方恢复永久保留可在第三方恢复中刷入当前 TWRP(如果使用的是 TWRP)或 OrangeFox 的 ZIP 包(如果使用的是 OrangeFox)
- 在第三方恢复中刷入
magisk.zip - 通过第三方恢复将目标安卓设备重启至系统
- 如果目标安卓设备能够正常进入系统
- 启动相应的 root 管理器并检查目标安卓设备是否已成功 root
- 如未 root,请重试或放弃 root(请记得将全部分区还原为原始分区)
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 重启目标安卓设备使其进入恢复模式(在目标安卓设备上通过音量 +/- 键选中红色的
RECOVERY并按下电源键或在计算机上执行fastboot reboot recovery) - 通过第三方恢复将目标安卓设备中的
magisk.zip重命名为uninstall.zip - 通过第三方恢复刷入
uninstall.zip - 通过第三方恢复将目标安卓设备中的
uninstall.zip重命名回magisk.zip - 重启目标安卓设备使其正常进入系统
- 重试或放弃 root
- 否则,搜索其它第三方恢复、重试或放弃 root
- 在计算机中执行
- 将最新版 Magisk 或其变体之一的 APK 重命名为
- 方法 1:通过刷入一个修补后的分区镜像文件
- 移除 USB 数据线
- 在计算机上部署最新的 platform tools 环境并确保
- 否则(请使用下列方法中的任一方法)
- 方法 1:请使用首次 root 的方法中的任一方法
- 方法 2:通过目标安卓设备中已具有 root 权限的 root 管理器直接安装并重启目标安卓设备使其正常进入系统(推荐)
- 方法 3:使用 Kernel Flasher
- 在目标安卓设备上安装 Kernel Flasher
- 使用已拥有 root 权限的 root 管理器为 Kernel Flasher 授予 root 权限
- 通过 Kernel Flasher 备份
/boot分区并将其复制或移动到计算机中 - 从 GitHub 上搜索并下载相应的 AnyKernel3(AK3)
- 通过 Kernel Flasher 刷入 AK3(内核在
boot分区中) - 重启目标安卓设备使其正常进入系统
- 如果目标安卓设备能够正常进入系统
- 安装并启动与新内核对应的最新版 root 管理器以检查目标安卓设备是否已成功 root(这可能从 LKM 模式转换为 GKI 模式)
- 如未 root,请尝试使用其它方法 root 目标安卓设备
- 否则
- 根据目标安卓设备长按电源键和音量键来强制目标安卓设备重启进入 bootloader
- 在计算机上部署最新的 platform tools 环境并确保
adb和fastboot在搜索路径中 - 在计算机上为目标安卓设备安装相应的驱动
- 在计算机上执行
fastboot flash original_boot.img - 重启目标安卓设备使其正常进入系统
- 尝试使用其它方法 root 目标安卓设备
一些实现和模块之间的兼容性分析如下,其中 Y 表示兼容,N 表示不兼容。
| 兼容性 | 官方 Magisk 和 KSU 的所有变体 | Magisk Alpha | Apatch | Zygisk Next | ReZygisk | NeoZygisk | Shamiko | NoHello | Zygisk Assistant |
|---|---|---|---|---|---|---|---|---|---|
| 官方 Magisk 和 KSU 的所有变体 | - | N | N | Y | Y | Y | Y | Y | Y |
| Magisk Alpha | N | - | N | Y | N | Y | Y | Y | Y |
| Apatch | N | N | - | Y | Y | Y | N | Y | Y |
| Zygisk Next | Y | Y | Y | - | N | N | Y | Y | Y |
| ReZygisk | Y | N | Y | N | - | N | Y | Y | Y |
| NeoZygisk | Y | Y | Y | N | N | - | N | N | Y |
| Shamiko | Y | Y | N | Y | Y | N | - | N | Y |
| NoHello | Y | Y | Y | Y | Y | N | N | - | N |
| Zygisk Assistant | Y | Y | Y | Y | Y | Y | Y | N | - |
因此,存在以下搭配(部分),其中 P 表示通过,F 表示失败。有关过检的详细步骤,请参阅 Bypassers。
| Combination | Native Root Detector | Native Test |
|---|---|---|
| Magisk Alpha + Zygisk Next + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + Zygisk Next + NoHello + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + Zygisk Next + Shamiko + PIF + TS + VBMeta Fixer | P | P |
| Magisk Alpha + Zygisk Next + Shamiko + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | P | F |
| Magisk + Zygisk Next + Shamiko + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + built-in Zygisk + Shamiko + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + built-in Zygisk + Shamiko + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + built-in Zygisk + NoHello + PIF + TS + VBMeta Fixer | P | F |
| Magisk Alpha + built-in Zygisk + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + NeoZygisk + PIF + TS + VBMeta Fixer | F | F |
| Magisk Alpha + NeoZygisk + Zygisk Assistant (Denylist configured) + PIF + TS + VBMeta Fixer | P | F |
值得注意的是,Zygisk Next 自 1.3.0 版本起集成了 Shamiko 大部分的功能,且适用于所有的 root 实现。目前,SukiSU-Ultra 或 Magisk Alpha,搭配 Zygisk Next 1.3.0 及更高的版本,可能是最好的上游组合。