Xiaomi Redmi 4X firmware via MiFlash is one of the most reliable ways to bring a smartphone back to life if it stops loading, slows down or requires an upgrade to the current version of MIUI. This method is suitable for both restoring bricks and installing custom firmware after unlocking the bootloader. However, the process has nuances, from choosing the right version of the Fastboot firmware to working with drivers and EDL mode.
Unlike the Recovery update, the firmware through MiFlash completely overwrites the system partition, which guarantees a clean installation without traces of the previous software. An error at any stage can lead to the inability to recover without service equipment, especially if we are talking about models with a locked bootloader. In this article, we will discuss the entire process from A to Z, including driver preparation, unlocking Bootloader and solving typical errors such as: flash_all_lock.bat or anti-rollback.
1. Firmware Preparation: What to Do Before Starting
Before you connect the Redmi 4X to your computer, make sure all the preliminary steps are followed. Neglect of preparation is the main reason for the "bricking" of devices.
First, check the bootloader version of your smartphone. To do this, go to Settings β About Phone β MIUI Version and tap 7 times on the kernel version bar to activate the hidden menu. In it, select Hardware info and find Bootloader. If Locked status, the firmware through MiFlash is only possible after official unlocking through the Mi Unlock Tool.
- π Battery charge at least 60 percent. Fastboot runs a lot of power, and a sudden shutdown will cause a crash.
- π» Computer on Windows 7/10/11 (64-bit On macOS or Linux, MiFlash does not work consistently.
- π Original. USB-Cheap cables often don't transmit data in Fastboot mode.
- π₯ Backup data. MiFlash firmware erases everything, including photos and contacts.
Pay special attention to drivers. Xiaomi requires the installation of Mi USB Driver and Qualcomm HS-USB QDLoader 9008 (for EDL mode). Without them, the computer will not recognize the device in firmware mode. You can download drivers from the official Xiaomi website or through the Mi Developer Portal.
2. Select firmware: which version of MIUI to download for Redmi 4X
Redmi 4X (codenamed santoni) supports several types of firmware, and choosing the wrong version can lead to an anti-rollback error or total loss of functionality.
- π Stable. MIUI β official firmware with minimal bugs, suitable for everyday use.
- π§ͺ Developer (weekly) β test builds with new features, but errors are possible.
- π Global vs China. For Russian users, it is better to choose Global (support for Google services). China requires manual installation of GApps.
- π Fastboot vs Recovery. MiFlash requires a Fastboot version (a file with the.tgz or.zip extension that contains scripts). flash_all.bat).
You should download firmware only from official sources:
- The official MIUI website (select the Redmi 4X section).
- Xiaomi Firmware Updater (alternative source with archive of old versions)
| Type of firmware | Download link | Features |
|---|---|---|
| MIUI Global Stable | Official website | Support for Google services, updates every 1-2 months |
| MIUI China Stable | Official website | Without Google services, updates are more common than in the Global |
| MIUI Developer | Xiaomi Firmware Updater | Weekly updates, possible bugs |
| Custom firmware | XDA Developers | Requires an unlocked bootloader and TWRP |
β οΈ Note: If your device was purchased in China and previously operated on China ROM, firmware Global ROM It may lead to problems with IMEI In this case, install China Stable first, and then switch to Global via fastboot.
π‘
Before downloading the firmware, check the version on MIUI Anti-Rollback. Installing an older version than the current one will lock the device!
3. Unlocking the bootloader: a mandatory step before the firmware
If your Redmi 4X has a locked bootloader (which is typical for most devices purchased officially), you canβt flash it through MiFlash without first unlocking. Xiaomi requires confirmation of your Mi Account account and waiting 72-360 hours after you peg the device.
The unlocking process:
- Link Mi Account to your device: Settings β Mi Account β Add an account.
- Activate USB debugging and OEM unlocking: Settings β About Phone β MIUI version (shoot 7 times), then Additional β For Developers.
- Download Mi Unlock Tool and log in to the program.
- Transfer the phone to Fastboot mode (press Power + Volume Reduction) and connect to the PC.
- In Mi Unlock Tool, press Unlock and wait until it is completed (it may take several attempts).
β οΈ Note: After unlocking the bootloader, all data will be reset, and the warranty (if any) will be canceled.
What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
4. Installation of MiFlash and drivers: step-by-step instructions
To run the Redmi 4X through MiFlash, you will need:
- Download MiFlash latest version (at the time of 2026, the current MiFlash20200314).
- Install Mi USB Driver (included in the MiFlash or downloaded separately).
- Install the Qualcomm HS-USB QDLoader 9008 driver for EDL mode (if you plan to stitch through it).
After installing MiFlash:
- Unpack the downloaded firmware (.tgz or.zip) into a folder without Cyrillic characters (for example, C:\MIUI\santoni_global).
- Run MiFlash on behalf of the administrator.
- Click Select and point the way to the firmware folder.
- In the drop-down menu, select the firmware mode: clean_all β complete cleaning (recommended for changing the firmware region). clean_all_lock β cleaning + Loader lock (only for official firmware!). save_user_data β User data storage (not always stable).
β οΈ Note: If you are flashing custom firmware (e.g. Pixel Experience), never use it. clean_all_lock β This will block the bootloader and make the device inoperable without EDL-firmware.
βοΈ Preparing MiFlash for work
5.The firmware process: from Fastboot to successful download
When everything is ready, we start to work on the firmware:
- Fastboot: Turn off your phone. Shut down Power + Volume down for 10 seconds. Connect to your PC, and you'll see a hare in a Fastboot hat.
- MiFlash Connection: In MiFlash, Press Refresh β Devices should appear in the list COM-If the device is not identified, check the drivers or try another one. USB-port (preferably) USB 2.0).
Firmware launch:
- Press Flash and wait until it is completed (usually 5-10 minutes).
- At the end of the log, Flash Done will appear, and the phone will automatically restart.
If the firmware is hanging on Waiting for device:
- π Reconnect. USB-cable.
- π₯οΈ Try another one. USB-port (better on the back of the PC).
- π§ Reinstall drivers manually through Device Manager.
- π± Put the phone in mode. EDL (see next section).
β οΈ Note: If after firmware the phone is stuck on the logo MI longer than 15 minutes, this is a sign of firmware incompatibility or an anti-rollback error. EDL Using Mi Flash Pro or QFil.
π‘
Always check the firmware of the device model (santoni) and its version (e.g. V12.5.1.0). Installing the firmware from Redmi 4/4A will lead to the brood!
6. Firmware through EDL: if the Fastboot doesn't work
EDL (Emergency Download Mode) is the last chance to bring the Redmi 4X back to life if it is not detected in Fastboot or the firmware through MiFlash ends in error.
- π Testpoint (closing contacts on the board) or Deep Flash Cable (special cable with resistor).
- π» Mi Flash Pro or QFil (for firmware via Qualcomm).
- π Firmware in.mbn or firehose format (can be found on Xiaomi Firmware Updater).
Instructions for EDL:
- Turn off the phone.
- Close the testpoint (contacts under the back cover, next to the battery) or use the Deep Flash Cable.
- Connect your phone to your PC β Qualcomm HS-USB QDLoader 9008 should appear in Device Manager.
- In Mi Flash Pro, select firmware and press Flash.
β οΈ Attention: Firmware through EDL If you don't have a testpoint or a cable, you can completely fail your device.
7.Typical errors and their solutions
Even with the correct instructions, errors can occur, and here are the most common ways to correct them:
| Mistake. | Reason. | Decision |
|---|---|---|
| flash_all_lock.bat failed | Attempt to block the loader on the custom firmware | Use it. clean_all instead clean_all_lock |
| anti-rollback check fail | Trying to install an older version of MIUI | Switch a newer firmware or the same version |
| Waiting for device | Drivers not installed or USB-port is not | Reinstall drivers, try another port/cable |
| Invalid sparse file format at header | Firmware file damaged | Download the firmware again and check the checksum |
| The phone does not turn on after the firmware | Incompatible firmware or anti-rollback error | Sweep through the EDL official firmware |
If none of these methods worked, try:
- π Switch another version MIUI (For example, from China to Global).
- π§ Use Mi Flash Pro instead of the standard MiFlash.
- π± Contact the Xiaomi service center (if the device is guaranteed).