-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sends malformed request to https://android.googleapis.com/auth/devicekey breaking Google Translate (and likely others) #1835
Comments
Note, the endpoint that is failing is a fairly generic one |
Device Keys are per device, not per app. Only very few apps require device key so far, Google Translate recently started requiring it, as well as Google's Live Transcribe App. Device Key support in microG is still rather new (only known to be working since 0.2.25), but it requires that you enable device attestation (SafetyNet) - and passing SafetyNet attestation is most likely also required. |
I have enabled device attestation, and via various hacky Magisk modules (MagiskHide Props Config + Universal SafetyNet Fix) I do pass SafetyNet, at least via MicroG's own SafetyNet UI. The bug still occurs. I am also using XPrivacyLua but it has only been blocking "Get Applications", "Record Audio", and "Use Camera", and these seem unrelated to the device key. I also see other people online with the same issue, presumably not all of them are using XPrivacyLua. |
I have similar issue. Here is a logcat
And headers I sniffed by mitmproxy:
But when I uninstalled MicroG GmsCore or made it non-force-queryable google translate works as expected. Here is mitmproxy dump of "good request":
Query strings are the same. In bad request 3 'X-'headers are absent. |
As a workaround GmsCore can be installed not as system app and without --force-queryable so Google Translate wont see it. It will break GoogleCamera but it also can be fixed by playing with in play-services-core/src/main/AndroidManifest.xml to make gms visible for GoogleCamera but not for Google Translate. I added this code to AccountPickerActivity activity block and it works for now:
To know what (not) to add to It's not a solution, it's just a (temporary) workaround. |
I found a semi-"workaround" which is to use the camera translate functionality. For some reason this works even though direct text translation doesn't. Of course if the stuff is on your phone you'll need to find a way to write it down. I'm using 2 phones. lol. |
microG now send If you want, you can try it with the nightly build. |
Running the nightly, 0.2.28.231657-28 (a749fe4), I get the same base64-encoded error about the request being malformed, and Translate still doesn't work. Unfortunately, the devices I have available all have CTS profile mismatch, but I'm not sure if that's related. |
MagiskHide Props Config is unmaintained and doesn't support Android 13 (LineageOS 20), however a fork of Safetynet works for me https://github.com/Displax/safetynet-fix/releases, use safetynet-fix-v2.4.0-MOD_1.3-microG.zip, don't use safetynet-fix-v2.4.0-MOD_2.0.zip which doesn't work. This should fix CTS profile mismatch to pass Safetynet BASIC attestation again. (Install YASNAC to see if you are passing only BASIC or HARDWARE as well). |
Anyway, Safetynet should be unrelated to this bug, I just wanted to spread around the most up-to-date information about it. |
Was working; broke a few months ago.
adb logcat
shows that MicroG is sending a "malformed request" to Google:Part of the request includes MicroG's own internal version number, maybe that's what's breaking things.
Work-around is to (1) download offline translation file then (2) firewall block Google Translate from making any internet requests, thereby tricking it into using offline translation.
The text was updated successfully, but these errors were encountered: