Install LineageOS on jfvelte

Basic requirements

  1. Make sure your computer has adb. Setup instructions can be found here.
  2. Enable USB debugging on your device.

Preparing for installation

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.

  1. Download and install the Heimdall suite:
    • Windows: Extract the Heimdall suite and take note of the directory containing heimdall.exe. You can verify Heimdall is working by opening a command prompt in that directory and typing heimdall version. If you receive an error, make sure you have the Microsoft Visual C++ 2012 Redistributable Package (x86) installed on your computer.
    • Linux: Pick the appropriate package to install for your distribution. The -frontend packages aren’t needed for this guide. After installation, verify Heimdall is installed by running heimdall version in the terminal.
    • macOS: Install the dmg package. After installation, Heimdall should be available from the terminal - type heimdall version to double-check.
  2. Power off the device and connect the USB adapter to the computer (but not to the device, yet).
  3. Boot into download mode:

    • With the device powered off, hold Home + Volume Down + Power.

    Accept the disclaimer, then insert the USB cable into the device.

  4. 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.
    2. Choose Options » List all devices from the menu.
    3. 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).
    4. Click Replace Driver (having to select Install Driver from the drop down list built into the button).
    5. 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.
  5. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
    heimdall print-pit
    
  6. If the device reboots, Heimdall is installed and working properly.

Installing a custom recovery using heimdall

  1. Download a custom recovery - you can download TWRP. Simply download the latest recovery file, named something like twrp-x.x.x-x-jfvelte.img.

  2. Power off the your device and connect the USB adapter to the computer (but not to the device, yet).
  3. Boot into download mode:

    • With the device powered off, hold Home + Volume Down + Power.

    Accept the disclaimer, then insert the USB cable into the device.

  4. 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:
    heimdall flash --RECOVERY <recovery_filename>.img --no-reboot
    
  5. A blue transfer bar will appear on the device showing the recovery being transferred.
  6. Unplug the USB cable from your device.
  7. Manually reboot into recovery:
    • With the device powered off, hold Home + Volume Up + Power.

Installing LineageOS from recovery

  1. Download the LineageOS installation package that you would like to install or build the package yourself.

    • Optionally, download additional application packages such as Google Apps (use the arm architecture).
  2. If you are not in recovery, reboot into recovery:
    • With the device powered off, hold Home + Volume Up + Power.
  3. Now tap Wipe.
  4. Now tap Format Data and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.

  5. Return to the previous menu and tap Advanced Wipe, then select the Cache and System partitions and then Swipe to Wipe.

  6. Sideload the LineageOS .zip package:
    • On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
    • On the host machine, sideload the package using: adb sideload filename.zip
  7. (Optionally): If you want to install any additional add-ons, adb sideload filename.zip those packages in sequence.

  8. (Optional): Root your device by installing LineageOS’ AddonSU, (use the arm package) or by using any other method you prefer.
  9. Once you have installed everything successfully, run ‘adb reboot’.

Get assistance

If you have any questions or get stuck on any of the steps, feel free to ask on our subreddit or in #LineageOS on freenode.