But what if my phone manufacturer refuses to provide Android Oreo? My phone (LG v20) was released in late 2016 and was the first to support Nougat (7.0).
What about others in this situation where stupid manufacturers refuse to upgrade their Android software?
Pick a phone next time that is from a manufacturer who has a reputation for staying up to date with Android.
But, the sad reality is that no manufacturers anywhere will provide OS updates for more than 2 years, and many are MUCH less than that. They expect you to throw them away and buy new ones. Or, they expect you to not notice since they don't want to 'burn cash' on porting new updates.
Nevermind that the 'android device support model' is a dumpster fire. Android (specifically AOSP, but google's spin too) needs to be a rolling distro to make it easier for manufacturers to support older devices (but no guarrantee they will care..). Shitting a monolithic update on them once a year doesn't work.
The 'smartphone industry' is an incredibly wasteful industry.
Project Treble[0] is a good 80% solution which makes it much easier to run mainline AOSP on new devices [1]. Ports still need to fix device-specific bugs, and camera image processing optimizations won't work unless they're implemented beneath the HAL (or hacked into a custom ROM). You'll also need a modern (8.0) unlocked device. Besides those caveats, it's a big improvement.
Android apps get tagged with two API levels. minSdkVersion is a way for the developer to say "my app requires this version of Android or higher". targetSdkVersion lets them say "opt me in to breaking changes you've made to the APIs on newer OS versions, because I've built and tested it to handle that".
So with this change, a developer can still release a brand new app that runs on Android phones which are 5 years old if they want. They just have to make sure that app is aware of how the newer releases work too.
This affects target API version, not minimum API version. Meaning that developers can still support your phone and you'll get benefits from them not opting into the unsecure compatiblity modes.
Install LineageOS if there's a maintainer for your model. It's a good way to extend the life of orphaned devices. (And next time, vote with your wallet and pick a different vendor. Some are better than others.)
What about others in this situation where stupid manufacturers refuse to upgrade their Android software?