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 / Linux
curl -fsSL https://sdf-flash-gui.blahaj.uk/install.sh | shUses the Homebrew cask when brew is installed. Otherwise it downloads the .dmg (macOS), the .deb (apt/dpkg), or the AppImage (into ~/.local/bin) from the latest release and checks it against the release's SHA-256 sums. Set SDF_FLASH_GUI_APP_DIR to install the macOS app somewhere other than /Applications.
Windows (PowerShell)
irm https://sdf-flash-gui.blahaj.uk/install.ps1 | iexDownloads the .msi, checks its SHA-256, and runs the installer.
Manual
Homebrew: brew install --cask thedavidweng/tap/sdf-flash-gui. Installers are also on Releases: .dmg for macOS, .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 linesThe project site lives in site/ and deploys to GitHub Pages from main. Its demo is the real GUI compiled to WebAssembly over a simulated backend (see docs/adr/0011-web-demo-reuses-desktop-gui.md).
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version <wasm-bindgen version in Cargo.lock> --locked
./scripts/build-site.sh # → target/site
python3 -m http.server -d target/site 8000src/
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)
demo.rs Web demo host: simulated sdftool behind ProcessRunner
web/ wasm32 entry that mounts the GUI on a canvas
site/ GitHub Pages site (static HTML/CSS/JS)
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
