Rooting Xiaomi Redmi 9: a complete guide with unlocking the bootloader and installing Magisk

Getting root rights to Xiaomi Redmi 9 opens up access to hidden Android capabilities, but requires careful attention.This process involves unlocking the bootloader, installing a custom TWRP recap, and installing Magisk, a modern alternative to the outdated SuperSU. It is important to understand that rooting voids the warranty and can lead to unstable system operation if the sequence of actions is broken.

The Redmi 9 (codenamed lancelot) has some peculiarities in the unlocking process: Xiaomi has tightened the requirements for Mi accounts, and some firmware versions block the installation of unofficial backups. In this article, current methods for 2026, tested on the latest versions of MIUI and Android 10/11.

What is Redmi 9 Rooting and What are the Risks?

Root rights allow:

  • ๐Ÿ”ง Remove system applications (bloatwar) and free up memory
  • ๐Ÿ”„ Modify the core to improve performance or autonomy
  • ๐Ÿ“ฑ Install custom firmware like LineageOS or Pixel Experience
  • ๐Ÿ”’ Use applications like Titanium Backup or AdAway for deep customization

But there is a downside:

  • โš ๏ธ Loss of warranty (Xiaomi records unlock status at service centers)
  • ๐Ÿ›ก๏ธ Malware vulnerability (root access bypasses standard Android restrictions)
  • ๐Ÿ”„ Risk of "brika" (turning the phone into a "brick") with firmware errors
  • ๐Ÿ“ต Problems with Google Pay, Netflix and banking apps (due to SafetyNet)

โš ๏ธ Attention: On Redmi 9 firmware MIUI 13+ lockdown TWRP via fastboot โ€“ requires a bypass through the patch boot.img. Details in the section about Magisk.

If you use your phone to work with financial applications or enterprise systems (such as 1C or CryptoPro), rooting may block access to them. Before you start, check whether critical services are compatible with rooted devices.

๐Ÿ“Š Why You Need to Root on Redmi 9?
Removal of system applications
Installation of custom firmware
Data backup
Overclocking the processor
Other

Preparing for rooting: what to do before unlocking

Before starting the process, make sure that:

Create a backup copy of data (photos, contacts, SMS)

Charge your phone at least 70%

Install ADB/Fastboot drivers on PC

Download the Mi Unlock Tool for the latest version

Disable Find My Device in Google Settings

-->

Pay special attention to backup. Even if you successfully root some data (such as MIUI settings or game saves) may be lost.

  • ๐Ÿ“ Use Mi. PC Suite for copying contacts and SMS
  • โ˜๏ธ Sync photos with Google Photos or Mi Cloud
  • ๐ŸŽฎ For games โ€“ enable cloud-based saving in Google Play Games
  • ๐Ÿ“ฑ Take screenshots of important settings (for example, APN mobile-internet)

Also check the firmware version in Settings โ†’ About Phone โ†’ MIUI Version. For Redmi 9, the best versions for rooting are:

MIUI versionAndroidNotes
12.0.8-12.0.1210Stable, minimal bugs with TWRP
12.5.1-12.5.411Requires patch boot.img for Magisk
13.0.1+11Block TWRP, need to bypass through fastbootd

โš ๏ธ Note: If your Redmi 9 is purchased in 2023 or later, check the bootloader status with the fastboot oem device-info command. OEM Unlock at the hardware level.

Unlock the bootloader with the Mi Unlock Tool

Xiaomi requires official unlocking of the bootloader through the Mi Unlock Tool utility, which takes up to 720 hours (30 days) of waiting for new accounts.

  1. Connect your phone to your Mi Account: Go to Settings โ†’ Mi Account โ†’ Sync and enable all options. Then to Settings โ†’ Additional โ†’ For developers, activate OEM Unlock and USB Debugging.
  2. Connect your phone to your PC in Fastboot mode: Turn off the device, then press Volume Down + Power before the Fastboot logo appears.
  3. Launch Mi Unlock Tool on behalf of the administrator, log in to your Mi Account and follow the instructions. If you see a message that says "Couldn't unlock", you should wait for the account to be linked to the device (usually 168 hours for old accounts).

On Redmi 9 with MIUI 13+ firmware, the utility can show an error "Current account is different from the account info on the device" even when properly anchored. Solution: Before unlocking, reset to factory settings via fastboot with fastboot -w command.

After successful unlocking, the bootloader will be marked as Unlocked, but this does not give root rights - only the ability to install custom firmware and recovery.

๐Ÿ’ก

If the Mi Unlock Tool is 99% over, try disabling the antivirus on your PC and using the original one. USB-Xiaomi cable, port change will also help USB on the motherboard (preferably) USB 2.0).

Installation of TWRP Recovery on Redmi 9

TWRP (Team Win Recovery Project) is a customized recavery needed to run Magisk firmware and create backups. For Redmi 9 (lancelot), use a special build, as the official version may not support data encryption.

Download the current one. twrp-3.7.0_12-lancelot.img official website TWRP or from the subject 4PDA. Installation is performed via fastboot:

fastboot flash recovery twrp-3.7.0_12-lancelot.img


fastboot boot twrp-3.7.0_12-lancelot.img

Once you reboot the TWRP, you can't let the system modify the recovery partition, which will result in the replacement of the TWRP with the stock recavator.

  1. In TWRP, go to Advanced โ†’ File Manager.
  2. Delete /system/recovery-from-boot.p file (if any).
  3. Create an empty file with the same name to prevent it from being recreated.

If the phone is loaded into a stock recavator after installing TWRP, then the firmware has anti-rollback protection, in which case use an alternative method of firmware Magisk through patched boot.img (described in the next section).

