Getting root rights on Xiaomi smartphones through Magisk gives you access to deep customization, removal of firmware and use of modules that are not available to ordinary users. A mistake at any stage can lead to a device βbrickβ or loss of warranty. In this article, we will analyze step-by-step instructions for modern Xiaomi models (including Redmi and other Xiaomi models). POCO) base MIUI 14/15 Android 13/14, In view of the latest changes in the companyβs security policy.
Magiskβs concept is radically different from the classic SuperSU: it provides root access through system patches without affecting the partition. /system, But before you install it, it's important to understand that unlocking a bootloader on Xiaomi is an irreversible process that resets the device to factory settings and erases all the data?
1. Device Preparation: What to Do Before Installation of Magisk
Before you start unlocking the bootloader and installing Magisk, follow the mandatory preparatory steps. Ignoring them can make it impossible to restore the device through standard tools. MIUI.
First, check your smartphone model and version. MIUI. To do this, go to the Settings. β Write down the exact name of the model (e.g. Redmi Note). 12 Pro+ 5G, Not just a note. 12") and firmware version (e.g, V14.0.4.0.TMCCNXM). This information will be required to download the correct boot.img and TWRP.
Second, make sure the device has disabled the βFind My Deviceβ feature (on some models it blocks unlocking the bootloader).
- π Go to Settings. β Google β Security β Find My Device and Turn It Off.
- π Back up your important data (photos, contacts, messages) to your PC or cloud. Once the bootloader is unlocked, the device will be reset!
- π Charge the battery to at least 70%. interruption of the process due to battery discharge can make the phone inoperable.
- π» Prepare a PC with Windows 10/11 (or Linux/macOS with fastboot support and original USB-Wireless connections will not work.
Also download the necessary tools:
- π± Official firmware MIUI For your model (select the Fastboot version, not the Recovery version).
- π§ The latest version of Magisk (file) Magisk-v26.4.zip).
- π₯οΈ Google Platform Tools (for fastboot and adb).
- π οΈ Informal TWRP For your model (if available). Official builds are often outdated.
β οΈ Note: On devices with MediaTek processors (e.g. Redmi Note) 11 or POCO M4 Pro) unlocking the loader may take up to 7 days due to Xiaomi requirements. for Qualcomm Snapdragon (e.g. Xiaomi) 13 or POCO F5) process 2-3 hour.
2. Unlock the bootloader on Xiaomi: step-by-step instructions
Unlocking the bootloader is the most critical step. Xiaomi requires you to link your Mi Account to your device and wait for confirmation. Without this step, you can't install Magisk.
First, turn on the developer mode and allow debugging by USB:
- Go to Settings β About phone and 7 times click on the MIUI version.
- Back to Settings β Additionally. β For developers.
- Activate the USB Debugging and OEM Unlock switches.
- Connect the phone to the PC and confirm the debugging permission.
Use the official Mi Unlock Tool tool:
- Download the Mi Unlock Tool and install it on PC.
- Run the program on behalf of the administrator and log in under the same Mi Account as on your phone.
- Transfer the device to fastboot mode: turn it off, then press Volume down + Nutrition.
- Connect your phone to your PC. The Mi Unlock Tool will have a wait message. For most models, it's 168 hours (7 days).
After the waiting period has expired:
- Re-start the Mi Unlock Tool and connect the phone in fastboot mode.
- Press Unlock. The process will take 1-2 minutes, after which the device automatically restarts and resets.
β οΈ Warning: If the phone does not turn on after unlocking or hovers on the logo MI, Don't panic. Try to boot up to fastboot. + Power) and repeat unlocking. If that doesn't work, you'll need to run the Mi Flash Tool firmware.
Mi Account Linked to Device|Find My Device is disabled|Unlocking enabled OEM developer-setting|Backup of all data.|The device is charged at more than 70%-->
Installation TWRP: Why is this necessary for Magisk?
TWRP (Team Win Recovery Project is a custom recovery project that allows you to install ZIP-files (including Magisk) and backup the system. on modern Xiaomi standard recovery from MIUI It blocks the installation of unofficial firmware, so TWRP β mandatory.
Installation process TWRP depends on the model of the device:
- π± For Qualcomm Snapdragon devices (e.g. Xiaomi) 12T, POCO F4) The command is: fastboot flash recovery. twrp-3.7.0_12-1-tissot.img fastboot boot twrp-3.7.0_12-1-tissot.img (Replace the tissot with the code name of your model).
- π₯οΈ For devices on MediaTek (e.g. Redmi Note) 12) You may need to patch vbmeta: fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img fastboot flash recovery twrp.img fastboot reboot recovery
After installation TWRP Create a backup copy of the boot section immediately:
- In TWRP, go to Backup.
- Select the Boot section and click Swipe to Back Up.
- Copy boot.emmc.win (or similar) file on your PC β youβll need it for patching.
If, after the reboot, TWRP If you replace it with standard recovery, you have anti-Rollback protection on your model:
- Download the full firmware MIUI.tgz.
- Take the file out of it. boot.img.
- Use it to patch through Magisk (more on this in the next section).
What happens if TWRP is not installed?
4. Patching. boot.img Magisk: The key stage
Installation of Magisk on Xiaomi is not through firmware ZIP-file TWRP, It's through patching the original. boot.img. This is due to the specifics of protection. AVB 2.0, which checks the integrity of the boot partition.
Here's how to do it right:
- Download Magisk APK And install it on your phone (even without root licenses).
- Copy the file. boot.img (firmware-extracted TWRP) memory.
- Open Magisk, press Install. β Select and correct the file and specify boot.img.
- Wait until the process is complete. A file will appear in the Download folder. magisk_patched-XXXXXX.img.
- Copy the patched one. boot.img PC-only.
Now, run the patchy boot.img fastboot:
fastboot flash boot magisk_patched-XXXXXX.img
fastboot rebootIf after the reboot Magisk does not appear in the list of applications or root rights do not work, then:
- π You used the wrong version. boot.img (like from another firmware).
- π§ You need to flash boot and dtbo on your model (for devices with Dynamic Partition).
- π± The device has AB-section (A/B Partitions), and you need to flash both slots: fastboot flash boot_a magisk_patched.img fastboot flash boot_b magisk_patched.img
π‘
If after the patching boot.img phone is stuck on the screensaver, try booting into fastboot and execute the command fastboot flash boot original_boot.img, Then repatch the patching with the correct file.
5. Root rights check and Magisk setup
Once Magisk is successfully installed, you need to check the root rights and adjust the basic settings. Open the Magisk app β if it requests an update, agree.
To check root access:
- Install the Root Checker app from Google Play.
- Open it and press Verify Root. Congratulations! Root access is properly installed on this device!
If the root rights don't work:
- π Reset the device.
- π§ In Magisk settings, enable the Zygisk option (to bypass checks on some applications).
- π± Make sure that in the settings β Root access switch is enabled for developers (on some firmware) MIUI It's off by default).
To hide root rights from banking applications (e.g. SberBank Online or Tinkoff):
- In Magisk, go to Settings. β Magisk cover-up.
- Enable the Enforce DenyList option.
- Add to the list of apps that should not detect root (e.g. com.sberbankmobile).
- Reset the device.
It is also recommended to install modules to improve functionality:
| Module | Appointment | Compatibility with MIUI |
|---|---|---|
| SecureTask | Blocking the background activity of applications | β Yes. |
| ViPER4Android | Advanced sound tuning | β Yes (requires SELinux in Permissive mode) |
| LSPosed | Alternative to Xposed for Android 12+ | β Yes. |
| Hide My Applist | Hiding applications from other programs | β Yes. |
β οΈ Attention: MIUI 14/15 certain modules (e.g, ViPER4Android) You can do this through the terminal with the su command. -c setenforce 0. However, this reduces the security of the system!
6. Solving common errors when installing Magisk
Even with the correct following of the instructions, users often face problems, and let's look at the most common errors and their solutions.
Error 1: "This package is for Xiaomi devices; this is a Google."
Reason: You are trying to flash Magisk through standard recovery MIUI, clampdown ZIP-file.
Solution: Install TWRP (as described in section 3) and stitch through it.
Error 2: The phone is stuck on the logo MI post-fix.
Causes and solutions:
- π§ Wrong. boot.img β Sweat the original boot through fastboot and repeat the patching.
- π± Conflict with modules - load into TWRP, delete the folder /data/adb/modules and reboot.
- π Failure when firmware - perform a complete reset through TWRP (Wipe β Format Data, then re-scan Magisk).
Error 3: Apps detect root despite DenyList.
Reason: Some applications (e.g, PokΓ©mon GO Netflix and other other systems use additional verification methods.
Decisions:
- π§ Enable Zygisk in Magisk and add the app to DenyList.
- π± Install Hide My Applist and hide Magisk from scanning.
- π Rename the folder /magisk into /topjohnwu (via Root Explorer).
Mistake 4: It's not working OTA-update MIUI.
Reason: After installing Magisk, standard updates MIUI They are blocked because of the change. boot.img.
Decision:
- Download the full package OTA-manually.
- Get it out of him. boot.img And patch it up through Magisk.
- Fill in the update through TWRP, Then you can run the patch. boot.img.
π‘
If banking applications stop working after installing Magisk, do not rush to remove the root.Try the combination: Zygisk + DenyList + Universal SafetyNet Fix, which solves 90 percent of SafetyNet problems.
7.How to remove Magisk and return the device to a stock state
If you need to return your phone to its original state (for example, for sale or warranty repairs), follow the following steps:
Method 1: Using the Magisk application (soft removal)
- Open Magisk and go to Settings.
- Click Delete Magisk β Complete removal.
- Restart the device. The root rights will be removed, but the bootloader will remain unlocked.
Method 2: Through the firmware of the original boot.img (hard-excision)
- Download the original boot.img for your version of MIUI.
- Fastboot: Fastboot Flash boot Original_boot.img
- Perform the reset through TWRP (Wipe β Format Data).
Method 3: Complete return to stock firmware
If you want to return the device to the βout of the boxβ state (including locking the bootloader):
- Download the full Fastboot firmware for your model.
- Unpack it and run it through the Mi Flash Tool with the clean all and lock option.
- The bootloader will be locked, but keep in mind: re-unblocking will require a wait of 7 days.
β οΈ Note: Once you lock the bootloader, you wonβt be able to re-unblock it for 30 days (Xiaomiβs rule for some regions.
8.Alternative ways to get root rights to Xiaomi
If installing Magisk seems too complicated, consider alternative root-right methods, but note that they have limitations:
1. temporary root through ADB
Suitable for one-time tasks (e.g., uninstall system applications) does not require unlocking the bootloader, but the rights disappear after the reboot.
Command to activate:
adb shell
su-c "team"2. firmware custom firmware with pre-installed rue
Some firmware (like LineageOS or Pixel Experience) already include Magisk.
- π§ An unlocked loader is required.
- π± Possible problems with the camera, NFC or sensors (due to lack of drivers) MIUI).
- π Updates will have to be installed manually.
3. Use of exploits (e.g., DirtyCOW)
Suitable for older Android devices 7-9. On the new versions MIUI It does not work due to patched vulnerabilities.
Comparison of methods:
| Method | Requires unlocking of the loader | Permanent root | Compatible with MIUI 14/15 |
|---|---|---|---|
| Magisk (this guide) | β Yes. | β Yes. | β Complete. |
| Temporary rout through ADB | β No. | β No (before rebooting) | β Yes. |
| Custom firmware | β Yes. | β Yes. | β οΈ Partial (possible bugs) |
| Exploits (DirtyCOW) | β No. | β οΈ Depends on vulnerability. | β No. |
π‘
Magisk remains the only reliable way to get a full-fledged root on modern Xiaomi.