Skip to content

fix google login missing droidguard#3257

Merged
mar-v-in merged 5 commits intomicrog:masterfrom
DaVinci9196:fix_google_login_missing_droidguard
Feb 6, 2026
Merged

fix google login missing droidguard#3257
mar-v-in merged 5 commits intomicrog:masterfrom
DaVinci9196:fix_google_login_missing_droidguard

Conversation

@DaVinci9196
Copy link
Copy Markdown
Contributor

1.Avoiding ANR that may occur during login (#3192)
2.fix google login missing droidguard
Problem stack:

org.microg.gms.common.NotOkayException: Error=MissingDroidguard
 at org.microg.gms.common.HttpFormClient.request(HttpFormClient.java:96)
at org.microg.gms.common.HttpFormClient.lambda$requestAsync$0(HttpFormClient.java:210)
at org.microg.gms.common.HttpFormClient$$ExternalSyntheticLambda0.run(Unknown Source:8)

2.fix google login missing droidguard
@ale5000-git
Copy link
Copy Markdown
Member

I don't know this code too much but does it check if droidguard is enabled in microG settings before using it?

@DaVinci9196
Copy link
Copy Markdown
Contributor Author

I don't know this code too much but does it check if droidguard is enabled in microG settings before using it?

Currently, based on my testing, this error occurs when installing Microg for the first time and then logging into a Google account.
It's also possible to determine this by checking the enable status of DroidGuard.

@ale5000-git
Copy link
Copy Markdown
Member

ale5000-git commented Jan 29, 2026

Currently, based on my testing, this error occurs when installing Microg for the first time and then logging into a Google account.
It's also possible to determine this by checking the enable status of DroidGuard.

Perhaps I did not express myself clearly.
My question was: Does microG execute droidguard and include droidguardResults ONLY if safetynet/playIntegrity is enabled in microG settings?

@DaVinci9196
Copy link
Copy Markdown
Contributor Author

Currently, based on my testing, this error occurs when installing Microg for the first time and then logging into a Google account.
It's also possible to determine this by checking the enable status of DroidGuard.

Perhaps I did not express myself clearly. My question was: Does microG execute droidguard and include droidguardResults ONLY if safetynet/playIntegrity is enabled in microG settings?

ok

@mar-v-in mar-v-in merged commit b6ab193 into microg:master Feb 6, 2026
2 checks passed
@DaVinci9196 DaVinci9196 deleted the fix_google_login_missing_droidguard branch February 9, 2026 06:36
@er13 er13 mentioned this pull request Feb 13, 2026
2 tasks
@er13
Copy link
Copy Markdown

er13 commented Feb 13, 2026

@DaVinci9196: shouldn't this line be changed in the same way as those from 3a68bc3?

LisoUseInAIKyrios pushed a commit to MorpheApp/MicroG-RE that referenced this pull request Feb 13, 2026
@er13
Copy link
Copy Markdown

er13 commented Feb 14, 2026

@DaVinci9196

Btw. instead of changing null to "null" shouldn't it be just

--- a/play-services-base/core/src/main/java/org/microg/gms/auth/AuthRequest.java
+++ b/play-services-base/core/src/main/java/org/microg/gms/auth/AuthRequest.java
@@ -68,7 +68,7 @@ public class AuthRequest extends HttpFormClient.Request {
     public boolean getAccountId;
     @RequestContent("ACCESS_TOKEN")
     public boolean isAccessToken;
-    @RequestContent("droidguard_results")
+    @RequestContent("droidguard_results", nullPresent = true)
     public String droidguardResults;
     @RequestContent("has_permission")
     public boolean hasPermission;

@er13
Copy link
Copy Markdown

er13 commented Feb 27, 2026

@DaVinci9196

Friendly reminder on
#3257 (comment)
and
#3257 (comment)

@er13
Copy link
Copy Markdown

er13 commented Mar 1, 2026

@mar-v-in

Looping in you (as the merger of this pull request), as @DaVinci9196 doesn't show any reaction to my comments listed below

#3257 (comment)
and
#3257 (comment)

@er13
Copy link
Copy Markdown

er13 commented Mar 13, 2026

As both @DaVinci9196 and @mar-v-in do not respond to #3257 (comment) and to #3257 (comment) (probably because they don't receive/read the GitHub notifications) looping in more people

@DaVinci9196 & @mar-v-in:
Please do enable the GitHub notifications and do read them, or document another way to contact you...

@mar-v-in
Copy link
Copy Markdown
Member

Hi @er13

Sorry for this. I receive dozens of notifications from GitHub every day, so some slip through (this one likely because it was on a closed PR).

Indeed the variant you described might be cleaner, you're welcome to open a pull request with it.

er13 added a commit to er13/GmsCore that referenced this pull request Mar 14, 2026
@er13
Copy link
Copy Markdown

er13 commented Mar 14, 2026

@mar-v-in
Thanks a lot for replying!

@mar-v-in & @DaVinci9196:
I'm not familiar with GmsCore, this is actually the very first time I'm taking a look at its source code. Thus I would prefer to discuss the effects of the changes with you guys first.

Annotating droidguard_results with nullPresent = true as suggested in #3257 (comment) would also affect some other contextes droidguardResults has not been set at all so far.

All together there are the following ones:

  • Group 1: droidguardResults already set to "null", switching to using the annotation would not change anything


  • Group 3: droidguardResults is not set so far, adding the annotation would result in setting it to "null". This is the main part I'm not sure if it would break anything and would thus appreciate it if you could comment on it. Thanks a lot!


AuthRequest request = new AuthRequest().fromContext(context)

The changes are already available in this branch

fynngodau added a commit to e-foundation/android_packages_apps_GmsCore that referenced this pull request Mar 20, 2026
mar-v-in pushed a commit that referenced this pull request Mar 30, 2026
* workaccount: Eliminate call to `AccountManager.addAccount`

Intune now sets a policy such that users are not allowed to create work
profiles anymore. This is good in principle because users are never
supposed to do this manually (and are, in fact, incapable of doing so).
Our code is also affected because `WorkAccountService` triggered sign-in
flow in `WorkAccountAuthenticator` through `AccountManager.addAccount`,
which is the action prohibited by the policy. We can still (and need to)
call `AccountManager.addAccountExplicitly` to register the account with
the system.

* workaccount: fix sign in

like 3a68bc3
i.e. same fix as #3257

* workaccount: cleanup
@mar-v-in
Copy link
Copy Markdown
Member

@er13 It seems the droidguard_results being present is only required for initial login requests, not service token requests. This makes sense, because the latter is also used in some non-Android environments of Google services that don't have access to DroidGuard.

With #3350 now merged, this should resolve all affected instances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants