No description
  • C 99.1%
  • Shell 0.5%
  • Makefile 0.4%
Find a file
Cameron Thompson 318a49cee9 Mirror qcseriald-darwin v1.0.6 changes
Sync demand-driven USB reads, QMI/RmNet skip, sessionID-based
reboot detection, and prev_bridge_count fix from qcseriald-darwin
commit b4faa9c.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 00:26:47 -04:00
.github/workflows Make XQCN default efsbackup format, rewrite README, trim release artifacts 2026-03-08 19:36:57 -04:00
gui Add macOS app icon (fenix logo) for GUI 2026-03-12 23:32:34 -04:00
tests Overhaul CLI help system, add --log global option, fenix art, and fix DIAG/EFS 2026-02-18 23:43:38 -05:00
.checkpatch.conf checkpatch: add more exceptions 2025-06-24 19:58:21 +02:00
.gitignore Add wxWidgets GUI and fix CLI pipe-mode issues 2026-03-11 17:41:07 -04:00
at_port.c Fix AT probe: read in a loop to get OK after echo 2026-03-08 18:07:05 -04:00
at_port.h Add AT command interface, interactive console, and macOS qcseriald integration 2026-02-28 22:32:42 -05:00
atcmd.c Add wxWidgets GUI and fix CLI pipe-mode issues 2026-03-11 17:41:07 -04:00
atcmd.h Fix Windows HANDLE truncation in AT session, skip sudo for offline commands 2026-03-08 15:23:07 -04:00
atconsole.c Add wxWidgets GUI and fix CLI pipe-mode issues 2026-03-11 17:41:07 -04:00
diag.c Fix Windows build: replace sleep() with usleep() in wait loops 2026-03-08 14:53:07 -04:00
diag.h Fix XQCN restore: EFS write corruption, ENOSPC handling, and modem reboot 2026-02-18 18:35:26 -05:00
diag_switch.c Break AT subcommands into top-level commands, implement Windows AT session, improve qcseriald port waiting 2026-03-07 00:55:05 -05:00
diag_switch.h Consolidate into single qfenix binary with DIAG, EFS, and PCIe support 2026-02-12 15:17:26 -05:00
efs_paths.h Add XQCN backup/restore, probe-based EFS discovery, NV scanning, and raw sector erase 2026-02-16 21:40:04 -05:00
firehose.c Add partinfo/write CLI commands and Partitions/NV Browser GUI tabs 2026-03-12 00:56:10 -04:00
firehose_op.c Add EFS backup/restore, partition erase, and full EFS file management 2026-02-15 22:06:03 -05:00
gpt.c Add partinfo/write CLI commands and Partitions/NV Browser GUI tabs 2026-03-12 00:56:10 -04:00
gpt.h Add partinfo/write CLI commands and Partitions/NV Browser GUI tabs 2026-03-12 00:56:10 -04:00
hdlc.c Fix XQCN restore: EFS write corruption, ENOSPC handling, and modem reboot 2026-02-18 18:35:26 -05:00
hdlc.h Consolidate into single qfenix binary with DIAG, EFS, and PCIe support 2026-02-12 15:17:26 -05:00
io.c Consolidate into single qfenix binary with DIAG, EFS, and PCIe support 2026-02-12 15:17:26 -05:00
LICENSE Add LICENSE file 2017-10-04 19:33:09 -07:00
list.h Introduce a linked list abstraction 2025-09-12 10:36:09 -05:00
Makefile Fix macOS CI builds: use override for HAVE_QCSERIALD and -lutil flags 2026-02-28 23:19:28 -05:00
md5.c Rename to QFenix and add cross-platform CI builds 2026-02-12 15:16:23 -05:00
md5.h Rename to QFenix and add cross-platform CI builds 2026-02-12 15:16:23 -05:00
oscompat.c Rename to QFenix and add cross-platform CI builds 2026-02-12 15:16:23 -05:00
oscompat.h Add EFS backup/restore, partition erase, and full EFS file management 2026-02-15 22:06:03 -05:00
patch.c Add document-order XML execution and universal tag handling 2026-02-12 15:16:23 -05:00
patch.h Add document-order XML execution and universal tag handling 2026-02-12 15:16:23 -05:00
pcie.c Add read subcommand for partition reads by label with retry logic 2026-02-12 15:17:26 -05:00
pcie.h Add read subcommand for partition reads by label with retry logic 2026-02-12 15:17:26 -05:00
pdu.c Fix Windows build: timegm() does not exist on MinGW 2026-02-28 22:47:25 -05:00
pdu.h Add AT command interface, interactive console, and macOS qcseriald integration 2026-02-28 22:32:42 -05:00
program.c Add document-order XML execution and universal tag handling 2026-02-12 15:16:23 -05:00
program.h Rename to QFenix and add cross-platform CI builds 2026-02-12 15:16:23 -05:00
qcseriald.c Mirror qcseriald-darwin v1.0.6 changes 2026-03-23 00:26:47 -04:00
qcseriald.h Enhance list command: show DIAG, AT, EDL, and ADB on all platforms 2026-03-08 17:31:51 -04:00
qdl.c Add partinfo/write CLI commands and Partitions/NV Browser GUI tabs 2026-03-12 00:56:10 -04:00
qdl.h Add partinfo/write CLI commands and Partitions/NV Browser GUI tabs 2026-03-12 00:56:10 -04:00
qfenix.manifest Consolidate into single qfenix binary with DIAG, EFS, and PCIe support 2026-02-12 15:17:26 -05:00
qfenix.rc Consolidate into single qfenix binary with DIAG, EFS, and PCIe support 2026-02-12 15:17:26 -05:00
read.c Add NAND readall, printgpt --make-xml, and fix NAND/COM read reliability 2026-02-12 15:17:26 -05:00
read.h Add NAND readall, printgpt --make-xml, and fix NAND/COM read reliability 2026-02-12 15:17:26 -05:00
README.md Make XQCN default efsbackup format, rewrite README, trim release artifacts 2026-03-08 19:36:57 -04:00
sahara.c Detect secure boot rejection during Sahara programmer upload 2026-03-12 22:57:43 -04:00
sha2.c qdl: add SPDX license identifiers 2025-06-13 16:27:47 +02:00
sha2.h qdl: add SPDX license identifiers 2025-06-13 16:27:47 +02:00
sim.c Move __unused macro after variable definitions 2025-11-17 14:11:21 -06:00
sim.h checkpatch: address all obvious issues 2025-06-21 21:32:25 +02:00
sparse.c sparse: Clean up endianness and chunk type signedness 2025-08-28 10:42:08 -05:00
sparse.h sparse: Handle larger FILL and DONT_CARE chunks 2025-08-28 10:42:08 -05:00
ucs2_utf8.c Add AT command interface, interactive console, and macOS qcseriald integration 2026-02-28 22:32:42 -05:00
ufs.c Add colored terminal output, ux_warn level, flash subcommand, and Sahara retry 2026-02-12 15:17:26 -05:00
ufs.h Introduce a linked list abstraction 2025-09-12 10:36:09 -05:00
usb.c Enhance list command: show DIAG, AT, EDL, and ADB on all platforms 2026-03-08 17:31:51 -04:00
usb_ids.h Add AT command interface, interactive console, and macOS qcseriald integration 2026-02-28 22:32:42 -05:00
util.c Merge upstream linux-msm/qdl v2.5 into qfenix (v2.5.10-qfenix-0.0.9) 2026-03-07 22:56:16 -05:00
ux.c Add partinfo/write CLI commands and Partitions/NV Browser GUI tabs 2026-03-12 00:56:10 -04:00
vip.c vip: Fix integer underflow in digest count 2025-12-18 18:52:57 -08:00
vip.h vip: address checkpatch issues 2025-06-24 20:15:20 +02:00

