Rooting Xiaomi Mi 9T: the complete guide from unlock to Magisk

The Xiaomi Mi 9T (also known as the Redmi K20 in some regions) remains a popular smartphone among Android modding enthusiasts thanks to its powerful hardware and active developer community. Getting root rights opens up access to deep customization, removing the built-in MIUI software, installing modified firmware, and even improving performance. However, the rooting process on Xiaomi devices has its own nuances, from the mandatory unlock of the bootloader to working with the custom TWRP recep and Magisk tool.

In this guide, we will take a look at the current 2026 way to root the Mi 9T, taking into account the latest changes in Xiaomi policy (including new requirements for unlocking the bootloader) and the potential risks. It is important to understand that the procedure voids the warranty, can lead to the inability to use banking applications (due to the SafetyNet trigger), and in rare cases, to โ€œbrickโ€ the device when you are mistaken. If you are ready for experiments, letโ€™s go!

1. Device Preparation: What to Do Before Rooting

Before you start unlocking and installing TWRP, you need to follow a few critical steps, and skipping any of them can cause crashes or data loss.

First, back up all your important data. Rooting erases user files, and can also damage internal memory if you make errors. Use Mi Mover, Google Drive, or physical copying on your PC.

  • ๐Ÿ“ฑ Contacts (export to.vcf)
  • ๐Ÿ“ธ Photos and videos (check hidden folders, for example, DCIM/.thumbnails)
  • ๐Ÿ”‘ App passwords (write them manually or use Titanium Backup after rooting)
  • ๐ŸŽฎ Game savers (many titles store data in the game) /Android/data)

Second, make sure your Mi 9T has the latest official firmware for your region.This is important, as older versions of MIUI may contain vulnerabilities or incompatibility with current tools. Check the version in Settings โ†’ About Phone โ†’ MIUI Version. Update through Settings โ†’ System Update, if available.

โš ๏ธ Attention: If your Mi is yours 9T It was purchased in China (suffix version) CN In the model, you need to link to a Chinese Mi Account to unlock the bootloader, which complicates the process โ€“ consider the possibility of firmware on the global version. MIUI EU beforehand.

Finally, prepare a PC with:

  • ๐Ÿ–ฅ๏ธ Windows 10/11 (64-bit) or Linux (for fastboot)
  • ๐Ÿ”Œ cable USB Type-C (original or certified)
  • ๐Ÿ› ๏ธ Installed drivers ADB/Fastboot (Download Platform Tools from Google)
  • ๐Ÿ”‹ Battery charge at least 60% (to avoid shutdown during the procedure)
๐Ÿ“Š What kind of firmware are you using on Mi? 9T?
Official MIUI Global
MIUI EU
Castomic (AOSP, LineageOS)
other

2 Unlocking the bootloader: a step without which root is impossible

Xiaomi blocks the bootloader on all its devices, and the Mi 9T is no exception. Without unlocking, installing TWRP or Magisk is impossible.The process requires binding to a Mi Account and waiting for confirmation from Xiaomi servers (usually 72-168 hours).

Instructions for unlocking:

  1. Activate Developer Mode: Go to Settings โ†’ About Phone and click on MIUI Version 7 times.
  2. Back to Settings โ†’ Additionally. โ†’ For developers and include: ๐Ÿ”“ Unlocking OEM (may require input PIN-code) ๐Ÿ”Œ Debugging by USB

ADB

Mi Unlock Tool

Xiaomi

miflash_unlock.exe

Mi Account

Fastboot

Once you send a request to Xiaomi servers, you will receive a notification that the waiting time countdown begins. Do not interrupt the process - trying to unlock before the deadline will lead to a "Couldn't unlock" error.

โš ๏ธ Note: If you have previously linked your device to another Mi Account, you must delete it via Settings. โ†’ Accounts. โ†’ Mi Account โ†’ Delete your account, otherwise it will be impossible to unlock it.

Developer mode activated|Unlocking enabled OEM|Drivers installed ADB/Fastboot|Download the Mi Unlock Tool of the latest version|Phone's loaded on 60%+-->

3. TWRP installation: custom Recovery for rooting

