Xiaomi firmware via EDL: a complete guide with unlock and restore

EDL (Emergency Download Mode) is a hidden service mode of Xiaomi smartphones that allows you to flash the device even when the system is completely down. It is often called the β€œlast hope” when the phone does not turn on, hovers on the Mi logo or after a failed update turned into a β€œbrick.” Unlike the standard Fastboot, EDL mode works at the hardware level, making it indispensable for recovering devices with damaged firmware or a locked bootloader.

However, working with EDL requires caution: wrong actions can permanently disable a smartphone or lead to the loss of IMEI. In this article, we will discuss the only officially supported way to log into EDL without physically damaging the phone (through testpoints), as well as alternative methods for devices with an unlocked bootloader. You will learn how to prepare a PC, where to download the right firmware, and how to avoid typical firmware errors when you use MiFlash or QFil.

What is an EDL mode and when is it needed

EDL (Emergency Download Mode) is a low-level firmware mode that is activated on Qualcomm chips (used in most Xiaomi, Redmi and POCO smartphones) that allows you to download the firmware directly into the device’s memory, bypassing the operating system and bootloader.

  • πŸ”„ The device got stuck in the bootloop (cyclic reboot on the Mi logo)
  • 🚫 The screen does not respond to touch, but the phone is defined by the PC as Qualcomm HS-USB QDLoader 9008
  • πŸ”“ The bootloader is locked and the standard methods of unlocking (fastboot oem unlock) do not work.
  • πŸ“± Firmware damaged after failed update via MIUI Updater or custom Recovery
  • πŸ”§ You need to roll back MIUI to an older version (downgrade)

It’s important to understand that EDL is not a universal solution, for example, it won’t help if the problem is in the hardware (damaged motherboard, oxidized battery contacts). Also, EDL doesn’t work on devices with Mediatek chips (which uses BROM Mode), so check your smartphone’s processor through Settings β†’ About Phone β†’ Kernel Version before you start.

⚠️ Warning: Firmware via EDL resets all data on the device, including photos, contacts and apps. If the phone is still on, back up via Settings β†’ Additional β†’ Backup and Reset.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note 12/13
POCO X5/X6
Mi 11/12/13
Redmi 10/9 Series Series
Other

Preparation for firmware: what will be needed

Before you start firmware, make sure you have everything you need, and even one of the components that you don't have can lead to bugs or bad firmware.

  • πŸ’» Windows PC 7/10/11 (64-bit required). On MacOS or Linux, firmware via EDL is possible, but requires additional drivers and often leads to errors.
  • πŸ”Œ Original. USB-cable (preferably from the kit) cheap cables may not provide stable connection.
  • πŸ“± Battery charge at least 30 percent. If the phone runs out during firmware, it can cause a total loss of performance.
  • πŸ”“ Unlocked bootloader (if you are flashing unofficial firmware). Unlocking is not always mandatory for official firmware via MiFlash.
  • πŸ“ Firmware in.tgz or.zip format (more about the choice in the next section).

Programmes will also be required:

  1. MiFlash Tool (official tool from Xiaomi for firmware in EDL mode)
  2. QFil (Qualcomm Flash Image Loader) – an alternative for devices that are not defined in MiFlash
  3. Qualcomm HS-USB QDLoader 9008 drivers (set automatically when you connect your phone in EDL mode)

β˜‘οΈ Checklist before firmware

Done: 0 / 5

How to Get Into EDL Mode on Xiaomi

There are three main ways to activate EDL on Xiaomi smartphones, and the choice of method depends on the state of the device:

1. Through a button combination (for working devices)

If the phone is turned on but you need to flash it through EDL (for example, for a downgrade), follow the following steps:

  1. Turn off your smartphone.
  2. Press the buttons Volume up + Volume down + Power at the same time.
  3. Hold them for 10-15 seconds until the screen goes out (the phone won’t turn on).
  4. Connect the USB- cable to a PC. The device should be identified as Qualcomm HS-USB QDLoader 9008.

