Guide on Bootloader Unlock and Root for Xiaomi devices (HyperOS / HyperOS 2.0 / HyperOS 3.0) (Non-Mainland China Devices) | Hide Root / Play Integrity / Spoof Bootloader Status as Locked (Key Attestation) for most Android devices [2026]
159
stars
109
commits
Jun 12, 2026
updated
adb.exe reboot fastboot and press enterinit_boot is for newer devices. Older devices do not have init_boot, so only use boot on thoseKernelSU (recommended — install to check if your phone is supported) (Android 12+)
Step 1: Obtain ROM Files
- Navigate to About phone on your device
- Download the firmware (Fastboot ROM) from miuirom.org that matches your device and OS version
Step 2: Extract Firmware
- After download, extract and navigate to its folder
Step 3: Locate the
imagesFolder
- Find the
imagesfolder and enter itStep 4: Backup
init_boot.img
- In the folder, copy
init_boot.imgto theplatform-toolsfolder in Step 9 of unlocking the bootloader- Rename the copied file to
init_boot_stock.img(DO NOT DELETE IN CASE OF A BRICK)Step 5: Transfer to Phone
- Transfer the
init_boot_stock.imgfile to your phoneStep 6: Install KernelSU
- Download and install the latest APK from their releases
https://github.com/tiann/KernelSU/releasesStep 7: Check KernelSU compatibility
- Open KernelSU
- If the app shows Not installed, then your device is officially supported by KernelSU
If the app shows Unsupported, it means that you should compile the kernel yourself, KernelSU won't and never provide files for you to flashStep 8: Patch the
init_boot_stock.img
- Open KernelSU
- Click on Not installed - Tap to install -> Select a file.
- Choose
init_boot_stock.img- Click on Next and choose the option with This device KMI
- Press Confirm
- The patched file should be something like
kernelsu_patched_20260605_045957.imgin the Download folder of your phoneStep 9: Transfer Patched File to PC
- Move the patched file (
kernelsu_patched_20260605_045957.img) toplatform-toolsStep 10: Reboot to Fastboot
- Plug in your phone
- Navigate to
platform-tools, click on the address bar of the folder and replace everything with cmd- Press enter and a CMD window should pop up
- Run the following command in CMD:
adb.exe reboot fastbootStep 11: Flash Patched
init_boot
In the same CMD window, execute the following commands using it as an example:
fastboot.exe flash init_boot_a kernelsu_patched_20260605_045957.img fastboot.exe flash init_boot_b kernelsu_patched_20260605_045957.img fastboot.exe rebootYour device should reboot into the system and be rooted
Magisk Alpha
Step 1: Obtain ROM Files
- Navigate to About phone on your device
- Download the firmware (Fastboot ROM) from miuirom.org that matches your device and OS version
Step 2: Extract Firmware
- After download, extract and navigate to its folder
Step 3: Locate the
imagesFolder
- Find the
imagesfolder and enter itStep 4: Backup
init_boot.img
- In the folder, copy
init_boot.imgto theplatform-toolsfolder in Step 9 of unlocking the bootloader.- Rename the copied file to
init_boot_stock.img(DO NOT DELETE IN CASE OF A BRICK)Step 5: Transfer to Phone
- Transfer the
init_boot_stock.imgfile to your phoneStep 6: Install Magisk Alpha
- Download and install the latest version of Magisk Alpha from their Telegram Channel
Step 7: Patch the
init_boot_stock.img
- Open Magisk Alpha
- Tap Install -> Select and Patch a File
- Choose
init_boot_stock.img- The patched file should be something like
magisk_patched-XXXXX_xxxxx.imgin the Download folder of your phoneStep 8: Transfer Patched File to PC
- Move the patched file (
magisk_patched-XXXXX_xxxxx.img) toplatform-toolsStep 9: Reboot to Fastboot
- Plug in your phone
- Navigate to
platform-tools, click on the address bar of the folder and replace everything with cmd- Press enter and a CMD window should pop up
- Run the following command in CMD
adb.exe reboot fastbootStep 10: Flash Patched
init_boot
In the same CMD window, execute the following commands
fastboot.exe flash init_boot_a magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash init_boot_a magisk_patched-28001_p5r8c.img) fastboot.exe flash init_boot_b magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash init_boot_b magisk_patched-28001_p5r8c.img) fastboot.exe rebootOnly for OLD DEVICES without
init_boot(DO NOT FOLLOW IF YOUR DEVICE HAVEinit_boot)fastboot.exe flash boot_a magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash boot_a magisk_patched-28001_p5r8c.img) fastboot.exe flash boot_b magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash boot_b magisk_patched-28001_p5r8c.img) fastboot.exe rebootOnly for OLD DEVICES without
init_boot, if there's an error, try running this command (DO NOT FOLLOW IF YOUR DEVICE HAVEinit_boot)fastboot.exe --disable-verity --disable-verification flash vbmeta vbmeta.img (vbmeta.img is from the firmware you downloaded)Your device should reboot into the system and be rooted
KernelSU
Step 1: Install Required Magisk / KernelSU Modules
Install the latest release version of the following modules in this order:
- Hybrid Mount (reboot your phone)
https://github.com/Hybrid-Mount/meta-hybrid_mount/releases- Zygisk Next (reboot your phone)
https://github.com/Dr-TSNG/ZygiskNext/releases- TEESimulator-RS (Way Better Alternative to Tricky Store)
https://github.com/Enginex0/TEESimulator-RS/releases- Tricky Addon Enhanced (auto-fetch keyboxes)
https://github.com/Enginex0/tricky-addon-enhanced/releases (press Vol+ when asked)- Vector (LSPosed fork)
https://github.com/JingMatrix/Vector/releases- PlayIntegrityFix (inject-s)
https://github.com/KOWX712/PlayIntegrityFix/releasesStep 2: Reboot
Magisk Alpha
Step 1: Install Required Magisk Modules
Install the release version of the following modules in this order:
- Zygisk Next (reboot your phone)
https://github.com/Dr-TSNG/ZygiskNext/releases- TEESimulator-RS (Way Better Alternative to Tricky Store)
https://github.com/Enginex0/TEESimulator-RS/releases- Tricky Addon Enhanced (auto-fetch keyboxes)
https://github.com/Enginex0/tricky-addon-enhanced/releases (press Vol+ when asked)- Vector (LSPosed fork)
https://github.com/JingMatrix/Vector/releases- PlayIntegrityFix (inject-s)
https://github.com/KOWX712/PlayIntegrityFix/releases- Shamiko
https://github.com/LSPosed/LSPosed.github.io/releasesStep 2: Reboot
KernelSU
Step 1: Install KsuWebUI
- Download and install the latest version of KsuWebUI from
https://github.com/5ec1cff/KsuWebUIStandalone/releasesStep 2: Set up KernelSU
- Open KernelSU
- Go to Settings → Turn off Kernel unmount
Step 3: Configure Zygisk Next
- Open KsuWebUI
- Click on the Zygisk Next module
- Set Denylist Policy to Unmount Only
- Turn on Use anonymous memory
Step 4: Install Hide My Applist
- Install Open Source HMA-OSS
https://github.com/frknkrc44/HMA-OSS/releases- Enable it in the LSPosed Manager notification, select Recommended
- Reboot
Step 5: Configure "Manage templates"
- Open HMA-OSS
- Go to Manage templates
- Create a blacklist template
- Name it anything
- Edit list of 0 apps invisible, add:
- HMA-OSS
- KernelSU
- All LSPosed modules installed
- If new LSPosed modules are installed later, update this template again
Step 6: Configure "Manage apps"
- Open HMA-OSS
- Go to Manage apps
- Select the app(s) detecting root
- Turn on Enable hide
- Press Template config
- Make sure Work mode is Blacklist
- Press Using 0 templates and select your blacklist template
- Confirm
Magisk Alpha
Step 1: Install KsuWebUI
- Download and install the latest version of KsuWebUI from
https://github.com/5ec1cff/KsuWebUIStandalone/releasesStep 2: Hide Magisk App
- Open Magisk Alpha
- Go to Settings → Hide Magisk App (you can name it anything, e.g.,
Settings)- Disable Zygisk
- Turn Enforce Denylist OFF
Step 3: Configure DenyList
- Navigate to Configure DenyList
- Select the app(s) you want to hide root from (tap app first, then checkbox)
Step 4: Configure Zygisk Next
- Open KsuWebUI
- Click on Zygisk Next module
- Set Denylist Policy to Enforced
- Turn on Use anonymous memory
Step 5: Install Hide My Applist
- Install Open Source HMA-OSS
https://github.com/frknkrc44/HMA-OSS/releases- Enable it in the LSPosed Manager notification, select Recommended
- Reboot
Step 6: Configure "Manage templates"
- Open HMA-OSS
- Go to Manage templates
- Create a blacklist template
- Name it anything
- Edit list of 0 apps invisible, add:
- HMA-OSS
- Settings (hidden Magisk app or renamed one)
- All LSPosed modules installed
- If new modules are installed later, update this template again
Step 7: Configure "Manage apps"
- Open HMA-OSS
- Go to Manage apps
- Select the app(s) detecting root
- Turn on Enable hide
- Press Template config
- Make sure Work mode is Blacklist
- Press Using 0 templates and select your blacklist template
- Confirm
Step 8: Make sure Shamiko is toggled ON
Some old custom ROMS spoof old fingerprints (PIF's) by default, you'd need to disable that functionality if your ROM has it built in, I can't help much for this part
Search for the app(s) you want to spoof bootloader status as locked, then click on the checkbox for it
109 commits
Guide on Bootloader Unlock and Root for Xiaomi devices (HyperOS / HyperOS 2.0 / HyperOS 3.0) (Non-Mainland China Devices) | Hide Root / Play Integrity / Spoof Bootloader Status as Locked (Key Attestation) for most Android devices [2026]
159
stars
109
commits
Jun 12, 2026
updated
adb.exe reboot fastboot and press enterinit_boot is for newer devices. Older devices do not have init_boot, so only use boot on thoseKernelSU (recommended — install to check if your phone is supported) (Android 12+)
Step 1: Obtain ROM Files
- Navigate to About phone on your device
- Download the firmware (Fastboot ROM) from miuirom.org that matches your device and OS version
Step 2: Extract Firmware
- After download, extract and navigate to its folder
Step 3: Locate the
imagesFolder
- Find the
imagesfolder and enter itStep 4: Backup
init_boot.img
- In the folder, copy
init_boot.imgto theplatform-toolsfolder in Step 9 of unlocking the bootloader- Rename the copied file to
init_boot_stock.img(DO NOT DELETE IN CASE OF A BRICK)Step 5: Transfer to Phone
- Transfer the
init_boot_stock.imgfile to your phoneStep 6: Install KernelSU
- Download and install the latest APK from their releases
https://github.com/tiann/KernelSU/releasesStep 7: Check KernelSU compatibility
- Open KernelSU
- If the app shows Not installed, then your device is officially supported by KernelSU
If the app shows Unsupported, it means that you should compile the kernel yourself, KernelSU won't and never provide files for you to flashStep 8: Patch the
init_boot_stock.img
- Open KernelSU
- Click on Not installed - Tap to install -> Select a file.
- Choose
init_boot_stock.img- Click on Next and choose the option with This device KMI
- Press Confirm
- The patched file should be something like
kernelsu_patched_20260605_045957.imgin the Download folder of your phoneStep 9: Transfer Patched File to PC
- Move the patched file (
kernelsu_patched_20260605_045957.img) toplatform-toolsStep 10: Reboot to Fastboot
- Plug in your phone
- Navigate to
platform-tools, click on the address bar of the folder and replace everything with cmd- Press enter and a CMD window should pop up
- Run the following command in CMD:
adb.exe reboot fastbootStep 11: Flash Patched
init_boot
In the same CMD window, execute the following commands using it as an example:
fastboot.exe flash init_boot_a kernelsu_patched_20260605_045957.img fastboot.exe flash init_boot_b kernelsu_patched_20260605_045957.img fastboot.exe rebootYour device should reboot into the system and be rooted
Magisk Alpha
Step 1: Obtain ROM Files
- Navigate to About phone on your device
- Download the firmware (Fastboot ROM) from miuirom.org that matches your device and OS version
Step 2: Extract Firmware
- After download, extract and navigate to its folder
Step 3: Locate the
imagesFolder
- Find the
imagesfolder and enter itStep 4: Backup
init_boot.img
- In the folder, copy
init_boot.imgto theplatform-toolsfolder in Step 9 of unlocking the bootloader.- Rename the copied file to
init_boot_stock.img(DO NOT DELETE IN CASE OF A BRICK)Step 5: Transfer to Phone
- Transfer the
init_boot_stock.imgfile to your phoneStep 6: Install Magisk Alpha
- Download and install the latest version of Magisk Alpha from their Telegram Channel
Step 7: Patch the
init_boot_stock.img
- Open Magisk Alpha
- Tap Install -> Select and Patch a File
- Choose
init_boot_stock.img- The patched file should be something like
magisk_patched-XXXXX_xxxxx.imgin the Download folder of your phoneStep 8: Transfer Patched File to PC
- Move the patched file (
magisk_patched-XXXXX_xxxxx.img) toplatform-toolsStep 9: Reboot to Fastboot
- Plug in your phone
- Navigate to
platform-tools, click on the address bar of the folder and replace everything with cmd- Press enter and a CMD window should pop up
- Run the following command in CMD
adb.exe reboot fastbootStep 10: Flash Patched
init_boot
In the same CMD window, execute the following commands
fastboot.exe flash init_boot_a magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash init_boot_a magisk_patched-28001_p5r8c.img) fastboot.exe flash init_boot_b magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash init_boot_b magisk_patched-28001_p5r8c.img) fastboot.exe rebootOnly for OLD DEVICES without
init_boot(DO NOT FOLLOW IF YOUR DEVICE HAVEinit_boot)fastboot.exe flash boot_a magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash boot_a magisk_patched-28001_p5r8c.img) fastboot.exe flash boot_b magisk_patched-28001_xxxxx.img (e.g., fastboot.exe flash boot_b magisk_patched-28001_p5r8c.img) fastboot.exe rebootOnly for OLD DEVICES without
init_boot, if there's an error, try running this command (DO NOT FOLLOW IF YOUR DEVICE HAVEinit_boot)fastboot.exe --disable-verity --disable-verification flash vbmeta vbmeta.img (vbmeta.img is from the firmware you downloaded)Your device should reboot into the system and be rooted
KernelSU
Step 1: Install Required Magisk / KernelSU Modules
Install the latest release version of the following modules in this order:
- Hybrid Mount (reboot your phone)
https://github.com/Hybrid-Mount/meta-hybrid_mount/releases- Zygisk Next (reboot your phone)
https://github.com/Dr-TSNG/ZygiskNext/releases- TEESimulator-RS (Way Better Alternative to Tricky Store)
https://github.com/Enginex0/TEESimulator-RS/releases- Tricky Addon Enhanced (auto-fetch keyboxes)
https://github.com/Enginex0/tricky-addon-enhanced/releases (press Vol+ when asked)- Vector (LSPosed fork)
https://github.com/JingMatrix/Vector/releases- PlayIntegrityFix (inject-s)
https://github.com/KOWX712/PlayIntegrityFix/releasesStep 2: Reboot
Magisk Alpha
Step 1: Install Required Magisk Modules
Install the release version of the following modules in this order:
- Zygisk Next (reboot your phone)
https://github.com/Dr-TSNG/ZygiskNext/releases- TEESimulator-RS (Way Better Alternative to Tricky Store)
https://github.com/Enginex0/TEESimulator-RS/releases- Tricky Addon Enhanced (auto-fetch keyboxes)
https://github.com/Enginex0/tricky-addon-enhanced/releases (press Vol+ when asked)- Vector (LSPosed fork)
https://github.com/JingMatrix/Vector/releases- PlayIntegrityFix (inject-s)
https://github.com/KOWX712/PlayIntegrityFix/releases- Shamiko
https://github.com/LSPosed/LSPosed.github.io/releasesStep 2: Reboot
KernelSU
Step 1: Install KsuWebUI
- Download and install the latest version of KsuWebUI from
https://github.com/5ec1cff/KsuWebUIStandalone/releasesStep 2: Set up KernelSU
- Open KernelSU
- Go to Settings → Turn off Kernel unmount
Step 3: Configure Zygisk Next
- Open KsuWebUI
- Click on the Zygisk Next module
- Set Denylist Policy to Unmount Only
- Turn on Use anonymous memory
Step 4: Install Hide My Applist
- Install Open Source HMA-OSS
https://github.com/frknkrc44/HMA-OSS/releases- Enable it in the LSPosed Manager notification, select Recommended
- Reboot
Step 5: Configure "Manage templates"
- Open HMA-OSS
- Go to Manage templates
- Create a blacklist template
- Name it anything
- Edit list of 0 apps invisible, add:
- HMA-OSS
- KernelSU
- All LSPosed modules installed
- If new LSPosed modules are installed later, update this template again
Step 6: Configure "Manage apps"
- Open HMA-OSS
- Go to Manage apps
- Select the app(s) detecting root
- Turn on Enable hide
- Press Template config
- Make sure Work mode is Blacklist
- Press Using 0 templates and select your blacklist template
- Confirm
Magisk Alpha
Step 1: Install KsuWebUI
- Download and install the latest version of KsuWebUI from
https://github.com/5ec1cff/KsuWebUIStandalone/releasesStep 2: Hide Magisk App
- Open Magisk Alpha
- Go to Settings → Hide Magisk App (you can name it anything, e.g.,
Settings)- Disable Zygisk
- Turn Enforce Denylist OFF
Step 3: Configure DenyList
- Navigate to Configure DenyList
- Select the app(s) you want to hide root from (tap app first, then checkbox)
Step 4: Configure Zygisk Next
- Open KsuWebUI
- Click on Zygisk Next module
- Set Denylist Policy to Enforced
- Turn on Use anonymous memory
Step 5: Install Hide My Applist
- Install Open Source HMA-OSS
https://github.com/frknkrc44/HMA-OSS/releases- Enable it in the LSPosed Manager notification, select Recommended
- Reboot
Step 6: Configure "Manage templates"
- Open HMA-OSS
- Go to Manage templates
- Create a blacklist template
- Name it anything
- Edit list of 0 apps invisible, add:
- HMA-OSS
- Settings (hidden Magisk app or renamed one)
- All LSPosed modules installed
- If new modules are installed later, update this template again
Step 7: Configure "Manage apps"
- Open HMA-OSS
- Go to Manage apps
- Select the app(s) detecting root
- Turn on Enable hide
- Press Template config
- Make sure Work mode is Blacklist
- Press Using 0 templates and select your blacklist template
- Confirm
Step 8: Make sure Shamiko is toggled ON
Some old custom ROMS spoof old fingerprints (PIF's) by default, you'd need to disable that functionality if your ROM has it built in, I can't help much for this part
Search for the app(s) you want to spoof bootloader status as locked, then click on the checkbox for it
109 commits