A complete step-by-step guide to flashing Samsung firmware using Linux and the open-source Odin alternative: Heimdall.
- A Samsung smartphone or tablet
- A Linux distro (tested on Ubuntu 24.04)
- A USB cable (preferably original)
- Downloaded Samsung firmware (from SamMobile, SamFW, etc.)
heimdallinstalled
Install via APT:
sudo apt update
sudo apt install heimdall-flashVerify installation:
heimdall versionIf you get APT lock errors (e.g., packagekitd holding lock), run:
sudo killall packagekitdUse one of these combinations (device dependent):
| Device Type | Button Combo |
|---|---|
| Older (w/ Bixby) | Vol Down + Bixby + Power |
| Newer (no Bixby) | Vol Down + Vol Up (then connect USB) |
| One UI 6+ Devices | Vol Down + Vol Up + USB cable |
Then press Vol Up to enter Download Mode.
Connect your device via USB and run:
sudo heimdall detectExpected output:
Device detected
If not, check:
- USB cable/port
- USB debugging / driver issues
- That you're really in Download Mode
Extract .tar.md5 firmware:
7z x firmware.tar.md5This should give you .img files like:
boot.imgrecovery.imgvbmeta.imgsuper.imguserdata.img
You do not flash
.tar.md5directly with Heimdall.
Get the PIT (Partition Information Table):
sudo heimdall print-pitExample partitions:
BOOTRECOVERYSUPERVBMETA
โ ๏ธ Many modern Samsung devices do not have aSYSTEMpartition โ useSUPERinstead.
Flash the files to correct partitions:
sudo heimdall flash \
--BOOT boot.img \
--RECOVERY recovery.img \
--SUPER super.img \
--VBMETA vbmeta.imgCustomize flags based on what you extracted and what print-pit showed.
If the device doesnโt reboot automatically:
sudo heimdall rebootecho 'SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"' | sudo tee /etc/udev/rules.d/50-samsung.rules
sudo udevadm control --reload-rulesUnplug and replug your device afterward.
Youโve successfully flashed your Samsung firmware from Linux. ๐ This method is especially useful for developers or users who donโt want to rely on Windows-only tools like Odin.
- Only flash firmware exactly matching your model number
- Back up your data โ flashing usually wipes the device
- Be cautious โ improper flashing can brick your device
- Heimdall Project: https://github.com/Benjamin-Dobell/Heimdall
- Samsung Firmware: https://samfw.com/ or https://www.sammobile.com/
Hell yeah! ๐ Hereโs the sequence of atomic commands that successfully flashed your Tab 3V without making it reboot automatically:
sudo heimdall flash --no-reboot --BOOT spl.img
sudo heimdall flash --no-reboot --SBOOT sboot.bin
sudo heimdall flash --no-reboot --SBOOT2 sboot2.bin
sudo heimdall flash --no-reboot --KERNEL boot.img
sudo heimdall flash --no-reboot --RECOVERY recovery.img
sudo heimdall flash --no-reboot --CSC cache.img
sudo heimdall flash --no-reboot --HIDDEN hidden.img
sudo heimdall flash --no-reboot --WDSP SPRDDSP.img
sudo heimdall flash --no-reboot --MODEM SPRDCP.img
Notice how --SYSTEM system.img and --SUPER system.img didnโt work because your deviceโs PIT didnโt have those partitions.
The key takeaway: --no-reboot kept the device in download mode for each step, but some flashes (like SBOOT and SBOOT2) occasionally needed a quick manual reconnection between flashes.
If you want, I can make a single โone-linerโ flash command that would attempt all working partitions in order so you could theoretically do it in one go next time. Do you want me to do that?