Last updated: November 12, 2026. Short answer: to root a Xiaomi, Redmi or POCO phone on HyperOS 3 or HyperOS 4, unlock the bootloader, take init_boot.img (or boot.img on older phones) from the Fastboot ROM of the exact build your phone runs, patch it in the Magisk 31.1 app and flash the patched file with fastboot flash init_boot. Magisk 31.1 (October 25, 2026) changed two things you’ll notice right away: there is no root pop-up anymore (you grant root to apps in advance in the Superuser tab) and the “Hide the Magisk app” option is gone.
Magisk 31.1 download
| Latest version | Magisk v31.1 (stable), October 25, 2026 |
|---|---|
| File | Magisk-v31.1.apk (the same APK is the app and the installer) |
| Official download | github.com/topjohnwu/Magisk/releases. Only download it there; Magisk has no official website with downloads. |
| Requires | Android 7.0 or newer (support for Android 6 was dropped in 31.1), unlocked bootloader |
| Previous | v31.0 (September 4, 2026, pre-release), v30.7 (February 2026) |
What’s new in Magisk 31.0 and 31.1
- New app (31.0): the whole interface was rebuilt with Jetpack Compose and Material 3. It has a built-in terminal for module scripts and can patch boot images straight from an OTA download link.
- No more root prompts (31.1): apps no longer show a “Grant / Deny” pop-up when they ask for root. Open Magisk → Superuser and allow the apps you trust before using them. Command-line root for
adb shellis set there too. - App hiding removed (31.1): the “Hide the Magisk app” (repackaging) feature and the stub app are gone, and Magisk no longer reinstalls its app if it’s missing. The developer’s advice: after setting up root permissions and modules, simply uninstall the Magisk app if you want it out of sight. Root keeps working.
- One patching pipeline: raw images, OTA ZIPs and factory images are all patched the same way, with progress and speed shown.
- Android 6 dropped: Android 7.0 is the minimum.
Before you start
- Unlocked bootloader. Rooting is impossible without it, and unlocking erases the phone: how to unlock the bootloader on HyperOS.
- Back up photos and chats. A wrong image means a bootloop (fixable, see below), but a factory reset may be needed.
- Banking and payment apps: with an unlocked bootloader, many of them and Google Wallet fail the Play Integrity check, root or not. Plan for that.
- PC with Fastboot: ADB, Fastboot and Xiaomi USB drivers.
How to root HyperOS with Magisk 31.1
- Find your exact build. Settings → About phone → HyperOS version, for example
OS3.0.303.0.WOJMIXM. The image you patch must come from this exact build, region included. - Download the matching Fastboot ROM (
.tgz) from your phone’s page in our firmware hub. If your build isn’t there yet, check the version decoder to make sure you pick the right region. - Extract the image. Open the
.tgzwith 7-Zip and go to theimagesfolder. If you seeinit_boot.img, use that one: most phones that launched with Android 13 or later (Xiaomi 13 series and newer) keep the ramdisk there, but not all of them, so go by what’s in the folder. If there is noinit_boot.img, useboot.img. After installing Magisk, also check the Ramdisk line on its home screen: if it says Yes, patch the image that holds the ramdisk (a few devices keep it invendor_boot.img); if it says No, see “Magisk in Recovery” in the official docs. The docs note that some Xiaomi phones report No but still boot a patched boot image. Shortcut: Magisk 31 can also patch a Recovery ROM.zipor itspayload.bindirectly, without extracting the image first. - Patch it. Install
Magisk-v31.1.apkon the phone, copy the image to the phone, then in Magisk tap Install → Patch firmware / image → Select from storage and pick the image. The result is saved asDownload/magisk_patched-31100_xxxxx.img. Patch the image yourself, on this phone: never flash a patched image someone else shared, and never patch an image that was already patched. Always start from the untouched image of the build you run, and keep that stock image on your PC. - Copy the patched file to the PC (for example
adb pull /sdcard/Download/magisk_patched-31100_xxxxx.img) and reboot the phone to Fastboot (power off, then hold Power + Volume Down). - Flash it:
fastboot flash init_boot magisk_patched-31100_xxxxx.img
(orfastboot flash boot magisk_patched-31100_xxxxx.imgif you patchedboot.img), thenfastboot reboot. - Finish in the app. If the Magisk app is missing after the reboot, install the APK again first. Open Magisk; if it asks for additional setup, let it reboot once. Then open the Superuser tab and allow root for the apps that need it.
Many Xiaomi phones have A/B slots. fastboot flash init_boot … writes the active slot, as in the Magisk docs. Some 4PDA guides (for example for the POCO X7 Pro) use fastboot flash init_boot_ab …, which writes both slots. Both work; keep the stock init_boot.img on your PC for recovery.
Next step, Xposed modules: to use modules such as HyperCeiler, turn on Zygisk in Magisk’s settings, reboot and install Vector, the successor of LSPosed.
Updating HyperOS on a rooted phone
A system update replaces your patched image, so root is lost after every update unless you re-patch:
- Simple way (works on all models): an incremental OTA usually fails on a rooted phone, so first open Magisk → Uninstall → Restore images (this restores the backup Magisk made when it was installed; don’t reboot), or install the full Recovery ROM of the new build instead. Then install the update, download the Fastboot ROM of the new build, extract its
init_boot.imgorboot.img, patch it again in Magisk and flash it as above. - Magisk’s official A/B method: turn off Automatic system updates in Developer options. When an update arrives, open Magisk → Uninstall → Restore Images (don’t reboot), install the update and don’t tap Restart, then Magisk → Install → Install to Inactive Slot (After OTA), and restart. The 4PDA Magisk FAQ recommends the same. The Magisk docs say this is only tested on Pixel phones, and KernelSU-based root users have reported bootloops with the same shortcut on a Xiaomi 15 and a Xiaomi 15 Pro. If it fails on your phone, use the simple way above, and keep the new build’s stock
init_boot.imgready: flashing it from Fastboot fixes the bootloop. - Major updates such as HyperOS 3 → HyperOS 4 (Android 17): read how to install HyperOS 4 manually first, and keep the Fastboot ROM of your current build at hand to go back.
Problems and fixes
| Problem | Fix |
|---|---|
| Bootloop after flashing | Boot to Fastboot and flash the original image from the same ROM: fastboot flash init_boot init_boot.img (or boot). The phone boots normally again without losing data. Usually the image was from a different build or region. |
fastboot: error: ... partition 'init_boot' not found | Your phone has no init_boot. Patch and flash boot.img instead. |
| Magisk says “Not installed” after reboot | The wrong image was patched (for example boot.img on a phone that needs init_boot.img), or the build doesn’t match. Re-patch the correct image of the installed build. |
| An app asks for root but nothing happens | Normal since 31.1: there is no pop-up. Allow the app in Magisk → Superuser. |
| “Hide the Magisk app” is missing | Removed in 31.1. Uninstall the Magisk app after setup instead. |
| Phone stuck at Fastboot after flashing on a MediaTek model | Check that the image is from your exact Fastboot ROM; the POCO X6 Pro and POCO X7 Pro (MediaTek) use init_boot, but not every MediaTek model does. Always check whether images contains init_boot.img. Flash the stock image to recover. |
How to unroot
In Magisk tap Uninstall → Complete Uninstall, or flash the stock init_boot.img/boot.img of your build with Fastboot. To return to a completely stock phone, flash the full Fastboot ROM with Mi Flash using Clean all (not “Clean all and lock” unless the ROM matches your region and nothing is modified).
Magisk alternatives
KernelSU, KernelSU Next and APatch root the phone at kernel level (full comparison: KernelSU vs APatch vs Magisk on Xiaomi) and are popular on newer Xiaomi devices; APatch added support for the HyperOS 4 kernel in October 2026. They work differently from Magisk and need their own patched images, so pick one method and don’t mix them.
FAQ
Can I root a Xiaomi phone without unlocking the bootloader?
No. Every working root method for HyperOS needs an unlocked bootloader. Apps that promise one-click root without unlocking don’t work on modern Xiaomi phones.
Should I patch init_boot.img or boot.img?
Use init_boot.img if the images folder of your Fastboot ROM has it (phones launched with Android 13 or later). Otherwise use boot.img. If unsure, check the Ramdisk line in the Magisk app.
Why don’t I get a root pop-up anymore?
Magisk 31.1 removed interactive root prompts. Grant root to each app in advance in the Superuser tab of the Magisk app.
Can I uninstall the Magisk app and keep root?
Yes, since 31.1. Root and modules keep working; reinstall the app when you need to change settings or update Magisk.
Where do I get init_boot.img for my Xiaomi phone?
From the official Fastboot ROM of your exact build: open your phone on our firmware page, download the Fastboot ROM and extract images/init_boot.img.
Sources: Magisk documentation by topjohnwu (Installation, OTA upgrade guide) and v31.1 release notes; 4PDA Magisk FAQ (install and remove, Kokaino2033, keeping root after OTA, Displax); POCO X7 Pro firmware thread (init_boot root guide by IZZY_RU87 and toreton, payload.bin patching by Dead master).
Xiaomi firmware & news on Telegram
New firmware, HyperOS 4 rollout updates, guides and Xiaomi news, all in one channel.