TWRP (Team Win Recovery Project) is an alternative recovery that allows you to install informal firmware, create backups and, of course, obtain root rights through Magisk. For the Mi 9T (device codename โ€“ davinci), there is a stable version of TWRP, but it is important to choose the right build.

Download the current image of TWRP for davinci from the official website:

https://twrp.me/xiaomi/xiaomiredmik20pro.html

Note the version: only a file marked davinci is suitable for the Mi 9T (not to be confused with raphael for the Redmi K20 Pro!).

Installation process:

  1. Move the downloaded file twrp-3.x.x-x-davinci.img to the folder with the platform-tools.
  2. Connect your phone to your PC in Fastboot mode (turn off the device, then press Power + Volume Down).
  3. Open the command line in the folder with platform-tools and execute: fastboot flash recovery twrp-3.x.x-x-davinci.img fastboot boot twrp-3.x.x-x-davinci.img
  4. After rebooting to TWRP, do not allow modifications to the system partition (swipe "Keep Read Only").

If the TWRP does not start or the device loads into a standard backup, repeat the command fastboot boot - this will temporarily boot TWRP without constant firmware. To fix the problem, you may need to disable the bootloader signature verification (see the next section).

What to do if TWRP is not installed?
If you have a fastboot flash recovery command, you get an error "FAILED (remote: 'Partition not found', which means that your version of the MIUI It uses dynamic partitions: 1. Download the modified TWRP Support dynamic partitions (see Xiaomi developersโ€™ Telegram channels). 2. Use the command fastboot flash recovery_ab twrp.img standard. 3. If the problem persists, please MIUI EU Fastboot is compatible with the classic TWRP.

4. disable the verification of the bootloader signature (dm-verity)

Modern versions of Android use a dm-verity mechanism that blocks the system from booting when changes are detected in the system partition. Once you install TWRP or root, this leads to a cyclic restart (bootloop).

This can be done in two ways:

  • ๐Ÿ”ง Through TWRP: V TWRP Go to Mount. โ†’ Connect your phone to your PC and delete the file. /system/bin/verity_key (or rename it).

Magisk

  1. Install Magisk (instructions in the next section).
  2. In Magisk settings, enable the option โ€œEnforce DenyListโ€ and add applications related to dm-verity to the list.

For reliability, we recommend combining both methods. /system/etc/verity_key โ€” You need to remove it, too. After the manipulation, do the Wipe. โ†’ Format Data in the TWRP (This will delete all data, but prevent bootloop).

๐Ÿ’ก

If after disabling the dm-verity phone still does not boot, try flashing Disable_Dm-Verity_ForceEncrypt.zip through TWRP. Download the archive on the forum XDA Developers in the theme of your device.

5. Install Magisk: Getting root rights

Magisk is a universal root-rights tool that bypasses SafetyNet restrictions and allows you to hide root from applications (e.g. banking), the latest stable version as of 2026 is Magisk v26.4.

Step-by-step:

  1. Download Magisk-v26.4.apk from GitHub and rename it Magisk-v26.4.zip.
  2. Move the file to your phone or flash drive.
  3. In TWRP, select Install โ†’ Select Magisk-v26.4.zip โ†’ Swipe to Confirm Flash.
  4. After installation, reboot to the system.
  5. Install Magisk.apk as a regular app and check the root status in it.

If Magisk does not define root, follow:

adb shell


su

If the su command returns an error, repeat the Magisk firmware via TWRP, having cleared the cache beforehand (Wipe โ†’ Dalvik/Cache).

Problem.Reason.Decision
Magisk is not installedThe incompatible version of MIUISweep MIUI EU or older official firmware
Bootloop after installationDm-verity not disabledDelete. verity_key or Disable_Dm-Verity.zip
SafetyNet does not passRoot foundEnable MagiskHide and add apps to DenyList
Apps fly outIncorrect rights of SELinuxIn Magisk, select Repair SELinux Context.

6. Root rights check and SafetyNet bypass

Once installed, Magisk must ensure that root is working correctly, and set up SafetyNet bypass to be compatible with banking applications and services like Google Pay.

