sn-00-x / aa4mg

Android Auto 4 microG
117 stars 6 forks source link

Android Auto Wireless support #13

Open MrNessuno opened 1 year ago

MrNessuno commented 1 year ago

I successfully connected the phone via USB cable but my car also support Android Auto wireless. I tried connecting with that, the car is listed in the Android Auto app, but when I try to connect from the car the android auto app keep restating without successfully connecting. Am I doing something wrong?

panoskpv commented 1 year ago

I tried as per the instructions and disabled all network data from aa and wireless not working. When I allowed mobile and background data wireless is working. Is the denial of data usefull? is the app connecting to google even if i use XPrivacyLua and restrict all?

knuxyl commented 8 months ago

When I try wireless connection, it says to continue on the Android Auto device but nothing shows up on the screen. I got rid of the android auto device but I am getting a new one to test turning on the data permissions, which were off throughout testing. I don't know what data is being sent to Google. Maybe hosts block will work for this? Idk.

bioluks commented 6 months ago

I tried as per the instructions and disabled all network data from aa and wireless not working. When I allowed mobile and background data wireless is working. Is the denial of data usefull? is the app connecting to google even if i use XPrivacyLua and restrict all?

I tried to do this but it isn't working. Restricting everything in XPrivacyLua doesn't do that much for telemetry, code obfuscation can bypass this as seen in the documentation.

When I try wireless connection, it says to continue on the Android Auto device but nothing shows up on the screen. I got rid of the android auto device but I am getting a new one to test turning on the data permissions, which were off throughout testing. I don't know what data is being sent to Google. Maybe hosts block will work for this? Idk.

I was able to get the same screen, like you said nothing happens on the car head unit. Whenever it's about to start Android Auto on the car my Android Auto phone app restarts all the time.

@sn-00-x is there anything we can do about this? I'm ready to do tests and provide you with logs, with different testing environments where possible.

knuxyl commented 6 months ago

Sorry i forgot to post back, but apparently whenever a VPN is in use Android Auto won't work. That's what was causing my issue. It has something to do with what Android is using for the internet. I have no idea what to do about it, it's apparently a known bug.

bioluks commented 6 months ago

Thanks for getting back so quickly, yes I have an app called TrackerControl in the background, which is like many a fake VPN that does domain/DNS blocking on a per-app basis. Never thought about disabling it alltogether.

So with a disabled VPN, on a custom ROM with microG, and allowed background traffic for Android Auto everything just works fine for you @knuxyl ?

knuxyl commented 6 months ago

Thanks for getting back so quickly, yes I have an app called TrackerControl in the background, which is like many a fake VPN that does domain/DNS blocking on a per-app basis. Never thought about disabling it alltogether.

So with a disabled VPN, on a custom ROM with microG, and allowed background traffic for Android Auto everything just works fine for you @knuxyl ?

yeah everything worked as expected and i didnt use the lsposed module because i dont have any apps that didnt show up that i wanted. youtube didnt show up with or without the module so i didnt use it.

im using lineageos 21 for microg on a pixel 5 and typically use a wireguard vpn. with vpn turned off everything worked as expected. from what i read its not this app causing the issue, it's android auto itself. im wondering if theres a way around this though with this app.

bioluks commented 5 months ago

@knuxyl can't thank you enough, it was the local VPN that was causing issues. Even when you are using a fake DNS blocker VPN (like TrackerControl in my case) your device gets a spoofed local IPv4 address, generally visible in the About phone > Device Identifiers section (mine was 10.1.10.1), that probably didn't play well with the network stack and expectations of Android Auto, which assigns a 10.XX.XX.XX local IP address since it's using something like Wi-Fi direct to connect to your headunit. Enabling background traffic and the exclusion from the VPN did the trick, if any VPN out there has split-tunnel support just exclude Android Auto and it should be fine. @MrNessuno this issue can be closed, I will update the documentation and the README accordingly.

panoskpv commented 5 months ago

And how about any data end up to Google?

bioluks commented 5 months ago

And how about any data end up to Google?

I have explained the options one can go for in Pull-Request #24 . You can read it here.

Basically if you allow traffic (which you have to for Android Auto wireless to work) it WILL contact external servers. Question is how much you want Android Auto wireless. You could experiment a bit with root firewall solutions like AFWall and disallow traffic from there while still allowing in Android settings. That could work, didn't test it myself though.