If we had a software building code, it could mandate the testing procedures for consumer devices, like a car's headunit firmware. This building code could be backed by an industry body that could revoke its certification from manufacturers if they don't comply with the code. Super-advanced-testing-procedure #1: plug a phone into a test car and check it works before release.
(This software building code is more necessary for software used in critical infrastructure. But it should also be applied to consumer devices as basic protection for consumers against manufacturers breaking functionality the consumer paid for)
Plug one of every combination of vendor, model, OS, and config into the car and check if everything works. That’s what would be required to actually ensure functionality.