The Xiaomi Mi 4, released in 2014, is still a popular device among enthusiasts and those looking for a reliable device for simple tasks or collecting. However, the standard Chinese version of firmware often does not meet the needs of users due to the lack of Russian, pre-installed Google services and excessive amounts of Chinese software.
The process of replacing the operating system requires care and preparation, since any manipulation of system partitions carries certain risks. You will need not only the firmware itself, but also specialized utilities, as well as an understanding of how the Fastboot mode works. In this material, we will discuss all the steps from unlocking the bootloader to the final configuration of the system.
It should be noted that official Xiaomi servers may not support the activation of the bootloader for such old models, so you often have to resort to third-party methods or use already unlocked devices. If you are ready to experiment, you can turn your gadget into a fully functional device with current security patches and a user-friendly interface.
Preparation for flashing: tools and files
Before any action is taken, you need to assemble all the necessary tools, without a quality USB cable and driver installed, the next steps will not be possible, and the computer must stably determine the device in different modes of operation, including the bootloader.
You'll need to download the firmware archive. For the Mi 4 (codename cancro), there are different versions: Global (world), China (Chinese), and various custom builds based on Android. It's important to choose a file with the.zip extension to update via Recovery or.tgz for firmware via Fastboot.
β οΈ Warning: Make sure you download the firmware specifically for Mi 4 (cancro). 4c, Mi 4i or Mi 4s It is not suitable and can cause irreversible damage to the system.
You also need to install the ADB and Fastboot platform on your computer, which is a basic command set that allows you to control your smartphone from the command line, and without that, the computer won't be able to send executive commands to the device.
- π± Original. USB-cable (preferably short for a stable signal).
- π» PC or laptop with Windows (most compatible environment).
- π At least 60% charge (to avoid turning off at critical time).
- π Backup of all important data (contacts, photos, messages).
After downloading all files, create a folder on the desktop with the name "Mi4_Flash" And put the firmware archive and executable files in there. ADB. This will simplify navigation and prevent path errors when typing commands.
Unlocking the bootloader (Bootloader)
Xiaomiβs factory bootloader is locked by default, which prohibits the installation of unofficial software and modified Recovery. For the Mi 4, this process has historically been easier than on new models, but still requires adherence to the algorithm. In some cases, older devices may need to use special utilities to force unlocking if the official method through the Mi Unlock Tool will give a compatibility error.
First, activate Developer Mode. Go to Settings β About Phone and click 7 times in a row on MIUI Version. Then a new Developer section will appear in the menu. Inside it, find Mi Unlock Status and turn it on, and activate USB debugging.
βοΈ Checking before unlocking
Then the smartphone is put into Fastboot mode by pressing the volume button when the device is turned off and connecting the cable. In this mode, a hare in headphones appears on the screen, fixing an android. Now you can run the unlock utility on your PC.
If the official servers do not accept the request from the old device, users often use the method of flashing the modified Recovery through an engineering cable or special scripts, however, this requires the presence of an already unlocked bootloader at some stage. For the Mi 4, a popular method is to use the miunlock utility with a swap version or use ready-made Recovery images with root rights.
β οΈ Attention: The unlocking process completely erases all data from the internal drive. Backup photos and documents to your computer or cloud in advance.
Installation of custom Recovery (TWRP)
stainless_recovery_ It allows you to install only signed official firmware. To install modified builds, patches and obtain superuser rights, you need to implement TWRP (Team Win Recovery Project: This modified recovery menu features touch controls and enhanced functionality.
The installation process is carried out via Fastboot. After connecting the smartphone in bootloader mode to the computer, open the command line in the folder with ADB. Enter the command to check the connection: fastboot devices. If the response displays a serial number, the connection is established correctly.
fastboot flash recovery twrp-3.x.x-x-cancro.img
fastboot boot twrp-3.x.x-x-cancro.imgThe second command, fastboot boot, runs Recovery once without writing it down, and it's a safe way to test the file's health, and if the TWRP menu is loaded and the sensor is responsive to touch, you can fix it permanently.
What happens if TWRP doesnβt start?
Inside TWRP, the first thing you should do is make a full backup of your current system (Boot, System, Data) that will roll back if you fail. Select Backup, mark the desired partitions, and swipe to start the process.
- π Download the current image TWRP for Mi 4 (cancro).
- π Connect your phone in Fastboot mode.
- π» Run the firmware command through ADB.
- β Check the touch screen in the Recovery menu.
The process of installing firmware through Recovery
After successful installation TWRP You can start to replace the operating system directly, and this is a method that's suitable for installation as the official Global System. ROM, and custom firmware (LineageOS, Resurrection Remix, etc.) The firmware file must be placed in the internal memory of the phone or on the phone. SD-map.
From the TWRP menu, go to the Wipe section. To install it clean, you need to format the Dalvik/ART Cache, System, Data, and Cache partitions. Do not format the Internal Storage partition if the firmware file is on the phone, or you will lose the installer.
Then select Install, search for the firmware archive, and confirm the swipe installation process, which takes 3 to 10 minutes, and displays ongoing operations such as partition mounting and file copying.
Once the installation is complete, the system will prompt you to clear the Dalvik cache. Agree, and then press Reboot System. The first run after flashing always lasts longer than usual - up to 5-7 minutes, as the application is optimized.
It is important to note that when you switch from one version of Android to another (for example, from Android 4.4 to Android 6.0), formatting the Data partition is a must to avoid cyclical restarts (bootloop).
Firmware via Fastboot (MiFlash method)
An alternative and deeper method is to use MiFlash and Fastboot (.tgz) firmware, which completely rewires partitions and returns the device to factory status, like new from the box, and is often used to recover from critical errors or change the region of the device.
Unpack the firmware archive in the root of the C disk so that the path is Cyrillic-free and short. Launch MiFlash on behalf of the administrator. Press Refresh; if the drivers are installed correctly, the device with its serial number will appear in the list.
| Parameter | Description | Recommendation |
|---|---|---|
| Firmware mode | Choice of action with data | clean_all (clean-up) |
| The path to files | Unpacked firmware directory | Without spaces and Russian letters |
| Driver. | Qualcomm/Android Bootloader | Must be installed in advance |
| Battery | Charge level | Minimum 50-60% |
At the bottom of the MiFlash window, select the option clean_all (Clean everything) for a guaranteed clean system. Press Flash. The process will take a few minutes, after which the status will change to "success", and the phone will automatically restart.
β οΈ Note: When using the Fastboot method via MiFlash, interruption of the process (cable disconnection, voltage surge) is highly likely to lead to a "bricking" of the device requiring a programmer to restore the device.
This method also allows you to change the region of the device (for example, from China to Global), as when you completely clean the system identifiers and settings of the base station change.
Possible errors and their solution
While flashing old devices like the Xiaomi Mi 4 can cause a variety of problems, understanding their nature can help quickly fix things without panic, and most often problems are related to drivers or file integrity.
If your computer doesnβt see your phone in Fastboot mode, check Windows Device Manager.The device can appear as βUnknown Deviceβ or "QHSUSB_BULK". In the first case, you need to update the driver manually, indicating the path to the folder with drivers ADB/Fastboot. The second is a problem with the cable or port. USB (Try the port USB 2.0 instead 3.0).
π‘
Use Windows Device Manager for diagnostics. If a new device appears on the list after connecting your phone in Fastboot mode, but the driver is not automatically installed, try finding the Android Bootloader Interface driver in the list of compatible devices.
Error 7 in MiFlash usually means the firmware cannot be written due to a bootloader lock or version mismatch.Make sure the bootloader is unlocked.The "Anti-rollback" error is less common on the Mi 4, but means trying to install an older version of Android than the current bootloader allows.
If the phone goes into an endless bootloop after installing the firmware, try logging back in to Recovery and doing Wipe Data/Factory Reset. If that doesn't help, maybe the firmware file is downloaded with errors - check the checksum (CRC) of the archive.
- β The "Can't mount" error /system": File system damaged. Solution: Wipe β Advanced Wipe β Repair File System.
- β Status 7 error: Incompatibility of Recovery and firmware.Update TWRP last-minute.
- β Black screen: Press the power and volume button (+) on 10-15 second-on-seconds.
π‘
Most of the errors in the flashing Xiaomi Mi 4 solved by re-checking the integrity of the firmware file and using the original USB-Don't panic if the first attempt fails.