Installation of TWRP Recovery on Xiaomi Mi 9T Pro: a complete guide with unlocking the bootloader

Installing a custom TWRP recavator on the Xiaomi Mi 9T Pro (also known as the Redmi K20 Pro) opens up access to advanced features from backing up the data partition to firmware for unofficial ROM. However, the process requires pre-unlocking the bootloader - a procedure that Xiaomi has complicated in recent versions of MIUI. In this article, you will find the current 2026 methods for installing TWRP, including bypassing new restrictions, list of compatible versions and solving typical errors.

There are risks involved: wrong actions can lead to a device brilliance or loss of warranty, and it is especially critical to follow the sequence of steps when working with boot and recovery sections. If you are new to Android, we recommend that you first learn the theory of how fastboot works and how it differs. A/B-marking (relevant to Mi) 9T Pro).

Note: This instruction is for the Xiaomi Mi 9T Pro (codenamed raphael). Other devices (e.g., Mi 9T with davinci code) require different TWRP files and unlock methods. Make sure your device meets the specification before continuing.

Preparation of the device: unlocking the loader

The first and mandatory step is to unlock the bootloader through the official Mi Unlock Tool. Xiaomi has introduced strict restrictions: now you need to link the account to the device and wait 72-168 hours (depending on the region). TWRP impossible.

What you'll need:

  • ๐Ÿ“ฑ Smartphone Mi 9T Pro with battery charge โ‰ฅ 60%
  • ๐Ÿ’ป Windows computer (for Mi Unlock Tool)
  • ๐Ÿ”Œ Original. USB-cable (important for stable connection)
  • ๐Ÿ”‘ Mi Account Linked to the Device

Algorithm of action:

  1. Turn on Developer Mode: Go to Settings โ†’ About Phone โ†’ MIUI Version and tap 7 times on the build number.
  2. Activate USB Debugging and OEM Unlock in the Settings menu โ†’ Additional โ†’ For developers.
  3. Connect the phone to the PC and confirm the debugging permission.
  4. Download Mi Unlock Tool, log in and follow the program instructions.

โš ๏ธ Note: If the Mi Unlock Tool gives a "Couldn't unlock" error after waiting, check: Is the account linked to the device in Settings โ†’ Xiaomi account โ†’ Mi Cloud โ†’ Find the device. If the antivirus/firewalls on the PC are disabled, they can block the connection. If you use the original cable (not all USB-Type C supports data transfer).

๐Ÿ“Š How long have you waited for the bootloader to unlock on Xiaomi?
Less than 24 hours.
24-72 hours
More than 72 hours.
Failed to unlock.

2 Selecting a TWRP version for the Mi 9T Pro

Mi device 9T Pro has A/B-partition markup, which means having two firmware slots ( a and b) that influences the choice of version TWRP. There are currently two current branches:

  • Official (from TeamWin) - stable, but without support for FBE encryption (File-Based Encryption).
  • Unofficial (from OrangeFox or PitchBlack) โ€“ with support for FBE and additional features (for example, built-in Magisk).

Recommended versions (checked on MIUI 14/Android 13):

TWRP versionDownload linkSupport for FBEFeatures
twrp-3.7.0_9-0-raphaelOfficial websiteโŒ No.Stable but requires data formatting when installed
OrangeFox-R11.1-Stable-raphaelOrangeFoxโœ… Yes.MIUI OTA support, built-in Magisk
PitchBlack-raphael-3.2.0PitchBlackโœ… Yes.Dark theme, advanced backup settings

Critical: If you use MIUI with encryption (default enabled), choose TWRP with FBE support. Otherwise, after installation, the recovery will not be able to mount the /data partition, and a full reset will be required.

๐Ÿ’ก

Before downloading TWRP, check the hash file (SHA-256) on the official website. This will protect against fake builds with malicious code.

3. Install TWRP via fastboot

Once you unlock the bootloader and download the appropriate TWRP (.img) image, you can start installing it.

  • ADB and Fastboot (you can download as part of Android SDK Platform-Tools).
  • The twrp-*.img file (rename it twrp.img for convenience).

Step-by-step:

  1. Transfer the phone to fastboot mode: turn off the device, then press Power + Volume Down.
  2. Connect your phone to your PC and check the connection with the command: fastboot devices must display the serial number of the device.
  3. Squeeze TWRP temporarily (for the test): fastboot boot twrp.img The device will reboot to TWRP without permanent recording.
  4. If TWRP Start correctly, run it constantly: fastboot flash recovery twrp.img For devices with A/B-Use the markup: fastboot flash recovery_ramdisk twrp.img

โš ๏ธ Attention: On Mi 9T Pro MIUI 12+ post-installation TWRP Stock Recovery can overwrite custom at the first reboot. To avoid this, immediately after the firmware, perform in the following mode: TWRP: adb shell echo "--disable-verity --disable-verification" > /vendor/build.prop

โ˜‘๏ธ Pre-installing check TWRP

Done: 0 / 4

4. Solving problems with installation

