feat(Strava): Add Disable subscription suggestions patch (#2997)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
committed by
GitHub
co-authored by
oSumAtrIX
parent
096fc12123
commit
ef241671bd
@@ -10,7 +10,7 @@ import app.revanced.patches.strava.subscription.fingerprints.GetSubscribedFinger
|
||||
|
||||
@Patch(
|
||||
name = "Unlock subscription features",
|
||||
description = "Unlocks \"Matched Runs\" and \"Segment Efforts\".",
|
||||
description = "Unlocks \"Routes\", \"Matched Runs\" and \"Segment Efforts\".",
|
||||
compatiblePackages = [CompatiblePackage("com.strava", ["320.12"])]
|
||||
)
|
||||
@Suppress("unused")
|
||||
@@ -19,4 +19,4 @@ object UnlockSubscriptionPatch : BytecodePatch(setOf(GetSubscribedFingerprint))
|
||||
val isSubscribedIndex = result.scanResult.patternScanResult!!.startIndex
|
||||
result.mutableMethod.replaceInstruction(isSubscribedIndex, "const/4 v0, 0x1")
|
||||
} ?: throw GetSubscribedFingerprint.exception
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
object GetSubscribedFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
classDef.type.endsWith("SubscriptionDetailResponse;") && methodDef.name == "getSubscribed"
|
||||
classDef.type.endsWith("/SubscriptionDetailResponse;") && methodDef.name == "getSubscribed"
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user