Smartphone Redmi 5, released by Xiaomi at the end of 2017, still remains a popular device due to its reliability and affordable price. However, over time, the standard shell MIUI may become unstable, accumulate errors, or simply stop receiving official security updates. In such situations, the only correct solution is to completely flash the device. This allows you to return your phone to factory speed, get rid of viruses, or even install a more recent version of Android if official support has already been discontinued.
The process of installing new software requires care and strict adherence to the algorithm of actions. Any deviation from the instructions, especially at the stage of working with the bootloader or file system, can lead to the smartphone turning into a โbrickโ. However, fear of the procedure is often exaggerated: modern tools for working with Xiaomi make this process as transparent as possible even for beginners. The main thing is to prepare all the necessary files and tools in advance so as not to look for them in a panic in the middle of a critical stage.
In this article we will analyze in detail all the available methods for updating the system on your gadget. We will consider both the safe method through the built-in menu, and more advanced options using a PC and mode Fastboot. You will learn how to unlock the bootloader, install custom recovery TWRP and what to do if the phone stops turning on after an unsuccessful attempt. The information is structured so that you can choose the appropriate level of complexity for your specific situation.
Preparing the device and choosing a firmware method
Before starting any manipulations with the system partition, it is necessary to carry out thorough preparation. This is the foundation of the entire process, ignoring which leads to data loss or breakdown. First of all, you need to understand what type of firmware you need. There are two main ways: an over-the-air (OTA) update to fix minor bugs, and a complete clean installation of the system image via a computer for deep cleaning or recovery.
Be sure to back up all important data. With a complete flashing, the internal memory will be completely cleared. Use cloud services Google Drive or the built-in function Mi Cloud to save contacts, photos and messages. Also check the battery charge level: it should be at least 60-70%. If the phone turns off while writing data to the flash memory, the file system structure may be damaged irrevocably.
โ ๏ธ Attention: Make sure that your device model exactly matches the firmware type. An attempt to install an image from Redmi 5 Plus to a regular Redmi 5 (or vice versa) is guaranteed to damage the device, since they have different processors and wiring diagrams.
You will need a high-quality USB cable, preferably original or certified. Cheap cables often provide only charging, but do not transfer data with the required speed and stability, which will lead to a transmission error at the most inopportune moment. Connect the device directly to the motherboard ports on the back of the computer, avoiding using USB hubs or front ports of the case.
Unlocking the bootloader: a mandatory step
To install custom recovery or unofficial firmware, you need to unlock the bootloader (Bootloader). By default, it is locked by the manufacturer for security purposes, which prevents third-party tools from writing to system partitions. The unlocking procedure on devices Xiaomi is official, but it requires time and account linking.
First activate developer mode. Go to Settings โ About phone and quickly click on the item MIUI version seven times until the notification โYou have become a developerโ appears. Then go to Settings โ Advanced settings โ For developers. Here you need to activate the switch Factory unlocking and link your current Mi account to the device. The system will warn you about the risks - agree.
After linking your account, you will have to wait. Typically the waiting period is from 3 to 7 days (168 hours). This is a security measure against device theft. After this period, download the official utility Mi Unlock Tool to your computer. Boot your phone into Fastboot mode by holding down the volume down button and connecting the cable to the PC. In the app, log in under the same Mi account and click the โUnlockโ button.
- ๐ The unlocking process will completely delete all data from the internal memory of the smartphone.
- โณ The waiting period may vary, sometimes it reaches 15 days for new accounts.
- ๐ก After successful unlocking, an icon will be displayed on the loading screen open lock.
Do not try to bypass the wait timer using third-party paid services - this often leads to permanent blocking of your Mi account. Itโs easier to wait for the period set by the manufacturer.
Installing TWRP Recovery via Fastboot
The standard recovery menu (Stock Recovery) has limited functionality and allows you to install only signed official firmware. For complete freedom of action, you need to install a custom recovery, the most popular of which is TWRP (Team Win Recovery Project). It allows you to create full backups (Nandroid), install zip archives with firmware and obtain superuser rights.
For installation you will need ADB and Fastboot drivers installed on the computer, as well as the image file itself twrp.imgdownloaded specifically for the model Redmi 5 (code name rosy). Place the image file in your ADB tools folder. Put your smartphone into Fastboot mode (Volume Down button + Power button). Connect the phone to the PC and open the command line in the tools folder.
Enter the command to check the connection:
fastboot devices
If you see the device serial number in response, the connection is established correctly. Now enter the command to temporarily download the recovery:
fastboot boot twrp.img
The phone will reboot into the TWRP menu. Immediately after loading the system, swipe to confirm permission to change system files. Now, being in the TWRP environment, you can flash the image permanently through the Install menu, selecting the image file and swiping to confirm, or use the command fastboot flash recovery twrp.imgif you want to burn it right away.
โ ๏ธ Attention: If after a reboot you again see the standard MIUI Recovery menu instead of TWRP, it means that the system has automatically replaced it with the stock one. This happens on first boot. To avoid this, immediately after flashing TWRP, reboot into Recovery mode without loading the main system.
What to do if the computer does not see the phone in Fastboot?
Most often the problem lies in missing drivers. Go to Windows Device Manager. If you see a device with an exclamation mark (often Xiaomi Android Bootloader Interface), right-click โ Update driver โ Select driver from the list of available drivers on your computer โ Select โUSB Deviceโ or manually specify the path to the ADB drivers folder. Also try a different USB port or cable.
Step-by-step installation of firmware via Recovery
The most universal and safest way to install a new system is to use the recovery menu. This method does not require a constant connection to the computer during the recording process itself, which reduces the risks associated with cable breaks. You will need a firmware file in the format .zip. Important: this must be a Recovery firmware (often has the word โRecoveryโ in the name), and not a Fastboot firmware (which consists of many files and an .img image).
Copy the downloaded archive with the firmware to the phoneโs internal memory or to an SD card. If you are using TWRP, boot into it. In the main menu, select Wipe (Cleaning), then Advanced Wipe. Check the boxes Dalvik / ART Cache, Cache, System and Data. Do not touch the partition Internal Storage, otherwise delete the firmware file itself. Swipe to clean.
After cleaning, return to the main menu and select Install. Locate the firmware file you copied earlier. Before installation, TWRP has a useful option Wipe after Installthat can be activated to ensure the system is clean. Start the installation by swiping at the bottom of the screen. The process will take from 5 to 15 minutes depending on the memory speed and data volume.
| Partition | Purpose | Need to be cleaned? |
|---|---|---|
| System | Contains operating system files | Yes (required) |
| Data | User data and applications | Yes (for a clean installation) |
| Cache | Temporary system files | Yes (recommended) |
| Dalvik | Application optimization cache | Yes (automatically) |
| Internal Storage | Photos, music, firmware files | No (categorically) |
โ๏ธ Checklist before installation
Firmware via Fastboot using MiFlash
Usage method utilities MiFlash is an official tool of Xiaomi service centers. It allows you to install the firmware in Fastboot (unpacked archive) format, which guarantees the cleanest possible installation of all partitions, including the modem and bootloader. This method is often used when the phone is โbrickedโ and does not boot into the system, but responds to the power button.
Download the Fastboot firmware archive (usually has a .tgz extension) and unpack it to drive C so that the path to the folder does not contain Cyrillic characters and spaces. Run MiFlash as administrator. Connect your phone in Fastboot mode. Click the button Refresh in the app - the device should be detected and display its COM port.
At the bottom of the MiFlash window there are three firmware modes:
- ๐ clean all: Complete data clearing and installation of a new system (recommended).
- ๐พ save user data: Installing the system while saving user settings files (may cause conflicts).
- โก clean all and lock: Cleaning, installing and re-locking the bootloader (use only with the original global firmware!).
Select mode clean all, specify the path to the unpacked folder with the firmware and press Flash. The progress bar will show the progress status. Once completed, the phone will automatically reboot. The first boot may take up to 10 minutes as the system optimizes applications.
โ ๏ธ Attention: Never select the mode
clean all and lockif you are installing custom firmware or firmware from another region (for example, Chinese to Global). This will lead to a hard lock of the device (Hard Brick), which can only be removed through an authorized service center with paid unlocking.
Using MiFlash is the most reliable way to restore your phone after serious failures, but it requires care when choosing the bootloader lock mode.
Possible errors and ways to eliminate them
Even if you strictly follow the instructions, unforeseen situations may arise. One of the most common problems is an error Error 7 when installing via Recovery. It means incompatible Android version or signature verification. In TWRP, this check can be disabled, but itโs easier to download the correct firmware version, designed specifically for your current security level.
If the phone is stuck on the logo MI (bootloop), try entering Recovery and doing Wipe Data / Factory Reset. If this does not help, the partition may be damaged and a flashing via Fastboot will be required. In the case when the phone shows no signs of life at all (black screen, no response to buttons), try holding the power and volume buttons for more than 20 seconds to force a reboot or enter EDL mode (disassembling the case is required to close the contacts). System, and will require flashing via Fastboot. If the phone shows no signs of life at all (black screen, no response to buttons), try holding the power and volume buttons for more than 20 seconds to force a reboot or enter EDL mode (disassembling the case is required to close the contacts).
Also, users often encounter the problem of no network after flashing. This is due to the fact that the section Modem or EFSwas erased. If you had a backup of the EFS partition, restore it via TWRP. If not, you will need to search and install a stock image of the modem for your specific firmware version.
Why does the fingerprint not work after the firmware?
On Redmi 5, the fingerprint sensor is closely linked to the bootloader and security section. If you switched from Chinese firmware to global firmware without completely cleaning it or unlocked the bootloader, the sensor may not work properly. Try deleting old fingerprints in the settings and adding them again. In rare cases, flashing the stock boot.img image helps.
Frequently asked questions (FAQ)
Is it possible to flash Redmi 5 on Android 10 or 11 if support officially ended on MIUI 11?
Yes, this is possible, but only by installing custom ones firmware (Custom ROM), such as LineageOS, Pixel Experience or Xiaomi.eu. Xiaomi does not officially release updates above Android 9 for this model. Custom firmware allows you to get the latest Android, but may have minor bugs in the camera or NFC.
Is it safe to unlock the bootloader? Will I void my warranty?
Unlocking the bootloader is officially allowed by Xiaomi, but it will void the warranty of the device. In addition, some banking applications (Google Pay, Sberbank) may refuse to work on an unlocked device due to security violations, although this problem can often be circumvented using Magisk Hide.
What is the difference between Global Stable and China Stable firmware?
Global Stable is designed for the international market, has built-in Google services, Russian language and the necessary communication frequencies (Band 20). China Stable is focused on the Chinese domestic market, does not have Google services out of the box, contains a lot of Chinese software and may not support some European LTE frequencies.
What to do if MiFlash gives the error "Flash Error" or "Miss matching image and phone"?
This error means that you are trying to flash the firmware from another model or are using an old version MiFlash for new firmware. Make sure that the image is downloaded specifically for Redmi 5 (rosy). Also try updating the Qualcomm drivers or running the app as an administrator.
Do you need to charge the phone while flashing the firmware via Fastboot?
It is advisable that the charge be above 50%. Although the phone receives power when connected to a PC, the current from the computer's USB port may not be sufficient to support simultaneous charging and intensive data recording. It is better to leave the phone connected to the network during the process.