topjohnwu/samloader-rs

An all-in-one Samsung firmware download and flash tool

Rust

379

497 commits

updated Sep 25, 2026

See the code

See what people are saying

SourceMessageScoreDate

Tutorial: turn an old Samsung phone into a private, always-on git server (Magisk + Termux + Tailscale), including every mistake I made so you don't (r/selfhosted)

> I'm making this post in the hope it will help someone else turn a piece of e-waste in an actually useful piece of tech. I'm not really a "tutorial guy" so please feel free to correct me anytime. > Keep in mind that this tutorial isn't exactly 'non-tech-savvy friendly', so **don't be surprised if…

0

Oct 18, 2026

README

samloader

An all-in-one Samsung firmware download and flash tool.

Usage: samloader [OPTIONS] <COMMAND>

Commands:
  download         Download firmware
  check-update     Check available versions
  detect           Indicates whether or not a download mode device can be detected
  dump-pit         Dumps the connected device's PIT file to the specified output file
  print-pit        Prints the contents of a PIT file in a human readable format
  flash            Flashes one or more firmware files to your phone
  verify-md5       Verifies the MD5 checksum of one or more .tar.md5 files
  reboot-download  Boot a connected Samsung device into download mode
  fix-usb          Add udev rules to fix USB device access permissions on Linux
  help             Print this message or the help of the given subcommand(s)

Options:
      --verbose                    Enable verbose output
      --usb-backend <usb_backend>  The USB backend to use [default: nusb] [possible values: nusb, vcom]
  -h, --help                       Print help
  -V, --version                    Print version

Features

  • Combines both firmware downloading and flashing into a single utility.
  • Downloads firmware using multiple parallel connections (default: 8) to bypass server-side connection speed throttling and maximize bandwidth usage.
  • Decrypts firmware files on-the-fly, eliminating separate download and decryption steps.
  • Supports flashing raw images and official package files across Linux, macOS, and Windows.
  • Processes and extracts official TAR firmware packages in-memory, avoiding slow disk write operations.
  • Transmits raw LZ4-compressed data directly to supported devices to reduce USB transfer size and time.

Install

If you have a working Rust toolchain installed, you can install with:

cargo install samloader

Prebuilt executables for Linux, macOS, and Windows are also available in the latest GitHub release.

License & Acknowledgements

This project is licensed under the Apache License, Version 2.0.

samloader is built on top of and inspired by several incredible open-source projects:

  • Heimdall (Firmware Flashing): The core flashing functionality is a derivative work of ~grimler/Heimdall. This implementation began as a precise 1-to-1 conversion of the original C++ project into safe and idiomatic Rust. The original code is licensed under the MIT License (preserved in this repository), and copyright headers are preserved in the relevant source files.

  • Firmware Downloading / FUS: The firmware downloading and decryption implementation was inspired from multiple places, including samloader, samfirm.js, Bifrost, and asgard.

topjohnwu/samloader-rs

An all-in-one Samsung firmware download and flash tool

Rust

379

497 commits

updated Sep 25, 2026

See the code

See what people are saying

SourceMessageScoreDate

Tutorial: turn an old Samsung phone into a private, always-on git server (Magisk + Termux + Tailscale), including every mistake I made so you don't (r/selfhosted)

> I'm making this post in the hope it will help someone else turn a piece of e-waste in an actually useful piece of tech. I'm not really a "tutorial guy" so please feel free to correct me anytime. > Keep in mind that this tutorial isn't exactly 'non-tech-savvy friendly', so **don't be surprised if…

0

Oct 18, 2026

README

samloader

An all-in-one Samsung firmware download and flash tool.

Usage: samloader [OPTIONS] <COMMAND>

Commands:
  download         Download firmware
  check-update     Check available versions
  detect           Indicates whether or not a download mode device can be detected
  dump-pit         Dumps the connected device's PIT file to the specified output file
  print-pit        Prints the contents of a PIT file in a human readable format
  flash            Flashes one or more firmware files to your phone
  verify-md5       Verifies the MD5 checksum of one or more .tar.md5 files
  reboot-download  Boot a connected Samsung device into download mode
  fix-usb          Add udev rules to fix USB device access permissions on Linux
  help             Print this message or the help of the given subcommand(s)

Options:
      --verbose                    Enable verbose output
      --usb-backend <usb_backend>  The USB backend to use [default: nusb] [possible values: nusb, vcom]
  -h, --help                       Print help
  -V, --version                    Print version

Features

  • Combines both firmware downloading and flashing into a single utility.
  • Downloads firmware using multiple parallel connections (default: 8) to bypass server-side connection speed throttling and maximize bandwidth usage.
  • Decrypts firmware files on-the-fly, eliminating separate download and decryption steps.
  • Supports flashing raw images and official package files across Linux, macOS, and Windows.
  • Processes and extracts official TAR firmware packages in-memory, avoiding slow disk write operations.
  • Transmits raw LZ4-compressed data directly to supported devices to reduce USB transfer size and time.

Install

If you have a working Rust toolchain installed, you can install with:

cargo install samloader

Prebuilt executables for Linux, macOS, and Windows are also available in the latest GitHub release.

License & Acknowledgements

This project is licensed under the Apache License, Version 2.0.

samloader is built on top of and inspired by several incredible open-source projects:

  • Heimdall (Firmware Flashing): The core flashing functionality is a derivative work of ~grimler/Heimdall. This implementation began as a precise 1-to-1 conversion of the original C++ project into safe and idiomatic Rust. The original code is licensed under the MIT License (preserved in this repository), and copyright headers are preserved in the relevant source files.

  • Firmware Downloading / FUS: The firmware downloading and decryption implementation was inspired from multiple places, including samloader, samfirm.js, Bifrost, and asgard.

Significant stargazers

Okinea Dev

117 followers · starred Mar 2026

Denys Vitali

543 followers · starred Sep 2026

林博仁 Buo-ren Lin

181 followers · starred Sep 2026

Alex Gorbatchev

710 followers · starred Jun 2026