fix: account fo breaking changes from ReVanced Patcher (#2103)

RE: revanced/revanced-patcher/commit/6f6434fdb191fa4150d07ef1ec829fe570b3c664
This commit is contained in:
rstular 2023-05-08 01:47:32 +02:00 committed by GitHub
parent deda92fcff
commit 5be25cde4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ class UnlockProPatch : BytecodePatch(
) )
val setThemeMethod = SetThemeFingerprint.result!!.mutableMethod val setThemeMethod = SetThemeFingerprint.result!!.mutableMethod
setThemeMethod.removeInstructions(0, 9) setThemeMethod.removeInstructions(0, 10)
return PatchResultSuccess() return PatchResultSuccess()
} }

View File

@ -38,7 +38,7 @@ class UnlockPaidWidgetsPatch : BytecodePatch(
fingerprint.result?.mutableMethod ?: return fingerprint.toErrorResult() fingerprint.result?.mutableMethod ?: return fingerprint.toErrorResult()
}.forEach { method -> }.forEach { method ->
method.apply { method.apply {
removeInstructions(4, 2) removeInstructions(4, 3)
addInstructions( addInstructions(
implementation?.instructions?.size!!, """ implementation?.instructions?.size!!, """
const/4 v1, 0x0 const/4 v1, 0x0

View File

@ -61,7 +61,7 @@ class HideViewsBytecodePatch : BytecodePatch(
TweetStatsContainerConstructorFingerprint, TweetStatsContainerConstructorFingerprint,
returnFingerprint returnFingerprint
) { patternScanResult, method -> ) { patternScanResult, method ->
method.removeInstructions(patternScanResult.endIndex - 3, 2) method.removeInstructions(patternScanResult.endIndex - 3, 3)
} }
} }
@ -80,13 +80,13 @@ class HideViewsBytecodePatch : BytecodePatch(
TweetStatsContainerWrapperConstructorFingerprint, TweetStatsContainerWrapperConstructorFingerprint,
wrapperReturnFingerprint wrapperReturnFingerprint
) { patternScanResult, method -> ) { patternScanResult, method ->
method.removeInstructions(patternScanResult.startIndex - 4, 3) method.removeInstructions(patternScanResult.startIndex - 4, 4)
} }
} }
private fun removeViewDelegateBinderSubscription() { private fun removeViewDelegateBinderSubscription() {
transformMethod(TweetStatsViewDelegateBinderFingerprint) { result, method -> transformMethod(TweetStatsViewDelegateBinderFingerprint) { result, method ->
method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 9) method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 10)
} }
} }