Xiaomi Redmi 7 (codenamed onc) is still a popular budget device, but over time its performance may fall due to outdated software. The firmware helps not only update the system to the current version, but also eliminate bugs, improve autonomy or even install custom firmware with advanced features. However, the process has nuances, from unlocking the bootloader to choosing the right version of MIUI for your modification (Redmi 7, Redmi 7A or global / Chinese version).
In this article, you will find 3 proven ways to run firmware through Recovery, Fastboot and Mi Flash Tool, as well as instructions for unlocking the bootloader and solving common errors (such as anti-rollback or invalid image). We will discuss how to avoid losing IMEI after firmware - one of the most common problems for Redmi 7 users when switching to custom builds. If you are a beginner, start with the official firmware through Recovery; experienced users can immediately go to the sections on TWRP and custom ROM.
Preparation for firmware: what to do before the start
Unprepared firmware can turn a smartphone into a brick. The first and most important thing is to save all the data. Even if you plan to scroll through Recovery without resetting, back up:
- π± Contact and SMS: Sync with Google Account or export through Settings β System system β Backup.
- π· Photo/video: copy to PC or cloud (Google Photos, Mi Cloud).
- π IMEI Serial number: write them down (you can find them in Settings) β About the phone or the box).
- π Battery charge: at least 60% (when running through Fastboot, the phone should not turn off).
The second is to identify the current MIUI and the model. It's critical for Redmi 7 to know:
- π Firmware region: global (MIUI Global), Chinese (MIUI China) or Indian (MIUI India. You can't mix them because of anti-rollback!
- π’ Android: Redmi 7 was released with Android 9 Pie and updated to Android 11 (in unofficial firmware).
- π bootloader status: blocked or unlocked (check by the command fastboot oem device-info).
Third, download the necessary files:
| Type of firmware | Download link | Notes |
|---|---|---|
| Official MIUI (Recovery) | Xiaomi website | Choose the version for onc (Redmi 7) |
| Official MIUI (Fastboot) | Xiaomi Firmware Updater | File in.tgz format |
| TWRP Recovery | Official website of TWRP | Version 3.7.0 or later |
| Custom firmware | XDA Developers | Popular: Pixel Experience, LineageOS 18.1 |
β οΈ Note: If you are using Redmi 7 Chinese-made (MIUI China) global, be sure to check version compatibility.Switch from Android 9 Android 10/11 It may require an intermediate firmware due to anti-rollback protection.
Method 1: Firmware through Recovery (without unlocking the bootloader)
This is the safest method to use to update the current version of MIUI. It does not require unlocking the bootloader and saves user data (but better backup!).
- π Updates to the new version MIUI within a single branch (e.g., with MIUI 12.5 on MIUI 13).
- π Correcting bugs with official patches.
- π± Devices with locked loader.
Step-by-step:
- Download the firmware file in.zip format (for example, miui_ONCGlobal_V12.5.1.0.QFLMIXM_...).
- Rename the file to update.zip and move it to the root of the phoneβs internal memory.
- Turn off the phone, then press Volume Up + Power to enter Recovery.
- Select the language (if you have a choice), then go to Install update.zip to System.
- Confirm the installation and wait for completion (5-10 minutes).
- After the reboot, check the version in Settings β About the phone.
SHOWS official ZIP-file for Redmi 7 (onc)
The file is renamed to update.zip and is located at the root of the memory.
Battery Charge > 60%
Backup of important data is made-->
β οΈ Warning: If the phone is stuck on the Mi logo after the firmware, wait 15-20 minutes. If it doesn't work, go through Fastboot (method 2).
This method is not suitable for:
- β Transition from MIUI China MIUI Global (unblocking required).
- β Installation of custom firmware (required) TWRP).
- β downhreid MIUI (It can be used as an anti-rollback).
Method 2: Fastboot (Mi Flash Tool)
This method is suitable for complete flashing of the device, including recovery from the brick. It requires an unlocked bootloader and a PC with installed Xiaomi drivers.
- π§ Ability to stream any version MIUI (including downgrade with caution).
- π‘ Recovery of the phone after a failed firmware.
- π¦ Installation of a βcleanβ system without residues of the previous firmware.
What you need:
- π» Windows PC (7/10/11).
- π Cable USB Type-C (original or quality).
- π The Mi Flash Tool.
- π Firmware in.tgz format (unpack it into a folder).
Instructions:
- Install the Mi Flash Tool and Xiaomi drivers (if the phone is not identified, use this driver pack).
- Turn off Redmi 7 and press Volume Down + Power to enter Fastboot (the rabbit logo in the cap).
- Connect your phone to your PC. In the Mi Flash Tool, press Select and specify the folder with the unpacked firmware.
- At the bottom, select firmware mode: Clean all β complete cleaning (recommended). Clean all and lock β cleaning + lock bootloader (only for official firmware!), Save user data β data storage (risky).
Flash
What to do if the Mi Flash Tool gives an error called "invalid image"
Possible errors and solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| anti-rollback check fail | Downgrade attempt on older version of MIUI | Sweep through the intermediate version or look for firmware with the anti-rollback disabled |
| device not found | Drivers are not installed or the cable is faulty | Reinstall the driver, try another one. USB-port |
| flash not done | Incompatible firmware or a corrupted file | Check the firmware version and the integrity of the archive |
Method 3: Install custom firmware through TWRP
Custom firmware (like LineageOS or Pixel Experience) gives Redmi 7 a new lease of life: up-to-date Android 12/13, no ads in MIUI, and advanced customizations.
- π Unlocked loader (see section below).
- π Established TWRP Recovery.
- π§ Understanding the risks (possible loss) IMEI, camera trouble).
Step-by-step:
- Unlock the bootloader (instructions in the next section).
- Install TWRP via Fastboot: fastboot flash recovery twrp-3.7.0-onc.img fastboot boot twrp-3.7.0-onc.img
- In TWRP, make a persist partition backup (important for saving IMEI!).
- Sweep through custom firmware: Erase the Dalvik, Cache, System, Data (except Internal Storage) partitions. Install ZIP-firmware file (e.g, lineage-18.1-20230510-onc.zip). Please use GApps (if you need Google services).
Reboot. The first launch can take 10 to 15 minutes.
π‘
Before installing custom firmware, check on the XDA forum to see if there are any bugs with the camera or mobile network. For example, some Pixel Experience builds for Redmi 7 do not have a wide-angle module.
Typical problems after installing custom firmware:
- πΆ No network: check it out IMEI (If lost, restore it through the backup persist).
- π· Camera not working: install the ANXCamera patch or check firmware compatibility.
- π Fast discharge: Calibrate the battery (discharge to 0%, charge to 100% without interruption).
How to unlock the bootloader on Redmi 7
Without unlocking the bootloader, you wonβt be able to install TWRP or custom firmware. Xiaomi officially lets you unlock the bootloader, but the process requires a wait (usually 7-14 days).
Steps to unlock:
- Link your Mi Account to your phone: Go to Settings β Mi Account and log in. Enable Sync and Device Search.
- Download the Mi Unlock Tool.
- Enter Fastboot (Loudness Down + Nutrition).
- Connect your phone to your PC and start the Mi Unlock Tool.
- Press Unlock β the program will request confirmation via SMS.
- Wait 168 hours (7 days) and then repeat the process and the bootloader will be unlocked.
π‘
Unlocking the bootloader resets the phone to factory settings!
β οΈ Warning: If you see a "Couldn't unlock" error when unlocking, check: Mi Account is linked to your phone and confirmed by SMS. You use the original cable and port. USB 2.0 (not) USB The phone has debugging enabled. USB (Settings β For developers).
IMEI Recovery After Firmware
Losing IMEI is the most common problem when running Redmi 7 firmware via Fastboot or installing custom ROMs. Without IMEI, the phone doesn't catch the network, and you can restore it in two ways:
Method 1: Through the backup of the persist partition (recommended)
- If you have backups in TWRP, restore the persist partition.
- Restart your phone and check it. IMEI In Settings β The phone. β Status. SIM-map.
Method 2: Manual recovery via QCN (for experienced)
- Download the QCN Rebuilder utility.
- Find the original IMEI (on the box or in the check).
- Create an IMEI.qcn file and run it through the QPST or Mi Flash Tool.