bkerler/edl – Open-Source Qualcomm EDL Flash Tool Guide
bkerler/edl is an open-source Python tool for flashing and recovering Qualcomm-based Android devices via EDL (Emergency Download) mode. It supports Firehose and Sahara protocols and runs on Windows, Linux, and macOS — making it the go-to EDL tool for Linux users and developers.
Pre-Flight Checklist
Complete ALL items before proceeding. Skipping any step increases the risk of bricking your device.
-
Python 3.9 or newer installedbkerler/edl is a Python command-line tool. Install Python 3.9+ from python.org. On Windows, check "Add Python to PATH" during installation. Verify with (python --version) in a terminal.
-
Git installedGit is required to clone the repository. Download from git-scm.com (Windows) or install via your package manager on Linux (sudo apt install git).
-
Qualcomm EDL (9008) USB drivers installedYour device must be recognised as <strong>Qualcomm HS-USB QDLoader 9008</strong> in Device Manager (Windows) or as a USB device (Linux/macOS). On Windows use the Qualcomm driver from the bkerler/edl Drivers folder or install via Zadig. On Linux, run the (udev] rules included in the repo.
-
Device-specific firehose programmer (.elf or .mbn file)Most Firehose-based operations require a (prog_firehose_ddr.elf) or similar programmer file matched to your device's Qualcomm chipset (e.g. SM8250, SDM845). Source this from a firmware package for your device, from community resources such as XDA, or from bkerler's Loaders repository on GitHub.
-
Qualcomm device that supports EDL modebkerler/edl works exclusively with Qualcomm-based Android devices. The device must expose USB PID (0x9008) when in EDL mode. Non-Qualcomm devices (MediaTek, Unisoc, Exynos) are not supported.
-
USB 2.0 port recommendedUSB 3.0/3.1 ports cause detection issues in EDL mode on many setups. Use a direct USB 2.0 port on your motherboard — not a hub.
Guide Steps
Windows (10 / 11)
Open PowerShell as Administrator and run:
curl.exe -O https://raw.githubusercontent.com/bkerler/edl/master/install_edl_win10_win11.ps1
.\install_edl_win10_win11.ps1
This script installs Python, Git, usbdk, Zadig drivers, and the edl tool automatically. Restart your terminal after completion.
Linux (Debian / Ubuntu)
sudo apt install adb python3-dev python3-pip liblzma-dev git
git clone https://github.com/bkerler/edl.git
cd edl
git submodule update --init --recursive
pip3 install .
macOS
brew install python3 git
git clone https://github.com/bkerler/edl.git
cd edl
git submodule update --init --recursive
pip3 install .
edl --help to verify the tool is working. On Linux/macOS you may need to prefix commands with python3 edl.py if edl is not in your PATH.Windows
The Windows install script handles most driver setup automatically. If the device is still not detected, run the batch file in the cloned repo:
cd edl\Drivers\Windows
Install_Windows.bat
In Device Manager, your device should appear as Qualcomm HS-USB QDLoader 9008 under Ports (COM & LPT) when in EDL mode. If it shows as an unknown device, use Zadig to install the WinUSB driver manually.
Linux
Install the included udev rules to allow non-root access:
sudo cp edl/Drivers/Linux/51-edl.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
lsusb | grep -i qualcomm — you should see ID 05c6:9008 Qualcomm, Inc.EDL mode makes the device expose USB PID 0x9008. Methods vary by device — use whichever applies:
- ADB command (device must be booted with USB debugging enabled)
adb reboot edl - Key combination (device powered off) — Hold Volume Up + Volume Down while connecting USB, or device-specific combination. Check XDA or your device's community for the exact combo.
- EDL test point / short (hardware method) — For completely bricked devices: short two PCB test points (D+ to GND or device-specific pads) while connecting USB. Requires disassembly and varies per board revision. Search "[your device model] EDL test point" on XDA.
- Deep flash cable (EDL cable) — A modified USB cable that shorts D+ and GND, triggering EDL on connection. Works on most Qualcomm devices without disassembly.
Once in EDL mode, verify detection:
edl detect
You should see the Qualcomm chipset identified and the Sahara/Firehose protocol negotiated.
Most Firehose operations require a programmer file (prog_firehose_ddr.elf or prog_firehose_lite.elf) matched to your device's exact chipset. This file acts as a secondary bootloader that edl uploads to RAM to enable partition access.
Sources for programmer files:
- Firmware packages — Extract the firmware ZIP for your device; the programmer is often included in the
images/orMETA-INF/folder. - bkerler's Loaders repo —
github.com/bkerler/Loaderscontains community-sourced programmer files for many chipsets. - XDA device forums — EDL unbrick threads typically provide the correct programmer for that device.
edl detect first without specifying a programmer.All commands below assume the device is in EDL mode and connected. Replace /path/to/programmer.elf with your actual programmer path, and partition names with those specific to your device.
Detect device and protocol
edl detect
Read (backup) a single partition
edl r boot boot.img --loader=/path/to/programmer.elf
Write (flash) a single partition
edl w boot boot.img --loader=/path/to/programmer.elf
Erase a partition
edl e userdata --loader=/path/to/programmer.elf
Read all partitions (full backup)
edl rl /output/backup/folder --loader=/path/to/programmer.elf
Write all partitions from a folder (full restore)
edl wl /folder/with/images --loader=/path/to/programmer.elf
Send a Firehose XML script
edl xml rawprogram0.xml patch0.xml --loader=/path/to/programmer.elf
List partition table
edl printgpt --loader=/path/to/programmer.elf
After all write operations complete without errors, reboot the device:
edl reset
The device exits EDL mode and boots normally. First boot after a full firmware restore may take several minutes.
Congratulations! Flash Successful!
You've successfully completed all steps. Your device should now be running the new firmware. If it's booting normally — you're done! Check the troubleshooting section below if you encounter any issues.
Troubleshooting & FAQ
Common errors and their solutions. Read this before asking for help.
Both tools flash Qualcomm devices via EDL mode using the Firehose/Sahara protocol. QFIL (Qualcomm Flash Image Loader) is Qualcomm's official Windows-only GUI tool. bkerler/edl is open-source, cross-platform (Windows/Linux/macOS), and command-line based. bkerler/edl is often preferred on Linux, supports more chipsets, and has auth-bypass capabilities for some devices. For users on Windows with a standard firmware package, QFIL is simpler. For Linux users, non-standard devices, or auth-locked devices, bkerler/edl is the better choice.
This usually means the programmer file is wrong for the chipset, or the device requires authentication. Try a programmer from bkerler's Loaders repository matched to your chipset. If the device has auth enforcement, you may need a signed programmer from the device manufacturer — community sources sometimes have these for popular devices. Check XDA threads for your specific model.
Confirm the device is actually in EDL mode — the screen should be completely black. On Windows, check Device Manager for Qualcomm HS-USB QDLoader 9008 under Ports. If it shows as unknown, reinstall via Zadig with WinUSB driver. Try a USB 2.0 port directly on the motherboard. On Linux, run lsusb | grep 05c6:9008 to confirm OS-level detection, and check udev rules are applied.
bkerler/edl is an unofficial open-source tool — it is not endorsed by Qualcomm or device manufacturers. Using EDL mode to flash unofficial firmware or modify partitions will void your warranty on most devices. However, flashing official firmware via EDL (for unbrick purposes) is generally treated the same as any other reflash. The tool itself is widely trusted in the Android development community and is used extensively for research and recovery.
Both are Qualcomm's proprietary EDL protocols. Sahara is the first stage — the bootrom's protocol used to upload a programmer (secondary loader) to device RAM over USB. Firehose is the second stage — the programmer's protocol that enables partition read/write/erase operations. In practice, edl handles both stages automatically: it sends the programmer via Sahara, then communicates via Firehose to perform flashing.
This tells the Firehose programmer which storage protocol your device uses. Modern flagship devices (2018+) typically use UFS (Universal Flash Storage). Older and budget devices use eMMC. Getting this wrong will cause partition operations to fail. You can usually find the correct memory type in your device's spec sheet or XDA device thread. If unsure, try --memory=ufs first; if it fails, try --memory=emmc.
Prioritize our guides in your Google search results.
No comments yet. Be the first to share your experience with this guide!