Samsung devices come with a unique boot mode called “Download mode”, which is very similar to “Fastboot mode” on some devices with unlocked bootloaders. Heimdall is a cross-platform, open-source tool for interfacing with Download mode on Samsung devices. The preferred method of installing a custom recovery is through this boot mode – rooting the stock firmware is neither necessary nor required.
Please note: On windows PC's to run the installation using ODIN check this [HOWTO](https://community.e.foundation/t/howto-install-e-on-a-samsung-smartphone-with-windows-easily/3186). The steps given below explain how to install Heimdall and flash /e/OS
1. Enable OEM unlock in the Developer options under device Settings.
> It appears sometime that the OEM unlock option is missing from Development options, especially on new devices. Please connect your device to the wifi and check of system updates. After a reboot, the option should appear.
1.[Install Heimdall](../../support-topics/install-heimdall) or if you prefer you can [Build latest Heimdall suite](../../support-topics/build-heimdall)
1. Power off the device and connect the USB adapter to the computer (but not to the device, yet).
1. Boot into download mode:
Samsung devices come with a unique boot mode called "Download mode", which is very similar to "Fastboot mode" on some devices with unlocked bootloaders.
Heimdall is a cross-platform, open-source tool for interfacing with Download mode on Samsung devices.
The preferred method of installing a custom recovery is through Download Mode{% unless custom_root_instructions %} -- rooting the stock firmware is neither necessary nor required{% endunless %}.
{% unless device.no_oem_unlock_switch %}
1. Enable Developer Options by pressing the `Build Number` option in the `Settings` app within the `About` menu
* From within the Developer options menu, enable OEM unlock.
{% endunless %}
2. Download and install the appropriate version of the [Heimdall suite](https://www.androidfilehost.com/?w=files&flid=304516) for your machine's OS
***Windows**: Extract the Heimdall suite zip and take note of the new directory containing `heimdall.exe`. You can verify Heimdall is functioning by opening a Command Prompt or PowerShell in that directory and running `heimdall version`.
* If you receive an error, install the [Microsoft Visual C++ 2015-2019 Redistributable Package (x86)](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) on your computer.
***Linux**: Extract the Heimdall suite zip and take note of the new directory containing `heimdall`. Now copy `heimdall` into a directory in $PATH, a common one on most distros will be /usr/local/bin. For example `cp heimdall /usr/local/bin`. You can verify Heimdall is functioning by opening a Terminal and running `heimdall version`.
***macOS**: Mount the Heimdall suite DMG. Now drag `heimdall` down into the `/usr/local/bin` symlink provided in the DMG. You can verify Heimdall is functioning by opening a Terminal and running `heimdall version`.
{% include alerts/tip.html content="These Heimdall suite distributions were built by LineageOS Developer Nolen Johnson (npjohnson) and Jan Altensen (Stricted)" %}
4. Power off the device, and boot it into download mode:
* {% t devices.with_the_device_powered_off %}
* {% t device.download_boot %}
Accept the disclaimer, then insert the USB cable into the device.
1. Windows only: install the drivers. A more complete set of instructions can be found in the ZAdiag user guide.
1. Run `zadiag.exe` from the Drivers folder of the Heimdall suite.
1. Choose Options » List all devices from the menu.
1. Select Samsung USB Composite Device or MSM8x60 or Gadget Serial or Device Name from the drop down menu. (If nothing relevant appears, try uninstalling any Samsung related Windows software, like Samsung Windows drivers and/or Kies).
1. Click Replace Driver (having to select Install Driver from the drop down list built into the
1. If you are prompted with a warning that the installer is unable to verify the publisher of the driver, select Install this driver anyway. You may receive two more prompts about security. Select the options that allow you to carry on.
1. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
```shell
* Now, click the button that the on screen instructions correlate to `Continue`, and insert the USB cable into the device.
5.**For Windows users only**: install the necessary drivers. A more complete set of instructions can be found in the [Zadig user guide](https://github.com/pbatard/libwdi/wiki/Zadig).
1. If nothing relevant appears, try uninstalling any Samsung related Windows software, like Samsung Windows drivers and/or Samsung Kies.
2. Run `zadig.exe` found in your extracted Heimdall directory.
{% include alerts/tip.html content="For the interested, source and documentation for zadig.exe can be found [here](https://github.com/pbatard/libwdi/releases)." %}
3. Choose **Options**»**List all devices** from the menu.
4. Select **Samsung USB Composite Device** or **MSM8x60** or **Gadget Serial** or **Device Name** from the drop down menu.
5. Click **Replace Driver**, then selecting **Install Driver** from the drop down list built into the button.
6. If you are prompted with a warning that the installer is unable to verify the publisher of the driver, select **Install this driver anyway**. You may receive two more prompts about security. Select the options that accept the warnings and allow you to carry on.
6. On your machine, open a Command Prompt or PowerShell (Windows) window, or Terminal (Linux or macOS) window, and type:
```
heimdall print-pit
```
1. If the device reboots, Heimdall is installed and working properly.
7. If the device reboots that indicates that Heimdall is installed and working properly. If it does not, please refollow these instructions to verify steps weren't missed, try a different USB cable, and a different USB port.