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 is no longer supported by the manufacturer itself. It may also improve the existing device software. You can read how to install LineageOS here.

That manufacturers are lax with updates to 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, free of bloatware, but with lots of customization options. The system usually runs quickly and stably. The installation requires some technical knowledge and there are some small risks involved, such as losing the manufacturer's warranty, but if a device is no longer supported with updates or security updates anyway, that is not such a problem.

The risk of making a device unusable by installing another operating system on it is very small in practice. And the so-called rooting of a device, an action that custom roms entail, 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.

In addition to outdated devices, LineageOS is also ideal if you are dissatisfied with the standard software, or if you do not trust it, for example because of the manufacturer's privacy policy. For this article, we use an approximately 2.5-year-old OnePlus 5T that has the OxygenOS operating system as standard: Android in a different jacket. LineageOS appears 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 come to the rescue in your case. The availability can be found on the LineageOS wiki. Less popular devices or older devices are sometimes left out, but an unofficial release or other alternative can still be a way out. Although they are less well controlled and less trusted.

Before you start

With the installation of a new operating system, all data on the phone will disappear. Therefore, first secure everything: photos and videos are obvious, but also think of a WhatsApp backup. The option for a full backup to Google Drive is in that app itself. You can then restore it after the switch to LineageOS. Also keep in mind that it will take you a while to install and then restore 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 are using an official edition of LineageOS, also keep the instructions for that device on the LineageOS website, so that you know whether 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 is different. The first step is always the so-called unlocking of the device, or to be more precise: the bootloader. That part ensures that the correct operating system starts when the phone is turned on. 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, among other things, 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 as well.

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

Unlock Bootloader

The bootloader can be unlocked from almost every device. That is even a legal requirement. However, that is often an act with which you lose the manufacturer's warranty on the phone. How to unlock differs per device. With our OnePlus 5T, but also devices from Google, you can use Android Debug Bridge (adb) and fastboot. With adb you can send commands and files to the smartphone, among other things, while fastboot makes it possible to write to partitions on the device.

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

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 will suffice. Adb can be downloaded 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.

You also need suitable drivers for adb. For Windows you can download a universal driver. You can look up a device-specific driver for other operating systems.

Another action is also required on the device for access via adb: turning on the so-called usb debugging. To do this, go to Settings, About phone. Tap the . repeatedly Build number until the message appears that you are a developer. An extra menu will then appear, usually under Settings, System, Developer Options. Put the option in it USB debugging at. If present, also set the option OEM unlock at. With that you in fact allow the unlocking of the bootloader, 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 look for the Command Prompt. Go with cd c:\platform-tools to the tools folder and issue the command adb devices. You will now see an identification number followed by device. You can now start the phone in what is 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 need to hold down the volume up button while turning it on.

Check on the PC with the command fastboot devices 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 the unlock 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 of the steps if you want, the details aren't important at this point.

Flash custom recovery

Now that the bootloader has been released, we can put the custom recovery TWRP on the smartphone. Go to the TWRP site and find the correct variant of TWRP for the device. Download the .img file and copy it to the folder containing c:\platform-tools. You should now start the device in fastboot mode again. The fastest way to do this is via the key combination for your device or by going through the previous steps again. So: turn on the usb debugger again, connect to the pc via usb, authorize access and give the command adb reboot bootloader in the command prompt.

Once the phone has started in fastboot mode, continue with (in our example) fastboot flash recovery twrp-3.3.1-0-dumpling.img. Replace the filename with your TWRP's if necessary. Use the volume key to select the option power off, so that the unit is turned off. Now you have to be alert: many devices, including the OnePlus 5T, overwrite the custom recovery with the first 'normal' startup action. That is why you should immediately start that custom recovery with the device-specific key combination.

For the OnePlus 5T, you have to hold down the volume down button while turning it on. After this, TWRP appears and the tool remains 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

Before proceeding, make a backup so that you can revert to the original software later if necessary. To do this, in TWRP, go to backup. Accept the suggested partitions Boat, System and Dates and start the backup, which will be ready in about a minute. Disconnect and reconnect the USB cable so that the backup will be 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 you flash LineageOS!

We stay 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 on the phone via Windows, which we download from download.lineageos.org. Copy the zip file (without extracting!) to a device folder, for example Download. Also copy the zip file containing the Google apps package (see box below). For root access, you can also download and copy a zip file called LineageOS SU Addon from download.lineageos.org/extras.

Install Google apps along

Google's apps are not part of custom ROMs like LineageOS. In order to still have access to the Play Store and apps such as Maps, Gmail and Calendar, you can use The Open GApps Project to compose a customized package for your device and download it to 'send' it with the custom rom.

Select on the website in question at PlatformARM (32 bit) or (for most devices after 2016) ARM64 (64-bit). You can find the ones you need on the LineageOS download page at Device info check. see you behind Architecture the text arm64, then the 64-bit version is needed. Select the correct version at Android and choose Variant the desired package. Preferably choose a more compact package such as Micro. You still get the most important apps, the rest you can supplement 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 deleted. 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 Google apps zip file. 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 default Trebuchet launcher, such as Nova Launcher. Also check out the extensive options for security and privacy under Settings, Security & Location, Trust. Here you can via Privacy protection even fine-tune what permissions apps get. And update LineageOS regularly, that's easy via Settings, System. Have fun with your device, which can now be used for a long time!

Recent Posts

$config[zx-auto] not found$config[zx-overlay] not found