Why install TWRP on Redmi Note 7 and what it does
TWRP (Team Win Recovery Project) is a powerful tool for owners of Xiaomi Redmi Note 7 (codename lavender), which provides access to functions not available in standard MIUI Recovery. With it you can install informal firmware (for example, LineageOS or Pixel Experience), create full backups (nandroid backup), remove preinstalled applications (bloatware), and restore the device after unsuccessful experiments.
However, installing TWRP on the Redmi Note 7 requires pre-unlocking the bootloader, a procedure that erases all data from the device and can lead to loss of warranty. Furthermore, since MIUI 12, Xiaomi has implemented Anti-Rollback (ARB) protection, which blocks the ability to roll back on older firmware versions, meaning that an incorrectly selected version of TWRP or firmware can turn a smartphone into a βbrick.β
In this guide, we will discuss in detail:
- π How to officially unlock the bootloader through the Mi Unlock Tool (with the latest restrictions Xiaomi).
- π₯ Where to download the current version TWRP Lavender and how to check its compatibility with your version MIUI.
- π§ Step-by-step installation via fastboot and alternative methods (including: ADB Sideload).
- β οΈ Common Errors (e.g. Invalid sparse file format at header) and how to fix them.
Preparation for installation: requirements and warnings
Before starting the procedure, make sure your device meets the following criteria:
- π± The smartphone model is Xiaomi Redmi Note 7 (lavender). β The phone. β Model.
- π Battery charge at least 70%, interruption of the process due to discharge may result in inability to turn on.
- π» Windows computer 7/10/11 (for Mi Unlock Tool or Linux/macOS (fastboot).
- π Original. USB-cable (preferably from the kit) Cheap cables can cause connection errors.
Also prepare the following files and tools:
| Component | Download link | Notes |
|---|---|---|
| Mi Unlock Tool | Official Xiaomi website | You need a Mi Account with a linked phone number. |
| TWRP for Lavender | Official website of TWRP | Choose a version that is compatible with your MIUI (see section below). |
| ADB & Fastboot | Android SDK Platform-Tools | Unpack at the root of the disk C:\platform-tools\. |
| Xiaomi drivers | Mi PC Suite | Install fastboot for proper operation. |
β οΈ Attention: Unlocking the bootloader will reset all data on the device, including photos, contacts and apps. Create a backup through Settings β Additionally. β Backup and reset or use Mi Cloud (unless it is blocked in your area).
Starting in 2021, Xiaomi has tightened its unlock rules, requiring you to link your Mi Account to your device and wait 7 days before unlocking, and if you just created an account or dropped your phone, that can go up to 30 days.
What happens if you install TWRP on a locked bootloader?
Step 1: Unlock the bootloader through the Mi Unlock Tool
The process of unlocking the bootloader on the Redmi Note 7 consists of three steps: linking the Mi Account to the device, waiting for confirmation and actually unlocking.
- Activate Developer Mode: Go to Settings β About Phone and 7 times click on MIUI Version. Return to the main settings where a new Developer section will appear.
- Enable OEM Unlock and USB Debugging: In the Developer Menu, activate both. Without this, the Mi Unlock Tool won't see the device.
- Link your Mi Account: In the same menu, find Mi Unlock Status and click Add Account and Device. Enter your Xiaomi account details (it must be confirmed by phone number!).
After the account is attached, a waiting message will appear, which is usually 168 hours (7 days), but the time limit may vary.
- πΆ Connect to the Internet via a mobile network (not Wi-Fi).
- π Restart the device after linking the account.
- β³ Check the unlock status in Mi Unlock Status β the remaining time will be displayed there.
When the wait is over, connect your phone to your PC in fastboot mode (turn off the device, then press Power + Volume Down), launch the Mi Unlock Tool, and follow the instructions on the screen. If done correctly, you will see the Unlocked successfully message.
Mi Account linked to device | OEM Unlock | USB | Debugging activated The device in fastboot |Mi Unlock Tool launched on behalf of the administrator-->
Step 2: Install TWRP via Fastboot
After successfully unlocking the bootloader, you can start installing TWRP.
- Download the current version TWRP For lavender from the official website, please note the version: MIUI 12/13 fit TWRP 3.6.2_9-0 Or newer. MIUI 11 older β 3.5.2_9-0.
OrangeFox/TWRP not working on encrypted devices.
Rename the downloaded file to twrp.img And put it in a folder. C:\platform-tools\.
Connect your phone in fastboot mode (as in the unlock stage) and check the connection with the command:
fastboot devicesIf the device is determined (the serial number will appear), continue.
Set the TWRP command:
fastboot flash recovery twrp.imgAfter successful firmware, you will see a message OKAY [ 0.5s].
Important! Don't restart the device right away!
fastboot boot twrp.imgThis will temporarily boot TWRP without overwriting the standard recavery.
If you replace TWRP with standard MIUI Recovery after the reboot, you have activated Anti-Rollback protection on your device.
β οΈ Attention: To secure TWRP, Immediately after loading into the Recovery go to Advanced β Flash Current TWRP (If there is no such option, download TWRP Installer ZIP And run it through Install).
π‘
If after installing TWRP, the phone boots to bootloop (cyclical reboot), try flashing Magisk to fix the bootloader check. Download the latest version here and install via Install β Select Storage β Magisk.zip.
Step 3: Alternative methods for installing TWRP
If the installation via fastboot failed (for example, due to a FAILED error (remote: 'Not allowed in Locked State') even though the bootloader is unlocked), try alternative methods:
Method 1: Installation with ADB Sideload
This method is suitable if you already have a temporary TWRP installed, but it does not persist after a reboot.
- Download TWRP Installer ZIP (not.img!) from the official website.
- In TWRP, select Advanced β ADB Sideload.
- On PC, run the command: adb sideload twrp-installer-lavender-3.x.x-x.zip
Method 2: Installation with OrangeFox Recovery
OrangeFox is a TWRP fork with advanced features (e.g. MIUI OTA support and built-in file manager).
- Download the latest version of OrangeFox for lavender from the official website.
- Quickboot is a TWRP: Fastboot Flash Recovery OrangeFox-*.img
- Load into the Recovery and select Install OrangeFox as Recovery.
OrangeFox is often better at encrypting data on MIUI 12+, but has a less intuitive interface than a classic TWRP.
π‘
If neither method worked, check the MIUI and Anti-Rollback (ARB) versions. Some firmware (e.g. MIUI 13.0.4+) requires you to roll back to the older version first via fastboot and then install TWRP.
Solving Common Errors When Installing TWRP
Even with the correct instructions, users often encounter errors, and here are the most common ones and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Flashing is not allowed in Lock State') | The bootloader is not unlocked or unlocked on Xiaomi servers. | Check status in the Mi Unlock Tool. If unlock is confirmed, repeat the procedure in 24 hours. |
| Invalid sparse file format at header | The twrp.img file or incompatible version is damaged. | Download the file again, check the checksum (MD5). For MIUI 12+, use TWRP 3.6.2+. |
| Device not defined in fastboot devices | There are no drivers or faulty cables. | Set up Mi. PC Suite, try another one. USB-port (preferably) USB 2.0). |
| TWRP is replaced by MIUI Recovery | Anti-Rollback protection is activated or does not embroidery TWRP Installer ZIP. | Please. disable_forceencrypt.zip (to disable encryption) and TWRP Installer ZIP. |
If the phone does not boot to the system after installing TWRP, try:
- Switch Magisk (to bypass the bootloader check).
- Disable forced encryption via Format Data β Yes (all data will be deleted!).
- Install firmware MIUI via fastboot with a flag --erase-userdata.
Warning: Installing Magisk or modified cores can cause MIUI malfunctions, especially if you use Mi Pay, Mi Fit or banking apps. Use MagiskHide Props Config to mask root rights.
If you plan to install custom firmware (such as LineageOS or ArrowOS), first:
- Check firmware compatibility with your deviceβs Anti-Rollback version.
- Download GApps (Google services) for firmware without them.
- Format the Data partition (if the firmware requires F2FS instead of ext4).
π‘
Before installing custom firmware, check reviews on the XDA-Developers forum.Some builds may have issues with the camera, NFC, or fast charging on the Redmi Note 7.