Android’s biggest feature is not that it is available across a number of devices and easily accessible even for those with very small budget. The real USP of Android is its open nature that allows developers to grab the source code from Android Open Source Project and add their own layer of enhancements to make a new version altogether.
One of the highlights of these forked version of Android is the ability to work even on devices with older hardware. Depending on the device in your possession, one can install different versions of Android, and some of them may even be maintained by a team of developers that guarantees timely software updates and bug-free user experience. Since Android is technically free, these modified versions are also available for free.
The trend of installing a forked version of Android was made popular by CyanogenMod, a modified version of Google’s mobile operating system. In fact, the operating system was so good that OnePlus decided to use it instead of regular Android on its first smartphone, the OnePlus One. Cyanogen, however, did not live long, and failed to survive. Now, a team of developers have taken CyanogenMod, and have modified it into custom experience called LineageOS.
What is LineageOS?
LineageOS, like Cyanogen before it, is a close to stock version of Android with features not easily available on Google’s operating system. It can be installed even on devices, which have stripped off update cycle by the OEMs. The operating system essentially brings a new lease of life to devices that have been relegated by the manufacturer, and haven’t received a software update in really long time.
Installing LineageOS, however, is not an easy task. The success rate of the process, where you flash your device with LineageOS instead of Android, is not guaranteed. If you are brave enough to try LineageOS on your smartphone then here is a guide on how you should go about with the procedure.
Watch: How to install Android P on non-Pixel devices
First Things First
Installing LineageOS or any other custom ROM on your Android device involves a set of steps. These steps and tools needed to complete them varies according from device-to-device. Before you get started, here is a list of all the things that you will need to flash LineageOS on your device:
1. Compatible Android smartphone or tablet.
2. USB cable to connect that device.
3. Laptop or desktop running Windows, macOS or Linux.
4. Active internet connection
5. Free time to sit through the process, and successfully install the ROM. This could take around an hour or two.
Step 1: Install necessary software
The first major step is to install necessary software on your PC running Windows, macOS, Linux or ChromeOS. The software will help you identify whether communication can be established with your device, and help flash the ROM.
Usually, the software needed to carry out this task is ADB or Android Debug Bridge. The software is developed, maintained and hosted by Google, which eliminates risks of malware while installing the program. The ADB software can be downloaded from Android Developers page, and it won’t take long to install.
Once installed, users can access ADB via command prompt on Windows or terminal window on Linux and macOS. The commands are extremely simple and straight forward to execute.
Step 2: Download software packages
Before installing the package, it is recommended that you check whether you device is compatible with the ROM by heading to LinageOS wiki, and it seems to be support a large set of device models. Once you find your device in LineageOS wiki, go ahead and download the package with most recent upload date.
Once you have the file downloaded to your computer, you can proceed to download the custom recovery package as well as the Google apps package. For custom recovery, the TeamWin Recovery Project or TWRP is the most recommended option. Once you have LineageOS, Recovery package and Google apps package for your device, move the files into the same location as the ADB files.
Step 3: Backup and prepare for LineageOS
It is always recommended to create a backup of your files before flashing with a custom ROM. There are a number of free and paid apps available on Play Store for mobile and on desktop to create backup. It is important to figure what you want to backup, and then the right way to back those files.
If an app allows you to back your files to a cloud storage then take advantage of it. Google also allows you to backup your contacts using Google account, and you can always use third-party tools to backup your call log and SMS to a desktop client or cloud.
Step 4: Enable USB Debugging
This next step is a rather easy one where you need to enable USB debugging and OEM unlocking. These two can found in your device’s settings panel, hidden within a section called “Developer Options”.
One can enable Developer Options by tapping seven times on the build number, which is usually available from System options. Once you have enabled developer options, then toggle on USB debugging and OEM unlock. If OEM unlock option is not available then simply enable USB debugging on your smartphone.
Once you have enabled the option, connect your device to a computer using the cable supplied with the smartphone. You might see a notification asking if you want to trust the computer. Confirm that you trust the connection, and exit the settings the menu. This should start installation of all necessary drivers needed to connect the smartphone with the PC.
Step 5: Unlock the bootloader
This is one of the crucial steps in the process of flashing a ROM to any Android device. The steps for unlocking the bootloader might vary from device to device, and it is advisable to check various forums that detail the process and whether there are any issues with the device. Once you are sure that the bootloader of your device can be unlocked, simply head to the installation guide for your device.
The steps there will help you unlock your bootloader, and it usually involves wiping the data. First connect your device to your computer using a USB cable, and then running a few ADB commands should unlock the smartphone. Here are a list of steps common for most devices:
An ADB command to make sure your device is properly connected
An ADB command to reboot the device into fastboot mode
A fastboot command to check that the device has entered fastboot mode and is properly connected
A fastboot command that will unlock the bootloader
Step 6: Flash a custom recovery
Once you have unlocked the bootloader, it is time to flash a custom recovery onto your device. This will be the first time you will flash a piece of software onto your device, so do proceed with caution.
Make sure you have right custom recovery from the TWRP website and then fire up ADB via command prompt and run following commands.
adb devices // Ensure your device is properly connected
adb reboot bootloader // The command will get you into fastboot mode
fastboot devices // This step performs one final check before flashing the device
fastboot flash recovery TWRP.img // Initialization of flash process
Once ADB and fastboot are done flashing, you should reboot the device into recovery mode. The recovery mode usually gets triggered by pressing power off and then holding the volume down key while powering on. This will boot the device into TWRP when you press the right set of hardware keys as defined for your smartphone model.
On this screen, tap on “Swipe to Allow Modifications” button that will ensure you can change the software configuration. Once you have booted the device into TWRP, your device is ready for flashing LineageOS.
Step 7: Flashing LineageOS
You have already downloaded the necessary installation file in Step 2 but the file needs to be on the device, and not your computer. While one can simply connect and transfer files, the same process is not applicable due to lack of Android system on the system.
In order to transfer file from PC to your smartphone, we will once again use ADB commands. From the main menu of TWRP, tap Wipe and then Format Data. Accept the warning, and wait for the “Successful” message. Now hit the back button until you reach the Wipe page. Now, tap on Advanced Wipe, and you will see a series of check boxes.
The check boxes show the partitions or folders that need to wiped in this process. You need to make sure that the first three folders are selected – Dalvik/ART Cache, System, and Cache. Now, swipe from left to right on the slider marked Swipe to Right to begin wipe process.
Once this process is done, you are officially ready to flash LineageOS. With the device still in TWRP mode, connect your smartphone to the PC using the USB cable. Now, start the command prompt or terminal window in the ADB folder, perform a device check and then use push command (adb push LINEAGE.zip /sdcard/) to move your LineageOS files onto the internal storage of the device.
Once you type the command and press Enter, ADB will begin moving the LineageOS file to your device. Wait till you see “1 file pushed” notification on command prompt, and have patience if you do not seen any progress bar.
On your device, go back to the main menu of TWRP and tap install. You will see list of available files including the LineageOS package. Tap on the filename and the screen will show three options: tap on Swipe to Confirm Flash. TWRP will begin flashing LineageOS on your device, and tell you when it is successful.
Step 8: Flash necessary applications
The last step only completes installation of LineageOS, which is a barebones image of Android. Now, you have install missing pieces or in other words, Google apps like Google Play Store, Google Play Services, Gmail and Google Maps. For this process, you will need to flash the Google apps package downloaded in Step 2. Boot your device into TWRP and connect to your computer and then use ADB to push the file to your device. Once push is successful, locate the file, and install by clicking on Swipe to Confirm Flash.
Once flash is successful, tap on Wipe Cache/Dalvik, wait for a moment and hit Reboot System. This process will reboot your device into LineageOS.
Step 9: Reboot and personalize
This first boot process into LineageOS should take a while since the OS is installed fresh. If the boot process take more than 15 minutes then try hard reboot by holding down the power button until the device restarts. If it still doesn’t boot then something went wrong during flash process. Once again try the Step 7 and start again.
If the device boots successfully, the first thing you will notice is a new boot animation with a LineageOS followed by start screen of Android. Now choose your language, add Google Account, and welcome yourself to the world of Lineage.