Free, open-source firmware flasher for Android A/B devices via fastboot.
CLI + GUI — no Python, no bloat. The CLI is a single static binary that runs on any Linux,
Termux included. Built with Slint.
Installation · Quick Start · CLI Commands · Tested Devices · Development
LFFF flashes full firmware on OnePlus / OPPO / Realme devices with Qualcomm SoC and A/B partition layout. Handles the entire pipeline — extraction, pre-flash checks, Anti-Rollback protection, dynamic super partitions, A/B slot management, modem flashing.
CLI (lfff) — scriptable, headless.
GUI (lfff-gui) — native desktop app built with Slint.
full flash · A/B slots · ARB protection · source build flash · OTA extraction · download · single-partition flash · error recovery · dependency installer
Any Linux / macOS (one-liner)
curl -fsSL https://raw.githubusercontent.com/mrFrok/LibreFastbootFirmwareFlasher/main/install.sh | bash
# Flags: --cli-only | --gui-only | --uninstallInstalls to ~/.local/bin — works on all Linux distros including atomic/immutable (Fedora Silverblue, Bazzite, NixOS, SteamOS), musl-based ones (Void, Alpine) and macOS.
musl distributions (Void, Alpine) — the installer detects musl and picks the
matching GUI build (lfff-gui-linux-<arch>-musl.tar.gz). The CLI is static and
the same everywhere.
Termux (Android) — the CLI only; there is no display server for the GUI.
curl -fsSL https://raw.githubusercontent.com/mrFrok/LibreFastbootFirmwareFlasher/main/install.sh | bash -s -- --cli-only
pkg install android-tools # fastboot and adbArch Linux (AUR)
yay -S lfff # build from source
yay -S lfff-bin # prebuilt binaryHomebrew (macOS / Linux)
brew tap mrFrok/lfff
brew install lfffFlatpak (Linux x86_64)
flatpak install lfff-gui-linux-x86_64.flatpak # from the release pageBundles fastboot, adb, aria2 and payload-dumper, so lfff deps is not needed.
It still needs the usual udev rules on the host for the device to show up.
AppImage (Linux)
chmod +x LibreFastbootFirmwareFlasher-*-x86_64.AppImage
./LibreFastbootFirmwareFlasher-*-x86_64.AppImageShips the GUI and the CLI; external tools come from the host, via lfff deps.
Nix / NixOS
# Install GUI (default)
nix profile install github:mrFrok/LibreFastbootFirmwareFlasher
# Or install CLI only
nix profile install github:mrFrok/LibreFastbootFirmwareFlasher#lfff-cli
# Run directly without installing
nix run github:mrFrok/LibreFastbootFirmwareFlasher # GUI
nix run github:mrFrok/LibreFastbootFirmwareFlasher#cli # CLI
# Development shell
nix develop github:mrFrok/LibreFastbootFirmwareFlasherThen install external tools:
lfff depslfff-gui # Launch GUI
lfff deps # Install fastboot, adb, aria2c, payload_dumper
lfff download https://.../firmware.zip # Download OTA
lfff extract firmware.zip # Extract OTA
lfff flash ./firmwares/RMX3709 # Flash full firmware
lfff flash --source /out/target/product/ # Flash from source buildLFFF extracts OTAs with payload-dumper-rust.
Some distributions (NixOS among them) ship an unrelated Python script under the
same payload_dumper name; LFFF detects that and ignores it. If your copy lives
somewhere unusual, point LFFF at it directly:
export LFFF_PAYLOAD_DUMPER=/path/to/payload_dumper| Command | What it does | Example |
|---|---|---|
flash <dir> |
Full firmware flash, A/B slots | lfff flash ./fw --dry-run |
flash-partition |
Flash a single partition | lfff flash-partition boot --firmware-dir ./fw |
extract <zip> |
Extract OTA via payload_dumper | lfff extract fw.zip -o ./out |
download <url> |
Multi-connection OTA download | lfff download <url> -c 8 |
devices |
List fastboot/adb devices | lfff devices --check |
arb |
Compare ARB: firmware vs device | lfff arb --firmware-dir ./fw |
deps [tool..] |
Install missing dependencies | lfff deps / lfff deps --check |
completion <shell> |
Emit a shell completion script | lfff completion zsh |
Full flag reference: lfff <command> --help.
Shell completions — the script goes to stdout, so install it wherever your shell looks for one. Supported: bash, zsh, fish, powershell, elvish, nushell.
lfff completion bash > ~/.local/share/bash-completion/completions/lfff
lfff completion zsh > ~/.zfunc/_lfff # with ~/.zfunc on $fpath
lfff completion fish > ~/.config/fish/completions/lfff.fishFlash flow:
[Stage 1 — fastbootd]
Non-super partitions → slot A + slot B
Super/dynamic parts → active slot only (super wiped first)
↓
[Stage 2 — bootloader]
modem → slot A + slot B
↓
[Offer: reboot to system / wipe data + reboot]
On error: retry / reboot / skip partition / abort
MediaTek vs Qualcomm: MediaTek devices flash entirely through fastbootd without preloader partition, and have no Anti-Rollback protection (ARB is Qualcomm-specific).
| Device | Model | Status |
|---|---|---|
| Realme GT Neo 5 | RMX3709 | ✅ Working |
| Realme GT Neo 5 SE | RMX3700 | ✅ Working |
Other OnePlus / OPPO / Realme devices with Qualcomm SoC and A/B layout should work. May work on MediaTek devices.
git clone https://github.com/mrFrok/LibreFastbootFirmwareFlasher
cd LibreFastbootFirmwareFlasher
cargo build --release -p lfff-cli # CLI only
cargo build --release -p lfff-gui # GUI only
cargo testLibreFastbootFirmwareFlasher/
├── Cargo.toml
├── README.md
├── LICENSE
├── logo.svg
├── lfff-gui.desktop
├── lfff-gui.svg
├── install.sh
├── packaging/
│ └── flatpak/ # manifest + AppStream metadata
├── scripts/
│ └── update-packaging.py # repoints flake/AUR/Homebrew/Flatpak at a release
├── lib/
│ └── src/
│ ├── lib.rs
│ ├── arb.rs
│ ├── deps.rs
│ ├── device.rs
│ ├── downloader.rs
│ ├── extractor.rs
│ ├── flasher.rs
│ └── utils.rs
├── cli/
│ └── src/main.rs
└── gui/
├── build.rs
├── material-1.18.0/ # vendored Material 3 components (MIT)
├── src/main.rs
└── ui/main.slint
The GUI is built with the official Material 3 component set for
Slint. It ships no crate, so a copy lives in
gui/material-1.18.0/, taken verbatim from ui-libraries/material/src of
slint-ui/slint at tag v1.18.0 and
licensed MIT (see gui/material-1.18.0/LICENSE.md). It is versioned in lockstep
with Slint, so it is refreshed from the tag matching the slint dependency.
gui/build.rs registers it as the @material library.
- NeFeroN — original Windows program author, help with flash implementation, Windows version
- MisterZtr — partial MediaTek support
curl -fsSL https://raw.githubusercontent.com/mrFrok/LibreFastbootFirmwareFlasher/main/install.sh | bash -s -- --uninstallIf LFFF saved you time or a bricked device — a ⭐ goes a long way!
GNU GPL v3. Uses Slint (GPL v3) and Material Design 3 icons (Apache 2.0).
