From 021d8584a7f5a6d1a028c5d18dc91a3b988b2884 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 16 Oct 2024 01:39:59 +0200 Subject: [PATCH] fix(YouTube - GmsCore support): Remove unclear patch changes --- .../patches/music/misc/gms/GmsCoreSupportPatch.kt | 3 --- .../gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt | 8 -------- .../patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt | 7 +------ .../gms/fingerprints/CastDynamiteModuleFingerprint.kt | 8 -------- .../patches/youtube/misc/gms/GmsCoreSupportPatch.kt | 4 +--- .../gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt | 8 -------- 6 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/shared/misc/gms/fingerprints/CastDynamiteModuleFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt diff --git a/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt index 1b6a7a6ec..28c935371 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt @@ -3,7 +3,6 @@ package app.revanced.patches.music.misc.gms import app.revanced.patches.music.misc.gms.Constants.MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.gms.Constants.REVANCED_MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.gms.GmsCoreSupportResourcePatch.gmsCoreVendorGroupIdOption -import app.revanced.patches.music.misc.gms.fingerprints.CastDynamiteModuleV2Fingerprint import app.revanced.patches.music.misc.gms.fingerprints.MusicActivityOnCreateFingerprint import app.revanced.patches.music.misc.gms.fingerprints.PrimeMethodFingerprint import app.revanced.patches.music.misc.integrations.IntegrationsPatch @@ -16,7 +15,6 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( toPackageName = REVANCED_MUSIC_PACKAGE_NAME, primeMethodFingerprint = PrimeMethodFingerprint, earlyReturnFingerprints = setOf( - CastDynamiteModuleV2Fingerprint, CastContextFetchFingerprint, ), mainActivityOnCreateFingerprint = MusicActivityOnCreateFingerprint, @@ -26,7 +24,6 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( CompatiblePackage("com.google.android.apps.youtube.music"), ), fingerprints = setOf( - CastDynamiteModuleV2Fingerprint, CastContextFetchFingerprint, PrimeMethodFingerprint, ), diff --git a/src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt b/src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt deleted file mode 100644 index 0249a9813..000000000 --- a/src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.music.misc.gms.fingerprints - - -import app.revanced.patcher.fingerprint.MethodFingerprint - -internal object CastDynamiteModuleV2Fingerprint : MethodFingerprint( - strings = listOf("Failed to load module via V2: ") -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt index 064bad9a4..6d2d6427b 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt @@ -11,7 +11,6 @@ import app.revanced.patches.all.misc.packagename.ChangePackageNamePatch import app.revanced.patches.shared.misc.gms.BaseGmsCoreSupportPatch.Constants.ACTIONS import app.revanced.patches.shared.misc.gms.BaseGmsCoreSupportPatch.Constants.AUTHORITIES import app.revanced.patches.shared.misc.gms.BaseGmsCoreSupportPatch.Constants.PERMISSIONS -import app.revanced.patches.shared.misc.gms.fingerprints.CastDynamiteModuleFingerprint import app.revanced.patches.shared.misc.gms.fingerprints.GmsCoreSupportFingerprint import app.revanced.patches.shared.misc.gms.fingerprints.GmsCoreSupportFingerprint.GET_GMS_CORE_VENDOR_GROUP_ID_METHOD_NAME import app.revanced.patches.shared.misc.gms.fingerprints.GooglePlayUtilityFingerprint @@ -69,7 +68,6 @@ abstract class BaseGmsCoreSupportPatch( GmsCoreSupportFingerprint, GooglePlayUtilityFingerprint, ServiceCheckFingerprint, - CastDynamiteModuleFingerprint, mainActivityOnCreateFingerprint, ) + fingerprints, requiresIntegrations = true, @@ -104,10 +102,7 @@ abstract class BaseGmsCoreSupportPatch( // Return these methods early to prevent the app from crashing. earlyReturnFingerprints.returnEarly() ServiceCheckFingerprint.returnEarly() - // Not all apps have CastDynamiteModule, so we need to check if it's present. - if (CastDynamiteModuleFingerprint.result != null) { - CastDynamiteModuleFingerprint.returnEarly() - } + // Google Play Utility is not present in all apps, so we need to check if it's present. if (GooglePlayUtilityFingerprint.result != null) { GooglePlayUtilityFingerprint.returnEarly() diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/gms/fingerprints/CastDynamiteModuleFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/misc/gms/fingerprints/CastDynamiteModuleFingerprint.kt deleted file mode 100644 index 7773e378d..000000000 --- a/src/main/kotlin/app/revanced/patches/shared/misc/gms/fingerprints/CastDynamiteModuleFingerprint.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.shared.misc.gms.fingerprints - - -import app.revanced.patcher.fingerprint.MethodFingerprint - -internal object CastDynamiteModuleFingerprint : MethodFingerprint( - strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl") -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt index e66efc9c6..5ecd694f8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt @@ -7,7 +7,6 @@ import app.revanced.patches.youtube.misc.fix.playback.SpoofVideoStreamsPatch import app.revanced.patches.youtube.misc.gms.Constants.REVANCED_YOUTUBE_PACKAGE_NAME import app.revanced.patches.youtube.misc.gms.Constants.YOUTUBE_PACKAGE_NAME import app.revanced.patches.youtube.misc.gms.GmsCoreSupportResourcePatch.gmsCoreVendorGroupIdOption -import app.revanced.patches.youtube.misc.gms.fingerprints.CastDynamiteModuleV2Fingerprint import app.revanced.patches.youtube.misc.gms.fingerprints.PrimeMethodFingerprint import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.shared.fingerprints.MainActivityOnCreateFingerprint @@ -18,7 +17,6 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( toPackageName = REVANCED_YOUTUBE_PACKAGE_NAME, primeMethodFingerprint = PrimeMethodFingerprint, earlyReturnFingerprints = setOf( - CastDynamiteModuleV2Fingerprint, CastContextFetchFingerprint, ), mainActivityOnCreateFingerprint = MainActivityOnCreateFingerprint, @@ -41,7 +39,7 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( ), ), fingerprints = setOf( - CastDynamiteModuleV2Fingerprint, + CastContextFetchFingerprint, PrimeMethodFingerprint, ), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt deleted file mode 100644 index d0a463176..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/fingerprints/CastDynamiteModuleV2Fingerprint.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.youtube.misc.gms.fingerprints - - -import app.revanced.patcher.fingerprint.MethodFingerprint - -internal object CastDynamiteModuleV2Fingerprint : MethodFingerprint( - strings = listOf("Failed to load module via V2: ") -) \ No newline at end of file