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