Crankshaft – A GNU/Linux for the Raspberry Pi as an Android Auto headunit
Is a whole custom OS really necessary?
Couldn't you just simply use Mopidy(https://www.mopidy.com/)? Possibly with some additional plugins required to make it work for cars.It runs on RPi and implements mpd protocol, hence, is fully compatible with mpd clients and has many more clients implemented targeting Mopidy itself.Also, it plays music from Spotify, YouTube, SoundCloud and whatnot.