Before upgrading LineageOS, first fully backup the device. This procedure assumes you’re generally familiar and comfortable with installing alternative OS on your Android device and are fully prepared to risk bricking your phone or having your phone get buggy when you might need it.
Connect to phone via adb
Install adb on an Ubuntu Linux PC.
apt install android-tools-adb
Before and after plugging in the phone to the PC, type
If phone is not seen, try plugging phone into a USB 2.0 instead of USB 3.0 port (USB 3.0 ports may be labeled SS or be blue in color (some are not blue)).
Add the udev line corresponding to your devices manufacturer and reboot your PC.
Unplug/plug your phone and then type
This will result in something like:
* daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached XXXXXXXXXXXXXXXXXX device
If the last line says offline, approve the debugging request on the phone.
Assuming you have already downloaded the SafeStrap APK for your particular phone, type
adb install Safestrap-XXX-v3.75.apk
in about 10-15 seconds you should see
If not, check that you have APK debugging and installation enabled. See the Lineage OS install for your specific device.
Find the SafeStrap app on your phone and when the Superuser prompt comes
up, allow SafeStrap permanent root access.
You will probably see
State: Old Version at the top; click Install Recovery.
After 30 seconds or so you’ll see that you now have SafeStrap installed as per the small text on the bottom left of your SafeStrap app.
Reboot to Recovery and allow the phone to reboot normally.
Download LineageOS for your specific device.
Copy all the files you want to save off your device, because this partition is going to be wiped!
Push the .zip to your device (will take about a minute) by:
adb push lineageos-imagename.zip /sdcard/
Reboot into Recovery, Wipe, back to Home and then Install and navigate to your /sdcard/lineageos-image.zip
After a couple minutes you will see Success and then Reboot.
Note: You may have to temporarily unplug the USB cord to allow boot for the first time
Installing Google Play (optional)
Optionally, install Google Play after installing LineageOS:
Get the latest Google Play build
Then as before do:
adb push gapps-*.zip /sdcard/
reboot into Recovery and Install this zip (without Wiping!)