How to put TWRP on Xiaomi Redmi 9: full instructions from unlock to installation

Why install TWRP on Redmi 9 and what it does

TWRP (Team Win Recovery Project) for Xiaomi Redmi 9 (codenamed lancelot) opens up features not available in standard MIUI recovery mode. With it, you can install informal firmware (for example, LineageOS or Pixel Experience), make full system backups, remove built-in Xiaomi applications, and restore the device after unsuccessful experiments with software.

But there’s a caveat: TWRP installation on Redmi 9 requires you to unlock the bootloader, an official procedure from Xiaomi, but it comes with waiting (usually 7-14 days) and potential risks, such as resetting all data. If you’re ready for it, read on.

In this article, we will discuss:

  • πŸ”“ How to unlock the bootloader on Redmi 9 with Mi Unlock Tool
  • πŸ“₯ Where to download the official and unofficial version TWRP lancelot
  • πŸ”§ Installation of the recavator through fastboot and ADB
  • ⚠️ Typical errors and how to avoid them (such as Anti-Rollback or brick)
πŸ“Š You have already unlocked the bootloader on your Xiaomi?
Yeah, long ago.
Yeah, but I don't remember how.
No, just planning.
No, I'm not going to.

Step 1: Preparing the device – what to do before unlocking

Before you start unlocking the bootloader and installing the TWRP, you need to perform several critical actions: skipping at least one point can lead to a blink (complete failure) of the device.

First, check the MIUI version on your Redmi 9. Go to Settings β†’ About Phone β†’ MIUI version. At the time of writing (2026), a version not newer than MIUI 12.5 is recommended for successful unlocking. If you have a MIUI 13/14 installed, you may need to roll back.

Backup all data (photos, contacts, messages)|Check the version. MIUI (not higher than 12.5)|Enable debugging on USB developer-setting|Linking your Mi Account to your device|Charge your phone at least 60%-->

Second, activate the developer mode and enable USB debugging:

  1. Go to Settings. β†’ The phone.
  2. Tap 7 times on the MIUI version until the notification β€œYou became a developer” appears.
  3. Go back to the basic settings, open Additional β†’ for developers.
  4. Activate the USB Debugging and OEM Unlock switches.

⚠️ Note: If the item Unlock OEM Inactive (gray), meaning your Redmi 9 has been unlocked before or is in an account-linked state, in which case try rebooting your device or untethering/associating your Mi Account again.

Step 2: Unlock the bootloader through the Mi Unlock Tool

The official tool from Xiaomi – Mi Unlock Tool – the only legal way to unlock the bootloader on Redmi 9. The process consists of two stages: linking the device to the account and actually unlocking.

Download the latest version of the Mi Unlock Tool from Xiaomi's official website (note bit size - x64 will do for Windows 10/11). Install the program and follow the following steps:

  1. Launch the Mi Unlock Tool on behalf of the administrator.
  2. Sign in with the same Mi Account that is linked to your phone.
  3. Connect Redmi 9 to your PC in fastboot mode (turn off your phone, then press Power + Volume down).
  4. In the program, press Unlock and confirm the action.

You’ll likely see a message telling you to wait 168 hours (7 days), which is Xiaomi’s standard practice for new accounts. If you’ve previously unlocked other devices, the wait can be reduced to 72 hours.

What if the Mi Unlock Tool can’t see the device?
If the program does not recognize Redmi 9 In fastboot mode, check it out: 1. Have Qualcomm drivers been installed? HS-USB QDLoader 9008 (You can download from [Forum] 4PDA](https://4pda.to/forum/)). 2. Are you using the original? USB-cable (not all cables support fastboot data transfer). 3. Antiviruses are disabled (they can block the Mi Unlock Tool). 4. Try another one. USB-port (preferably) USB 2.0 back-panel).

Step 3: Download the correct version of TWRP for Redmi 9 (lancelot)

For Xiaomi Redmi 9 (model M2004J19C, codenamed Lancelot), there are several builds of TWRP:

  • Official – maintained by TeamWin, but may be outdated.
  • Unofficial – collected by enthusiasts (e.g., XDA Developers or 4PDA), often with patches for newer versions of MIUI.

We recommend using an informal assembly from pepea01 (developer XDA), Since it supports data encryption (FBE) and works correctly with MIUI 12.5/13. You can download it from this link (look for a file with the name). twrp-3.6.2_11-lancelot-mauronofrio.img).

TWRP versionSupport for MIUIEncryption (FBE)Download link
Official 3.5.2To MIUI 12.0❌ No.twrp.me
Informal 3.6.2 (pepea01)MIUI 12.5–14βœ… Yes.XDA
Informal 3.7.0 (test)MIUI 13+ (experimental)βœ… Yes.Telegram channel

⚠️ Attention: If you download TWRP For other models (for example, for Redmi). 9A or Redmi 9C), Make sure the file is called...lancelot... is the code name of your model.

Step 4: Install TWRP via Fastboot (Step-by-step)

