mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-20 01:23:57 +00:00
Compare commits
5 Commits
v2.185.0-d
...
v2.185.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b78e8377b | ||
|
|
6b2f7862d1 | ||
|
|
4668861d65 | ||
|
|
c5c63537ff | ||
|
|
5de8ee51c1 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [2.185.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.2...v2.185.0-dev.3) (2023-07-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync for Reddit - Disable ads:** fix compatibility with latest version ([1456577](https://github.com/ReVanced/revanced-patches/commit/1456577f11c4a7e49d6c1ba0103b919dc487f4cf))
|
||||||
|
|
||||||
|
# [2.185.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.1...v2.185.0-dev.2) (2023-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* allocate for more than eight `LithoFilter` array items ([#2643](https://github.com/ReVanced/revanced-patches/issues/2643)) ([fc8660b](https://github.com/ReVanced/revanced-patches/commit/fc8660b740bec2747e5f82b7321027bb8a51e0cf))
|
||||||
|
|
||||||
# [2.185.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.184.1-dev.1...v2.185.0-dev.1) (2023-07-15)
|
# [2.185.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.184.1-dev.1...v2.185.0-dev.1) (2023-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.185.0-dev.1
|
version = 2.185.0-dev.3
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package app.revanced.patches.syncforreddit.detection.piracy.fingerprints
|
package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.reference.TypeReference
|
|
||||||
|
|
||||||
object PiracyDetectionFingerprint : MethodFingerprint(
|
object PiracyDetectionFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch
|
package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patches.syncforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint
|
||||||
|
|
||||||
@Description("Disables detection of modified versions.")
|
@Description("Disables detection of modified versions.")
|
||||||
@Version("0.0.1")
|
|
||||||
class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) {
|
class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
// Do not return an error if the fingerprint is not resolved.
|
||||||
|
// This is fine because new versions of the target app do not need this patch.
|
||||||
PiracyDetectionFingerprint.result?.mutableMethod?.apply {
|
PiracyDetectionFingerprint.result?.mutableMethod?.apply {
|
||||||
addInstruction(
|
addInstruction(
|
||||||
0,
|
0,
|
||||||
@@ -21,7 +20,7 @@ class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerpr
|
|||||||
return-void
|
return-void
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: return PiracyDetectionFingerprint.toErrorResult()
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class LithoFilterPatch : BytecodePatch(
|
|||||||
"""
|
"""
|
||||||
new-instance v1, $classDescriptor
|
new-instance v1, $classDescriptor
|
||||||
invoke-direct {v1}, $classDescriptor-><init>()V
|
invoke-direct {v1}, $classDescriptor-><init>()V
|
||||||
const/4 v2, ${filterCount++}
|
const/16 v2, ${filterCount++}
|
||||||
aput-object v1, v0, v2
|
aput-object v1, v0, v2
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -187,7 +187,7 @@ class LithoFilterPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() = LithoFilterFingerprint.result!!
|
override fun close() = LithoFilterFingerprint.result!!
|
||||||
.mutableMethod.replaceInstruction(0, "const/4 v0, $filterCount")
|
.mutableMethod.replaceInstruction(0, "const/16 v0, $filterCount")
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val MethodFingerprint.patternScanResult
|
private val MethodFingerprint.patternScanResult
|
||||||
@@ -208,4 +208,4 @@ class LithoFilterPatch : BytecodePatch(
|
|||||||
|
|
||||||
private var filterCount = 0
|
private var filterCount = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user