If you’re looking to give your Android device a new lease on life, installing a custom ROM like LineageOS can be a great way to do it. LineageOS is an open-source operating system that’s built on top of the Android Open Source Project (AOSP). It’s designed to be fast, stable, and customizable, and it’s compatible with a wide range of Android devices. In this post, we’ll walk you through the steps to install LineageOS on your Android device.
What You Need Before Installing LineageOS
There are some requirements to complete the installation of the Lineage OS on your phone or device:
- A Lineage OS Compatible Android Device and do not forget to fully charge your device as you may brick the phone if it gets out of charge during the flashing process.
- A Compatible USB Data Cable (preferably, by the phone’s OEM). Do not fall for cheap USB cables as these cables can prove costly if the phone is bricked during the installation process.
- A Windows, Linux, or Mac PC (in some cases, a system with ChromeOS).
- An Active Internet Connection to Download Packages and Software Applications.
- Time as the flashing process may take an hour or two, depending on your technical knowledge and the speed of the Internet connection.
How to Install LineageOS on Your Android Device
Step #1. Check Your Device Compatibility
The first step in installing LineageOS on your Android device is to check if it’s compatible with the custom ROM. To do this, you can visit the official LineageOS website and navigate to the list of supported devices.
- Open a web browser on your computer or mobile device.
- Go to the official LineageOS website at https://lineageos.org/.
- Click on the “Download” tab in the top menu.
- Scroll down until you see the “Supported Devices” section.
- Browse through the list of supported devices to see if your device is listed. (like Samsung)
If your device is on the list, you’re good to go. If not, you may be able to find a custom ROM that’s designed specifically for your device. However, keep in mind that using an unofficial custom ROM can be risky and may lead to potential issues such as instability, loss of data or even bricking your device.
It’s important to note that even if your device is listed as compatible with LineageOS, there may be some features that don’t work perfectly or at all. This is because LineageOS is a community-driven project that relies on volunteers to create and maintain the ROM for each device. So, before proceeding with the installation, it’s a good idea to read through the comments and reviews of other users who have installed LineageOS on the same device to get an idea of what works and what doesn’t.
Step #2. Set Up PC and Device for Flashing
Before you can start installing LineageOS on your Android device, you need to set up your PC and device for flashing. Here are the steps to do this:
Download and Install ADB with Fastboot
- Download and install ADB on your PC. Make sure to enable Fastboot and note down the path to the ADB/Fastboot files. Do not forget to install Platform Tools as well.
Download TWRP (Team Win Recovery Project)
- Launch a web browser and head to the TWRP website.
- Now head to Devices and search for your mobile phone. Make sure to select the correct version of the TWRP as per your mobile phone.
3. Then steer to the download section and select the recovery software as per your region.
4. Now download the TWRP recovery.
Download the Lineage OS
- Head to the downloads page of the Lineage OS and select your OEM.
- Now select your mobile phone and download the Lineage OS. Make sure to note down the Lineage OS version as you may require it when downloading Google Apps.
Download Google Apps (Optional Download)
To use your phone with your Google account, you will need to access the Play Store and all other Google features but that is not natively available on the Lineage OS (being an open-source project). For that, you may install Google Apps. If you have planned not to use any Google-based Android features, then you can skip Google Apps.
- Launch a web browser and steer to the GAPPS download page of the Lineage website.
- Now open the GAPPS link as per the downloaded Lineage OS in the previous step.
- Then select the platform (if you are not sure about the processor type of your device, search the Internet), and afterward, leave the Android version to the pre-selected.
- Now choose the variant. Nano is the one with fewer options whereas Full contains all the GAPPS features. If you are not willing to use Full, then you may opt for Micro or Larger.
- Then click on the download button and wait till the download completes.
Enable Developer Mode and USB Debugging on Your Phone
To flash the Lineage OS on a phone, we need developer access and USB debugging on the phone as these features are essential to enable write access to the system ROM.
- Enable Developer Mode and USB Debugging on your Android phone
Step #3. Unlock the Bootloader of Your Phone
Before you can install a custom ROM like LineageOS on your Android device, you need to unlock its bootloader. The bootloader is a program that runs when you turn on your device, and it’s responsible for loading the operating system. By default, the bootloader is locked to prevent you from installing unauthorized software, but unlocking it allows you to install custom software like LineageOS.
- Connect your phone to the PC with a USB data cable and on your phone (if asked to), make sure to select that you trust the system. Then launch the system’s File Explorer.
- Now navigate to the folder where your ADB and Fastboot files are stored, usually, the following:
3. Then hold the Shift key and right-click in the folder.
4. Now select Open PowerShell Window Here or Open Command Prompt Window Here and then execute the following:
5. Then check if your phone is shown on the devices’ list. You may have to tap on OK on your phone’s screen (make sure to checkmark the Always Allow option) to enable ADB communications for the first time and re-execute the above command. If your phone is not shown in the devices, then reconnect the phone to the PC on a different USB port and repeat the above steps. In some cases, you may even have to install or update your phone’s drivers on the PC.
6. Once your phone is shown in the devices after executing the PowerShell command, execute the following:
adb reboot bootloadercopied to clipboard
7. Now wait till the phone restarts in the bootloader and then execute the following command to unlock the bootloader (your phone will revert to the factory settings, so, make sure the data on the phone is backed up):
8. Then, on the phone’s screen, use the volume up or down buttons to select Yes and press the power button to confirm the unlocking of the bootloader.
If you fail to unlock your phone’s bootloader as your OEM does not support the ADB command to unlock the phone’s bootloader, then you may search the Internet to find out the method to unlock your phone’s bootloader.
Step 4: Flash TWRP on Your Phone
After unlocking your phone’s bootloader, it is time to flash a custom recovery (like TWRP) on your phone. If you are not comfortable with the TWRP recovery, you can also use the recovery image from your phone’s download page on the Lineage website or you may use Clock Work Mode Recovery.
- Once your phone resets to the factory defaults after unlocking the bootloader, then launch the system’s File Explorer and steer to the folder where TWRP files are stored.
- Now hold the Shift key and right-click on the TWRP folder.
- Then select Open PowerShell Window Here and afterward, execute the following:
fastboot flash recovery <nameofrecovery.img>
4. Make sure to replace the nameofrecovery.img with the actual name of the recovery file e.g., if the name of the recovery file is twrp-3.2.1-1-hammerhead.img, then the command will be as under:
fastboot flash recovery twrp-3.2.1-1-hammerhead.img
5. If you are having issues in flashing recovery, you may (one by one) execute the following (do not forget to change the Recovery.img with the actual file name):
fastboot devicesfastboot flash recovery RECOVERY.img
Step 5: Wipe/Reset Partitions on the Phone
Now is the time to wipe the official Android from your phone. To do so:
- Power on your phone and use the volume buttons (in some models, you may also need to press/hold the power button as well) on the phone to boot into the phone’s recently flashed recovery mode.
- Now, in the recovery screen tap on Wipe and then open Advanced Wipe.
- Then checkmark the options of System, Data, and Cache. Do not select any other boxes.
- Now swipe the bottom bar to the right to start the wipe process and wait till the process completes.
- Once done, restart your phone by using the button on the bottom.
If you are using Lineage OS recovery (not TWRP recovery), then you may execute the following one by one:
fastboot reboot adb reboot recovery
Step 6: Flash Lineage, GAPPS, and SU on the Phone
Now we will perform the main task of installing or flashing Lineage OS on your phone.
- Launch the system’s File Explorer and head to the folder where Lineage, GAPPS, and SU are present.
- Now hold the Shift key and right-click in the folder.
- Then select Open PowerShell Window Here and execute the following (here, the SD card is the local storage of the phone, and no need to insert an SD card in the phone. Also make sure to replace nameoflineagebuild.zip with the original file name):
adb push /sdcard
- Now move the GAPPS and SU (if you are willing to install these) to the phone by executing the following (make sure to replace the GAPPS.zip and SU.zip with the original file names):
adb push /sdcardadb
- Then, boot your phone in the recovery mode, tap on Install and select the Lineage OS zip. Make sure the Lineage OS is the first file in the queue.
- Now tap on Add More Zips and select the GAPPS zip. If you think that you may install the GAPPS later, then you will have to redo all the above processes, so, make the choice accordingly.
- Again, tap on Add More Zips and select the SU zip.
- Now make sure the top bar says “3 of Max of 10 Files Queued“.
- Then swipe the bottom bar to confirm the flashing of Lineage OS on your phone and wait till the process completes.
In the case of non-TWRP recovery, you may (one by one) execute the following in the system’s PowerShell in the ADB folder (do not forget to replace files with the original file names):
adb sideload LINEAGE.zip adb sideload GAPPS.zip adb sideload SU.zip
Step 7: Boot and Set Up Your Phone
Once the flashing process completes, reboot your phone for the last time and wait till the phone reboots as it can take some time to boot for the first time after flashing Lineage (if it takes more than 15 minutes, then you may force restart the phone). Once done, set up your phone as per your liking, and hurray, you are running Lineage OS on your phone. To enable root access, head to the Developer Options of the Lineage OS and enable it there.
If you are not happy with the Lineage OS on your phone, then you can reflash your phone with the stock ROM (the process is generally the same as the above) but you may need to search the Internet to do so. We are hopeful that this article will be helpful for you in the world of flashing custom ROMs but if you have any queries, we will be very happy to help out in the comments section.
That’s it! You’ve successfully installed LineageOS on your Android device and can now enjoy its features and benefits.