2. via ADB (for devices with unlocked bootloader)

If you have access to ADB (for example, through Platform Tools), follow the command:

adb reboot edl

The phone will automatically reboot to EDL mode.

3. Through test points (for "bricks")

If the phone doesn't respond to buttons and is not detected by the PC, you'll need to close the test points on the motherboard, which is the riskiest method, because it requires disassembling the device.

  1. Remove the back cover of the phone (need a mediator or plastic spatula).
  2. Find testpoints – usually two metal pads labeled EDL or TEST POINT (location depends on the model).
  3. Lock them with tweezers or wires on the 2-3 seconds, while connecting the USB- cable to the PC.
Where to find test points for your model?
For each Xiaomi model, the location of testpoints is different. For example, on the Redmi Note 10 Pro, they are under the battery next to the connector for the screen plume, and on the POCO X3 Pro is next to the camera. Search the forums for exact diagrams. 4PDA or XDA Developers on request "[model phone] EDL test point".

⚠️ Warning: Closing the test points on the phone on may result in a short circuit. Always turn off the battery before the procedure (if possible).

Selection of firmware for EDL: official vs custom

The success of the entire procedure depends on the right firmware choice. Only certain types of files are suitable for EDL mode:

Type of firmwareFormatWhere to downloadIs it EDL-suited?Does it require unlocking?
Official (Fastboot).tgz, .zipOfficial Xiaomi websiteYes.No (but you may require authorization to your Mi Account)
Official (Recovery).zipOfficial websiteNo.β€”
Castomic (AOSP, LineageOS).img, .zipXDA Developers, 4PDAYes (only via QFil)Yes.
Stock (for downgrade).tgz4PDA ForumsYes.Yes (if downgraded)

For most users, the best choice is the official firmware in.tgz format. It contains all the necessary files for recovery through MiFlash and does not require unlocking the bootloader (if you are running the same version of MIUI that was installed earlier).

If you want to install custom firmware (like Pixel Experience or LineageOS), you will need to:

  • πŸ”“ Unlock the bootloader via fastboot oem unlock.
  • πŸ“₯ Download firmware in.img format for QFil.
  • ⚠️ Note that custom firmware may not support certain features (e.g., IR Blaster or NFC).

πŸ’‘

Before downloading the firmware, check out the firmware version on the MIUI Versions website. For example, for the Redmi Note 11 Pro+ 5G (codename veux), only firmware marked veux_global_images will work.

Step-by-step: firmware through MiFlash

If you have chosen the official firmware in.tgz format, follow this instruction. The process takes 5-10 minutes, but requires strict adherence to the steps.

Step 1: Installation of drivers

1. Connect the phone in EDL mode to the PC.

2. Open Device Manager (Win + X β†’ Device Manager).

3. In the Ports section (COM and LPT), the Qualcomm HS-USB QDLoader 9008 device should appear.

4. If the driver is not installed automatically, download it manually from the Qualcomm website or use the Zadig program to replace the driver with libusb.

Step 2: Set up MiFlash

1 Unpack the archive from MiFlash and launch XiaoMiFlash.exe on behalf of the administrator.

2. In the Select field, specify the path to the unpacked firmware (the folder must contain images and flash_all.bat files).

3. At the bottom of the window, select the firmware mode:

  • clean all – complete cleaning (recommended for the restoration of bricks)
  • Clean all and lock – Clean + lock the bootloader (use if you sell the phone)
  • Save user data – saving user data (not always used in EDL)

Step 3: Starting the firmware

1. Press Refresh – your phone should appear in the list of devices (e.g. COM4).

2. Press Flash and wait for the process to end (green success in the log).

3. Once complete, turn off the phone and turn it on with the power button.The first turn on can take up to 10 minutes.

- Correctness of the selected firmware (should correspond to the model code).

- USB- cable integrity (try another port).