QFenix

License

An enhanced fork of linux-msm/qdl — a Swiss Army knife for Qualcomm-based modems and devices. Flash firmware, read/write NV items, browse EFS, send/receive SMS, interactive AT console, and more — all from a single binary.

Download

Pre-built static binaries for Linux (x64, arm64, armv7), macOS (universal), and Windows (x64, x86, arm64) are available under Releases.

Quick Start

# Flash firmware (auto-detect programmer, XMLs, and storage type)
qfenix flash /path/to/firmware/

# List connected devices (EDL, DIAG, AT, ADB, PCIe)
qfenix list

# Backup EFS to XQCN (default, QPST-compatible)
qfenix efsbackup -o backup.xqcn

# Interactive AT console
qfenix atconsole

# Send an SMS
qfenix smssend +15551234567 "Hello from qfenix"

# Read all partitions save to file and make xml (-L /loader/search/path)
qfenix readall -L ./ -o ./

Key Features

  • Auto firmware detection-F recursively finds programmer ELF, rawprogram/patch XMLs, and detects storage type from any directory layout and -L is used to search for the loader automatically from a starting path.
  • Full DIAG protocol — NV read/write, complete EFS management, backup/restore to XQCN or TAR
  • SMS & USSD — Send/receive SMS, delete messages, send USSD queries over AT commands
  • AT console — Interactive terminal for AT commands with real-time URC display (Linux, macOS, Windows)
  • PCIe/MHI transport — Flash PCIe modems (T99W175, T99W373, T99W640, etc.) on Linux and Windows
  • DIAG-to-EDL auto-switch — Detects DIAG mode and switches to EDL automatically
  • GPT operations — Print partitions, A/B slots, read/erase/dump partitions by label
  • Wide device support — Quectel, Sierra, Telit, Fibocom, Foxconn/Dell, Simcom, MeiG, and more
  • Document-order XML execution — Operations run in XML order, enabling backup-erase-flash workflows
  • Cross-platform — Linux, macOS, and Windows from a single codebase

