LineageOS/Installing

Requirements

edit
  • A desktop PC or laptop
  • A compatible phone or tablet
  • An USB data cable
  • A microSD card (optional, at least 4GB)
  • A recovery image for your specific model (TWRP recommended)
  • LineageOS custom ROM for your specific model
  • Gapps (optional)
  • Android SDK Platform Tools
  • Odin (required for Samsung devices)

Preparing for flashing

edit

Enabling OEM unlocking

edit

Go to Settings → About Phone or System on your device and find Build Number. Tap it 7 times to enable developer options. Return back and go to Developer options and find OEM unlocking, then turn on. You might be prompted to enter PIN or password to confirm.[1] You may need to factory reset before enabling, so backup of important files is important.

Flashing recovery

edit

On your computer, download Android SDK Platform Tools and a custom recovery tool. TWRP is recommended, but you can also use LineageOS Recovery.

For Samsung devices

edit

Connect your device to your computer. Power your device off and boot into download mode using the key combination:

  • Power + Home + Volume Down for older models with Home button
  • Power + Bixby + Volume Down for devices with Bixby button
  • Power + Volume Down for newer devices without Home or Bixby button

This will prompt a warning screen, which can be proceeded by pressing Volume Up button. Download and open Odin. This should recognise your device ("0 [COM3]" on left). Click "AP" button and select your recovery image in TAR format. Click "Start" to flash your recovery image to your device. Wait for a moment. When it does flash (PASS), boot into custom recovery mode using this key combination[2]:

  • Power + Home + Volume Up for older models with Home button
  • Power + Bixby + Volume Up for devices with Bixby button
  • Power + Volume Up for newer devices without Home or Bixby button

For other models

edit

Enable USB debugging in Settings -> Developer options -> USB debugging on your device. Connect to your computer and accept the connection. Open the platform tools folder, right-click and open command line (CMD). Type this following line to check that the device is connected.[3]

adb devices

Reboot into fastboot mode by typing the following code:

adb reboot bootloader

Copy the custom recovery image into the platform tools folder and rename the image to twrp.img. In command line, type the following code to flash TWRP to your device:

fastboot flash recovery twrp.img

Wait for the process to finish and type the following code to restart your device:

fastboot reboot 

Turn off your device and use the key combination Power + Volume Up to reboot into custom recovery.

Flashing LineageOS

edit

Via TWRP

edit
 
Screenshot of TWRP main menu

Once the device is booted into TWRP, wipe the system by going to Wipe -> Advanced Wipe, selecting Dalvik, System, Data and Cache, and then swipe to wipe. Reboot to TWRP.

Flashing via computer

edit

On your computer, rename the LineageOS ROM as LineageOS.zip, open command line, and enter this following code to flash LineageOS custom ROM to your device:

adb push LineageOS.zip /sdcard

If you need Gapps installed, download this file, rename as gapps.zip and type the following code to flash Gapps:[4]

adb push gapps.zip /sdcard

Flashing via SD card

edit

Transfer the same files as in computer method to SD card, put into your device, reboot, go to Install, select LineageOS custom ROM and swipe to flash.

If you need Gapps, flash this file in the same way.

Via LineageOS Recovery

edit

References

edit