From 441900ef20b1ad4c0a91f9dc159eb276bbe6187b Mon Sep 17 00:00:00 2001 From: FullerBread2032 Date: Fri, 27 Sep 2024 20:53:06 +0200 Subject: [PATCH] Support version `2024.09.20` --- .../soundcloud/ad/fingerprints/InterceptFingerprint.kt | 4 ---- .../UserConsumerPlanConstructorFingerprint.kt | 3 --- .../fingerprints/CreateTrackingApiFingerprint.kt | 3 ++- .../DownloadOperationsHeaderVerificationFingerprint.kt | 4 +--- .../DownloadOperationsURLBuilderFingerprint.kt | 3 --- .../fingerprints/FeatureConstructorFingerprint.kt | 10 +++++++--- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/InterceptFingerprint.kt b/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/InterceptFingerprint.kt index d38975357b..bc183573c6 100644 --- a/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/InterceptFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/InterceptFingerprint.kt @@ -14,8 +14,4 @@ internal object InterceptFingerprint : MethodFingerprint( Opcode.MOVE_RESULT_OBJECT ), strings = listOf("SC-Mob-UserPlan", "Configuration"), - customFingerprint = { _, classDef -> - classDef.sourceFile == "ApiUserPlanInterceptor.java" || - classDef.sourceFile == "ApiUserPlanInterceptor.kt" - }, ) diff --git a/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/UserConsumerPlanConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/UserConsumerPlanConstructorFingerprint.kt index 0a238be565..0abe74043d 100644 --- a/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/UserConsumerPlanConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/soundcloud/ad/fingerprints/UserConsumerPlanConstructorFingerprint.kt @@ -8,7 +8,4 @@ internal object UserConsumerPlanConstructorFingerprint : MethodFingerprint( returnType = "V", accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, parameters = listOf("Ljava/lang/String;", "Z", "Ljava/lang/String;", "Ljava/util/List;", "Ljava/lang/String;", "Ljava/lang/String;"), - customFingerprint = { _, classDef -> - classDef.sourceFile == "UserConsumerPlan.kt" - }, ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/soundcloud/analytics/fingerprints/CreateTrackingApiFingerprint.kt b/src/main/kotlin/app/revanced/patches/soundcloud/analytics/fingerprints/CreateTrackingApiFingerprint.kt index f305591d21..993ba1afdf 100644 --- a/src/main/kotlin/app/revanced/patches/soundcloud/analytics/fingerprints/CreateTrackingApiFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/soundcloud/analytics/fingerprints/CreateTrackingApiFingerprint.kt @@ -7,6 +7,7 @@ internal object CreateTrackingApiFingerprint : MethodFingerprint( returnType = "L", accessFlags = AccessFlags.PUBLIC.value, customFingerprint = { methodDef, classDef -> - classDef.sourceFile == "DefaultTrackingApiFactory.kt" && methodDef.name == "create" + methodDef.name == "create" }, + strings = listOf("backend", "boogaloo") ) diff --git a/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsHeaderVerificationFingerprint.kt b/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsHeaderVerificationFingerprint.kt index e3629c788e..1721c4feb2 100644 --- a/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsHeaderVerificationFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsHeaderVerificationFingerprint.kt @@ -15,7 +15,5 @@ internal object DownloadOperationsHeaderVerificationFingerprint : MethodFingerpr Opcode.MOVE_RESULT_OBJECT, Opcode.CONST_STRING ), - customFingerprint = { _, classDef -> - classDef.sourceFile == "DownloadOperations.kt" - } + strings = listOf("X-SC-Mime-Type", "X-SC-Preset", "X-SC-Quality") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsURLBuilderFingerprint.kt b/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsURLBuilderFingerprint.kt index 5394658e54..4d7ffa0c6b 100644 --- a/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsURLBuilderFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/fingerprints/DownloadOperationsURLBuilderFingerprint.kt @@ -14,7 +14,4 @@ internal object DownloadOperationsURLBuilderFingerprint : MethodFingerprint( Opcode.SGET_OBJECT, Opcode.FILLED_NEW_ARRAY ), - customFingerprint = { _, classDef -> - classDef.sourceFile == "DownloadOperations.kt" - } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/soundcloud/shared/fingerprints/FeatureConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/soundcloud/shared/fingerprints/FeatureConstructorFingerprint.kt index 6506ebab2c..0ee4292c38 100644 --- a/src/main/kotlin/app/revanced/patches/soundcloud/shared/fingerprints/FeatureConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/soundcloud/shared/fingerprints/FeatureConstructorFingerprint.kt @@ -3,12 +3,16 @@ package app.revanced.patches.soundcloud.shared.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.MethodFingerprint import com.android.tools.smali.dexlib2.AccessFlags +import com.android.tools.smali.dexlib2.Opcode + internal object FeatureConstructorFingerprint : MethodFingerprint( returnType = "V", accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, parameters = listOf("Ljava/lang/String;", "Z", "Ljava/util/List;"), - customFingerprint = { _, classDef -> - classDef.sourceFile == "Feature.kt" - }, + opcodes = listOf( + Opcode.SGET_OBJECT, + Opcode.CHECK_CAST, + Opcode.INVOKE_VIRTUAL + ) ) \ No newline at end of file