Heimdall Guide – Flash Samsung Firmware on Windows, macOS & Linux
Open-source alternative to Odin — use Heimdall to flash Samsung partition images from Linux, macOS, or Windows via the command line without any GUI required.
Pre-Flight Checklist
Complete ALL items before proceeding. Skipping any step increases the risk of bricking your device.
-
Samsung device with Download Mode accessibleHeimdall is exclusively for Samsung Android devices. Confirm your model is supported — most Galaxy S, Note, A, and Tab series work.
-
Heimdall installed on your PCDownload from heimdall.com or the official GitHub repo (Benjamin Dobell/Heimdall). Available for Windows, macOS, and Linux — a key advantage over Odin.
-
libusb driver installed (Windows)On Windows, Heimdall requires the libusb-win32 driver. Use Zadig to install it for the Samsung device in Download Mode.
-
Correct Samsung firmware (.tar or individual .img files)Heimdall accepts raw .img partition files or extracted .tar files. Samsung firmware ZIPs contain .tar.md5 files — extract these to get the individual partition images (boot.img, recovery.img, system.img, etc.).
-
Full data backup completedFlashing via Heimdall will erase user data. Back up via Samsung Smart Switch or Google Backup.
-
Battery charged above 50%Insufficient battery during flash can cause boot issues.
Guide Steps
Windows: Install Heimdall from the official installer. Then put your Samsung into Download Mode (see Step 2) and connect it. Open Zadig, select the Samsung device (may show as "SAMSUNG Android" or similar), and install libusb-win32 as the driver.
Linux: Install via your package manager:
macOS: Install via Homebrew:
Samsung firmware ZIPs contain .tar.md5 files. Rename them to .tar and extract with 7-Zip or tar. You'll get partition images like:
boot.img— Boot partitionrecovery.img— Recoverysystem.img(inside AP tar) — Android systemmodem.bin— Radio firmwaresboot.bin— Bootloader
Power off your Samsung completely. Then:
- Older Samsung (physical home button): Hold Volume Down + Home + Power
- Modern Samsung (no home button): Hold Volume Down + Bixby/Volume Up, then connect USB cable
- Galaxy A series / newer: Hold Volume Up + Volume Down while connecting USB
You'll see a warning screen — press Volume Up to confirm entry into Download Mode.
With the device in Download Mode and connected, open a terminal and verify Heimdall detects it:
If detected, print the partition table (PIT — Partition Information Table):
Note the exact partition names shown (e.g. BOOT, RECOVERY, SYSTEM, RADIO). You will need these exact names in the next step.
sudo or add udev rules.Flash individual partitions using the names from the PIT output:
--boot instead of --BOOT will fail.To flash everything (full firmware restore):
After flashing completes, Heimdall reboots the device automatically (unless you used --no-reboot). To reboot manually:
First boot may take several minutes. Confirm the firmware version under Settings → About Phone → Software information.
Congratulations! Flash Successful!
You've successfully completed all steps. Your device should now be running the new firmware. If it's booting normally — you're done! Check the troubleshooting section below if you encounter any issues.
Troubleshooting & FAQ
Common errors and their solutions. Read this before asking for help.
Odin is official Samsung software (Windows-only, GUI-based, uses .tar.md5 files directly). Heimdall is open-source, cross-platform (Windows/Linux/macOS), and command-line based. For most users, Odin is simpler. Heimdall is the better choice on Linux/macOS or when scripting automated flashes.
Windows: redo the Zadig step — Samsung must be in Download Mode when you install the libusb driver. Linux: run with sudo or install udev rules from the Heimdall repo. macOS: try a different USB port or cable. Confirm device is truly in Download Mode (shows "Downloading... Do not turn off target").
Heimdall can flash any valid partition image — stock or custom. It is commonly used to flash TWRP recovery (heimdall flash --RECOVERY twrp.img) as a stepping stone to installing custom ROMs via recovery.
Most likely a partition mismatch — the firmware image is for a different Samsung model or region. Confirm your exact model number (Settings → About Phone → Model number or sticker under battery). Re-flash with the correct firmware in Refurbish/full-wipe mode.
Prioritize our guides in your Google search results.
No comments yet. Be the first to share your experience with this guide!