- Disable the antivirus (it can block access to ports).-->

Firmware via QFil (for custom firmware)

If you install custom firmware or MiFlash can't see your device, use Qualcomm Flash Image Loader (QFil).This tool is more versatile, but requires manual firmware file specification.

Step 1: Preparing files

1 Unpack the firmware in.zip or.img format.

2. The folder must have a prog_emmc_firehose.mbn file (or similar to the.mbn extension). If it is not, the firmware is not suitable for QFil.

Step 2: Set up QFil

1. Launch QFil on behalf of the administrator.

2. Under Select Build Type, select Flat Build.

3 In the Programmer Path field, specify the path to the file prog_emmc_firehose.mbn.

4. In the Load XML section, download rawprogram.xml and patch.xml files (they should be in the firmware archive).

Step 3: Firmware

1. Connect the phone in EDL mode.

2.Push Download and wait until it is completed (the process can take up to 15 minutes).

3. After successful firmware, disable the device and reset via Recovery (Wipe Data).

⚠️ Warning: If QFil gives an error Sahara Communication Failed, it means that the phone is not recognized in EDL mode. Check the connection of testpoints or try another USB- cable.

Typical errors and their solutions

Even with the correct following of the instructions, errors can occur, and here are the most common ones and ways to fix them:

Mistake.Reason.Decision
Device not found in MiFlashDrivers not installed or phone not in EDL modeCheck Device Manager for Qualcomm HS-USB QDLoader 9008. Reinstall drivers via Zadig.
Flash write failureDamaged firmware or lack of memory spaceDownload the firmware again and check its checksum (MD5). Try a different mode in MiFlash (clean all).
Invalid image formatWrong firmware formatUse only.tgz for MiFlash or.mbn for QFil.
The phone does not turn on after the firmwareIncompatible firmware or interrupted processRepeat the firmware with the correct version of MIUI. If it doesn't work, check the test points.

If the phone turns on after firmware, but errors occur (for example, there is no network or the camera is not working), this may be due to:

  • πŸ“‘ Loss IMEI (recovered via QCN- file or Maui META).
  • πŸ”§ Wrong firmware version (e.g., stitched Global onto a Chinese model).
  • πŸ”“ Unlocked bootloader (for custom firmware).

FAQ: Answers to Frequent Questions

Can I flash Xiaomi through EDL without unlocking the bootloader?
Yes, but only official firmware via MiFlash. For custom firmware (like LineageOS), unlocking is mandatory. Also note that some new models (like Xiaomi 13 or Redmi Note 12) may require authorization to Mi Account even for official firmware.
The phone is not detected in EDL mode. What to do?
The problem could be: πŸ”Œ Faulty USB- cable or port (try another cable and port USB 2.0). πŸ”§ Testpoints are not closed (if the phone doesn't respond to buttons). πŸ–₯️ There are no drivers (installe them manually via Zadig). πŸ”‹ Battery is discharged (charge the phone to at least 30% before firmware).
IMEI's gone after the firmware. How do you restore it?
Loss IMEI is a common problem when you run through EDL. It can be recovered in two ways: via Maui META (requires a backup of QCN- file). Through the engineering menu: dial ##4636#, go to Phone Information and type IMEI manually (if it's saved on the box). ⚠️ Recovery IMEI may be illegal in some countries. Clarify local legislation.
Can Xiaomi be flashed with a Mediatek processor via EDL?
No, Mediatek chips use BROM Mode, not EDL. For firmware such devices (for example, Redmi 10 or POCO M3) will require SP Flash Tool and firmware in scatter format.
How to find out the code name of your Xiaomi model?
The code name (e.g., veux for Redmi Note 11 Pro+ 5G) can be found in several ways: Through ADB: connect your phone and execute the command adb shell getprop ro.product.device. On the box or under the battery (if the phone is collapsible). In settings: Settings β†’ About Phone β†’ MIUI Version (click a few times on "Kero Version").