fix(Soundcloud): Support latest versions (#3702)

This commit is contained in:
FullerBread2032 2024-09-29 02:25:56 +02:00 committed by GitHub
parent 2d203bdab7
commit 099ac5ea2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 10 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,4 @@ internal object DownloadOperationsURLBuilderFingerprint : MethodFingerprint(
Opcode.SGET_OBJECT,
Opcode.FILLED_NEW_ARRAY
),
customFingerprint = { _, classDef ->
classDef.sourceFile == "DownloadOperations.kt"
}
)

View File

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