QFIL Flash Tool: How to Flash Firmware on Qualcomm Phones
The QFIL flash tool (Qualcomm Flash Image Loader) writes complete factory firmware to phones with a Qualcomm Snapdragon chip while the phone is in Emergency Download (EDL) mode. Use it when a Qualcomm phone will not start and you have the correct factory firmware for your exact model, including its programmer file. This guide covers what QFIL needs, how to flash a Flat Build step by step, and what the common errors mean.
What QFIL Is and What It Does
QFIL is a Windows program that comes as part of QPST (Qualcomm Product Support Tools). It does not talk to Android or to the normal bootloader. It talks to the chip’s boot ROM.
Every Qualcomm chip has a Primary Bootloader (PBL) stored in read-only memory. When the phone enters EDL mode, the PBL waits for a small loader called the programmer over USB, using the Sahara protocol. The programmer then receives commands over the Firehose protocol and writes the firmware to storage. Because the PBL sits in ROM, software damage cannot remove EDL mode. This is why QFIL can sometimes revive a phone that no longer reaches fastboot or recovery.
Firmware formats QFIL accepts
- Flat Build: one folder with a programmer file,
rawprogram*.xml,patch*.xmland the image files. The programmer is an .elf file on recent phones (for exampleprog_firehose_ddr.elf) and an .mbn file on older ones (for exampleprog_emmc_firehose_xxxx.mbn). - Meta Build: a larger package with a
contents.xmlfile in its root folder. - Not supported: OTA update files and flashable ZIPs for recovery. QFIL cannot install them.
Limits on retail phones
Programmers are signed by the phone maker, and each one is made for a specific device and chip. The phone only accepts a programmer signed for it, so a file from another model will not work.
Some brands add an extra check. Xiaomi locked EDL so that only a Xiaomi-authorised programmer and account can use it, which means owners of a bricked Xiaomi phone must visit a Xiaomi service centre. If your brand offers its own PC tool or a fastboot ROM, try that first. For Xiaomi, see our Mi Flash Tool guide.
Requirements
- A Windows PC with a working USB data cable, plugged straight into the computer (no hub).
- QPST with QFIL. Qualcomm does not offer QPST or QFIL as a public download on its website. Its tools are distributed through the Qualcomm Software Center, which requires a Qualcomm ID and only lists the tools your account is entitled to. We do not link the unofficial QFIL ZIPs found on mirror sites. If your phone maker or service centre supplies QFIL with the firmware, use that copy.
- The Qualcomm USB driver. Qualcomm also distributes this driver (QUD) through the Qualcomm Software Center. With the driver installed, a phone in EDL mode shows up as Qualcomm HS-USB QDLoader 9008. For normal adb and fastboot drivers, see our Android USB driver guide for Windows 11.
- Official factory firmware in Flat Build or Meta Build format for your exact model and variant.
- A short folder path with no spaces, for example
C:\fw. Spaces in the path are a known cause of Sahara errors. - A backup. Treat a full QFIL flash as a complete wipe of the phone.
How to Put a Qualcomm Phone in EDL Mode
The method depends on the model. Common ways are:
- With adb, if the phone still boots and USB debugging is on:
adb shell reboot edl. This command asks the phone to restart into EDL mode. Qualcomm documents it for its own development boards. Many phone makers block it, and then the phone just restarts normally. - With keys: some phones enter EDL when you hold both volume buttons on the powered-off phone while you connect the USB cable. The OnePlus family is known for using a key combination. Check the method for your model.
- With a test point: shorting two points on the circuit board while connecting USB. This means opening the phone, so leave it to a trained technician.
To check, open Device Manager on the PC. Under Ports (COM & LPT) you should see Qualcomm HS-USB QDLoader 9008. EDL mode can time out if the phone waits too long, so enter it just before you click Download.
How to Flash Firmware with QFIL (Flat Build)
- Install the Qualcomm USB driver and QPST, then open QFIL.
- Extract the firmware into a short folder path with no spaces.
- Click Configuration and then FireHose Configuration. Set Device Type to the phone’s storage (ufs or emmc). QFIL uses eMMC by default, and the programmer’s file name often shows the storage type. Tick Reset After Download and click OK.
- Make sure Erase All Before Download is not ticked.
- Under Select Build Type, choose Flat Build.
- Under the programmer path, click Browse and select the programmer file from your firmware folder.
- Put the phone in EDL mode and connect it. Click Select Port, choose Qualcomm HS-USB QDLoader 9008 and click OK.
- Click Load XML and select the
rawprogramXML file or files. In the next window, select the matchingpatchXML file or files. - Click Download. A blue progress bar shows the flash is running. Do not touch the cable. Interrupting the flash can hard-brick the phone.
- Wait for Download Succeed and Finish Download in the Status box. With Reset After Download ticked, the phone restarts by itself. Otherwise disconnect it and switch it on.
If the phone then asks to reset because encryption was unsuccessful, accept the reset so the phone can finish starting.
Common QFIL Errors and Fixes
“No Port Available”
QFIL cannot see a phone in EDL mode. Either the phone is not in EDL or the Qualcomm driver is missing. Check Device Manager for the 9008 entry, try another cable and port, and enter EDL again.
“Download Fail: Sahara Fail: QSaharaServer Fail: Process fail”
The phone did not accept the programmer at the Sahara stage. Common causes are:
- firmware or a programmer for a different model or variant;
- a firmware package with several programmers where you chose the wrong one (try the others);
- an old QFIL version, or a standalone QFIL instead of the one inside the latest QPST;
- spaces in the firmware folder path;
- EDL timing out because the phone waited too long. Reconnect it in EDL right before you click Download.
The Download button stays grey
QFIL enables Download only after the programmer and all XML files are loaded. Repeat the Browse and Load XML steps.
The flash fails after the programmer loads
Check the Device Type setting from step 3. If it does not match the phone’s storage, the programmer cannot write the firmware.
The phone needs authorisation
If the flash stops because the phone requires an authorised programmer or account, which is the case on many Xiaomi models, home flashing is not possible. Take the phone to an official service centre. Do not buy “authorised account” access from strangers.
The phone loops after a successful flash
Do a factory reset from recovery mode, then see our boot loop fixes.
QDL: Qualcomm’s Open-Source Alternative
QDL is an open-source command-line tool for Qualcomm EDL devices under the BSD 3-Clause licence. It uses the same programmer, rawprogram and patch files as QFIL, and runs on Linux, macOS and Windows:
qdl list
qdl --dry-run prog_firehose_ddr.elf rawprogram*.xml patch*.xml
qdl --storage ufs prog_firehose_ddr.elf rawprogram*.xml patch*.xml
qdl list shows EDL devices with their serial numbers. --dry-run checks the files without connecting to a phone. The last line flashes the firmware and overwrites the phone’s storage, so use --storage emmc instead if the phone uses eMMC. On Windows, Qualcomm’s own QDL guide runs install_driver.bat first and lists each XML file by name. QDL does not remove the maker’s signing or authorisation checks.
Related Guides
- Mi Flash Tool Latest Version: How to Flash a Xiaomi Fastboot ROM
- Fastboot Commands List Explained (With Examples)
- Android USB Driver for Windows 11 (All Major Brands)
- Phone Stuck in a Boot Loop? Universal Fixes for Android Phones
- SP Flash Tool v6: How to Use the New Version with flash.xml
FAQ
Does flashing with QFIL erase my data?
Expect it to. A full Flat Build rewrites the phone’s partitions, and after a full flash the phone may ask for a reset before it will start. Back up anything you can first.
Do I need an unlocked bootloader to use QFIL?
No. EDL mode runs in the chip’s boot ROM before the bootloader starts. The phone still only accepts a programmer signed by its maker, and some brands also require authorisation.
Can QFIL flash MediaTek or Unisoc phones?
No. QFIL only works with Qualcomm devices in EDL mode. MediaTek phones use SP Flash Tool, and Unisoc (SPD) phones use the Upgrade or Research Download tool with a .pac file.
Is QFIL available for Mac or Linux?
QFIL is a Windows program. On Linux and macOS, QDL does the same flashing job from the command line with the same firmware files.
https://droid-developers.com/qfil-flash-tool/https://droid-developers.com/wp-content/uploads/2026/11/qfil-flash-tool-featured-1024x538.jpghttps://droid-developers.com/wp-content/uploads/2026/11/qfil-flash-tool-featured-150x150.jpgFirmwareFlash ToolsHow ToThe QFIL flash tool (Qualcomm Flash Image Loader) writes complete factory firmware to phones with a Qualcomm Snapdragon chip while the phone is in Emergency Download (EDL) mode. Use it when a Qualcomm phone will not start and you have the correct factory firmware for your exact model, including...Fahim MahmudFahim Mahmud[email protected]AdministratorDroid-Developers
Leave a Reply