LineageOS/Installing
This page was last edited on 14 November 2024, and is still under heavy construction. Content that is added is likely to be moved/deleted/edited significantly in a short amount of time. All Wikibookians with knowledge in this subject are welcome to help out. You can remove this tag when the book has become more mature. |
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
editEnabling OEM unlocking
editGo 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
editOn 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
editConnect 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
editEnable 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
editVia TWRP
editOnce 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
editOn 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
editTransfer 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
editReferences
edit- ↑ https://www.ultfone.com/unlock-android/oem-unlock-android.html - retrieved 2024-11-11
- ↑ https://www.getdroidstuff.com/post/how-to-install-twrp-recovery-on-samsung-odin - retrieved 2024-11-11
- ↑ https://support.mobiledit.com/portal/en/kb/articles/how-to-flash-twrp-on-non-samsung-devices - retrieved 2024-11-14
- ↑ https://www.howtogeek.com/348545/how-to-install-lineageos-on-android/ - retrieved 2024-11-14