📱 Flash Tool Guides

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.

Difficulty: 🔴 Advanced
Read time: 26 min
Updated: June 24, 2026
High Risk — backup first!
🪟 Windows 🍎 macOS 🐧 Linux

Pre-Flight Checklist

Complete ALL items before proceeding. Skipping any step increases the risk of bricking your device.

Requirements met 0 / 6

Guide Steps

Guide Progress
0/6 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:

sudo apt install heimdall-flash # Debian/Ubuntu sudo pacman -S heimdall # Arch

macOS: Install via Homebrew:

brew install heimdall

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 partition
  • recovery.img — Recovery
  • system.img (inside AP tar) — Android system
  • modem.bin — Radio firmware
  • sboot.bin — Bootloader
💡 You do not need to flash every partition. For most recoveries, flashing only boot and recovery is sufficient.

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:

heimdall detect

If detected, print the partition table (PIT — Partition Information Table):

heimdall print-pit

Note the exact partition names shown (e.g. BOOT, RECOVERY, SYSTEM, RADIO). You will need these exact names in the next step.

🚫 If "heimdall detect" fails on Windows, redo the Zadig driver step. On Linux, run with sudo or add udev rules.

Flash individual partitions using the names from the PIT output:

# Flash boot only: heimdall flash --BOOT boot.img # Flash boot and recovery: heimdall flash --BOOT boot.img --RECOVERY recovery.img # Flash multiple partitions at once: heimdall flash --BOOT boot.img --RECOVERY recovery.img --RADIO modem.bin
⚠️ Partition names are case-sensitive and must match the PIT exactly. Using --boot instead of --BOOT will fail.

To flash everything (full firmware restore):

heimdall flash --BOOT boot.img --RECOVERY recovery.img --SYSTEM system.img --RADIO modem.bin --BOOTLOADER sboot.bin --no-reboot
🚫 Never disconnect USB during flashing.

After flashing completes, Heimdall reboots the device automatically (unless you used --no-reboot). To reboot manually:

heimdall flash --no-reboot # then hold Power to reboot

First boot may take several minutes. Confirm the firmware version under Settings → About Phone → Software information.

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.

Never miss a fix.

Prioritize our guides in your Google search results.

Set as Preferred

No comments yet. Be the first to share your experience with this guide!

Leave a Comment —

Your email address will not be published. Required fields are marked *