-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
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. |
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. |
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:
|
The observations were correct, but the conclusion was false. Extensive tests show that:
An implementation will follow very soon. |
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
Logs which of the dependencies for setting up enterprise accounts are missing: * Checkin enabled * GCM enabled * microG allowed to use GCM * Lockscreen enabled
This reverts commit 6ca10d6.
ffb9062
to
6246798
Compare
Ok, this matches with what I observed and wrote in #896 (comment) Interesting to hear that this is a bug on the server. |
Yes, the buggy behavior I described above really did point us in the wrong direction. I have implemented the EnrollKeys step. @aximut If you want to try again, unlocking the device should now work with the latest changes on our |
@fynngodau You are AMAZING!!! 🎉🎉🎉🎉🎉 It is working. Everything is working. 🥳🥳🥳🥳🥳 Wow, I can't count the years for how long I have been dealing with shabby workarounds to this, using everything in browser. So stoked. Made my |
It seems the When apps are instead using There's an incomplete and preliminary attempt at moving towards returning an intent for the error case instead of posting to a notification ourselves at https://github.com/e-foundation/android_packages_apps_GmsCore/tree/basic-workspace-am-async. @mar-v-in what do you think? |
For everyone, here's a screencast of the ux flow: https://gitlab.e.foundation/-/project/177/uploads/dbd0dbf91679dfc8610249019c1dc3e7/ux-flow-basic-workspace.mp4 (21.6 MB)
|
…nto null referenes later
Merged manually to resolve conflicts. Thanks :) |
DeviceManagementScreenlockRequired
error.To do:
Resolves #896. Resolves #1726. Likely resolves #1838.