Install LineageOS on smartphone

With LineageOS as an alternative to your standard Android version, you can breathe new life into a discarded smartphone or tablet, even if it has long since been discontinued by the manufacturer itself. It can also improve the existing device software. You can read how to install LinegeOS here.

That manufacturers are lax with updates for Android is a common complaint. Fortunately, there is an alternative for many devices, namely LineageOS. That is an Android variant, which is also called a custom rom. LineageOS is free, open source, bloatware free, but with plenty of customization options. The system usually runs quickly and stably. The installation requires some technical knowledge and some minor risks, such as the loss of the manufacturer’s warranty, but if a device is no longer supported with updates or safety updates, that is not such a problem.

In practice, the risk of rendering a device unusable by installing a different operating system is very small. And the so-called rooting of a device, an action that custom ROMs involve, is not a requirement. We even advise against it, because you run the risk that apps, such as those from banks, will no longer work properly.

LineageOS is ideal for outdated devices, but also ideal if you are dissatisfied with the standard software or if you do not trust it, for example due to the manufacturer’s privacy policy. For this article, we use an approximately 2.5 year old OnePlus 5T that knows the OxygenOS operating system as standard: Android in a different guise. LineageOS proves to be a popular option for this brand, but also for HTC, Xiaomi and Samsung, as statistics show.

Some preliminary research is needed to see if LineageOS can save you in your case. The availability can be found on the LineageOS wiki. Less popular devices or older devices are sometimes excluded, but an unofficial release or other alternative can still be a way out. Although they are less well controlled and less familiar.

Before you start

With the installation of a new operating system, all data stored on the phone disappears. Therefore, first secure everything: photos and videos are obvious, but also think of a WhatsApp backup. The option for a full backup on Google Drive is in that app itself. You can restore them after the switch to LineageOS. Also remember that you will be working on the installation for a while and then restoring the data. You cannot use the device all this time. Always start with a full battery.

Make sure you download exactly the right (often device-specific) parts. Then you limit the risks. If you’re using an official edition of LineageOS, keep the instructions for that device on the LineageOS website, so you know if there are exceptions to the instructions in this article, for example.

The steps to be taken are broadly the same, but they differ per device in the details of the process. If you come across something strange, a search through Google is sometimes inevitable. We give as many tips as possible for devices on which the process goes differently. The first step is always the so-called unlocking of the device, or more precisely: the boot loader. That part ensures that the correct operating system starts when you switch on the phone. Unlocking clears the way to put a so-called custom recovery on the phone.

With Android, the recovery is a separate environment where you can enter via a certain command or key combination, and with which you can, for example, make a backup or make changes to the system partition. From here you also put LineageOS on the smartphone. The most popular custom recovery is TWRP and we install and use it here.

With TWRP, we make a full backup of the most important partitions, to have a way back if you don’t like LineageOS. We also put both LineageOS and a package with Google apps, which is not standard in LineageOS, on the smartphone from TWRP.

Unlock boot loader

The boot loader can be unlocked from almost every device. That is even a legal requirement. However, that is often an action with which you lose the manufacturer’s warranty on the phone. How unlocking should be done differs per device. With our OnePlus 5T, but also devices from Google, you can use Android Debug Bridge (adb) and fastboot. With adb, you send commands and files to the smartphone, while fastboot allows writing to partitions on the device.

Other manufacturers require specific instructions to unlock the boot loader. Google is your best friend in this. Often you have to register (free) and agree to the conditions. Putting the software on the phone itself then usually goes via fastboot. An exception is Samsung: here Odin or the open source alternative Heimdall is used.

Download and use adb

The helpers adb and fastboot that we need for the OnePlus 5T are in the so-called software development kit (sdk) for Android. You can install the full Android Studio development package, but the SDK Platform Tools are enough. You can download adb here for Windows, Mac and Linux. Extract the zip file to, for example, c: , after which the tools will be placed in c: platform tools.

For adb you also need suitable drivers. For Windows, you can use one universal driver to download. You can use one with other operating systems device-specific driver to look up.

The device also requires another action to access via adb: switching on the so-called USB debugging. To do this, go to the device Settings, About phone. Tap it repeatedly Build number until the message that you are a developer appears. There will then be an extra menu, usually underneath Settings, System, Developer Options. Put the option there USB debugging On. If available, also set the option OEM unlocking On. This basically allows you to unlock the boot loader without actually unlocking it. Now connect the device to the PC via USB.

