Last updated: November 11, 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: phones that launched with Android 13 or later (Xiaomi 13 series, Redmi Note 13 and newer) keep the ramdisk there. If there is noinit_boot.img, useboot.img. - Patch it. Install
Magisk-v31.1.apkon the phone, copy the image to the phone, then in Magisk tap Install → Select and Patch a File. The result is saved asDownload/magisk_patched-31100_xxxxx.img. - Copy the patched file to the PC 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. 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 to the active slot, which is what you want. Don’t flash the patched image to both slots manually.
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): 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. - Keep root through an OTA (A/B phones): in Magisk, tap Uninstall → Restore images (don’t reboot), install the OTA from Settings but don’t reboot yet, return to Magisk and choose Install → Install to inactive slot (after OTA), then reboot. Xiaomi’s updater often refuses the incremental OTA on a modified phone; then use the full Recovery ROM or the simple way.
- 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; MediaTek phones (Redmi Note 13 Pro 4G, POCO X6 Pro, POCO X7 Pro) also use init_boot. 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 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.
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.
Xiaomi firmware & news on Telegram
New firmware, HyperOS 4 rollout updates, guides and Xiaomi news, all in one channel.