Even with the correct following of the instructions, errors can occur. Let's consider typical scenarios and ways to eliminate them:

Error 1: "Invalid sparse file format at header magic" TWRP.

  • ๐Ÿ”น Reason: A damaged.img file or incompatible version.
  • ๐Ÿ”น Solution: Download the image again, check the hash. 9T Pro only use raphael builds.

Error 2: TWRP does not see the /data partition or asks for a password.

  • ๐Ÿ”น Reason: MIUI cryptography FBE, And your version TWRP He doesn't support it.
  • ๐Ÿ”น Solution: Install OrangeFox or PitchBlack (see table above).If you need to save data, backup through adb pull /sdcard pre-set.

Error 3: The device got stuck on the Xiaomi logo after the firmware.

  • ๐Ÿ”น Reason: Boot partition or conflict with Magisk is damaged.
  • ๐Ÿ”น Solution: Re-show the stock. boot.img Fastboot: Fastboot Flash boot boot.img Then repeat the installation. TWRP.
What if TWRP does not start after the fastboot boot command?
If you have a fastboot boot twrp.img The screen is turned off or the logo appears MIUI, The reason may be: Incompatible version TWRP (For example, for davinci instead of raphael. MIUI You need to roll back the firmware to Android 10). Problems with USB-Check fastboot: fastboot getvar all For diagnostics, note the lines secure: yes and unlocked: yes - if unlocked: no, the bootloader is not unlocked.

5. Permanent installation of TWRP (bypassing the rewriting stock recaveri)

On the Mi 9T Pro, MIUI stock firmware can automatically restore the original Recovery when rebooted.

Method 1: Disabling signature verification

In a temporary TWRP (launched via fastboot boot) do:

adb shell


echo "--disable-verity --disable-verification" > /vendor/build.prop

Then you can sew it. TWRP constantly:

fastboot flash recovery twrp.img

Method 2: Installation of Magisk to protect the Recaveri

  1. Download Magisk (Magisk-v*.zip)
  2. In TWRP, run the Magisk zip file.
  3. Install MagiskHide Props Config and activate the Hide Magisk option from MIUI.

Method 3: Transition to custom firmware

If you plan to use custom ROMs (like LineageOS or Pixel Experience), they usually include a patch to prevent the Recovery from overwriting. Once the ROM TWRP is firmware, it will stay in place.

๐Ÿ’ก

On MIUI 14+, the most reliable way to save TWRP is a combination of method 1 (disable verification) + Magisk installation.

6. Backup and Restore in TWRP

The main advantage of TWRP is the ability to create full backups (nandroid backup). on the Mi 9T Pro, it is recommended to save the following sections:

  • ๐Ÿ“ Boot โ€“ Boot partition (critical for system start-up).
  • ๐Ÿ“ Data - user data (applications, settings).
  • ๐Ÿ“ System and Vendor โ€“ System files (required for stock firmware recovery).
  • ๐Ÿ“ EFS โ€” section IMEI and modem data (important for communication).

How to make a backup:

  1. In TWRP, go to Backup.
  2. Select the sections (see list above) and the save location (better on External) SD or OTG-accumulator).
  3. Start the process and wait until it is completed (it can take 10โ€“30 minutes).

Features for the Mi 9T Pro:

  • If you use encryption (FBE), you will need to enter a password before the Data backup.
  • The EFS partition is small (about 40MB), but critically important, and its loss will result in a lack of network.
  • To restore the backup on another version of MIUI, you may need to disable the check in the settings of TWRP (Settings โ†’ Disable DM-Verity).

๐Ÿ’ก

Store backups on multiple media, like a copy on your PC and in the cloud (Google Drive, Mega), which will save data if you damage it. SD-map.

7. Frequent questions and answers

Can I install TWRP without unlocking the bootloader?
No. Xiaomi blocks the entry to the recovery and boot sections at the boot boot level. Any attempt to get around this without officially unlocking will result in a device blink.
Why does the TWRP install not boot your phone to the system?
Probable causes: Boot damaged (try flashing stock boot.img); Magisk conflict (remove modules via TWRP or browse Magisk-uninstaller.zip); Incompatible TWRP (e.g. for another model); Solution: reflash the stock firmware through Mi Flash Tool in clean all mode.
How do you get the stock recap?
Download the official firmware for Mi 9T Pro from Xiaomi. The file will be in the archive. recovery.img. Fastboot: Fastboot Flash Recovery recovery.img For A/B-Devices: fastboot flash recovery_ramdisk recovery.img
Will Google Pay work after installing TWRP and Magisk?
Not unless you configure MagiskHide and pass SafetyNet. To do this: Install MagiskHide Props Config and Universal SafetyNet Fix. In Magisk settings, activate MagiskHide and add Google Play Services to the hidden app list. Reboot and check SafetyNet status through the YASNAC app.
Can I upgrade MIUI with OTA with TWRP installed?
Technically yes, but: Stock Update will re-write TWRP If the firmware contains security patches, they can block Magisk. OTA-Packages (.zip) and stitch them through TWRP Disabled DM-Verity (Disable DM-Verity).