GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
346 stars 19 forks source link

Cannot use voice control with Android Auto - Oops something went wrong #3848

Open donicrosby opened 1 month ago

donicrosby commented 1 month ago

So I have been using Android Auto for a while now almost everything about the integration with Graphene OS seems to work fine... except voice commands/voice control. When I drive I cannot use the voice commands almost at all to ask Google Assistant to be able to do things hands free and be safe while driving. When I try to use the voice control button (or microphone button on the screen) I hear the ding from the assistant but it doesn't seem to register my voice.

What's weird is sometimes voice does work, but only for that drive, as soon as I shut the car off it goes back to not working again. I'm unsure if there's just a settings issue or if there's just some permission that needs to be given.

I have downloaded my offline language (English) downloaded and it seems to be up to date. I have all of the permissions set in the GrapheneOS config for Android Auto and there's no other warnings on that screen.

I have some logs from the Google app from two different drives where I tried to use the voice commands that show that it seems to not be able to configure the hot word detection or some other voice assistant config

Google log a8566bd5abc3.txt Google log cd5b3df43717.txt

Kevinf63 commented 3 weeks ago

Copying this almost verbatim from a forum comment I posted...

So I've dug into this a bit deeper for myself on a Pixel 7 as I had the same problem. I practically gave all possible permissions to Android Auto and it's google related dependencies. I had the Default Language set to English (UK), applied the same to keyboards and voice input and made sure to download offline voice packs both in Google and the voice synthesis apps for English (UK).

Still no joy, until... I specifically opened the Sandboxed Google Play settings page/activity, which is the Graphene OS GmsCompat app under the hood, I press the hands-free button on my car and Google Assistant now works in Android auto!

Locking the screen, it will still work for a minute or two until I assume the phone signals to the GmsCompat app, "you are no longer drawing the page/activity, might as well sleep/kill the app process" and then of course "Oops something went wrong!" happens once more!

I'm convinced it's something to do with GmsCompat app sleeping/being killed when not in focus. Perhaps if it's a background service of some sort it will sort our issues? I'm not an Android dev and this is my two cents from a 30 minute gander at logs and pulling my hair out in my car haha. I can try obtain more logs if it helps.

donicrosby commented 3 weeks ago

So I also have some new info that I found.

Voice commands seem to work on wired Android Auto if I have my phone unlocked when I make the initial connection. I think it's probably similar with wireless because I've gotten it to work but I haven't had a chance to test this more thoroughly.

I'm wondering if I keep the "Sandboxed Google Play Running" notification from startup if that would prevent GmsCompat from getting reaped in the background similar to how the Aurora Store does their background download and installation.

If that seems to work then I think it should confirm that GsmCompat may need to be made into some sort of background service or at least make the notification persistent to prevent accidentally dismissing it.