bkerler/edl: Qualcomm Sahara, Firehose and Diag tooling in Python
Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
At a glance
- What is it?
- bkerler/edl drives Qualcomm devices in EDL mode over USB: reading chip info through Sahara, pushing Firehose loaders, dumping memory and running Diag commands. It is a Python toolkit for people who already know why they need 0x9008, not a one-click repair utility.
- Who is it for?
- Adopt bkerler/edl if you have a Qualcomm device that enumerates as USB pid 0x9008 and you are comfortable matching a Firehose loader to the chip yourself. Do not adopt it if you expect a guided repair wizard, if your device only reaches 0x900E and you have no recovery path, or if your project cannot ship GPL-3.0 code.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 66 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- bkerler/edl2,728 ★ · +122
| Repository | 2026-10-04 | 2026-11-24 |
|---|---|---|
| bkerler/edl | 2.6k | 2.7k |
122 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What bkerler/edl actually does, and who needs it
Qualcomm chips expose a low-level USB mode, usually enumerated as pid 0x9008, that bypasses the normal operating system. The README states plainly that your device needs a usb pid of 0x9008 for the tool to work. Inside that mode two protocols matter: Sahara, which negotiates and uploads a signed loader, and Firehose, which the loader then speaks to read, write and erase flash. bkerler/edl is a Python client for both, plus a Diag component exposed through the qc_diag entry point.
The intended audience is narrow. The README's own framing is blunt: flexible dumping of smartphones, attacking firehose, and memory dumping to find issues. This is a reverse-engineering and recovery tool. If your phone boots normally and you want to unlock a bootloader, you are in the wrong place; fastboot and vendor tools handle that. If the phone is semi-bricked and only enumerates in EDL, this is one of the few open clients that speaks the protocol directly instead of hiding it behind a vendor executable.
Sahara negotiation, Firehose upload and the loader database
The data flow starts with Sahara. The host queries chip information, then selects and uploads a loader binary that matches the device. That loader is the part people trip over, because a Firehose loader is signed for a specific chip and there is no universal one.
The project keeps a Loaders directory, populated as a git submodule, and looks up loaders by hardware identifiers. The README notes that for newer QC phones loader autodetection stopped working because the Sahara loader no longer offers a way to read the pkhash. This fork addresses that by reading extended chip information on Sahara V3 devices through cmd=0x0A (CHIP_ID_V3_READ), since V3 devices no longer respond to cmd=0x03 (OEM_PK_HASH_READ) or cmd=0x02 (MSM_HW_ID_READ). The V3 extended info structure places MSM_ID at offset 36, OEM_ID at 40, MODEL_ID at 42, and an alternative OEM_ID at 44 when offset 40 is zero. The code builds a V1/V2 compatible HWID string from those fields so the existing loader database lookup still applies.
That is a meaningful design decision. Rather than requiring the user to name a loader every time, the tool reconstructs the older identifier format and reuses the same matching logic. The README's own example output shows the reconstructed value as HW_ID : 0028c0e10051a012 alongside MSM HWID : 0x28c0e1, model_id:0xa012 and the OEM string. If matching still fails, the README points to the --loader option as the manual escape hatch.
Installing bkerler/edl on Linux, macOS and Windows
The README gives three platform paths. On Linux the tool needs adb, fastboot, python3-dev, pip and liblzma-dev, and it asks you to purge or stop ModemManager, because that service grabs the serial device before edl can. The repository also ships autoinstall.sh and install-linux-edl-drivers.sh, the latter invoked with bash after chmod +x. The README warns that with SELinux enabled you may need to set it permissive temporarily with sudo setenforce 0.
The clone step is unusual: the README says explicitly do NOT use --recurse-submodules on the clone, then run the submodule update separately.
git clone https://github.com/bkerler/edl.git
cd edl
git submodule update --init --recursive
pip3 install .On macOS the prerequisites are libusb and git from Homebrew, followed by the same submodule update and pip3 install . step. On Windows there are two methods. Method 1 is a PowerShell one-liner that downloads and runs install_edl_win10_win11.ps1. Method 2 is manual: install Python 3.10 or newer and git, install a QC 9008 serial port driver, then install UsbDk from its GitHub releases and confirm with UsbDkController -n that you see a device with pid 0x9008.
A first real use is reading chip information without touching flash. If you are on a serial port rather than USB, the README gives two forms, autodetection or an explicit port name.
edl --serial
edl --portname \\.\COM1On a working connection you should see a chip info block similar to the README's example: Sahara version, chip serial number, MSM HWID, OEM PKHASH and the reconstructed HW_ID. Treat that output as the gate. If the tool cannot read chip info, do not proceed to flashing commands.
Loader mismatch is the failure mode that bites hardest
The single largest practical limitation is the loader. Everything after Sahara depends on a loader that matches the chip, and the README is candid that autodetection broke for newer devices and that the V3 fix may still not resolve every case. The note is explicit: if autodetection still fails, use --loader to specify a loader manually. That puts the burden on you to know which loader belongs to which MSM ID and PK hash.
The project provides tooling for that, but it is not trivial. fhloaderparse takes a directory of loaders and a destination, autodetects and renames the structure, and copies them into the Loaders directory. There is also a beagle_to_loader path for people who sniff an existing EDL session with a Totalphase Beagle 480 and export a binary capture. Both routes assume you already have loader files from somewhere legitimate.
Beyond loaders, the README itself flags the semi-bricked case: if your device entered pid 0x900E rather than 0x9008, the README says there are several options to get back but the text provided does not enumerate them. That is a gap. A reader stuck at 0x900E should not expect this README to walk them out of it.
Finally, this is a destructive-capable tool. Firehose can write and erase flash. Nothing in the README describes a rollback path or an undo, and there is no dry-run mode documented. If you cannot restore the device, you should not point it at one.
How it differs from vendor flashing utilities and from libqc
Vendor tools such as Qualcomm's own QFIL and the various OEM repair packages do the same protocol work, but they wrap it in a GUI, bundle a curated loader set, and generally refuse to expose raw Firehose operations. They are also Windows-centric and closed. bkerler/edl is the opposite trade: a command-line Python client with scriptable entry points, no curated loader guarantee, and full access to the protocol.
Against lower-level libraries, the difference is scope. bkerler/edl is an application and toolkit, not just a protocol binding. It ships edl, qc_diag, sierrakeygen, boottodwnload, enableadb, fhloaderparse and beagle_to_loader as console scripts declared in pyproject.toml, plus standalone scripts like qc_nand_extract.py and the ubidump entry in the repository root. A thin protocol library would leave you writing the loader selection, the partition parsing and the Diag framing yourself.
The cost of that breadth is dependency weight. The requirements list includes pyusb, pyserial, pycryptodome, lxml, paramiko, Exscript, passlib, capstone and keystone-engine. That is a lot of surface for a tool whose core job is pushing bytes at a USB endpoint, and it means installation failures are more likely to come from a Python dependency than from the protocol code.
Licence, maintenance and what upgrading costs you
The project is GPL-3.0, and the README states the consequence in the author's own words: if you use anything from this repository in any including compiled form, you need to opensource your code as well. That is a strong statement of intent about derivative works. If you are building a commercial repair service around a modified fork, or linking this into a proprietary product, the licence is the first thing to check with someone qualified to advise you. The README also frames licence violations as a reason the author would stop developing the tools.
On activity, the last push to the repository was on 2026-09-19, which is recent. The published releases are older: 3.52.1 dates to 2021-08-07. pyproject.toml declares version 3.62, so the packaged version and the GitHub release tags have drifted apart. If you install from the repository you get 3.62; if you look for a release artefact you will find 3.52.1. Plan around the git checkout, not the release page.
Upgrade cost is mostly the submodule. The Loaders directory is a submodule, so a fresh clone without git submodule update --init --recursive leaves the tool without a loader database, and the README's own ordering exists for that reason. Python 3.10 or newer is required per pyproject.toml. There is no migration guide between versions in the README, and no documented config file format, so upgrades are a git pull plus a pip3 install . rerun.
Editorial conclusion
Adopt bkerler/edl if you have a Qualcomm device that enumerates as USB pid 0x9008 and you are comfortable matching a Firehose loader to the chip yourself. Do not adopt it if you expect a guided repair wizard, if your device only reaches 0x900E and you have no recovery path, or if your project cannot ship GPL-3.0 code. Before flashing anything, verify the loader file matches your MSM ID and PK hash, confirm the Sahara version reported by the tool, and test on a device you can afford to lose.
Frequently asked questions
How do I reboot my device to EDL mode using ADB?
The README does not document an ADB reboot-to-EDL command. It does list enableadb as a console script entry point, and it states that the device must enumerate with USB pid 0x9008 before the edl tool will work.
What does EDL mode mean for bkerler/edl?
EDL is the Qualcomm low-level USB mode the tool talks to. The README states your device needs a usb pid of 0x9008 for the edl tool to work, and mentions pid 0x900E as the semi-bricked variant.
How do I use bkerler/edl?
Install it from the repository, update the submodules to get the Loaders directory, then run edl over USB or with --serial for a serial port. A first safe step is reading chip info, which the README shows as a block with Sahara version, MSM HWID, OEM PKHASH and HW_ID.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/bkerler-edl)Star history chart for your README
[](https://hysenlabs.com/projects/bkerler-edl)Was this useful?