Unlock your device and allow access to USB debugging in the pop-up window, optionally with the option Always allow from this computer checked.

Unlock smartphone

We can now unlock the device. Within Windows 10, click Start and search for the Command Prompt. Go with cd c: platform-tools to the folder with the tools and issue the command adb devices. You will now see an identification number with a device behind it. You can now start the phone in so-called fastboot mode with adb reboot bootloader. Your device will show a confirmation on the screen. You can also start the mode with a (device-dependent) key combination. For our device, we have to press and hold the volume up button while turning on.

On the PC with the command fastboot devices, check that the device has been found and is in fastboot mode and now unlock the device with the command fastboot oem unlock. Read the warning on your device, confirm unlocking with the key combination indicated on the screen and restart the device. At this point you start again with a clean device. Go through the configuration, but skip most steps if desired, the details are not important at this time.

Flash custom recovery

Now that the boot loader has been released, we can put the custom recovery TWRP on the smartphone. Go to the TWRP site and find the correct version of TWRP for the device. Download the .img file and copy it to the folder containing c: platform-tools. You should now restart the device in fastboot mode. The fastest way to do this is via the key combination for your device or by going through the previous steps. So: re-enable the USB debugging, connect to PC via USB, approve access and issue the adb reboot bootloader command in the command prompt.

If the phone started in fastboot mode, continue with (in our example) fastboot flash recovery twrp-3.3.1-0-dumpling.img. Replace the file name with your TWRP if necessary. Use the volume key to select the option Power offso that the unit is turned off. Now you have to be alert: many devices, including the OnePlus 5T, overwrite the custom recovery at the first “normal” start-up action. That is why you should be the first to start that custom recovery with the device-specific key combination.

For the OnePlus 5T, you have to press and hold the volume down button while turning on. After this TWRP will appear and the tool will remain active in the future. If it doesn’t work, you can flash TWRP again as explained above and try again.

Copy files to device storage

Back up before continuing so you can revert to the original software later. In TWRP go to Backup. Accept the proposed partitions Boot, System and Data and start the backup, which is ready in about a minute. Disconnect the USB cable and reconnect it, so that the backup is visible on your PC in the folder TWRP, Backups. It is important that you copy the contents of that folder to the PC, because the internal storage will be overwritten when flashing LineageOS!

We remain in TWRP and connect the phone to the PC so that we can access the device storage. Here we put the image file for LineageOS via Windows on the phone that we send via to download. Copy the zip file (without extracting!) To a device folder, for example Download. Also copy the zip file with the Google apps package (see box below). For root access, you can also download a zip file called LineageOS SU Addon from and copy it.

Install Google apps

Google’s apps are not part of custom ROMs such as LineageOS. To still have the Play Store and apps like Maps, Gmail and Agenda, you can compile and download a custom package for your device via The Open GApps Project to “send along” with the custom rom.

Select on the website concerned Platform ARM (32 bit) or (for most devices after 2016) ARM64 (64 bit). You can find which ones you need on the LineageOS download page at Device info to check. See you behind Architecture the text arm64, then the 64-bit version is needed. Select the correct version for Android and choose at Variant the desired package. Preferably choose a more compact package such as Micro. You also get the most important apps, the rest can be completed via the Play Store.

Flashing LineageOS

After all the preparations, we are ready to put LineageOS on the device. For this we will first clean the device. In TWRP, go back to the main menu and choose Wipe. By default, the partitions Data, Cache and Dalvik erased. Go back to the main menu and choose Install. Browse to the folder containing the zip files, in our case the folder Download, and tap the LineageOS zip file. Then choose Add more Zips and tap the zip file with Google apps. Finally, add the root add-on if necessary. Start flashing with a swipe over Swipe to confirm Flash. When it’s done, tap Wipe Cache / Dalvik. Then restart the device. That takes a little longer the first time.

Then LineageOS is ready for you with the well-known Android installation help. After that you can completely customize LineageOS. For example, install an alternative to the standard Trebuchet launcher, such as Nova Launcher. Also check out the extensive options for security and privacy below Settings, Security and Location, Trust. Here you can via Privacy protection even fine-tune what rights apps get. And update LineageOS regularly, that is easy via Settings, System. Have fun with your device, which can now last a long time!


Recent Articles

Related Stories