Linux magazine explores how to breath fresh life into old Android devices:
Every mobile device needs its own Android build because of numerous drivers that are not available in the source code. The need to maintain every version of Android for every mobile device means that many manufacturers eventually stop supporting updates. Often, smartphones or tablets that still work perfectly can no longer be used without worry because the manufacturer has simply ceased to offer bug fixes and security updates.... It is possible to keep these devices up-to-date, as evidenced by the LineageOS project. Many manufacturers don't want to work with unpaid volunteers at LineageOS because they combine current releases with required device specific drivers.
Every month, the LineageOS project provides a new patch for around 300 devices. Unless there is a problem in the build, the builds are released every week. You can find out if a LineageOS build is available for your device on the Devices page.
The LineageOS project is the first port of call for anyone who wants to protect an older device that is no longer maintained and doesn't get security patches from the internet giant. It's easier to enjoy a Google-free phone with the LineageOS derivatives.
The article also describes how to use TWRP to flash a manufacturer-independent recovery system (while also creating a restoreable backup of the existing system) as an alternative to LineageOS's own recovery tools. And it even explains how to unlock the bootloader — although there may be other locks set up separately by the manufacturer. "Some manufacturers require you to register the device to unlock it, and then — after telling you that the warranty is now void — they hand over a code. Others refuse to unlock the device altogether."
A big thank you to Slashdot reader DevNull 127 who submitted the article.