When the bootloader is unlocked and the TWRP file is downloaded, you can start the installation.

  • πŸ–₯️ Computer with Windows/Linux and established ADB Fastboot (you can download it as part of Platform Tools).
  • πŸ”Œ Original. USB-cable (better the one that came with the phone).
  • πŸ“± Phone with at least 70% charge and unlocked bootloader.

Instructions:

  1. Unpack the archive from the platform-tools to the root of the C:\ disk (e.g., C:\platform-tools\).
  2. Place the file. TWRP (for example, twrp-3.6.2_lancelot.img) in the same file.
  3. Open the command line in the platform-tools folder (click Shift + right mouse button β†’ β€œOpen PowerShell window here”).
  4. Connect Redmi 9 in fastboot mode (turn off the phone, then press Power + Volume down).
  5. Enter the command to check the connection: fastboot devices If the device is determined (the serial number will appear), continue. If not, check the drivers.
  6. Install. TWRP Team: Fastboot Flash Recovery twrp-3.6.2_lancelot.img
  7. After successful firmware type: fastboot boot twrp-3.6.2_lancelot.img This will load the phone directly into TWRP (important!).

πŸ’‘

After installation TWRP The phone is loaded into a standard recavator, so MIUI To avoid this, immediately after the firmware, run the command fastboot boot. twrp.img and TWRP Go to Advanced. β†’ Flash Current TWRP (if such a clause exists).

Step 5: First Actions in TWRP – Backup and Setup

When you first download to TWRP, you'll see a request to allow modifications to the system. Move the slider to the right to allow changes, or many features will not be available.

The first thing you need to do is create a full backup of your current firmware, which will save you if you don't do any experiments.

  1. Go to the Backup section.
  2. Check the boxes for Boot, System, Data, Vendor.
  3. Select a save location (preferably on MicroSD, if any).
  4. Swipe to start the backup.

Backup can take 10-20 minutes. Upon completion, check that the files appear in the TWRP/BACKUPS folder on the memory card or in the internal memory.

If you want root rights, download the latest version of Magisk (e.g., Magisk-v26.1.zip) and run it through Install β†’ Select Storage β†’ select the file β†’ Swipe to Confirm Flash.

Step 6: Common Mistakes and How to Avoid Them

Even with the right instructions, you can fail, and here are the most common problems and solutions.

Mistake.Reason.Decision
Fastboot: unknown command 'flash'Older version of fastbootUpdate platform-tools to the latest version
Anti-Rollback (phone not switched on)Firmware of the old version of MIUI on top of the newSweep the full fastboot through the Mi Flash Tool
This package is for "lancelot" devices; this is a ""Incorrect TWRP file (for another model)Download the version specifically for lancelot
TWRP asks for password when mounting /dataEncryption (FBE) enabledEnter the password from the lock screen or disable encryption in MIUI before installation

⚠️ Attention: If after installation TWRP The phone loads into a fastboot and the red light flashes -- it's a hard brick. You can only restore the device through the use of a red light. EDL-Mode (requires an authorized Xiaomi account and Qualcomm boxing).

If you encounter an Anti-Rollback error, don't try to flash the old version of MIUI - it will only make the problem worse.

  1. Download the fast boot for your model from the official website.
  2. Unpack the archive and swipe through the Mi Flash Tool (select clean all and lock).
  3. After recovery, re-unlock and install TWRP.

FAQ: Frequent questions about TWRP on Redmi 9

Can I install TWRP without unlocking the bootloader?
No, it's technically impossible. Xiaomi blocks entry to the recovery section without unlocking the bootloader. Any "bypass" methods (for example, through ADB in sideload mode) will not work - the system will simply overwrite TWRP with a standard recap on the first reboot.
How to return the standard MIUI Recovery?
To remove TWRP and return stock receivables: Download the original recovery.img for your version of MIUI (can be from fastboot).Sweat it through fastboot: fastboot flash recovery.img Reboot the phone. If the device doesn't boot after that, reset via fastboot: fastboot erase userdata
Why does TWRP not see internal memory?
This is due to the encryption enabled (FBE). Solutions: Enter the lock screen password in TWRP (if you have a request for it). Disable the encryption in MIUI before installing TWRP (Settings β†’ Unlock and Passwords β†’ Phone Encryption). Use FBE-enabled TWRP (e.g., build from pepea01).
Can I upgrade MIUI with OTA with TWRP installed?
Technically, but not recommended. When you upgrade through OTA: TWRP, it will be overwritten with a standard backup. If you have Magisk installed, the update may result in a logo getting stuck. Anti-Rollback is likely to conflict if the firmware is older than the current one. It is better to download full fastboots and stitch them through TWRP or Mi Flash Tool.
How to flash custom firmware (for example, LineageOS) through TWRP?
Routine: Download firmware (e.g. lineage-20.0-lancelot.zip) and GApps (if you need Google services). Reboot to TWRP. Run Wipe β†’ Advanced Wipe and mark Dalvik, Cache, System, Data. Fast through Install, then GApps (if necessary). Reboot. The first download can take 10-15 minutes. Redmi 9 is suitable firmware based on 11/12 (e.g. LineageOS 18.1/19 or Pixel Experience).