Samsung-Loki / Thor

An alternative to Heimdall

Repository from Github https://github.comSamsung-Loki/ThorRepository from Github https://github.comSamsung-Loki/Thor

badges badges badges badges

Thor Flash Utility

This is a flash utility for Samsung devices, made from scratch in C#.
To run this, you must have .NET 7 runtime installed on your computer.
This tool was tested and works flawlessly, I'm open for any bug reports.

Disclaimer

  1. You can't reuse the same USB connection after you close an Odin session, and you can't re-connect the device. You have to reboot each time.
  2. Do not use the Linux version under WSL or under a badly configured VM. Do not expect any support on those - it's a waste of time.
  3. Always try each option the platform-specific note tells you. In case of linux, try with cdc_asm disabled and enabled.

Support me

Please consider donating here if you would like to support me.

List of platforms

  1. Linux (USB DevFS method)
  2. Windows (not implemented)
  3. Mac OS (not implemented)

How's it different from Heimdall?

Fun fact: Official Odin for Linux works using DevFS, and people report it working when Heimdall didn't.

  1. Is able to do NAND Erase All (aka erase userdata) and erase any partition, given the length.
  2. Ability to shutdown and reboot into Odin mode (not supported on every device)
  3. Not using a USB transfer library and doing it natively for best results
  4. Extended the PIT parser with new information being discovered
  5. Can flash directly from an Odin .tar / .tar.md5 archive
  6. Works with .lz4 files directly without manual extraction
  7. Implemented EFS Clear and Bootloader Update options in Odin
  8. Is able to change the sales code of the device

Current list of commands

Commands

Usage guide

Initiate a connection
Select the options
Flash an odin archive
tarball.webm
Flash a single partition
single.webm
Print description of a device's partition table
dumped.webm
Dump device's partition table into a PIT file
dump.webm
Print description of any PIT file
anyPit.webm

What devices were tested?

  1. SM-M205FN/DS from 2019 0x00030000 (Unknown1: 0, Unknown2: 0, Version: 3)
  2. SM-G355H/DS from 2014 0x00020000 (Unknown1: 0, Unknown2: 0, Version: 2)

Frequently Asked Questions

  1. A fatal error occurred. The required library something could not be found.
    This is a Linux Package Mixup, use this as reference.

  2. What happened to original Thor (or Hreidmar)
    This is a rewrite of Thor written from scratch, so I could implement the native USB communication.
    Also, the old codebase was severely flawed in my opinion. I archived it here.

Credits

TheAirBlow for Thor Flash Utility
Benjamin-Dobell for documenting much of the Odin protocol

This project is licenced under

Mozilla Public License Version 2.0

About

An alternative to Heimdall

License:Mozilla Public License 2.0


Languages

Language:C# 100.0%