-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support workspace accounts with basic device management #2296
base: master
Are you sure you want to change the base?
Conversation
Sync keys request is required for Google Workspace-enabled accounts that mandate a screenlock to be enabled. Note that with this commit, a working method is provided, but not yet called, and it also doesn't contain the correct "screenlock enabled" value yet.
For manual testing only. Remove this commit
Just built your branch on GitHub actions. Using the debug build. Getting the following logcat when clicking on the account settings screen (only relevant parts filtered). Feels like your code does not get executed (or because the intent returns too fast the deferred part does not get executed), maybe an error on my end.
From your code, I expect there should be a debug statement like:
|
@aximut Unfortunately I haven't been able to find the difference between your builds and my builds. On my end, it is working and outputs (for instance) the request as you expected:
|
Just started further investigation and apparently for me the function returns here:
I just rebuilt the main apk (com.google.android.gms, not the com.android.vending one). Is there anything else I need to update? Or might this be a problem with my workspace account? I added the debug output as in this file and this is the adb log:
Not sure if the class loader issues are related or not. |
@aximut You will need to enable device checkin and Google Cloud Messaging before running the query. I will provide updates to get the functionality in a more use-ready state in the coming days. |
I have device registration and GCM both enabled. For device registration, I can see my Android ID in the microG app. GCM I set to "confirm new apps". |
@aximut From the code being called, enabling to "confirm new apps" while querying for an app not yet contained in the database (microG itself) will also yield no result at this moment. |
Thanks! That was it. Now I see the code being fully executed.
However, once I start a G app afterwards, I still get
For testing, I commented out all the rest of the web view code though, maybe that's the issue. |
Logs which of the dependencies for setting up enterprise accounts are missing: * Checkin enabled * GCM enabled * microG allowed to use GCM * Lockscreen enabled
I've added functionality to automatically send the request if necessary (for instance, when a sync fails with
The next step will be to add UI to guide users to resolve these problems.
@aximut It shouldn't be an issue. After sending the query (and waiting its 500ms additional delay), it should work to sync Google apps and also to load the webview, which would otherwise close immediately. I don't know what the problem could be in your case. |
Ok, then I'll try with the new version soon. |
This reverts commit 6ca10d6.
It seems the instance token + instance ID we are getting from GCM in https://github.com/microg/GmsCore/pull/2296/files#diff-3341dd523d63f6a4b7f5b44b9db7075c9a834e139fdc0fa945aafbb342942cceR48-R75 is somehow bad. The query works with it (which seems to indicate we are going in the right direction, as using a different sender constant for getting the instance ID – or no instance ID at all – would lead to a failing cryptauth request), but The same request with an instance ID taken from original GMS from the emulator works and leads to the account fully functioning. I couldn't find out how original Google Play services generate their instance ID. |
That would explain why the request went through on my device but I'm still facing the errors |
For future investigation regarding the above problem:
|
play-services-core/src/main/java/org/microg/gms/ui/AskPushPermission.java
Outdated
Show resolved
Hide resolved
play-services-core/src/main/kotlin/org/microg/gms/accountaction/AccountActionActivity.kt
Outdated
Show resolved
Hide resolved
Seemingly good senders / subtypes:
More info:
|
DeviceManagementScreenlockRequired
error.To do:
Resolves #896. Resolves #1726. Likely resolves #1838.