From 89d44da171c3f56f13112d1d82bc4ea4a56c7c06 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sat, 12 Apr 2025 21:01:51 +0200 Subject: [PATCH 1/4] fix(Spotify): Restore patching with ReVanced Manager (#4769) --- .../app/revanced/patches/spotify/misc/UnlockPremiumPatch.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/UnlockPremiumPatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/UnlockPremiumPatch.kt index 4c4889d97..57d95e1e7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/UnlockPremiumPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/UnlockPremiumPatch.kt @@ -35,7 +35,10 @@ val unlockPremiumPatch = bytecodePatch( sharedExtensionPatch, // Currently there is no easy way to make a mandatory patch, // so for now this is a dependent of this patch. - checkEnvironmentPatch, + // + // FIXME: Modifying string resources (such as adding patch strings) + // is currently failing with ReVanced manager. + // checkEnvironmentPatch, ) execute { From 618e3276e49cea4159ce4e3162b89f89ee5a7fb4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 12 Apr 2025 19:04:28 +0000 Subject: [PATCH 2/4] chore: Release v5.19.1-dev.1 [skip ci] ## [5.19.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.19.0...v5.19.1-dev.1) (2025-04-12) ### Bug Fixes * **Spotify:** Restore patching with ReVanced Manager ([#4769](https://github.com/ReVanced/revanced-patches/issues/4769)) ([89d44da](https://github.com/ReVanced/revanced-patches/commit/89d44da171c3f56f13112d1d82bc4ea4a56c7c06)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca7dc37b3..5c9e59f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [5.19.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.19.0...v5.19.1-dev.1) (2025-04-12) + + +### Bug Fixes + +* **Spotify:** Restore patching with ReVanced Manager ([#4769](https://github.com/ReVanced/revanced-patches/issues/4769)) ([89d44da](https://github.com/ReVanced/revanced-patches/commit/89d44da171c3f56f13112d1d82bc4ea4a56c7c06)) + # [5.19.0](https://github.com/ReVanced/revanced-patches/compare/v5.18.0...v5.19.0) (2025-04-12) diff --git a/gradle.properties b/gradle.properties index 2d73c8eb3..20155825a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M org.gradle.parallel = true android.useAndroidX = true kotlin.code.style = official -version = 5.19.0 +version = 5.19.1-dev.1 From 3e18e868bbd9fd0600fe81a7fe8767b4bd89a00e Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sat, 12 Apr 2025 21:20:36 +0200 Subject: [PATCH 3/4] fix(Google Photos): Restore patching with ReVanced Manager (#4773) --- .../misc/gms/GmsCoreSupportPatch.kt | 1 + .../misc/gms/GmsCoreSupportPatch.kt | 1 + .../shared/misc/gms/GmsCoreSupportPatch.kt | 38 ++++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/googlenews/misc/gms/GmsCoreSupportPatch.kt b/patches/src/main/kotlin/app/revanced/patches/googlenews/misc/gms/GmsCoreSupportPatch.kt index d03ce31e7..630e737cc 100644 --- a/patches/src/main/kotlin/app/revanced/patches/googlenews/misc/gms/GmsCoreSupportPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/googlenews/misc/gms/GmsCoreSupportPatch.kt @@ -27,4 +27,5 @@ private fun gmsCoreSupportResourcePatch( toPackageName = REVANCED_MAGAZINES_PACKAGE_NAME, spoofedPackageSignature = "24bb24c05e47e0aefa68a58a766179d9b613a666", gmsCoreVendorGroupIdOption = gmsCoreVendorGroupIdOption, + addStringResources = false, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/gms/GmsCoreSupportPatch.kt b/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/gms/GmsCoreSupportPatch.kt index 3ed14a29d..75d265be3 100644 --- a/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/gms/GmsCoreSupportPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/gms/GmsCoreSupportPatch.kt @@ -22,6 +22,7 @@ private fun gmsCoreSupportResourcePatch( ) = app.revanced.patches.shared.misc.gms.gmsCoreSupportResourcePatch( fromPackageName = PHOTOS_PACKAGE_NAME, toPackageName = REVANCED_PHOTOS_PACKAGE_NAME, + addStringResources = false, spoofedPackageSignature = "24bb24c05e47e0aefa68a58a766179d9b613a600", gmsCoreVendorGroupIdOption = gmsCoreVendorGroupIdOption, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt b/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt index 64173c18c..694d471f7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt @@ -500,13 +500,44 @@ private object Constants { * @param executeBlock The additional execution block of the patch. * @param block The additional block to build the patch. */ -fun gmsCoreSupportResourcePatch( +fun gmsCoreSupportResourcePatch( // This is here only for binary compatibility. fromPackageName: String, toPackageName: String, spoofedPackageSignature: String, gmsCoreVendorGroupIdOption: Option, executeBlock: ResourcePatchContext.() -> Unit = {}, block: ResourcePatchBuilder.() -> Unit = {}, +) = gmsCoreSupportResourcePatch( + fromPackageName, + toPackageName, + spoofedPackageSignature, + gmsCoreVendorGroupIdOption, + true, + executeBlock, + block +) + +/** + * Abstract resource patch that allows Google apps to run without root and under a different package name + * by using GmsCore instead of Google Play Services. + * + * @param fromPackageName The package name of the original app. + * @param toPackageName The package name to fall back to if no custom package name is specified in patch options. + * @param spoofedPackageSignature The signature of the package to spoof to. + * @param gmsCoreVendorGroupIdOption The option to get the vendor group ID of GmsCore. + * @param addStringResources If the GmsCore shared strings should be added to the patched app. + * @param executeBlock The additional execution block of the patch. + * @param block The additional block to build the patch. + */ +// TODO: On the next major release make this public and delete the public overloaded constructor. +internal fun gmsCoreSupportResourcePatch( + fromPackageName: String, + toPackageName: String, + spoofedPackageSignature: String, + gmsCoreVendorGroupIdOption: Option, + addStringResources: Boolean = true, + executeBlock: ResourcePatchContext.() -> Unit = {}, + block: ResourcePatchBuilder.() -> Unit = {}, ) = resourcePatch { dependsOn( changePackageNamePatch, @@ -516,7 +547,10 @@ fun gmsCoreSupportResourcePatch( val gmsCoreVendorGroupId by gmsCoreVendorGroupIdOption execute { - addResources("shared", "misc.gms.gmsCoreSupportResourcePatch") + // Some patches don't use shared String resources so there's no need to add them. + if (addStringResources) { + addResources("shared", "misc.gms.gmsCoreSupportResourcePatch") + } /** * Add metadata to manifest to support spoofing the package name and signature of GmsCore. From 7f98474d3712b71ebd52f1afb04e8da9640c819a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 12 Apr 2025 19:23:37 +0000 Subject: [PATCH 4/4] chore: Release v5.19.1-dev.2 [skip ci] ## [5.19.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.19.1-dev.1...v5.19.1-dev.2) (2025-04-12) ### Bug Fixes * **Google Photos:** Restore patching with ReVanced Manager ([#4773](https://github.com/ReVanced/revanced-patches/issues/4773)) ([3e18e86](https://github.com/ReVanced/revanced-patches/commit/3e18e868bbd9fd0600fe81a7fe8767b4bd89a00e)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c9e59f70..a2c4aa513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [5.19.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.19.1-dev.1...v5.19.1-dev.2) (2025-04-12) + + +### Bug Fixes + +* **Google Photos:** Restore patching with ReVanced Manager ([#4773](https://github.com/ReVanced/revanced-patches/issues/4773)) ([3e18e86](https://github.com/ReVanced/revanced-patches/commit/3e18e868bbd9fd0600fe81a7fe8767b4bd89a00e)) + ## [5.19.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.19.0...v5.19.1-dev.1) (2025-04-12) diff --git a/gradle.properties b/gradle.properties index 20155825a..caa7cc81d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M org.gradle.parallel = true android.useAndroidX = true kotlin.code.style = official -version = 5.19.1-dev.1 +version = 5.19.1-dev.2