diff --git a/patches/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt index da41fe3c4..d918c8163 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt @@ -41,6 +41,7 @@ val cairoSplashAnimationPatch = bytecodePatch( "7.16.53", "7.25.53", "8.05.51", + "8.10.51", ), ) diff --git a/patches/src/main/kotlin/app/revanced/patches/music/player/components/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/music/player/components/Fingerprints.kt index 0182bc141..20921e3c4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/player/components/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/player/components/Fingerprints.kt @@ -20,8 +20,8 @@ import app.revanced.util.or import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import com.android.tools.smali.dexlib2.iface.reference.TypeReference const val AUDIO_VIDEO_SWITCH_TOGGLE_VISIBILITY = "/AudioVideoSwitcherToggleView;->setVisibility(I)V" @@ -44,7 +44,6 @@ internal val audioVideoSwitchToggleFingerprint = legacyFingerprint( internal val engagementPanelHeightFingerprint = legacyFingerprint( name = "engagementPanelHeightFingerprint", returnType = "L", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, // In YouTube Music 7.21.50+, there are two methods with similar structure, so this Opcode pattern must be used. opcodes = listOf( Opcode.IGET_OBJECT, @@ -54,6 +53,7 @@ internal val engagementPanelHeightFingerprint = legacyFingerprint( ), parameters = emptyList(), customFingerprint = { method, _ -> + AccessFlags.FINAL.isSet(method.accessFlags) && method.containsLiteralInstruction(1) && method.indexOfFirstInstruction { opcode == Opcode.INVOKE_VIRTUAL && @@ -65,7 +65,6 @@ internal val engagementPanelHeightFingerprint = legacyFingerprint( internal val engagementPanelHeightParentFingerprint = legacyFingerprint( name = "engagementPanelHeightParentFingerprint", returnType = "L", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, opcodes = listOf(Opcode.NEW_ARRAY), parameters = emptyList(), customFingerprint = custom@{ method, _ -> @@ -75,9 +74,12 @@ internal val engagementPanelHeightParentFingerprint = legacyFingerprint( if (method.returnType == "Ljava/lang/Object;") { return@custom false } + if (!AccessFlags.FINAL.isSet(method.accessFlags)) { + return@custom false + } method.indexOfFirstInstruction { opcode == Opcode.CHECK_CAST && - (this as? ReferenceInstruction)?.reference?.toString() == "Lcom/google/android/libraries/youtube/engagementpanel/size/EngagementPanelSizeBehavior;" + getReference()?.type == "Lcom/google/android/libraries/youtube/engagementpanel/size/EngagementPanelSizeBehavior;" } >= 0 } ) diff --git a/patches/src/main/kotlin/app/revanced/patches/music/utils/compatibility/Constants.kt b/patches/src/main/kotlin/app/revanced/patches/music/utils/compatibility/Constants.kt index 435f19c2e..3169e345f 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/utils/compatibility/Constants.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/utils/compatibility/Constants.kt @@ -15,7 +15,8 @@ internal object Constants { "6.51.53", // This is the latest version of YouTube Music 6.xx.xx "7.16.53", // This is the latest version that supports the 'Spoof app version' patch. "7.25.53", // This is the last supported version for 2024. - "8.05.51", // This is the latest version supported by the RVX patch. + "8.05.51", // This was the latest version supported by the previous RVX patch. + "8.10.51", // This is the latest version supported by the RVX patch. ) ) } \ No newline at end of file