Skip to content

fix: Apply various sign-in fixes#146

Merged
LisoUseInAIKyrios merged 6 commits into
MorpheApp:devfrom
hoo-dles:fix-signin
Mar 21, 2026
Merged

fix: Apply various sign-in fixes#146
LisoUseInAIKyrios merged 6 commits into
MorpheApp:devfrom
hoo-dles:fix-signin

Conversation

@hoo-dles

Copy link
Copy Markdown

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.

@hoo-dles

Copy link
Copy Markdown
Author

Related to #127

@hoo-dles

Copy link
Copy Markdown
Author

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);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@hoo-dles hoo-dles Mar 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hoo-dles hoo-dles Mar 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +12 to +17
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";

@hoo-dles hoo-dles Mar 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api project(':play-services-basement')
api project(':play-services-tasks')

annotationProcessor project(':safe-parcel-processor')

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was missing from this module

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title Various sign-in fixes fix: Apply various sign-in fixes Mar 18, 2026
@hoo-dles

Copy link
Copy Markdown
Author

Do we know why we're whitelisting scopes?

private val ACCEPTABLE_SCOPES = setOf(Scopes.OPENID, Scopes.EMAIL, Scopes.PROFILE, Scopes.USERINFO_EMAIL, Scopes.USERINFO_PROFILE, Scopes.GAMES_LITE)

This breaks, for instance, google drive functionality.

@LisoUseInAIKyrios

Copy link
Copy Markdown

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.

@hoo-dles

Copy link
Copy Markdown
Author

When this seems ready we can merge to dev and make a one off pre-release for others to test.

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.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit 346f0da into MorpheApp:dev Mar 21, 2026
1 check passed
@LisoUseInAIKyrios

LisoUseInAIKyrios commented Mar 21, 2026

Copy link
Copy Markdown

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.

2 participants