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

Merged
merged 9 commits into from
Jul 20, 2024

Conversation

benjy3gg
Copy link
Contributor

@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
Contributor 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
Contributor

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

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Jul 20, 2024

The latest releases of Google News use Android SDK 35. iBotPeaches/Apktool@25826db needs to be updated for resource patches to work. Pinning the GmsCore support patch to 5.108.0.644447823.

@oSumAtrIX oSumAtrIX merged commit ad59096 into ReVanced:dev Jul 20, 2024
1 check passed
Copy link

welcome bot commented Jul 20, 2024

Thank you for contributing to ReVanced. Join us on Discord to receive a role for your contribution.

revanced-bot pushed a commit that referenced this pull request Jul 20, 2024
# [4.12.0-dev.4](v4.12.0-dev.3...v4.12.0-dev.4) (2024-07-20)

### Features

* **Google News:** Add `Enable CustomTabs` and `GmsCore support` patch ([#3111](#3111)) ([ad59096](ad59096))
revanced-bot pushed a commit that referenced this pull request Aug 6, 2024
# [4.12.0](v4.11.0...v4.12.0) (2024-08-06)

### Bug Fixes

* **Google Photos - GmsCore support:** Fix by checking first if a method exists before trying to patch it ([acf38ca](acf38ca))
* **Instagram - Hide ads:**  Restore compatibility with latest version by fixing fingerprint ([#3455](#3455)) ([4505fa4](4505fa4))
* **Messenger - Disable switching emoji to sticker:** Constrain to last working version `439.0.0.29.119` ([6207c31](6207c31))
* **SoundCloud - Enable offline sync:** Stop crashing by reversing order of patching instructions from last to first to retain indices ([63b6ced](63b6ced))
* **YouTube - Bypass image region restrictions:** Move setting to `Misc` menu ([094ae59](094ae59))
* **YouTube - Client Spoof:** Restore missing high qualities by spoofing the iOS client user agent ([#3468](#3468)) ([0e6ae5f](0e6ae5f))
* **YouTube - Hide keyword content:** Do not hide flyout menu ([687c9f7](687c9f7))
* **YouTube - SponsorBlock:** Correctly show minute timestamp when creating a new segment ([d74c366](d74c366))
* **YouTube - SponsorBlock:** Improve create segment manual seek accuracy ([#3491](#3491)) ([1544981](1544981))
* **YouTube - Spoof client:** Fix tracking history on brand accounts ([#3480](#3480)) ([69c1f16](69c1f16))
* **YouTube - Spoof client:** Restore livestream audio only playback with iOS spoofing ([#3504](#3504)) ([90d3288](90d3288))

### Features

* Add `Hide mock location` patch ([#3417](#3417)) ([5f81b40](5f81b40))
* Add `Spoof build info` patch ([e7829b4](e7829b4))
* **Boost for Reddit:** Add `Disable ads` patch ([#3474](#3474)) ([b292c20](b292c20))
* **CandyLink:** Remove non-functional `Unlock pro` patch ([7ae9f8f](7ae9f8f))
* **Expense Manager:** Remove non-functional `Unlock pro` patch ([ebbcac7](ebbcac7))
* **Google News:** Add `Enable CustomTabs` and `GmsCore support` patch ([#3111](#3111)) ([ad59096](ad59096))
* **Google Photos:** Add `GmsCore support` patch ([#3414](#3414)) ([24528e0](24528e0))
* **Instagram:** Remove unnecessary `Hide timeline ads` patch ([5e1d001](5e1d001))
* **SoundCloud:** Add `Enable offline sync` patch ([#3407](#3407)) ([4de86c6](4de86c6))
* **SwissID:** Add `Remove Google Play Integrity Integrity check` patch ([#3478](#3478)) ([60492ae](60492ae))
* **YouTube - Description components:** Add `Hide 'Key concepts' section` option ([#3495](#3495)) ([d75b645](d75b645))
* **YouTube:** Add `Bypass image region restrictions` patch ([#3442](#3442)) ([765fab2](765fab2))
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.

4 participants