I installed Android Auto on my Mazda after someone on a previous HN thread convinced me to, and now I can't go back to using the native system. It makes such a huge difference, and works perfectly with the physical controls.
As far as i'm aware, there are no Mazda's directly that support android auto at this point in time.
They keep claiming they will, but they haven't made it happen yet.
(I looked at various 2018 models just last week, and if you go to various mazda forums on the internet, it's a constant topic of discussion)
The only way i'm aware of to get Android Auto on a Mazda would be to replace the head unit.
It's unofficial, from the link that the other commenter posted, but works well enough, and takes about 5 minutes to install if you have a USB drive lying around.