Lineage OS
TWRP is asking for a password even if pattern was set
This happens for encrypted phone and my TWRP v 3.1.0 (at least). It seems to be a bug in TWRP.
It can be solved by writing numbers instead of points for gesture:
https://www.reddit.com/r/Nexus5/comments/2mskzu/twrp_is_asking_for_a_password/
Or by setting PIN in the system as a lock method and unlocking TWRP with that PIN instead.
https://forums.oneplus.net/threads/twrp-encryption-password.432114/#post-14736345
Or by using default_password as a password.
Upgrade LineageOS by a major version
Download to PC
System install ZIP and Recovery image from https://download.lineageos.org/bacon
GApps NANO image from https://wiki.lineageos.org/gapps.html
because MICRO only overrides Calendar and has extra GMail, Pixel Launcher and Google Wallpapers.
Magisk image and Manager APK.
Recovery image
EITHER - TWRP https://eu.dl.twrp.me/bacon/
OR - Lineage Recovery https://download.lineageos.org/bacon
Installing Lineage Recovery with major version upgrade where previously was used TWRP, can cause inability to unlock screen. Install TWRP back instead.
Fix is to rename/remove the /data/system/locksettings.db from within the TWRP (Advanced > Filemanager), reboot to system and set the new lockscreen.
Prepare PC
Install android-tools to support adb and fastboot https://wiki.lineageos.org/adb_fastboot_guide.html
Setup adb
enable developer options on phone
Settings > About > [tap Build number 7-times] > [back] > System > Developer options > Andriod/USB debugging
connect phone to PC via USB
on PC run sudo adb devices
if no permissions is shown then
sudo adb kill-server
sudo adb start-server
if unauthorized is shown then
on phone
Revoke ADB authorizations
and disable/enable Andriod/USB debugging again
then on PC run sudo adb devices and confirm the dialog
on phone tap [x] Always allow USB debugging
Setup fastboot
connect phone to PC via USB
boot phone into fastboot mode
EITHER when phone powered on, run sudo adb reboot bootloader
OR when phone powered off, hold [Volume Up] + [Power]
on PC run sudo fastboot devices to verify connection to phone
if no permissions fastboot is shown, try running it as root
Install new recovery
https://wiki.lineageos.org/devices/bacon/install#installing-a-custom-recovery-using-fastboot
do the same as [Setup fastboot](#setup-fastboot)
on PC run sudo fastboot flash recovery <recovery.img> to flash recovery to phone
on phone
when powered off (or in Fastboot mode) hold [Volume Down] + [Power] (release after vibration confirmation/screen change) to boot into recovery
enable ADB
on PC run sudo fastboot reboot to reboot to system, if that you don't want to sideload any other apps
Upgrade the OS
https://wiki.lineageos.org/devices/bacon/upgrade
on phone Settings > System > Developer Optionseither [x] Rooted Debugging (LineageOS 17.1 or above)or Root Access Options > ADB Only
on PC run sudo adb reboot sideload
blank screen is OK - bug on some recoveries
on PC run sudo adb sideload </path/to/system-image.zip>
install custom APK packages
on phone Apply Update > Apply from ADB
this enables ADB and sideload
on PC run sudo db sideload </path/to/package.apk>
on phone [back] > Reboot system now