Unlocking bootloader, rooting, hiding root, Play Integrity, and hiding unlocked bootloader status for Xiaomi devices (this guide should work for most of the newer Xiaomi devices with HyperOS/HyperOS 2.0)
- BACK UP ANY DATA YOU MAY HAVE ON YOUR PHONE; THIS WILL FACTORY RESET YOUR PHONE.
- Your Xiaomi account must be over 30 days old.
- Enable Find device in Xiaomi Cloud in the Settings app (this may not be necessary, but you should do it to be sure).
- In the Settings app, go to About phone, and then tap the OS version 5 times.
- Enable OEM Unlocking from Developer Options.
- Uninstall Xiaomi Community, reboot, and then install the latest version of Xiaomi Community via the Play Store.
- Sign in to your Xiaomi account through the Xiaomi Community app.
- Go to the Me tab, scroll down and select Set up.
- Select Change region and choose Global.
- At exactly 12:00 AM GMT+8, press "Apply for unlocking" (If you do this too late, you may encounter an "application quota limit reached" error, so ensure you act precisely at 12:00 AM GMT+8, you can use this site to check the time).
- It might display an "Account Error" window. If that happens, you'll need to retry after 10 days.
- Tip: If you cannot apply for unlocking or encounter quota limit with this guide, you can follow another method using this Python automation script to automate the button press and run multiple instances simultaneously to improve your chances.
- Logout of your Xiaomi account within your phone's settings.
- Reboot your phone.
- Log back into your Xiaomi account in the settings.
- Turn off your Wi-Fi and ensure you have a working mobile data connection.
- In Developer Options, scroll down until you see Mi Unlock status, select it, and press Add account and device.
- Download the latest version of the tool from here.
- After downloading the tool, extract it, navigate to the extracted folder, and open miflash_unlock.exe.
- It will prompt you to sign in.
- After signing in, agree to the disclaimer.
- Go to this site and select the one for Windows.
- Download it and extract it. You should now see a folder named
platform-tools. - Navigate to the extracted folder, click on the address bar, and replace everything in the address bar with cmd, and then press enter and a CMD window should show up.
- Enable USB Debugging from Developer Options.
- Plug your phone in and press allow computer when prompted on the phone.
- In the CMD window that you opened in step 8, type
adb.exe reboot fastbootand press enter. - Your phone should reboot and show the text FASTBOOT.
- In the Mi Unlock app, it should say phone connected. Now press unlock, and then press unlock anyway.
- It might say couldn't unlock; you have to wait for the amount of hours that is displayed (During this waiting time, DO NOT log out of your Xiaomi account on the phone or the Xiaomi Community app).
- After waiting for the specified amount of hours, do the same unlocking process and this time your phone should be unlocked.
Disclaimer: init_boot is for newer devices. If your device does not have init_boot, replace init_boot with boot instead.
- Navigate to About phone -> OS Version on your device.
- Download the firmware (Fastboot ROM) from miuirom.org corresponding to your device and OS Version.
- Use tools like 7-Zip to extract the firmware.
- Navigate to the
imagesfolder within the extracted firmware files.
- Copy
init_boot.imgto theplatform-toolsfolder that you extracted in Step 8 of unlocking the bootloader. - Rename it to
init_boot_stock.img(DO NOT DELETE THIS FILE IN CASE OF A BRICK).
- Transfer the
init_boot_stock.imgfile to your phone.
- Download and install the lastest version of Magisk Alpha from their Telegram Channel.
- Open the Magisk Alpha app.
- Tap Install -> Select and Patch a File.
- Choose
init_boot_stock.img. - The patched file will appear as something like
magisk_patched-28001_p5r8c.imgin your phone's Download folder.
- Move the patched file (
magisk_patched-28001_xxxxx.img) to theplatform-toolsfolder on your computer.
- Connect your phone to the computer.
- Navigate to the
platform-toolsfolder, click on the address bar, and replace everything in the address bar with cmd, and then press enter and a CMD window should show up. - Run the following command in CMD:
adb.exe reboot fastboot
- In the same CMD window, execute the following commands:
For OLD DEVICES without
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 rebootinit_boot(DO NOT FOLLOW THESE COMMANDS IF YOUR DEVICE ALREADY HAVEinit_boot!!!!!!!!!!!!!!!!!!!!!):For OLD DEVICES withoutfastboot.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 rebootinit_boot, if there's an error, try running this command (DO NOT FOLLOW THESE COMMANDS IF YOUR DEVICE ALREADY HAVEinit_boot!!!!!!!!!!!!!!!!!!!!!)::fastboot.exe --disable-verity --disable-verification flash vbmeta vbmeta.img (vbmeta.img is from the firmware you downloaded)
Your device should be rebooted to the system and have root access.
Hiding Root (You SHOULD be able to use this hiding root section with most Android devices like Xiaomi, Samsung, etc.)
- Open the Magisk Alpha app.
- Go to Settings -> Hide Magisk App (You can name it anything, e.g.,
Settings). - Disable Zygisk.
- Turn Enforce Denylist OFF.
- Navigate to Configure DenyList.
- Select the apps you want to hide root from (tap the app, and then tap on the checkbox).
Install the following modules in this order:
- Install the Hide My Applist module.
- Enable it via LSPosed manager.
- On the home screen of "Hide My Applist", go to Template manage and create a blacklist template.
- Name it anything, and add the following to Apps Invisible:
- Hide My Applist
- Settings (Hidden Magisk App) (If you unhide the Magisk Alpha app, you have to add it back when you hide it again)
- Any LSPosed modules you will install in the future
- On the home screen of "Hide My Applist", go to App Manage and select the apps that are detecting root.
- Select "Enable Hide" -> Set "Work Mode" to Blacklist (default option) -> Select "Using 0 templates" and choose the template you named.
As of May 2025, Google has rolled out major changes to the Play Integrity API, follow these steps to fix it:
Make sure you already have the Tricky Store module from Step 3 of Hiding Root installed, then install the following modules:
- PlayIntegrityFix (download the newest inject-s version)
- Tricky Store Addon
- Busybox
- Yuri Keybox Manager
- Download and install the lastest version of KsuWebUI from here.
- Open the KsuWebUI app.
- Click on the PlayIntegrityFix module.
- Click on the Advanced button, and make sure Spoof Build, Spoof Build (Play Store), Spoof Props, Spoof Provider, and Spoof Signature are toggled on.
- Click on the Fetch pif.json button, and wait for it to be done
- Open the KsuWebUI app.
- Click on the Yuri Keybox Manager module.
- Go to the Menu tab
- Click Set Up Yuri Keybox, Set Up Security Patch, Set Up Verified Boothash, Set up Target.txt, and Force Stop & Clear Data Play Store
- Use this app
Note: Do not change keybox too frequently, or preferably, not at all. If you check too frequently, Google will get suspicious.
Some 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.
Make sure the Tricky Store and Tricky Store Addon modules are installed.
- Open the KsuWebUI
- Click on the Tricky Store module.
- You can search for the apps you'd like to hide bootloader status from, then check the box for it.
- Hit the blue Save button at the center bottom of the screen, scroll to top if you don't see the button.
Tested and found to be working on the following devices (I'd appreciate it if you guys could report it back to me your device if in Issues if it works for you)
- Xiaomi 14T (HyperOS)
- Xiaomi Redmi K60 Ultra 5G (HyperOS/HyperOS 2.0)
- Xiaomi Mi 11 Ultra (HyperOS)
- Xiaomi 12 (Lineage OS 22.2)
- Xiaomi 13 Ultra (HyperOS 2.0)
- Xiaomi Redmi Note 15 5G (HyperOS 2.0)















