Xiaomi Redmi 7 is one of the most popular budget smartphones of 2019, but even years later, its owners are faced with the need to install custom Recovery. However, the installation process on Redmi 7 has nuances: from the mandatory unlock of the bootloader to the choice of a compatible version. TWRP.
In this article, we will take a look at the process in steps, from tool preparation to final health checks, and focus on common errors (e.g., fastboot: error: Command failed) that occur when working with Redmi 7 due to the specifics of its Snapdragon 632 hardware platform.
Warning: the procedure requires care. MIUI 12+ unlocking the bootloader takes up to 720 hours (30 days) of latency if the Xiaomi account is not tied to the device in advance.
1.Preparation: What it takes to install Recovery on Redmi 7
Before starting the process, make sure you have:
- π± Xiaomi Redmi 7 (codenamed onc) with a battery charge of at least 70.
- π» Computer running Windows 10/11 (for Mac/Linux Virtual machines are not recommended due to problems with fastboot.
- π Cable USB Type-C original or high quality. Cheap cables often cause data transmission errors.
- π Xiaomi account linked to the device (required to unlock the bootloader) If the account is not tied, the waiting time will increase to 30 days.
Also download the necessary files:
| Component | Reference | Note |
|---|---|---|
| Mi Unlock Tool | Official website | Version 5.5.224.30 or later |
| TWRP for Redmi 7 | Official repository | Choose the version for onc |
| ADB & Fastboot | Android Developers | Platform-tools package for Windows |
| Xiaomi drivers | Support page | Install MiPhoneManager for automatic installation |
Important: Back up all your data before you start. Installing Recovery and unlocking the bootloader will cause the device to be completely reset. Use Mi Cloud or third-party utilities like Titanium Backup (requires root).
β οΈ Note: If your Redmi 7 was purchased in China (the domestic version), unlocking the bootloader may not be possible without additional manipulation. β The phone. β Version. MIUI. The inscription "China" indicates this version.
2. Unlocking the bootloader on Redmi 7: a step-by-step process
The bootloader on Xiaomi devices is locked by default, and unlocking it is a must before installing Recovery. On Redmi 7, the process consists of two parts: account binding and unlocking itself.
Step 1: Linking your Xiaomi account to your device
- Go to Settings β Xiaomi Account and log in.
- Turn on the settings. β Additionally. β For developers β Unlocking OEM (If you do not have an option, tap 7 times on the version. MIUI under the heading βOn the telephone").
- Connect your device to the Internet and wait for synchronization (can take up to 24 hours).
Step 2 Unlocking with Mi Unlock Tool
- Install Mi Unlock Tool on your PC and run on behalf of the administrator.
- Sign in with the same account as on your phone.
- Put Redmi 7 into fastboot mode: turn off the device, then pinch the power + Turning down the volume.
- Connect your phone to your PC. In Mi Unlock Tool, press Unlock.
If your account was tied less than 168 hours (7 days) ago, you will see a waiting message.
- π Connect your device to the Internet and use it as normal (calls, messages, app installation).
- π Repeat the unlock attempt every 24 hours β the timer may reset.
- π΅ Do not reset the device to factory settings - this will reset the meter.
β οΈ Note: On some Redmi 7 firmware (especially Chinese) unlocking may require additional confirmation via the Redmi 7 firmware. SMS. If the code doesn't come in, try using it. VPN Contact the China region or contact Xiaomi support.
Xiaomi account tied to device|The option βUnlockingβ is enabled OEM"|The device is charged more than 70%|Drivers installed ADB/Fastboot|Backup of important data is made-->
Installation of drivers ADB and Fastboot for Redmi 7
Without properly installed drivers, your PC wonβt be able to βseeβ your Redmi 7 in fastboot mode. On Windows, this process is often accompanied by errors, so follow the instructions carefully.
Method 1: Automatic installation via MiPhoneManager
Download and install the official MiPhoneManager software from Xiaomi, which will automatically install all the necessary drivers, including the Android Bootloader Interface.
- Connect Redmi 7 to fastboot mode.
- Open Device Manager (Win + X β Device Manager).
- Make sure that Android Bootloader Interface appears in the βPortable Devicesβ section.
Method 2: Manual installation of ADB drivers
If the automatic method does not work:
- Download. ADB and Google's Fastboot.
- Unpack the archive in the root of the C:\platform-tools disk.
- Open the command prompt in this folder (Shift + PCM β Open the PowerShell window here).
- Enter the command: fastboot devices If the device is displayed (for example, abc12345678 fastboot, drivers installed correctly.
If the fastboot device team returns an empty list:
- π Try another one. USB-port (preferably) USB 2.0 on the back of the PC).
- π Reinstall drivers via Device Manager (PCM on the device) β Update the driver β Perform a search on this computer β Select from the list β Android Bootloader Interface).
- π« Disable the antivirus β it can block the installation of drivers.
π‘
If Redmi 7 is not defined in fastboot, but charges when connected, the problem is precisely in the drivers.Try to install universal drivers from Google through this instruction.
4. Selecting and downloading the correct version TWRP for Redmi 7
Wrong version TWRP For Redmi 7 (codenamed onc), only assemblies labeled onc or redmi7. Use of versions for other models (for example, Redmi Note 7) is unacceptable.
Where to download TWRP for Redmi 7:
- π Official website TWRP β The most stable version, but it may not be the most recent.
- π XDA-Developers Forum β unofficial builds with support for new versions of Android.
- π Telegram channel MIUI TWRP β firmware MIUI.
How to choose the version:
| Android version | Recommended TWRP | Notes |
|---|---|---|
| Android 9 (MIUI 10-11) | TWRP 3.3.1-0 | Official assembly, stable. |
| Android 10 (MIUI 12) | TWRP 3.4.0-0 or 3.5.2 | Requires a patch for encryption |
| Android 11+ (MIUI 12.5+) | TWRP 3.6.2+ (informal) | Support for dynamic partitions |
After downloading, check the integrity of the file (the extension should be.img). twrp_redmi7.img And put it in the platform-tools folder.
β οΈ Note: Some unofficial assemblies TWRP You can only download files from trusted sources (XDA, website TWRP). Before using, check the hash amount of the file (MD5) utility-wise WinMD5Free.
What to do if the right version TWRP no?
5. Installation TWRP Redmi 7 via fastboot
Now, to the installation itself, the whole process takes no more than 5 minutes, but requires precise execution of commands.
Step 1: Transfer the device to fastboot mode
Turn off Redmi 7, then shut down the power. + Turning down the volume before you see the Fastboot logo.
Step 2. Check the connection
Open the command line in the platform-tools folder and do:
fastboot devicesYour device's serial number should show up, and if it's not, go back to the driver section.
Step 3: Installation TWRP
Enter the command (replace). twrp_redmi7.img in the name of your file):
fastboot flash recovery twrp_redmi7.imgIf the process is successful, you will see:
OKAY [ 0.5s]
finished. total time: 0.5sStep 4: Loading into TWRP
Without turning off the cable, enter:
fastboot boot twrp_redmi7.imgThe device will reboot to TWRP If that doesn't happen, manually pinch the power. + Increased volume when loading.
Important point: At the first loading in TWRP You'll be asked to allow modifications to the system partition. Swipe to the right, otherwise Recovery won't be able to work with the device files.
π‘
After installation TWRP Backup the persist partition immediately. This section contains data IMEI and MAC-Losing it will cause problems with the network!
Typical errors and their solutions
Even with the exact instructions, there can be errors. Consider the most common ones for the Redmi 7:
Error 1: "Fastboot: Error: Command Failed"
Reasons:
- π Faulty. USB-cable.
- π bootloader not unlocked (check status via fastboot oem device-info).
- π± The device is not in fastboot mode (check the phone screen).
Solution: Try another cable, port, or PC. Make sure the bootloader is unlocked (Device unlocked: true).
Mistake 2: TWRP It doesn't start, the logo flashes. MI
Reasons:
- π Wrong version TWRP for your firmware.
- π The bootloader is locked (even if the unlock is successful).
- π± The file is damaged. recovery.img.
Solution: Repeat installation with another version TWRP. If it doesn't help, do it:
fastboot erase recovery
fastboot flash recovery twrp_redmi7.imgError 3: After installation TWRP device is not loaded into the system
This is because of a data reset when the bootloader is unlocked.
- Download to TWRP (Nutrition + Volume Increase).
- Select Wipe β Format Data (enter yes to confirm).
- Reboot to the system. The first boot can take up to 10 minutes.
Mistake 4: TWRP asks for a password, but it's not there.
This is due to the encryption of data in MIUI. Decision:
- π Enter your Xiaomi account password (if you have been set up).
- π If you do not have a password, run Format Data in TWRP (erase all data!).
- π± For MIUI 12+ Download a special decryptor (for example, MIUI Decrypt Tool).
fastboot flash boot twrp_redmi7.imgIt'll replace the stock boot with TWRP, But it can cause problems with OTA-update.-->
7. Additional settings TWRP post-installation
After successful installation TWRP It is recommended to perform several actions for stable operation:
1. Creating a full backup
On the main menu. TWRP Select Backup and mark all sections:
- Boot
- System
- Data
- Persist (required!)
- Vendor
Save the backup on SD-This will save your data when you manipulate your firmware.
2.Install Magisk for root rights
If you need root rights:
- Download the latest version of Magisk from GitHub.
- V TWRP Select Install and specify the path to the file. Magisk-v26.4.zip.
- Once installed, reboot. Check root through the Magisk Manager app.
3. Disabling Forced Encryption
Nana MIUI 12+ Enabled forced encryption that may interfere with the work TWRP. To turn it off:
- In TWRP, go to Mount β Enable MTP.
- Connect your phone to your PC and copy the file disable_forceencrypt.zip (You can download it here).
- Install the file via Install in TWRP.
4. Update TWRP
To update Recovery:
- Download the new version twrp.img.
- V TWRP Choose Install β Install Image β Select a file β Recovery.
- After installation, restart to Recovery (not in the system!).
8.Stock Recovery Restoration (if something went wrong)
After installation TWRP The device is unstable, or you want to get it back to where it was, you can restore stock Recovery:
Step 1. Download the stock firmware.
Find the official firmware for your model on the Xiaomi website. Unpack the archive and find the file recovery.img picture-folder.
Step 2. Install stock recovery
Transfer the device to fastboot and do:
fastboot flash recovery recovery.img
fastboot rebootStep 3: System Recovery
If after the return of stock Recovery, the device does not boot:
- Boot into stock recovery (Food) + Volume up).
- Choose Wipe Data β Wipe All Data.
- Reset the device.
If that doesnβt work, run the full stock firmware through the Mi Flash Tool:
- Download Mi Flash Tool and firmware in.tgz format.
- Unpack the firmware and run the Mi Flash Tool on behalf of the administrator.
- Connect Redmi 7 in fastboot mode, select the firmware folder and press Flash.
β οΈ Note: Firmware full stock firmware through the Mi Flash Tool erases all data, including IMEI, If you don't select Clean All and Lock, the device will look like new, with the boot loader locked.