Installing custom TWRP recavator on Xiaomi Redmi Note 7 (codename lavender) gives you access to advanced features from creating full system backups to firmware informal ROM. However, the process requires accuracy - an error at any stage can lead to a "brick" of the device. Unlike the standard recavator from Xiaomi, TWRP allows you to install ZIP-packets, modify system partitions and even recover data after failures.
This instruction is suitable for the Redmi Note 7 model (not to be confused with the Note 7 Pro or Note 7S!). Before you start, check the version of the device in Settings β About Phone β Model. The process includes three key steps: unlocking the bootloader through the official Xiaomi tool, Firmware TWRP through fastboot and preventing the recovery from being replaced with stock when restarted. Without an unlocked boot, installing TWRP is impossible - this is a security restriction from the manufacturer.
Important: After installation TWRP You will lose the opportunity to receive OTA-Also, some banking applications (such as Sberbank Online) may stop working due to the SafetyNet trigger.
Preparation of the device and PC
Before unlocking the bootloader and installing the TWRP, both the phone and the computer must be prepared, and skipping any of the items can lead to errors like fastboot: error: cannot load or hanging on the Mi logo.
On the phone:
- π± Put the debugging on. USB: Go to Settings. β About the phone, tap 7 times on the version MIUI, Then go back to the settings. β Additionally. β For developers and activate debugging.
- π Connect your device to your PC with the original cable (cheap cables often donβt transmit data to fastboot).
- π Battery charge should be at least 60% - when discharged during firmware, the phone may turn off.
- π Backup important data: Once the bootloader is unlocked, the phone will be reset to factory settings.
On your computer (Windows/Linux/macOS):
- π» Install Android SDK Platform-Tools (includes fastboot and adb).
- π§ For Windows, additionally install Mi Flash drivers (download from the official Xiaomi website).
- π Download the current version TWRP for lavender from the official website TWRP (file extension).
- π‘οΈ Disable the antivirus β it can block fastboot as suspicious activity.
β οΈ Warning: If you use a laptop, connect it to a power source.Some users have reported firmware failures due to the laptop suddenly being turned off from the battery.
2 Unlock the bootloader through the Mi Unlock Tool
Xiaomi blocks the bootloader on all its devices. To install TWRP, it must be officially unlocked through the Mi Unlock Tool.The process takes 3 to 360 hours (depending on Xiaomi's policy) and requires an association of the Mi Account to the device.
Steps to unlock:
- Download the Mi Unlock Tool and unpack the archive.
- Launch it. miflash_unlock.exe on behalf of the administrator (for Windows).
- Sign in with the same Mi Account that is linked to your phone.
- Connect the phone in fastboot mode (turn off the phone, then press Power + Volume down until the hare appears in the eardress cap).
- In the program, press Unlock and confirm unlock.
Once successfully unlocked, the phone will automatically reset to factory settings. If the Mi Unlock Tool shows a "Couldn't unlock" error with a timer (e.g., 168 hours), wait for the specified time - this is Xiaomi's restriction for new accounts.
What if the Mi Unlock Tool canβt see the device?
| Mistake. | Reason. | Decision |
|---|---|---|
| Couldn't unlock 50% | Mi Account is not tied to phone | Log into your phone account, turn on synchronization |
| Current account is different from the account info on the device | Another account on PC and phone | Use one account everywhere |
| This device is locked | Waiting timer's not up. | Wait for the specified time (3-15 days) |
| No device connected | Drivers not installed | Install Mi Flash or SDK Platform-Tools |
3. Install TWRP via fastboot
Once the bootloader is unlocked, you can start the TWRP firmware. Using the official.img file and the fastboot flash recovery command. Importantly, do not disconnect the phone from the PC until the process is complete!
Step-by-step:
- Place the downloaded file twrp-3.7.0_9-0-lavender.img (version may differ in the folder with the platform-tools.
- Open the command prompt (or terminal) in this folder: Windows: Shift + PCM β Open the PowerShell window here Linux/macOS: cd /path / to / folder
fastboot
fastboot devicesThe serial number of the device must be displayed.
fastboot flash recovery twrp-3.7.0_9-0-lavender.imgfastboot boot twrp-3.7.0_9-0-lavender.imgbootloader unlocked (Unlocked status in fastboot) |
TWRP file downloaded for Lavender| model
Phone connected with original cable |
The command line is open on behalf of the administrator-->
Critical point: If you boot into the system after firmware, Xiaomiβs stock recavator will scratch TWRP. Therefore, immediately after the fastboot flash command, you need to boot into TWRP via fastboot boot.
β οΈ Note: On some versions MIUI post-installation TWRP Data decryption unsuccessful may occur. Solution: before rebooting to TWRP reset via Wipe β Format Data β Yes (this will delete all data!).
4.Preventing the replacement of TWRP with stock Recovery
Xiaomi aggressively protects its devices from modifications. Once the TWRP is installed, the system automatically flashes back the stock Recovery when it first boots, and to avoid this, you need to turn off the Recovery checking via fastboot or install the Disable Force Encryption patch.
Method 1: Disabling the check via fastboot (temporary solution):
fastboot flash vbmeta vbmeta.img
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.imgThe vbmeta.img file can be extracted from stock firmware or downloaded here.
Method 2: Install a patch in TWRP (permanent solution):
- Download. ZIP-packet Disable_Dm-Verity_ForceEncrypt.
- Move the file to your phone or flash drive.
- V TWRP Choose Install β Choose. ZIP β Swipe to Confirm Flash.
- After installation, run Wipe β Format Data (if required).
For custom firmware installation:
- Download. ZIP-firmware package (e.g. with XDA Developers).
- Move the file to your phone or microSD.
- In TWRP, select Wipe β Advanced Wipe β Dalvik, Cache, System, Data.
- Return to the main menu, click Install and select ZIP-packet.
- After installation, swipe Gapps (if required) and Magisk (for root rights).
SafetyNet Warning: Many banking applications (Sberbank, Tinkoff) and services (Google Pay) check the integrity of the system. Once TWRP and Magisk are installed, they may stop working.
- Install Magisk and activate SafetyNet Fix and Universal SafetyNet Fix modules.
- Hide root rights for specific applications through Magisk β Settings β MagiskHide.
- Check SafetyNet status with the team: adb shell su -c "snet check"
7.How to return stock recavers and block the loader
If you decide to return the phone to its original state (for example, for sale or warranty repair), you must:
- Download stock firmware for Redmi Note 7 from the official Xiaomi website.
- Unpack. ZIP-archive and place the firmware folder in the root of the disk C:\.
- Install the Mi Flash Tool.
- Connect your phone in fastboot mode.
- In the Mi Flash Tool, select the firmware folder and press Refresh (the device should be displayed).
- Select Clean All mode and press Flash.
After the firmware runs the stock ROM, the bootloader will remain unlocked to lock it back:
fastboot oem lockWarning: Locking the bootloader erases all data and can lead to a blink if the phone has unofficial firmware installed!