Thor (protocol)

Last updated

Thor [1] is a communication protocol which is mainly used to communicate with the Bootloader of Samsung devices to make it write files into various partitions of the device. It is also possible to list the partitions or to reboot the phone through this protocol.

Contents

Beside being implemented in the bootloader of various smartphones and tablets made by Samsung, an implementation is also available in Das U-Boot, a Free software bootloader.

To use the protocol, users typically need to put the phone needs to be in Download mode.

To do this, the device first need to be powered off, and then some key combination need to be pressed during boot, such as Power + Volume Down + Home, Power + Volume Up + Home, [2] or Power + Volume Down + Bixby for later models. [3]

It is also possible to reboot the phone in download mode either through the commandline (for instance with ADB and root access to the phone) or through a menu if the Android distribution has it.

Then users need a computer, software like Odin or Heimdall and an USB cable to interact with the bootloader (and either list partitions, overwrite them or reboot the phone).

Security

On Samsung devices that are allow users to unlock the bootloader (to install alternative Android distributions or operating systems) that use the Thor protocol, users typically need to go through some procedure to unlock the bootloader.

Then since the Thor implementation in the bootloader of Samsung devices typically doesn't allow users to download the partition content, they have to overwrite some partitions to install these alternative distributions or operating systems.

But some bootloaders like Samsung's S-Boot 4.0 used on the Galaxy SIII (GT-I9300) have known exploitable bugs in their Thor implementation that let users execute code inside the bootloader. This has for instance been used to repair devices with broken internal storage. [4]

See also

Related Research Articles

<span class="mw-page-title-main">Booting</span> Process of starting a computer

In computing, booting is the process of starting a computer as initiated via hardware such as a button on the computer or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so some process must load software into memory before it can be executed. This may be done by hardware or firmware in the CPU, or by a separate processor in the computer system.

<span class="mw-page-title-main">UEFI</span> Operating system and firmware specification

Unified Extensible Firmware Interface is a specification that defines the architecture of the platform firmware used for booting a computer's hardware and its interface for interaction with the operating system. Examples of firmware that implement the specification are AMI Aptio, Phoenix SecureCore, TianoCore EDK II, InsydeH2O. UEFI replaces the BIOS which was present in the boot ROM of all personal computers that are IBM PC compatible, although it can provide backwards compatibility with the BIOS using CSM booting. Intel developed the original Extensible Firmware Interface (EFI) specification. Some of the EFI's practices and data formats mirror those of Microsoft Windows. In 2005, UEFI deprecated EFI 1.10.

The boot ROM is a type of ROM that is used for booting a computer system. There are two types: a mask boot ROM that cannot be changed afterwards and a boot EEPROM, which can contain an UEFI implementation.

The Android Dev Phone (ADP) is a SIM-unlocked and bootloader unlocked Android device that is designed for advanced developers. While developers can use regular consumer devices purchased at retail to test and use their apps, some developers may choose not to use a retail device, preferring an unlocked or no-contract device.

Rooting is the process by which users of Android devices can attain privileged control over various subsystems of the device, usually smartphones and tablets. Because Android is based on a modified version of the Linux kernel, rooting an Android device gives similar access to administrative (superuser) permissions as on Linux or any other Unix-like operating system such as FreeBSD or macOS.

<span class="mw-page-title-main">Fastboot</span> Recovery mode included in Android mobile operating system

Fastboot is a communication protocol used primarily with Android devices. It is implemented in a command-line interface tool of the same name and as a mode of the bootloader of Android devices. The tool is included with the Android SDK package and used primarily to modify the flash filesystem via a USB connection from a host computer. It requires that the device be started in Fastboot mode. If the mode is enabled, it will accept a specific set of commands, sent through USB bulk transfers. Fastboot on some devices allows unlocking the bootloader, and subsequently, enables installing custom recovery image and custom ROM on the device. Fastboot does not require USB debugging to be enabled on the device. To use fastboot, a specific combination of keys must be held during boot.

<span class="mw-page-title-main">Hacking of consumer electronics</span>

The hacking of consumer electronics is a common practice that users perform to customize and modify their devices beyond what is typically possible. This activity has a long history, dating from the days of early computer, programming, and electronics hobbyists.

The Samsung Infuse 4G was an Android smartphone that was released by Samsung in May 2011. It has a 1.2 GHz Hummingbird processor with 8–16 GB internal Flash memory, a 4.5 inch 480×800 pixel Super AMOLED Plus capacitive touchscreen display, an 8-megapixel camera and a 1.3-megapixel front-facing camera.

<span class="mw-page-title-main">Galaxy Nexus</span> Smartphone designed by Google and Samsung

