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:
- Turn on Developer Mode: Go to Settings โ About Phone โ MIUI Version and tap 7 times on the build number.
- Activate USB Debugging and OEM Unlock in the Settings menu โ Additional โ For developers.
- Connect the phone to the PC and confirm the debugging permission.
- 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).
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 version | Download link | Support for FBE | Features |
|---|---|---|---|
| twrp-3.7.0_9-0-raphael | Official website | โ No. | Stable but requires data formatting when installed |
| OrangeFox-R11.1-Stable-raphael | OrangeFox | โ Yes. | MIUI OTA support, built-in Magisk |
| PitchBlack-raphael-3.2.0 | PitchBlack | โ 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:
- Transfer the phone to fastboot mode: turn off the device, then press Power + Volume Down.
- Connect your phone to your PC and check the connection with the command: fastboot devices must display the serial number of the device.
- Squeeze TWRP temporarily (for the test): fastboot boot twrp.img The device will reboot to TWRP without permanent recording.
- 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
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?
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.propThen you can sew it. TWRP constantly:
fastboot flash recovery twrp.imgMethod 2: Installation of Magisk to protect the Recaveri
- Download Magisk (Magisk-v*.zip)
- In TWRP, run the Magisk zip file.
- 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:
- In TWRP, go to Backup.
- Select the sections (see list above) and the save location (better on External) SD or OTG-accumulator).
- 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.