fix: Apply various sign-in fixes#146
Conversation
|
Related to #127 |
|
There are actually some additional changes that are needed when spoofing package name, but only signature spoofing is necessary for my use cases. |
|
|
||
| public AuthRequest callerIsGms() { | ||
| return caller(Constants.GMS_PACKAGE_NAME, Constants.GMS_PACKAGE_SIGNATURE_SHA1); | ||
| return caller(Constants.GOOGLE_GMS_PACKAGE_NAME, Constants.GMS_PACKAGE_SIGNATURE_SHA1); |
There was a problem hiding this comment.
We want the auth request to have the caller as com.google.android.gms, not app.revanced.android.gms
| } | ||
| Log.d(TAG, "Result: ${data.extras?.also { it.keySet() }}") | ||
| setResult(statusCode, data) | ||
| setResult(RESULT_OK, data) |
There was a problem hiding this comment.
This caused a problem where the initiating app got the ActivityResult back. The previously used CommonStatusCodes.SUCCESS maps to 0, which is defined as ActvityResult.RESULT_CANCELED. The expected RESULT_OK is equal to -1.
There was a problem hiding this comment.
Looking at upstream, this was already fixed: https://github.com/microg/GmsCore/blob/48bc2bb11c22ab9f943a35364cedcc95a0157392/play-services-core/src/main/kotlin/org/microg/gms/auth/signin/AuthSignInActivity.kt#L232
There's a lot more changes, though, that aren't a clean merge.
| java.lang.Class<?> upmostClass = tClass; | ||
| while (upmostClass.getEnclosingClass() != null) upmostClass = upmostClass.getEnclosingClass(); | ||
| String upmostClassName = upmostClass.getName(); | ||
| int idx = upmostClassName.lastIndexOf('.'); | ||
| String packagePrefix = idx > 0 ? upmostClassName.substring(0, idx + 1) : ""; | ||
| String creatorClassName = packagePrefix + tClass.getSimpleName() + "$000Creator"; |
There was a problem hiding this comment.
| api project(':play-services-basement') | ||
| api project(':play-services-tasks') | ||
|
|
||
| annotationProcessor project(':safe-parcel-processor') |
|
Do we know why we're whitelisting scopes? This breaks, for instance, google drive functionality. |
|
When this seems ready we can merge to dev and make a one off pre-release for others to test. We haven't got around to automating a pre-release but we can post an artifact link here for others to test. After no issues are found we can do stable release. |
That would be helpful, let's do that. I'm pretty hard-stuck on getting Duolingo to work. I don't think its an issue with the implementation, just a login flow that isn't supported by microg. |
|
One off dev build for others to try: https://github.com/MorpheApp/MicroG-RE/actions/runs/23383625167/artifacts/6040456696 |
These changes were necessary to allow google sign-in on one of my patched applications. I may add additional commits as I go through the other apps, but wanted to get some eyes on this.
The only part I'm iffy about is the theme/layout changes. Mostly I was just trying to get it not to crash when loading the account picker.