To verify:

  1. Open Magisk and make sure the status says "Installed: XX.XX."
  2. Install the Root Checker app from the Play Market and run the test.
  3. Check SafetyNet in Magisk โ†’ Settings โ†’ SafetyNet Check.

If SafetyNet fails (ctsProfile: false), follow the following steps:

  • ๐Ÿ”„ Update Magisk to the latest version.
  • ๐Ÿ›ก๏ธ Enable MagiskHide in the settings and add to the list: Google Play Services Google Play Store Banking applications (Sberbank, Tinkoff, etc.)
  • ๐Ÿ”„ Reset the device.
  • ๐Ÿ“ฑ Install Universal SafetyNet Fix via Magisk โ†’ Modules.

โš ๏ธ Note: Some applications (e.g. Sberbank Online) may block work even if you successfully pass SafetyNet. In this case, try using alternative payment methods or the web version of the service.

๐Ÿ’ก

SafetyNet bypass is a temporary solution. Google and banks regularly update their root-right detection methods.

Possible problems and solutions

Even with the correct following of the instructions, errors can occur, and let's look at the most common ones and how to fix them.

Problem 1: The device does not turn on after the TWRP firmware is installed.

The probable cause is damage to the boot or recovery partition.

  1. Download to Fastboot (Food + Volume Reduction).
  2. Sweep through the original recovery.img from the official firmware: fastboot flash recovery recovery.img
  3. Repeat the installation of TWRP from a verified source.

Problem 2: Magisk is not updated through the app.

This is due to the change in the partition structure in new versions of MIUI.

  • Download the new version of Magisk.apk and rename it to.zip.
  • Sweat it through TWRP (as in the first install).
  • Remove the old version of the app and install the new.apk.

Problem 3: Constant reboots after rooting.

The culprit is an undisabled dm-verity or a damaged firmware.

  1. Download to TWRP.
  2. Please. Disable_Dm-Verity_ForceEncrypt.zip.
  3. Run Wipe โ†’ Format Data (all data will be deleted!).
  4. Reinstall Magisk.

If the problem persists, go back to the stock firmware via the Mi Flash Tool and start the process again.

FAQ: Frequent questions about rooting Mi 9T

โ“ Can I get root without unlocking the bootloader?
No. Xiaomi blocks any modifications to the system partition without unlocking the bootloader. All โ€œbypassโ€ methods (for example, through vulnerabilities) either do not work on current versions of MIUI, or lead to unstable operation of the device.
โ“ Will Google Pay and banking apps work after rooting?
With MagiskHide and Universal SafetyNet Fix properly configured, most applications can trick the root check, but some banks (such as VTB or Alfa Bank) can block access even if they successfully pass SafetyNet, leaving them to use web versions of services or alternative payment methods.
โ“ How to return the warranty after rooting?
Technically, the warranty is canceled when unlocking the bootloader, and this fact is recorded in the hardware log of the device. However, you can visually return the phone to the "stock" state: Swipe the official firmware through the Mi Flash Tool (selecting the "clean all" option). Lock the bootloader with the command fastboot oem lock. Remove all traces of Magisk and TWRP. Note: Xiaomi service centers can check the status of the bootloader through diagnostic utilities, so a full "reset" guarantee cannot be achieved.
โ“ Can I update you? MIUI rooting?
Yes, but with caution. Updates through Ota Updater result in loss of root rights, as they overwrite the boot section. Recommended method: Download the full service pack (.zip) from Xiaomi's site. Sweep it through TWRP (without data cleaning!). Once updated, re-scroll Magisk.zip. Using Ota Updater is only possible if you pre-disable the update signature verification (via the Disable Force Encryption module in Magisk).
โ“ How to remove root rights if they are no longer needed?
To completely remove root rights: Open Magisk and select Uninstall โ†’ Complete Uninstall. Reboot to TWRP and swipe the original boot.img from stock firmware. Remove /magisk folder manually (via TWRP โ†’ File Manager). Lock the bootloader with fastboot oem lock if necessary. If you plan to sell the phone, we recommend returning the stock receptacle and perform a full reset (Wipe All Data in TWRP).