I have a few Android phones but my favorite one is Xiaomi Mi A1. It’s a 5-year-old phone, but it’s running the latest Android, thanks to LineageOS. This phone stopped getting official updates years ago, and it wouldn’t be usable without LineageOS despite having a perfectly capable hardware. It’s still blazing fast, which is a good reminder that 2-year and even 5-year software support periods are indefensible. We should be able to use our hardware for as long as it works, which can be close to 10 years and beyond.
Not being a huge fan of heavy-handed regulation, I can understand why companies don’t want to support their devices for more than a few years. Forcing companies to offer software support for 10+ years is problematic for many reasons, one of them is the fact that companies come and go, which makes such regulations unenforceable. On the other hand, it’s not hard to let your customers install non-official firmware. We can also let those companies off the hook if they release open-source drivers for their hardware, enabling others to continue offering software support for those devices.