What to do if TWRP asks for a password?
If TWRP It asks for a password when it's downloaded, which means that the data section is encrypted. Solution: 1. Enter your PIN-2. if it doesn't work, format the data section into TWRP (All user content will be removed! 3. Alternatively, use the fastboot format userdata before installing it. TWRP.

Magisk firmware for root rights

Magisk is a modern root rights tool that masks changes from verification systems (such as SafetyNet). v26.1+.

There are two ways to install:

Method 1: TWRP (if installed)

  1. Download the latest Magisk-v26.1.zip from GitHub.
  2. Move the archive to your phone or flash drive.
  3. In TWRP, select Install โ†’ Select file โ†’ Magisk-v26.1.zip.
  4. After installation, reboot to the system.

Method 2: Through patched boot.img (for MIUI 13+)

If TWRP is not installed, use this method:

  1. Download the stock firmware for your version of MIUI from the official website.
  2. Remove boot.img from the firmware archive (located in the image folder).
  3. Install Magisk Manager on your phone, select Install โ†’ Select and Patch a File and select boot.img.
  4. Patch file magisk_patched.img Copy it on PC and run through fastboot: fastboot flash boot magisk_patched.img fastboot reboot

After the reboot, check for root rights through the Magisk Manager app or by a command in the terminal:

su

If the command returns the # invitation, the root is installed successfully.

๐Ÿ’ก

On Redmi 9 with MIUI 13+, the only working rooting method is to run a patched boot.img firmware. Attempts to install Magisk via TWRP will result in looped bootloop.

Solving problems after rooting

Even with the right installation, there can be problems.

Problem.Reason.Decision
The phone is not loaded (bootloop)Incompatible boot.img or MagiskSwipe stock boot.img through fastboot and repeat the process
Google Pay is not working.Not coming through SafetyNetInstall MagiskHide Props Config and activate MagiskHide
No network after rootingDamaged modem or EFSRestore EFS from the backup or flash the stock firmware
TWRP is dumped on stock RecoveryProtection of recovery-from-boot.pDelete the file via TWRP File Manager (described above)

If banking applications (such as SberBank Online or Tinkoff) stopped working after rooting, try:

  • ๐Ÿ”„ Enable MagiskHide in Magisk settings and add the app to the hidden list.
  • ๐Ÿ“ฑ Install Universal SafetyNet Fix via Magisk.
  • ๐Ÿ”„ Rename the application package (for example, via App Cloner).

โš ๏ธ Note: On some versions MIUI 13 for Redmi 9, the SafetyNet Fix module may not work due to hardware certification of the HardwareBacked Keystore. MIUI 12.5.

How to return the phone to its original state

If you need to give up your phone under warranty or sell it, you need to remove the root rights and return the stock firmware.

  1. Download the full stock firmware (.tgz or.zip) for your model from the official Xiaomi website.
  2. Unpack the archive and place the file flash_all.bat (for Windows or flash_all.sh (for Linux/Mac) firmware.
  3. Connect your phone in Fastboot mode and start the script. To clean it completely, use the command: fastboot -w This will reset all data and return the stock receivers.
  4. After firmware check the status of the bootloader command: fastboot oem device-info Device unlocked: false means that the phone has returned to factory condition.

If after returning to stock firmware, the phone does not pass SafetyNet check, perform additional cleaning:

  • ๐Ÿ“ฑ Install stock recavers via fastboot flash recovery stock_recovery.img.
  • ๐Ÿ”„ Perform a reset via fastboot -w twice.
  • ๐Ÿ”ง Check the integrity of the miscc partition (may contain unlock tags).

Xiaomi keeps a log of unlockers over IMEI, so even after you return to the drain, the service center can see the history of changes. If the warranty is critical, avoid rooting.

FAQ: Frequent questions about rooting Redmi 9

Can I get root without unlocking the bootloader?
No. On all modern Xiaomi smartphones, including the Redmi 9, unlocking the bootloader is mandatory for installing Magisk or TWRP. Bypass methods (for example, through vulnerabilities in the kernel) for this model are irrelevant from 2021.
Why is the mobile network not working after rooting?
This is due to damage to the modem partition or patch incompatibility. boot.img. Solution: Squeeze the stock. modem.img Check the settings from the official firmware. APN In Settings โ†’ SIM-maps and mobile networks โ†’ Access points (APN). If the problem persists, complete the reset through TWRP (format data).
How to update the firmware after rooting?
Updating to OTA after rooting will result in root rights being lost. To update and save root: Download the full service pack (.zip) for your model. Run it through TWRP (no wipes!). After updating, re-sweep Magisk (patch boot.img or Magisk.zip). Important: Don't use incremental updates (delta packages) - they are incompatible with the modified system.
Why does Magisk not pass SafetyNet?
Since 2022, Google has tightened requirements for SafetyNet by adding a HardwareBacked Keystore check. For Redmi 9, this means that even with Universal SafetyNet Fix, some applications (like Google Pay) may not work. Alternative solutions: Use Magisk Delta (fork with improved root); Install Shamiko module to bypass hardware checks; roll back to MIUI 12.5, where SafetyNet works more stable.
Can I root Redmi 9 without a PC?
Technically, but with serious limitations: Unlocking the bootloader is only possible through the Mi Unlock Tool on PC. TWRP can be flashed through apps like Flashify, but it's risky (high bootloop chance). Magisk can be installed via TWRP, but without a PC you can't restore the phone in case of a crash. Recommendation: Use the PC for all critical operations. Alternatives like KingRoot or iRoot don't work on Redmi 9 and can damage the system.