Cross-platform GUI for optical drive firmware dump/flash. Inspired by the Windows-only SDFtool Flasher.exe
- Drive enumeration — optical drives on macOS, Linux, and Windows (IOKit / sysfs / drive letters), with MakeMKV-style backend
-llist when a tool is configured - Drive properties — vendor, model, revision, firmware date, MT1959 / MT1939 detection, encrypted firmware, LibreDrive status, SDF.bin version
- Firmware dump — read drive firmware via the selected backend
- Firmware flash — multi-gate safety before write/recover:
- MT1959 platform check (probe)
- Typed confirmation (
FLASH <device>) - Mutually exclusive encrypted vs boot-loader rawflash modes
- Cross form-factor warning + explicit confirm when slim/desktop mismatch
- Firmware identification — SHA-256 lookup in a known-firmware table plus binary content scan (PCB type / embedded model); no reliance on filenames
- Recovery flash — 16-byte boot token entry or extraction from a wrong firmware dump
- SDF0 parsing —
sdf.bin/ firmware containers (vendor, model, version, flags) - Dual backends —
sdftoolandmakemkvcon(both from MakeMKV); auto-detected on PATH and common install paths - CLI —
list,info,dump,flash,sdf-infoshare the same planning path as the GUI
macOS (Homebrew)
brew install --cask thedavidweng/tap/sdf-flash-guiLinux / Windows
Download the latest installer from Releases — .deb / .AppImage for Linux, .msi for Windows.
- MakeMKV installed (provides
sdftoolandmakemkvcon) sdf.binfrom the SDFtool/MKV firmware pack (optional; improves probe/flash when present)
| Platform | Notes |
|---|---|
| Linux | Optical drive access often needs the cdrom group (or equivalent rights) to open /dev/sr* / /dev/sg*. |
| macOS | Drive access is usually available to the logged-in user. |
| Windows | Some raw device paths may require running as Administrator. |
cargo build --releaseOutput: target/release/sdf-flash-gui.
Local quality gate (matches Ubuntu CI):
cargo fmt -- --check
cargo clippy -- -D warnings
cargo test
./scripts/coverage.sh gate # project ≥99%, patch 100% on changed domain linessrc/
main.rs CLI entry (no args → GUI)
lib.rs library crate for tests
branding.rs Product name (from Cargo.toml) and project URLs
command.rs Backend argv planner (no shell strings) + command display
orchestration.rs Shared probe / list / flash session, BackendOpError (CLI + GUI)
process.rs Run / stream / cancel / reap + ProcessRunner trait
process_runner.rs NativeRunner (OS process adapter; coverage-ignored)
firmware_db.rs Known-hash table, binary firmware ID, encryption policy, version compare
platform.rs Slim/desktop model tables, form-factor helpers
warnings.rs Flash-safety warnings (cross-flash, two-step, downgrade, mismatch)
test_support.rs Shared ProcessRunner fake (cfg(test) only)
drive/
parse.rs Pure list/identity/selection parsers (covered)
probe.rs --info interpretation: DriveSafety + identity (covered)
os.rs OS enumerate + find_backend / find_sdf_bin (ignored)
sdf.rs SDF0 container parser + presentation helpers
i18n/ Language keys, English + locale tables
gui/
state.rs AppState (drive list apply, probe cache)
start_gate.rs Structured Start enablement reasons
ops/ Lifecycle, start, firmware load, drives, nudge, labels
workers.rs Background probe / list / streaming
views/ egui paint only
validation.rs Tool / sdf.bin path checks
file_dialog.rs rfd adapter (coverage-ignored)
CLI and GUI share probe/list/flash planning through orchestration and command. GUI Start rules live in start_gate; i18n maps them at the edge.
Coverage ignore set is shared: scripts/coverage-ignore.regex ↔ codecov.yml (checked in CI).
See SECURITY.md for vulnerability reporting.
- MakeMKV
- MartyMcNuts for the original Windows SDFtool Flasher: forum thread
GPL-2.0-or-later