Common Workflows

Flash firmware

# Auto-detect everything from a firmware directory
qfenix -F /path/to/firmware/

# Traditional mode
qfenix prog_firehose_ddr.elf rawprogram*.xml patch*.xml

# Target a specific device
qfenix --serial=0AA94EFD -F /path/to/firmware/       # by USB serial
qfenix --serial=COM49 -F /path/to/firmware/           # by COM port (Windows)

# PCIe modem
qfenix --pcie -F /path/to/firmware/

# Erase-all workflow
qfenix flash -e -F /path/to/firmware/

The device must be in EDL mode. QFenix auto-switches from DIAG to EDL (disable with --no-auto-edl).

EFS backup & restore

# Backup to XQCN (default — includes NV items, QPST-compatible)
qfenix efsbackup
qfenix efsbackup -o my_backup.xqcn

# Backup to TAR (probe-based path coverage)
qfenix efsbackup -t -o backup.tar
qfenix efsbackup -t --quick -o quick.tar     # tree walk only, faster

# Restore (format auto-detected)
qfenix efsrestore backup.xqcn
qfenix efsrestore backup.tar

# Offline format conversion (no device needed)
qfenix xqcn2tar backup.xqcn output.tar
qfenix tar2xqcn backup.tar output.xqcn

NV items & EFS

# NV items
qfenix nvread 0                              # read NV item 0 (ESN)
qfenix nvread 6828 --index=0                 # with subscription index
qfenix nvwrite 6828 0102030405               # write hex data

# EFS filesystem
qfenix efsls /                               # list directory
qfenix efspull /nv/item_files/file.bin ./     # download file
qfenix efspush ./file.bin /nv/item_files/     # upload file
qfenix efsrm -r /custapp/mydir               # recursive delete

SMS & AT commands

# SMS
qfenix smssend +15551234567 "Hello"          # send SMS
qfenix smsread                               # list received SMS
qfenix smsread -j                            # JSON output
qfenix smsrm all                             # delete all messages
qfenix smsstatus                             # storage status

# USSD
qfenix ussd "*#06#"                          # query IMEI

# Raw AT command
qfenix atcmd AT+COPS?                        # single command

