Skip to content

About

FOSS Version of Fastboot Firmware Flasher for GNU/Linux and MacOS

Resources

Stars

59 stars

Watchers

1 watching

Forks

Repository files navigation

LFFF

License: GPL v3 Rust Slint Platform Releases

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

Screenshot


About

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

✈️ Author · 👥 Community · ☕ Donate


Installation

Any Linux / macOS (one-liner)

curl -fsSL https://raw.githubusercontent.com/mrFrok/LibreFastbootFirmwareFlasher/main/install.sh | bash

# Flags: --cli-only | --gui-only | --uninstall

Installs 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 adb

Arch Linux (AUR)

yay -S lfff         # build from source
yay -S lfff-bin     # prebuilt binary

Homebrew (macOS / Linux)

brew tap mrFrok/lfff
brew install lfff

Flatpak (Linux x86_64)

flatpak install lfff-gui-linux-x86_64.flatpak   # from the release page

Bundles 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.AppImage

Ships 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/LibreFastbootFirmwareFlasher

Then install external tools:

lfff deps

Quick Start

lfff-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 build

LFFF 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

CLI Commands

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.fish

Flash 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).


Tested Devices

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.


Development

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 test
LibreFastbootFirmwareFlasher/
├── 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.


Special Thanks

  • NeFeroN — original Windows program author, help with flash implementation, Windows version
  • MisterZtr — partial MediaTek support

Uninstall

curl -fsSL https://raw.githubusercontent.com/mrFrok/LibreFastbootFirmwareFlasher/main/install.sh | bash -s -- --uninstall

Star History

If LFFF saved you time or a bricked device — a ⭐ goes a long way!

Star History Chart

License

GNU GPL v3. Uses Slint (GPL v3) and Material Design 3 icons (Apache 2.0).

About

FOSS Version of Fastboot Firmware Flasher for GNU/Linux and MacOS

Resources

Stars

59 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages