I don't believe that's possible, the best you can do is foss apps with android auto compatibly. The only one that shows up as an option for me on my phone is VLC, but I'm sure there are at least a few others. Someone on the fossandroid community said osmand works with it earlier today, but I don't remember seeing it show up as an option (but that was with a rental car a year ago, things may have changed.)
Free and Open Source Software
If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
I don't remember OsmAnd working on Android Auto, unless I didn't see something in the car side of things I was supposed to open.
This would be a great idea but as I understand it, Android Auto and CarPlay are very explicitly tied into the auto manufacturers systems in a way that would likely require a group that builds the open source mobile auto platform to be certified and integrated with auto manufacturers systems.
This would be costly, and without the initial user base, unlikely to take off as manufacturers don’t like giving their data to other systems. Toyota held out a long time on Android auto for exactly that reason: not wanting Google to get access to their systems.
I like the idea, but I think the only for it to happen would be if an aftermarket headunit manufacturer were to build something that integrates with such a system. But that would be a very small user base and also unlikely to happen.
You do make a good point that I hadn't thought of (and need to think of more often) wrt hardware. I guess the next best thing that I'd look for is something that uses the SDK of Android Auto but isn't made by Google and doesn't send its data however anonymized to Google. And also FOSS is the goal if possible.