Skip to content
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

feat(Google News): Add Enable CustomTabs and GmsCore support patch #3111

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

benjy3gg
Copy link

@benjy3gg benjy3gg commented May 2, 2024

This Patch implements CustomTabs in Google News (com.google.android.apps.magazines).
This sets a flag that is otherwise false to true -> Instead of opening articles in ChromeWebView it uses the Default Browser

This also implements Basic GMSCore Support.
Login and Logout works.
Clicking on "Manager your Google Account" doesn't open the GMSCore settings -> same problem as in Youtube.

@benjy3gg
Copy link
Author

benjy3gg commented May 2, 2024

depends on this pullrequest in revanced-integrations:
ReVanced/revanced-integrations#628

otherwise i get an error in the onCreate method of StartActivity

@oSumAtrIX
Copy link
Member

@benjy3gg Is this PR still active?

@Patch(requiresIntegrations = true)
object IntegrationsPatch : BaseIntegrationsPatch(
setOf(
StartActivityInitFingerprint
Copy link
Member

Choose a reason for hiding this comment

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

Are there any other exported activities that can be launched? Because if so, they should be added here because if they are launched, context would not be hooked.

@oSumAtrIX oSumAtrIX changed the title feat(Google News): Add Google News Patches, CustomTabs and GMSCore Integration feat(Google News): Add Enable CustomTabs and GmsCore support patch Jun 7, 2024
@xob0t
Copy link

xob0t commented Jul 5, 2024

The GmsCore patch crashes the app.
Tested with Google news v5.108.0.638413701, revanced-cli-4.6.0-all.jar and revanced-integrations-1.11.0.apk
Frida crash log

Process crashed: java.lang.VerifyError: Verifier rejected class com.google.apps.dots.android.newsstand.activity.StartActivity: void com.google.apps.dots.android.newsstand.activity.StartActivity.onCreate(android.os.Bundle) failed to verify: void com.google.apps.dots.android.newsstand.activity.StartActivity.onCreate(android.os.Bundle): [0x1C] register v3 has type Undefined but expected Reference: android.content.Context (declaration of 'com.google.apps.dots.android.newsstand.activity.StartActivity' appears in base.apk!classes4.dex)

changing register to v2 in this line of the decompiled patched app fixes the crash

invoke-static/range {v3 .. v3}, Lapp/revanced/integrations/shared/Utils;->setContext(Landroid/content/Context;)V

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.

None yet

4 participants