Installation of LineageOS on OnePlus One

Introduction

OnePlus One Android device originally shipped with CyanogenMod OS. OnePlus does no longer support its first model. Stock CyanogenMod OS discontinued too. So one of the possible options, how to keep this still great Android device up-to-date, is to replace the system with LineageOS – the successor of CyanogenMod. LineageOS provides not only the latest features and tweaks from the community around the OS, but also ( and more importantly ) the continuous development and the latest security and bug fixes. Good example is the fix for the recent KRACK exploit in WPA2 protocol, which has been not addressed by the vendor for this model. Following guide briefly describes experience with installation of LineageOS on OnePlus One, which was OEM locked and not rooted since the purchase. Process has been assisted by PC with Linux OS.

Preparation

Disclaimer

❢ Be aware that you accept full responsibility for the actions you take. You are performing the procedure out of your own free will. Also make sure that you know what you are doing – that helps a lot. Actions performed during this customization might breach the warranty of your device – if there is any – and in some circumstances your device might become unusable and bricked.

❢ Installation of the system not supported by the manufacturer, requires the device to be OEM unlocked. Such operation will ERASE ALL DATA on the device and therefore all important data must be copied from the OnePlus One device before taking any steps and if necessary restored afterwards on the device.

Download

For the installation you need to get 3 files:

TWRP – TeamWin Recovery for OnePlus One (bacon) at https://dl.twrp.me/bacon/ – I used twrp-3.2.0-0-bacon.imgLineageOS for OnePlus One (bacon) at https://download.lineageos.org/bacon – I used lineage-14.1-20171127-nightly-bacon-signed.zipGoogle Apps at OpenGapps.org – I used open_gapps-arm-7.1-nano-20171202.zip. Of course, this step is optional, so install Google Apps only if you want to have Google applications ( like Google Play Store and so on ) available after the installation. To obtain the working file for LineageOS installation, compatible configuration must be selected:

Variant: Nano – this may vary based on what you want to have installed on the device at the start.

Phone Setup

CyanogenOs Recovery

If you plan to install TWRP recovery tool to the recovery partition and replace the original stock recovery from CyanogenMod, you need to disabled CyanogenOS Update recovery setting in Developer options, which would prevent usage of non-stock recovery: Open Android settings menu, select About phone, tap 7 times on Build number item, go one step back and there you can see Developer options menu. Installation of TWRP is not necessary as it can be directly boot-ed on Android from the image file.

USB Debugging

Usually, it is required to enable USB debugging on the existing ( stock ) Android. This settings enables then usage of adb tool to connect to the Android device, transfer files and so on. I didn’t use adb, so no USB debugging is needed.

OEM Unlock

❢ This actions will delete all data from the Android device without any confirmation. Also encryption of the device is disabled again, so make sure that you re-enable the encryption after you are done with installation.

Connect the device to the PC via USB and restart the Android to the FastBoot mode. To get to FastBoot mode I just powered off the device, started it again by holding Power button + Volume Down button. Then in CyanogenMod recovery menu selected Advanced and Reboot to recovery. If you manage to switch off the phone while it is booting by holding the buttons for too long, just release and press the Power button.

TWRP Recovery

Enter the FastBoot mode again and start TWRP recovery. There are two options on how to do it:

Either you directly execute one-time start of the TWRP from the downloaded file by command:

# sudo fastboot boot twrp-3.2.0-0-bacon.img

Or you can flash the TWRP to the recovery partition ( requires CyanogenOS recovery to be disabled as mentioned above ). After the reboot into recovery mode ( Power button + Volume down button ) TWRP should start:

LineageOS Installation

While the device is in TWRP recovery mode, at first press the Wipe button and start the process by swiping the slider. As a result, this operation factory resets your phone ( again ), but also cleans the cache and Dalvik cache partitions. Afterwards you should see storage device attached to your PC. Follow by copying the necessary files: LineageOS and Google Apps to the device. I’ve placed them into existing TWRP directory. As soon as files are present on the device, in TWRP press the Install button and select LineageOS file. If you plan to install Google Apps too, proceed by selecting Add more zips and select Google Apps file now. Then swipe the slider to confirm the flash operation. As soon as the operation is finished, your Android device can be rebooted. Welcome to the LineageOS.