# Interactive AT console
qfenix atconsole                             # auto-detect port
qfenix atconsole -p COM9                     # specify port

Partitions & GPT

# Inspect
qfenix printgpt prog_firehose_ddr.elf
qfenix getslot prog_firehose_ddr.elf
qfenix storageinfo prog_firehose_ddr.elf

# Read partitions
qfenix read modem -L /path/to/firmware/
qfenix readall -L /path/to/firmware/ -o /path/to/output/

# Erase
qfenix erase modemst1 modemst2 -L /path/to/firmware/
qfenix eraseall -L /path/to/firmware/

Full Command Reference

Every subcommand supports --help for detailed usage.

Flashing & Storage

These commands require a programmer ELF and a device in EDL mode.

Command Description
(default) / flash Flash firmware via Firehose protocol
printgpt Print GPT partition tables (supports --make-xml for XML generation)
storageinfo Query storage hardware info
reset Reset, power off, or reboot into EDL
getslot Show active A/B slot
setslot Set active A/B slot
read Read partition(s) by label
readall Dump all partitions (supports --single-file for full storage dump)
erase Erase partition(s) by label or raw sector range
eraseall Erase all partitions

DIAG Operations

Work directly over the DIAG serial port — no programmer or EDL mode needed.

Command Description
diag2edl Switch device from DIAG to EDL mode
nvread Read NV item (supports --index for subscriptions)
nvwrite Write NV item from hex data
efsls List EFS directory
efspull Download file from EFS
efspush Upload file to EFS
efsrm Delete file or directory (-r for recursive)
efsstat Show file/directory metadata
efsmkdir Create EFS directory
efschmod Change permissions
efsln Create symlink
efsrl Read symlink target
efsdump Dump EFS factory image
efsbackup Backup EFS to XQCN (default) or TAR (-t)
efsrestore Restore EFS from XQCN or TAR (auto-detected)
xqcn2tar Convert XQCN to TAR (offline, no device)
tar2xqcn Convert TAR to XQCN (offline, no device)

AT / SMS / USSD

Work over the AT serial port — no programmer or EDL mode needed.

Command Description
atcmd Send a raw AT command
atconsole Interactive AT console with real-time URC display
smssend Send SMS via PDU mode
smsread List/read SMS messages (-j for JSON, -r for raw PDU)
smsrm Delete SMS by index or all
smsstatus Query SMS storage status
ussd Send USSD/USSI query

Other

Command Description
list List connected EDL, DIAG, AT, ADB, and PCIe devices
ramdump Extract RAM dumps via Sahara
ks Keystore/Sahara over serial device nodes

Supported Devices

QFenix includes a VID/PID database for automatic detection of:

  • Qualcomm reference designs (SDX55, SDX65, SDX72, SDX75)
  • Quectel (EM05, EM06, EM12, EM060K, EM120K, RM520N, RM255C, RG650V, etc.)
  • Sierra Wireless (EM74xx, EM9190, EM9191, EM9291)
  • Telit (LM960, FN980, FN990, FM990, LE910C4)
  • Fibocom (FM150, FM160)
  • Foxconn/Dell (DW5820e, DW5930e, DW5931e, DW5934e / T99W175, T99W373, T99W640)
  • Simcom (SIM8200EA, SIM8380G)
  • MeiG Smart (SRM825, SRM930)
  • Sony, ZTE, LG, Netgear, Huawei EDL/DIAG devices

PCIe modems (MHI-based) are detected via friendly name matching on Windows.

Build from Source

# Linux
sudo apt install libxml2-dev libusb-1.0-0-dev help2man
make

# macOS (Homebrew)
brew install libxml2 pkg-config libusb help2man
make

# macOS (MacPorts)
sudo port install libxml2 pkgconfig libusb help2man
make

# Windows (MSYS2 MinGW64 terminal)
pacman -S base-devel git mingw-w64-x86_64-{gcc,make,pkg-config,libusb,libxml2}
make

# Run tests
make tests

License

BSD 3-Clause. See LICENSE. Fork of linux-msm/qdl.