LineageOS is the most popular ROM for Android devices. It garners vast success due to its near-stock Android experience with no bloatware, and a clean and uncluttered interface. It provides regular security updates and bug fixes that often lack in some stock ROMs. Additionally, it gives you a higher level of customization than the stock Android firmware.
Even better, this ROM supports an extensive list of devices, including older ones that no longer receive official updates. Here is a comprehensive step-by-step guide to installing LineageOS on your Android phone.
What You Need Before Installing LineageOS
You can install LineageOS via Windows, Mac, or Linux. We're focusing on Windows in this guide, so have a Windows PC and a USB cable for your Android device ready.
Before you begin, install the OEM USB drivers for your phone, to ensure your device is recognized when connected to the PC.
Next, back up all your vital data on the device since the installation process wipes everything in the internal memory. While doing this, ensure your device is fully charged.
Set Up ADB and Fastboot
You also need to set up the ADB and Fastboot tools on your PC. These help you to control your Android device by running terminal commands via USB. For instance, Fastboot allows you to perform tasks like unlocking the bootloader, flashing system images, and more.
Download the ADB and Fastboot tools from the Android Developer website in the form of the SDK Platform-Tools package. Unzip the downloaded package and find the contents of interest in the platform-tools folder. Keep this folder in mind.
Enable USB Debugging
Next, enable USB Debugging on your Android device. To unlock this option, launch the Settings app, open About phone, scroll down till you find the Build number section, and then tap on it until you see a notification informing you that you're now a developer. If you have configured a screen lock, it will be needed in this step.
After that, go back to the Settings app, and due to differences in Android versions, search for the words Developer options in the search bar at the top. Tap on the Developer options search result when it pops up, scroll down to the Debugging section, and enable the USB debugging toggle.
You're now almost ready to start. You now just need to confirm your device's CPU architecture. This will be helpful when downloading a Google Apps installation package. Download the Treble Info app from Google Play Store, open it, and check the Architecture section. Most devices will be ARM or ARM64.
Double-check the prerequisites above and continue to the next step.
Step 1: Download LineageOS and Everything Else You Need
Before continuing, confirm that LineageOS is available to download for your device. Some devices with official support include the Google Pixel lineup, select Samsung phones (but not recent Galaxy S models), as well as devices from Xiaomi, Motorola, Asus, and more.
Visit the official LineageOS devices website, choose your device manufacturer category, select your device model name, open the builds section, and download the ROM installation package (a ZIP file) you wish to install.
If you are out of luck on the official website, visit the reputable XDA forums and check for your device. On XDA, how-to-install instructions will be provided, so keep an eye out for that.
Download a Recovery
The stock Android recovery does not support flashing a custom ROM package, so you need a custom recovery. If your Android device is officially supported, download Lineage Recovery for it. Again, head over to the website and open the builds section.
Depending on your device partitioning scheme, the Lineage Recovery can be downloaded as a recovery.img, boot.img, or vendor_boot.img.
- If you find a recovery.img file in the LineageOS Download builds section, download it and ignore the other image files that you see in that section.
- If you only find boot.img, your device uses the boot partition for recovery. Download this image file.
- Devices like the Google Pixel 7 Pro come with a vendor_boot partition for recovery, meaning the image to download will be vendor_boot.img.
As for unofficial devices, check the XDA forums for popular custom Android recoveries like TWRP or the top TWRP recovery alternatives. The forum posts will provide download links and installation instructions.
Download the Google Apps
LineageOS does not ship with Google apps. Therefore, if you wish to have Google Play Store functionality, download an add-on application package from the recommended LineageOS Google Apps website. Ensure you download the proper Google Apps package for your device architecture (which you should have checked above) and match the ROM version you plan to install.
For convenience, place all the files you have downloaded in the platform-tools folder you unzipped previously—the ROM file, the recovery image, and the Google Apps package.
Step 2: Unlock the Bootloader
You must unlock your device's bootloader for the ultimate gateway to fully-fledged Android modding. Unlocking the bootloader means that you disable the security restrictions put in place by the manufacturer that prevent you from flashing your device partitions.
Luckily, many popular manufacturers like Google, Samsung, Xiaomi, Motorola, Sony, and OnePlus allow you to unlock the bootloader. However, keep in mind that an unlocked bootloader may void the warranty of your device.
Unlocking the bootloader will wipe your phone, so make sure you've backed up your data before you begin.
If your device is unlockable, follow our how to unlock the Android bootloader guide. Once done, re-enable USB Debugging since your device is factory reset during the unlock process.
Step 3: Install the Custom Recovery
To install the recovery image file, start by opening a Command Prompt window. Open the platform-tools folder, type cmd in the address bar, and hit Enter. This is the only Command Prompt window you will use for all the subsequent steps since you should have copied all the files into the same folder.
Next, connect your device to the PC and type the following ADB command into the Command Prompt window to confirm the device is connected.
adb devices
You'll be prompted to allow USB debugging in a pop-up that appears on the phone screen. Then, reboot your device into bootloader mode by running the command below.
adb reboot bootloader
Once in bootloader mode, flash the recovery.img file using the following command.
fastboot flash recovery recovery.img
If you have a boot.img for recovery instead, execute the command below.
fastboot flash boot boot.img
And for vendor_boot.img file, run the following command.
fastboot flash vendor_boot vendor_boot.img
After you have flashed the correct recovery image, reboot into recovery mode using the following command.
fastboot reboot recovery
If the command doesn't take you into recovery mode, use your device-specific key-combination method as an alternative. For instance, many devices require you to long press the Power button + Volume Up key when off.
Step 4: Install LineageOS Using Custom Recovery
Your device should now be in Recovery Mode and should be able to see the Lineage Recovery UI.
On the recovery interface, tap Factory reset, then Format data/factory reset, and select Format data to confirm. This process will wipe all the data associated with the current system on your device. After that, use the back arrow in the top-left corner to return to the main menu.
It is time to activate ADB sideload mode to help you flash the ROM. ADB sideload mode allows you to push and install a ZIP package on your Android device using a single command on your PC. To do this, tap Apply update and select the Apply from ADB option.
Ensure your device is still connected to the PC. Execute the command below to confirm that your device is connected in sideload mode. You will get feedback on your Android device serial number and the word sideload as output.
adb devices
To sideload the ROM via ADB, run the following command. Replace the word romname with the actual filename of the ROM file you downloaded.
adb sideload romname.zip
Be patient as the ROM is installed, and once the process is complete, the recovery will exit the sideload mode and take you to the main screen. A success message will also be displayed at the bottom of the screen.
Step 5: Install Google Apps Add-On (Optional)
If you prefer a vanilla experience on LineageOS, skip this step, but you will not have any Google Play Services installed on your device.
To install the Google apps, and assuming you are still in recovery mode, tap Advanced and select Reboot to recovery option. Once back in recovery, activate ADB sideload mode as you did for the ROM and flash the Google Apps ZIP package you downloaded using the adb sideload command.
Step 6: Reboot Into LineageOS
After completing all the steps above, you are ready to boot into the LineageOS system. Tap on the Reboot system now option and wait for the boot process to complete. The first boot takes some time, so be patient.
The moment you see the welcome screen, the installation process is a success. Go through the initial Android setup process and restore your data before exploring all the goodies in store for you.
Revitalize Your Android Device With LineageOS
Custom ROMs breathe new life into old and new devices, and LineageOS is one of the best examples as it extends the life span of Android devices significantly compared to the manufacturers.
If you have an old Android device that stopped getting security updates, there is a possibility to turn that around by installing LineageOS. Alternatively, you can find an even wider number of devices being supported with unofficial builds on the XDA forums. All in all, this is a custom ROM that you should not miss out on.