fix(YouTube - GmsCore support): Remove unclear patch changes

This commit is contained in:
oSumAtrIX 2024-10-16 01:39:59 +02:00 committed by LisoUseInAIKyrios
parent 4d39770602
commit 021d8584a7
6 changed files with 2 additions and 36 deletions

View File

@ -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.MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.gms.Constants.REVANCED_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.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.MusicActivityOnCreateFingerprint
import app.revanced.patches.music.misc.gms.fingerprints.PrimeMethodFingerprint import app.revanced.patches.music.misc.gms.fingerprints.PrimeMethodFingerprint
import app.revanced.patches.music.misc.integrations.IntegrationsPatch import app.revanced.patches.music.misc.integrations.IntegrationsPatch
@ -16,7 +15,6 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch(
toPackageName = REVANCED_MUSIC_PACKAGE_NAME, toPackageName = REVANCED_MUSIC_PACKAGE_NAME,
primeMethodFingerprint = PrimeMethodFingerprint, primeMethodFingerprint = PrimeMethodFingerprint,
earlyReturnFingerprints = setOf( earlyReturnFingerprints = setOf(
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint, CastContextFetchFingerprint,
), ),
mainActivityOnCreateFingerprint = MusicActivityOnCreateFingerprint, mainActivityOnCreateFingerprint = MusicActivityOnCreateFingerprint,
@ -26,7 +24,6 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch(
CompatiblePackage("com.google.android.apps.youtube.music"), CompatiblePackage("com.google.android.apps.youtube.music"),
), ),
fingerprints = setOf( fingerprints = setOf(
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint, CastContextFetchFingerprint,
PrimeMethodFingerprint, PrimeMethodFingerprint,
), ),

View File

@ -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: ")
)

View File

@ -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.ACTIONS
import app.revanced.patches.shared.misc.gms.BaseGmsCoreSupportPatch.Constants.AUTHORITIES 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.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
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.GmsCoreSupportFingerprint.GET_GMS_CORE_VENDOR_GROUP_ID_METHOD_NAME
import app.revanced.patches.shared.misc.gms.fingerprints.GooglePlayUtilityFingerprint import app.revanced.patches.shared.misc.gms.fingerprints.GooglePlayUtilityFingerprint
@ -69,7 +68,6 @@ abstract class BaseGmsCoreSupportPatch(
GmsCoreSupportFingerprint, GmsCoreSupportFingerprint,
GooglePlayUtilityFingerprint, GooglePlayUtilityFingerprint,
ServiceCheckFingerprint, ServiceCheckFingerprint,
CastDynamiteModuleFingerprint,
mainActivityOnCreateFingerprint, mainActivityOnCreateFingerprint,
) + fingerprints, ) + fingerprints,
requiresIntegrations = true, requiresIntegrations = true,
@ -104,10 +102,7 @@ abstract class BaseGmsCoreSupportPatch(
// Return these methods early to prevent the app from crashing. // Return these methods early to prevent the app from crashing.
earlyReturnFingerprints.returnEarly() earlyReturnFingerprints.returnEarly()
ServiceCheckFingerprint.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. // Google Play Utility is not present in all apps, so we need to check if it's present.
if (GooglePlayUtilityFingerprint.result != null) { if (GooglePlayUtilityFingerprint.result != null) {
GooglePlayUtilityFingerprint.returnEarly() GooglePlayUtilityFingerprint.returnEarly()

View File

@ -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")
)

View File

@ -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.REVANCED_YOUTUBE_PACKAGE_NAME
import app.revanced.patches.youtube.misc.gms.Constants.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.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.gms.fingerprints.PrimeMethodFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.shared.fingerprints.MainActivityOnCreateFingerprint import app.revanced.patches.youtube.shared.fingerprints.MainActivityOnCreateFingerprint
@ -18,7 +17,6 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch(
toPackageName = REVANCED_YOUTUBE_PACKAGE_NAME, toPackageName = REVANCED_YOUTUBE_PACKAGE_NAME,
primeMethodFingerprint = PrimeMethodFingerprint, primeMethodFingerprint = PrimeMethodFingerprint,
earlyReturnFingerprints = setOf( earlyReturnFingerprints = setOf(
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint, CastContextFetchFingerprint,
), ),
mainActivityOnCreateFingerprint = MainActivityOnCreateFingerprint, mainActivityOnCreateFingerprint = MainActivityOnCreateFingerprint,
@ -41,7 +39,7 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch(
), ),
), ),
fingerprints = setOf( fingerprints = setOf(
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint, CastContextFetchFingerprint,
PrimeMethodFingerprint, PrimeMethodFingerprint,
), ),

View File

@ -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: ")
)