The Galaxy Nexus (GT-I9250) is a touchscreen Android smartphone co-developed by Google and Samsung Electronics. It is the third smartphone in the Google Nexus series, a family of Android consumer devices built by an original equipment manufacturer partner. The phone is the successor to Google's previous flagship phones, the Nexus One and Nexus S.

<span class="mw-page-title-main">Samsung Galaxy S Advance</span> Smartphone

The Samsung GT-I9070 Galaxy S Advance is an Android smartphone manufactured by Samsung Electronics. It was announced on 30 January 2012 and released in April 2012 as an "advanced" variant to the original Galaxy S.

Samsung Knox is a proprietary security and management framework pre-installed on most Samsung mobile devices. Its primary purpose is to provide organizations with a toolset for managing work devices, such as employee mobile phones or interactive kiosks. Samsung Galaxy hardware, as well as software such as Secure Folder and Samsung Wallet, make use of the Knox framework.

<span class="mw-page-title-main">Samsung Galaxy Note 4</span> Android smartphone model with stylus by Samsung

The Samsung Galaxy Note 4 is an Android smartphone developed and produced by Samsung Electronics. It was unveiled during a Samsung press conference at IFA Berlin on 3 September 2014 and was released globally in October 2014 as successor to the Samsung Galaxy Note 3. Improvements include expanded stylus-related functionality, an optically stabilized rear camera, 1440p quad-HD filming on the front camera, significantly increased charging rate, revised multi-windowing, and fingerprint unlocking. It is the last in the Samsung Galaxy Note series with interchangeable battery. Its subsequent model, the Samsung Galaxy Note 5, was unveiled on 13 August 2015.

<span class="mw-page-title-main">Odin (firmware flashing software)</span> Utility software developed by Samsung

Odin is a utility software program developed and used by Samsung internally which is used to communicate with Samsung devices in Odin mode through the Thor (protocol). It can be used to flash a custom recovery firmware image to a Samsung Android device. Odin is also used for unbricking certain Android devices. Odin is the Samsung proprietary alternative to Fastboot.

Custom firmware, also known as aftermarket firmware, is an unofficial new or modified version of firmware created by third parties on devices such as video game consoles, mobile phones, and various embedded device types to provide new features or to unlock hidden functionality. In the video game console community, the term is often written as custom firmware or simply CFW, referring to an altered version of the original system software inside a video game console such as the PlayStation Portable, PlayStation 3, PlayStation Vita/PlayStation TV, PlayStation 4, Nintendo 3DS, Wii U and Nintendo Switch. Installing custom firmware on some devices requires bootloader unlocking.

<span class="mw-page-title-main">Samsung Experience</span> Software overlay by Samsung Electronics

Samsung Experience was the name of the software overlay by Samsung for its Galaxy devices running Android 7.x “Nougat” and Android 8.x “Oreo”. It was introduced in late 2016 on a beta build based on Android 7.0 “Nougat” for the Galaxy S7, succeeding TouchWiz. It has been succeeded in 2018 by One UI based on Android 9 “Pie” and later versions.

Heimdall is a free and open-source software for Linux, Macos and Unix, to manage and flash files on electronic devices through the Thor (protocol). It's a free/libre/open-source equivalent of the Windows software Odin, provided by Samsung.

<span class="mw-page-title-main">Bootloader unlocking</span> Process of disabling secure device booting

Bootloader unlocking is the process of disabling the bootloader security that makes secure boot possible. It can make advanced customizations possible, such as installing a custom firmware. On smartphones this can be a custom Android distribution or another mobile operating system. Some bootloaders are not locked at all, others can be unlocked using a standard command, others need assistance from the manufacturer. Some do not include an unlocking method and can only be unlocked through a software exploit.

The Qualcomm Emergency Download mode, commonly known as Qualcomm EDL mode and officially known as Qualcomm HS-USB QD-Loader 9008 is a feature implemented in the boot ROM of a system on a chip by Qualcomm which can be used to recover bricked smartphones. On Google's Pixel 3, the feature was accidentally shown to users after the phone was bricked.

<span class="mw-page-title-main">Android recovery mode</span> Mode on Android operating system for installing system updates and wipe data

The Android recovery mode is a mode of Android used for installing updates and wipe data. It consists of a Linux kernel with ramdisk on a separate partition from the main Android system.

The booting process of Android devices starts at the power-on of the SoC and ends at the visibility of the home screen, or special modes like recovery and fastboot. The boot process of devices that run Android is influenced by the firmware design of the SoC manufacturers.

References

  1. According to u-boot's md/Kconfig the communication protocol is named Thor.
  2. "Info about i9100 | LineageOS Wiki".
  3. Dumitru, Bogdan. "Boot any Samsung Devices into Download Mode". Odin . Retrieved 2021-09-11.
  4. "EMMC hacking, or: How I fixed long-dead Galaxy S3 phones". 10 January 2018.