LineageOS is a free, open-source operating system based on Android that replaces your device’s stock firmware. Installing it gives you a cleaner, ad-free experience, longer software support for older devices, and deeper control over permissions and performance. This guide walks you through the entire process—from unlocking the bootloader to booting into your new system—with the exact steps and warnings you need to avoid bricking your phone.
What You’ll Need
- A compatible Android device (check the official LineageOS device list).
- A USB cable and a computer (Windows, macOS, or Linux).
- ADB and Fastboot tools installed on your computer.
- LineageOS ROM zip file for your specific device.
- Optional: Google Apps (GApps) package if you want Google services.
- A full backup of your data—this process wipes everything.
- At least 70% battery charge on your phone.
Step-by-Step
- Back up your device. Copy photos, contacts, and any important files to your computer or cloud. Your apps and settings will be erased.
- Enable Developer Options. Go to Settings > About phone and tap Build number seven times. You’ll see a toast saying “You are now a developer.”
- Enable OEM unlocking. In Settings > Developer options, turn on OEM unlocking. This is required to unlock the bootloader. If the toggle is grayed out, your device may be carrier-locked or unsupported.
- Enable USB debugging. In the same Developer options menu, turn on USB debugging.
- Install ADB and Fastboot on your computer. Download the platform-tools from the official Android developer site and extract them to a folder. On Windows, you may need to install the proper USB drivers for your device.
- Connect your phone to the computer. Use a good quality USB cable. When prompted on your phone, allow USB debugging and check “Always allow from this computer.”
- Verify the connection. Open a terminal/command prompt in the platform-tools folder and run
adb devices. Your device should appear with “device” status. If it shows “unauthorized,” re-check the prompt on your phone. - Reboot to bootloader. Run
adb reboot bootloader. Your phone will restart into fastboot mode (a black screen with text). - Unlock the bootloader. Run
fastboot flashing unlock(on most devices) orfastboot oem unlock(on older ones). Confirm on your phone’s screen. This wipes all data and may void your warranty. Once done, your device will restart automatically. - Set up the device again (temporarily). After the wipe, go through the initial setup, re-enable Developer options and USB debugging, and connect to the computer again.
- Download the correct LineageOS build. Go to the official LineageOS website, find your device, and download the latest stable ROM zip. Also download the recommended GApps package (choose the ARM64 architecture and Android version matching your LineageOS build).
- Transfer the ZIP files to your phone. With USB debugging on, run
adb push lineage.zip /sdcard/andadb push gapps.zip /sdcard/(replace filenames). Alternatively, copy via MTP if it works. - Boot into recovery. Run
adb reboot recovery. Your device will boot into the stock recovery (or a custom one if already installed). - Install a custom recovery (if needed). If your device doesn’t have TWRP or LineageOS recovery, you need to flash it. Download the recovery image for your device, then from bootloader run
fastboot flash recovery recovery.img. Then reboot into recovery again. - Wipe data and cache. In recovery, go to Wipe and select Format data (type “yes” if prompted). Then go to Advanced wipe and wipe Dalvik/ART Cache, Cache, and System. Do not wipe the internal storage unless you want to remove the ZIPs you just pushed.
- Install LineageOS. Go to Install, select the LineageOS zip, and swipe to confirm. Wait for the installation to finish.
- Install GApps (optional). Without rebooting, go to Install again, select the GApps zip, and swipe to install. This is only needed if you want Google Play services.
- Reboot. Go to Reboot and select System. The first boot can take 5–10 minutes. Be patient.
- Complete setup. Once booted, go through the Android setup wizard. You now have LineageOS installed.
Common Mistakes
- Downloading the wrong ROM variant (e.g., using a carrier-specific build on an unlocked device).
- Forgetting to unlock the bootloader before trying to flash—this causes a “FAILED (remote: unknown command)” error.
- Skipping the data wipe, leading to boot loops or crashes.
- Installing GApps that don’t match the Android version or architecture of your ROM.
- Using a faulty USB cable or port, causing ADB to disconnect mid-flash.
- Not backing up the stock ROM, so you can’t restore if something goes wrong.
Tips
- Always read the official installation guide for your specific device on the LineageOS wiki—some devices have extra steps (e.g., vendor partitions).
- Keep the platform-tools folder handy; you’ll need it for future updates or if you need to restore.
- Use a USB port directly on your computer, not a hub.
- If you plan to root later, flash Magisk after the first boot, not before.
- Take a note of your current Android version and firmware—some ROMs require a specific stock version first.
- Consider using LineageOS recovery instead of TWRP for simpler updates via the built-in updater.
Troubleshooting
Device not detected by ADB/Fastboot: Install the correct USB drivers for your phone model. Try a different cable or port. On Windows, run adb kill-server then adb start-server.
Boot loop after installation: Go back to recovery (press the key combo for your device) and wipe data again. If that fails, reflash the ROM and GApps in the correct order. Ensure you didn’t skip the System wipe.
Cannot unlock bootloader: If the OEM unlock toggle is grayed out, your device may be carrier-locked or the manufacturer has disabled it. Check the LineageOS wiki for your device—some require a special code or tool.
Error “Failed to mount /system” during install: This usually means the system partition wasn’t wiped. Go to Advanced wipe and select System, then try again.
Google Play services keep crashing: You likely installed the wrong GApps package. Download the correct one for your Android version and architecture, then reflash it (wipe data first if necessary).
Phone stuck on boot logo: Wait at least 10 minutes. If still stuck, force reboot into recovery and reflash the ROM. If the problem persists, restore your stock firmware using the manufacturer’s flashing tool.
Frequently Asked Questions
Will installing LineageOS void my warranty?
In most cases, yes, because it involves unlocking the bootloader, which is a manufacturer-level change. Some regions have laws protecting consumers, but it’s safest to assume the warranty is void.
Can I go back to the stock OS?
Yes. Download the official stock firmware for your device and flash it using the manufacturer’s tool (e.g., Odin for Samsung, Fastboot for Pixel). This will restore the original system and relock the bootloader.
Do I need to root my phone to install LineageOS?
No. LineageOS works without root. Rooting is optional and done separately after installation.
Will I still get OTA updates?
Yes, LineageOS supports over-the-air updates through the built-in Updater app. You’ll receive notifications when a new build is available.
Is my banking app going to work?
Many banking apps detect custom ROMs and refuse to run, especially if the bootloader is unlocked. You can try hiding the unlock status with Magisk, but it’s not guaranteed. Some apps work fine if you don’t root.
What is the difference between LineageOS and LineageOS for microG?
The microG variant replaces Google Play Services with an open-source alternative, so you don’t need GApps. It’s lighter on battery and more privacy-focused, but some apps that require Google services may not work.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Turn Off Shutter Sound on iPhone
- VPN Setup on iPhone SE: Step-by-Step Guide
- Fix Internet Not Working on Windows 11
- Fix Right Click Not Working in Firefox
- Compare Two Columns with Comma Separated Values in Excel
- How to Limit Ad Tracking on iPhone Apps