[Paid Software Announcement and Discussion] north3221:
I've been playing with this quite a bit recently, got some old phones laying round, rooted a couple of them and set to work getting it set up in both our cars. Ran into the usual issues people have talked about around getting it to connect etc, but managed to get it working. I ended up using @lipippo aastarter and aagateway with the udp method. The main issue/reason is timing seems to be everything.

Using aastarter I had some success, although took a fair few attempts. What I have found (as many have started) is the following and I now have a solution for all of them and seem to have it running pretty smoothly (few final tweaks to do)

Only works when connected to hotspot on slave (I have had zero success with slave connected to master) but given for aa to work wirelessly it expects to connect TO the headunit, so makes sense

The timing that works can vary based on phone used as a slave and head unit.

Because the master has to connect wirelessly to slave (which is unlikely to have internet) you lose internet access (see below for fix)

I don't think it needs to be rooted to work, like lipippo said, I'll maybe try verify this with another old phone that isn't rooted (albeit root helps with me automating all this)

Having two people try use it (myself and wife and two cars, each drive both cars and could be in car together) means that whoever phone connects first wins. The other person likely ends up connected to a hotspot with not internet.

Different head units seem to work very differently, like one of my cars powers on the usb and bluetooth when you walk up to it, so the slave and master think everything is ready, but really it cant fire up aa until the car is started and headunit display is on, it just rejects it prior.

So to solve all that I forked the aastarter and aagateway lipippo created and made some mods (tbf I didn have it working reasonably well without my mods). Mostly stripping stuff out to leave me with ipv4 and the trigger to come from tasker (not the gateway app). Doing this means I can automate it all in tasker, which gives me a little more control to check certain things and trigger when those things are true, play with timings on different devices and also manage re-retying if its not connected for some reason.

Its also meant I can have a set up that works on both mine and my wife's phone. Its still a first come first served kinda thing, but it sets up a primary and secondary master. Then if the primary disconnects the slave tells the secondary that its now available and it becomes the primary. i.e. both get in car, my phone grabs primary slot, we drive somewhere, I get out, wife carries on.. my phone disconnects and slave tells wife's (secondary) device that gateway is now available for primary use... connects, she now has aa.. :)

Then finally the no internet issue.. So I've worked out a few different ways to solve this, varying in difficulty/success. First off I was playing with mobile data only apps, like @Rag3 mentioned, albeit the issue is they are always on mobile data, and like Rag3 pointed out you tasker cant turn mobile data on and off on non-root device (most masters aren't rooted). Well tasker can if you use adb wifi, bit of a faff to set up but got it set up and automated re enabling after reboot..

However, I found a better way, not requiring the adb wifi complexity. Albeit, between the above and this method I upgraded to android 12, so not sure if it works on older (but suspect it will). Tasker (if you give it the correct write secure settings permission) can update which apps use mobile data only, so I just get it to set those apps when I connect to aagateway and reset back to no apps using mobile data only after. With a little task that updates the list if I change which ones I want to use.

Finally I figured a better solution would be to use a proxy. So I set up apache on my device (using termux and termux tasker plugin to run it). so now when I connect to aagateway in the car, tasker triggers the proxy (and I have the proxy set in the advanced wifi config for that connection) and all traffic is routed via the proxy instead of to the slave device.. doesn't allow incoming, so no push notifications to whatsapp etc, but all outbound internet apps work (google assistant, maps, spotify etc etc). So I combines the two, just add a few apps that need inbound, plus termux for apache proxy) as mobile data only via tasker when I connect to slave hotspot. All seems to work pretty well, and fun trying :-)

You could also use a vpn, I tried that and worked well. I have a vpn set up at home anyway so already have it on my phone. I use open vpn for android, if you set that to use mobile data only and route all apps through the vpn, they all have internet via mobile, while your devices is connected to slave hotspot. I just figure this could slow suff down, where as proxy will give me whatever mobile data speed I have available. If you already have a vpn set up though, could be an easy option for you

Lots of words there, but if people are interested in the set up I'll upload my stuff to git and taskernet for reuse..

Big thank you to @Emil Borconi for this, it really is awesome!