Xiaomi Redmi 5, released in late 2017, is still a popular device in the budget segment. However, time is spared software: official support is discontinued, and current versions of Android have ceased to come โover the airโ.
Fastboot is one of the most reliable ways to reprogram a device, allowing you to work with memory partitions at a low level, bypassing a damaged operating system, and if your phone is โburstโ or you want to completely clean up the accumulated garbage, this is the best solution.
In this guide, we will discuss in detail the process of preparing, installing the necessary components and the procedure for recording the system image itself. Attention: any manipulation of the bootloader and system partitions carries risks. Clear adherence to the instructions minimizes the likelihood of errors, but requires your attention to every detail.
Preparation of the workplace and necessary tools
You need a Windows computer (preferably version 7, 8 or 10) before you start any action, as most utilities are sharpened for this platform, and make sure that the USB cable you plan to use is functional and capable of transmitting data, not just charging the device.
The key element is the presence of an original or high-quality copy of the firmware. For the Redmi 5 model (codename rosie), it is important not to confuse the version, since there are modifications for different regions. The firmware file must have the.tgz extension and be unpacked into the disk root or a convenient folder on the computer.
- ๐ Original. USB-cable or certified analogue with data transmission support.
- ๐ป Computer or laptop with Windows operating system installed.
- ๐ Charge of the smartphone at least 60% to avoid sudden shutdown.
- ๐ Downloaded and unpacked Fastboot firmware for Redmi 5.
โ ๏ธ Attention: Use of damaged equipment USB-A cable or unreliable port can cause data recording to be interrupted, turning the phone into a "brick." Connect the device directly to ports on the motherboard, avoiding USB-hub.
You also need ADB and Fastboot Tools, which are a set of drivers and executable files that allow a computer to communicate with a phone in bootloader mode, and without this software bridge, the command from the computer simply won't be understood by the smartphone.
Installation of drivers and utilities MiFlash
In Windows 10 and 11, the basic drivers can be installed automatically, but Fastboot mode often requires additional components from Qualcomm or Xiaomi.
The most convenient tool for firmware is the official Xiaomi Mi Flash Tool. It has a graphical interface, which simplifies the process of choosing a path to files and launching the procedure. Download the latest stable version of the utility from an official resource or a trusted source.
The process of installing drivers can be performed manually through the โDevice Managerโ or use the built-in installer as part of the Mi Flash Tool. When connecting the phone in Fastboot mode, a device called Android Bootloader Interface or the same, without exclamation points should appear in the Device Manager.
โ๏ธ Firmware readiness check
If the system canโt see the device, try installing Qualcomm HS-USB QDLoader drivers. Sometimes Windows blocks the installation of unsigned drivers, so you may need to temporarily disable the driver signature verification through system boot options.
Unlocking the bootloader: the critical stage
Before you write a new firmware through Fastboot, you need to check the status of the bootloader.Most Xiaomi devices come with a locked bootloader, which prohibits the installation of unofficial software or custom recavators, but often allows firmware re-flashing official methods.
To completely reflash the data, or change the region (for example, from China to Global), the bootloader must be unlocked. The official procedure requires submitting an application on the Mi Unlock website, linking the Mi Account in the phone settings and waiting for 7 to 168 hours.
The process of unlocking is as follows: you plug your phone into Fastboot mode, launch the Mi Unlock utility on your PC, log in to your account and press the unlock button, and once successfully completed, the phone will be completely clear of user data.
What to do if the loader is not unlocked?
There is a concept called Deep Cleaning, which is only possible when the bootloader is unlocked, and if you try to flash a device with a locked bootloader using a partition clean command, the process will end in error or the phone will go into an endless reboot.
Step-by-step instructions for firmware through the Mi Flash Tool
After all the components are ready, you can proceed to the direct firmware process. Make sure the firmware folder is unpacked and the path to it does not contain Cyrillic symbols or spaces to avoid path-reading errors.
Launch the Mi Flash Tool on behalf of the administrator. Press the Select button and specify the path to the folder with the unpacked firmware. The address bar should show the path to the image file, not the archive.
Put your smartphone in Fastboot mode. To do this, turn off the device completely, and then press the volume button and, holding it, connect it. USB-You're going to see a hare in a hat, a corn-fish repairing an android, or a sign that says, FASTBOOT.
- ๐ Press the Refresh button in the program to detect the connected device.
- ๐ Make sure that a device with a serial number appears in the list.
- ๐งน In the lower right corner, select Clean All mode for complete data cleanup.
- ๐ Press the Flash button to start the recording process.
The firmware process will take 200 to 500 seconds, during which time it is strictly forbidden to turn off the cable or interrupt the program, and the progress indicator will be filled in, displaying the current stage of writing partitions.
๐ก
Clean all mode completely deletes all user data, so make sure to back up important files and contacts before you firmware.
Manual firmware through the command line
For power users or when the Mi Flash Tool GUI is failing, an alternative method is to use the Windows Command Prompt, which gives you complete control over the process and allows you to see detailed error logs.
Open the folder with the unpacked firmware. There's often a script inside. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac). Running this file will automatically execute all the necessary commands sequentially.
If you don't have an automatic script, you can run manual commands. Open the command line in the Fastboot tool folder. Enter the link check command:
fastboot devicesIf you receive a serial number in response, the connection is established, followed by a data cleanup command, which is critical when changing the software version:
fastboot erase userdataThen you start the firmware process for all partitions. Depending on the firmware structure, it can be a single command or a sequence of commands for each partition (boot, system, recovery, etc.). flash_all.bat It already contains all the necessary commands.
โ ๏ธ Note: The fastboot oem unlock or fastboot flashing unlock command also completely cleans the device. Do not use it if you want to save data, since file recovery after this is impossible without a pre-created backup.
Possible errors and methods of their elimination
There are various bugs that can occur in the firmware process, each with its own code and cause, and understanding the nature of the bug helps you quickly find a solution and not panic.
One of the most common problems is the Miss matching image and device error, which means that you are trying to flash the firmware designed for another model or region, or the bootloader version does not match the firmware version.
Table of common errors and their solutions:
| Code/Error text | Probable cause | Decision |
|---|---|---|
| Miss matching image | Model inconsistency | Check the code name (rosie) of the firmware |
| Can not find device | Problems with the driver | Reinstall the drivers, change the drivers. USB-port |
| Error: 0x80070005 | No access rights. | Run Mi Flash on behalf of the administrator |
| Waiting for device | Phone's not on Fastboot. | Reconnect the cable by pressing the volume button |
Another common problem is hanging out at the โWritingpersistโ or โWritingmodemโ stage, which often indicates poor cable contact or unstable power supply. USB-Try using a different cable or connecting your computer to another power source.
If the firmware process is interrupted in the middle, don't panic. Try repeating the procedure by selecting Clean all mode. If the phone stops responding to Fastboot commands, you may need to enter EDL (Emergency Download Mode) mode, which requires disassembling the device or a special cable.