Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3638f4c9 authored by pranav's avatar pranav
Browse files

samsung device update

parent 31b32b64
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
Checking the correct firmware (only for Samsung dreeamlte)

Installation on your device requires a specific firmware version to be installed before you continue.

- Firmware refers to a device-specific set of images that are included in, and updated by the stock OS
- /e/OS builds for this device require an Android 10 version of the stock OS to be installed prior to following the installation guide
- Please ensure that you are checking the Android version, and not the vendor OS version
- Being on another custom ROM, including unofficial builds of the same version of /e/OS, does not ensure that this requirement has been fulfilled
- Please re-read this section as many times as necessary to fully understand the requirements

> If you are unsure what firmware version you are currently on, we strongly recommend returning to the corresponding stock OS before following the installation guide!

Failing to install the correct firmware version prior to installation may result in failure to install LineageOS, unexpected crashes post-installation, or permanent damage to your device!
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ adb reboot recovery

- {% t devices.with_the_device_powered_off %}, {% t device.recovery_boot %}

   

1. In TWRP return to main menu, then tap `Wipe`

1. Now tap `Format Data` and continue with the formatting process.
+59 −28
Original line number Diff line number Diff line
@@ -17,55 +17,86 @@

## Preparing for installation using Heimdall

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.
Heimdall is an open-source tool that lets you interface with Samsung's 'Download mode', similar to Fastboot mode on other devices. It's the preferred way to install a custom recovery on Samsung devices, and doesn't require rooting the stock firmware.
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 %}.

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:
{% 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 %}
    * 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
```
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.

    You must accept/continue with the warning in "Download mode" to unlock the bootloader (see image below). You can accept/continue by short-pressing the `Volume UP` button. Then, connect your device with your PC if you have already not done it.
    ![](/images/download-mode.png)
{% if device.required_bootloader %}

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.
{% capture bootloader_versions -%}
    `{% for bootloader in device.required_bootloader -%}
        {{ bootloader }}{% unless forloop.last %} / {% endunless %}
    {%- endfor %}`  
{%- endcapture %}

1. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
{% capture content %}
    Your device must be on bootloader version: {{ bootloader_versions }} otherwise the instructions found in this page will not work. The current bootloader version can be checked by running the command `getprop ro.bootloader` in a terminal app or an adb shell from a command prompt (on Windows) or terminal (on Linux or macOS) window.
{% endcapture %}

    ```shell
    heimdall print-pit
    ```
1. If the device reboots, Heimdall is installed and working properly.
{% include alerts/danger.html content=content %}

{% endif %}


## Installing the /e/OS Recovery on your {{device.codename }}

1. Download the /e/OS recovery (linked in the Download section above)
1. Download the custom recovery linked in the Download section above, named something like twrp-x.x.x-x-herolte.img and rename it to recovery.img.

> Ensure you download the .img file and not the .tar or .tar.md5 versions.
> Recoveries not listed above most probably won't work for this installation or further updates.
  
1. Power off the device and connect the USB adapter to the computer (but not to the device, yet).
1. Boot into download mode:
1. Power off the device.
1. 1. Boot into download mode:
* {% t devices.with_the_device_powered_off %}
* {% t device.download_boot %}
1. Connect your device to your computer using a data transfer cable.

   Accept the disclaimer, then insert the USB cable into the device.
1. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window in the directory the recovery image is located, and type:

```shell
heimdall flash --RECOVERY recoveryfilename.img --no-reboot
heimdall flash --RECOVERY recovery.img --no-reboot
```
> Replace `recoveryfilename` with the name of the recovery you downloaded

1. A blue transfer bar will appear on the device showing the recovery being transferred.
    {% include alerts/tip.html content="The device will continue to display `Downloading... Do not turn off target!!` even after the process is complete. When the status message in the top left of the device's display reports that the process is complete, you may proceed." %}
> The command will work well, if you've followed our instructions above exactly. For some reason if it does not work,make sure that the recovery file name is "recovery.img" and you're running the command in the folder where the file is. If you've downloaded a zip version, extract is first, rename the file and try again.

1. A transfer bar will appear on the device showing the recovery being transferred.

> Don't unplug or turn off any device until the process completes. Sometime it gets stuck, don't worry it will continue.

1. Unplug the USB cable from your device.
1. Manually reboot into recovery:

> Sometimes you may require removing the device’s battery out and putting it back in, or if you have a non-removable battery, press the Volume Down + Power buttons for 8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery -

* {% t devices.with_the_device_powered_off %}, {% t device.recovery_boot %}

    {% if device.update_vendors %}
+19 −10
Original line number Diff line number Diff line
## Preparing for installation using Heimdall

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.
Heimdall is an open-source tool that lets you interface with Samsung's 'Download mode', similar to Fastboot mode on other devices. It's the preferred way to install a custom recovery on Samsung devices, and doesn't require rooting the stock firmware.
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 %}
@@ -51,24 +50,34 @@ heimdall print-pit

## Installing a custom recovery using `Heimdall`

1. Download the custom recovery linked in the Download section above
1. Download the custom recovery linked in the Download section above, named something like twrp-x.x.x-x-herolte.img and rename it to recovery.img.

1. Power off the device and connect the USB adapter to the computer (but not to the device, yet).
1. Boot into download mode:
> Ensure you download the .img file and not the .tar or .tar.md5 versions.
> Recoveries not listed above most probably won't work for this installation or further updates.
  
1. Power off the device.
1. 1. Boot 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. Connect your device to your computer using a data transfer cable.

1. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window in the directory the recovery image is located, and type:

```shell
heimdall flash --RECOVERY recoveryfilename.img --no-reboot
heimdall flash --RECOVERY recovery.img --no-reboot
```
> Replace the recoveryfilename with the name of the recovery image you downloaded

1. A blue transfer bar will appear on the device showing the recovery being transferred.
> The command will work well, if you've followed our instructions above exactly. For some reason if it does not work,make sure that the recovery file name is "recovery.img" and you're running the command in the folder where the file is. If you've downloaded a zip version, extract is first, rename the file and try again.

1. A transfer bar will appear on the device showing the recovery being transferred.

> Don't unplug or turn off any device until the process completes. Sometime it gets stuck, don't worry it will continue.

1. Unplug the USB cable from your device.
1. Manually reboot into recovery:

> Sometimes you may require removing the device’s battery out and putting it back in, or if you have a non-removable battery, press the Volume Down + Power buttons for 8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery -

* {% t devices.with_the_device_powered_off %}, {% t device.recovery_boot %}

    {% if device.update_vendors %}