mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 18:03:55 +01:00
Compare commits
24 Commits
v2.187.0-d
...
v2.188.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fec613eb13 | ||
|
|
b007aa3827 | ||
|
|
8cd293310a | ||
|
|
9e8c4e61a5 | ||
|
|
9725870e6a | ||
|
|
204284f5d3 | ||
|
|
70cffa4466 | ||
|
|
4f885b15c0 | ||
|
|
28c541078b | ||
|
|
4d031cb029 | ||
|
|
1ea6f27d7d | ||
|
|
636e9dc446 | ||
|
|
dbcff623c8 | ||
|
|
e93adc15c2 | ||
|
|
244473cd4f | ||
|
|
efe7cbc78c | ||
|
|
9ac0ed477a | ||
|
|
9426b28dcc | ||
|
|
146b213b4a | ||
|
|
557a9f7418 | ||
|
|
e7b2bfbde3 | ||
|
|
d442acaac8 | ||
|
|
a00eab6744 | ||
|
|
87f2f90fc5 |
85
CHANGELOG.md
85
CHANGELOG.md
@@ -1,3 +1,88 @@
|
|||||||
|
# [2.188.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.3...v2.188.0-dev.4) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* improve wording ([26f9b05](https://github.com/ReVanced/revanced-patches/commit/26f9b0514fda9434b2a36d2f9e5ad6a4f5bb94bd))
|
||||||
|
* **Tiktok - Show seekbar:** Bump compatibility ([#2737](https://github.com/ReVanced/revanced-patches/issues/2737)) ([08413bd](https://github.com/ReVanced/revanced-patches/commit/08413bdc97aef892f7372c585d1d792eb95e30f4))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Lightroom:** Add `Disable mandatory login` patch ([#2738](https://github.com/ReVanced/revanced-patches/issues/2738)) ([896a713](https://github.com/ReVanced/revanced-patches/commit/896a71308f1084d7f941c5b59610e40ea5d53009))
|
||||||
|
* **Lightroom:** Add `Unlock premium` patch ([#2740](https://github.com/ReVanced/revanced-patches/issues/2740)) ([e18a9bc](https://github.com/ReVanced/revanced-patches/commit/e18a9bcb50705d374ccbf03cd6ab9a140a2f23ec))
|
||||||
|
* **YouTube Music:** Add `Permanent Shuffle` patch ([#2730](https://github.com/ReVanced/revanced-patches/issues/2730)) ([86a271c](https://github.com/ReVanced/revanced-patches/commit/86a271cd7cc3d1d2a11ff9ebe962574368b93f4f))
|
||||||
|
|
||||||
|
# [2.188.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.2...v2.188.0-dev.3) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove newline ([545388b](https://github.com/ReVanced/revanced-patches/commit/545388b3b21cabb485c4d2025756c48984548d6b))
|
||||||
|
|
||||||
|
# [2.188.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.1...v2.188.0-dev.2) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Reddit is Fun - Spoof client:** Use a more convincing user agent ([236a18f](https://github.com/ReVanced/revanced-patches/commit/236a18f9356cede156417c0d55a876d25a98cd4d))
|
||||||
|
|
||||||
|
# [2.188.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.187.0...v2.188.0-dev.1) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Nova Launcher:** Remove `Unlock prime` patch ([bbde91c](https://github.com/ReVanced/revanced-patches/commit/bbde91cf9df4b410a34147bbe5f359e39a71ad4c))
|
||||||
|
|
||||||
|
# [2.187.0](https://github.com/ReVanced/revanced-patches/compare/v2.186.0...v2.187.0) (2023-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Remove version numbers from individual patches ([#2709](https://github.com/ReVanced/revanced-patches/issues/2709)) ([7a828ea](https://github.com/ReVanced/revanced-patches/commit/7a828ea8826864505fac9b2bdb3a1261d9f4dc35))
|
||||||
|
* **Sync for Reddit - Change OAuth client id:** Disable piracy detection ([cd103dd](https://github.com/ReVanced/revanced-patches/commit/cd103dd9b8ff2667246d4abaf75577f28bf1a11b))
|
||||||
|
* Use clearer descriptions ([8dbb0e2](https://github.com/ReVanced/revanced-patches/commit/8dbb0e212e8ceeb0381a3509e45afca095ddee53))
|
||||||
|
* **YouTube - Spoof app version:** Fix grammar in description ([#2711](https://github.com/ReVanced/revanced-patches/issues/2711)) ([dd249e6](https://github.com/ReVanced/revanced-patches/commit/dd249e62243e57733a6ff4d3a17d30db0e08a84d))
|
||||||
|
* **YouTube - Spoof App Version:** Remove 17.30.35 target (version no longer works correctly) ([#2703](https://github.com/ReVanced/revanced-patches/issues/2703)) ([210108b](https://github.com/ReVanced/revanced-patches/commit/210108bd8f86f583f5cd5d5538480b76d51d7776))
|
||||||
|
* **YouTube - Theme:** only set splash screen color if background colors are set ([f058db4](https://github.com/ReVanced/revanced-patches/commit/f058db4ba4300400ac92b4a9790708eb8bde7092))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Joey for Reddit:** Add `Change OAuth client id` patch ([1bac47d](https://github.com/ReVanced/revanced-patches/commit/1bac47df889b5221bef1c03e652f894be8d39385))
|
||||||
|
* **Joey for Reddit:** Add `Disable ads` patch ([ad7e147](https://github.com/ReVanced/revanced-patches/commit/ad7e14771208dcab08fd6dc29403b1a4cf602111))
|
||||||
|
* **Reddit is Fun - Spoof client:** Spoof the user agent ([b9aaf61](https://github.com/ReVanced/revanced-patches/commit/b9aaf610ad9f1f45a72265a3782d2cf996020139))
|
||||||
|
* **Sync for Reddit:** add `Disable Sync for Lemmy bottom sheet` patch ([56b535b](https://github.com/ReVanced/revanced-patches/commit/56b535b2a136d4b0afbddf2c8e251889c2555056))
|
||||||
|
* **YouTube - Hide layout components:** Hide `chips shelf` ([#2699](https://github.com/ReVanced/revanced-patches/issues/2699)) ([8e6058b](https://github.com/ReVanced/revanced-patches/commit/8e6058b62350b3d14d79e6fe52b0ad781b66b5de))
|
||||||
|
* **YouTube:** add `Player Flyout Menu` patch ([#2295](https://github.com/ReVanced/revanced-patches/issues/2295)) ([aea0af0](https://github.com/ReVanced/revanced-patches/commit/aea0af059784ae4820a0e73ff91f97bbc3ebc4c7))
|
||||||
|
|
||||||
|
# [2.187.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.9...v2.187.0-dev.10) (2023-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Reddit is Fun - Spoof client:** Spoof the user agent ([b9aaf61](https://github.com/ReVanced/revanced-patches/commit/b9aaf610ad9f1f45a72265a3782d2cf996020139))
|
||||||
|
|
||||||
|
# [2.187.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.8...v2.187.0-dev.9) (2023-07-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Use clearer descriptions ([8dbb0e2](https://github.com/ReVanced/revanced-patches/commit/8dbb0e212e8ceeb0381a3509e45afca095ddee53))
|
||||||
|
|
||||||
|
# [2.187.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.7...v2.187.0-dev.8) (2023-07-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync for Reddit - Change OAuth client id:** Disable piracy detection ([cd103dd](https://github.com/ReVanced/revanced-patches/commit/cd103dd9b8ff2667246d4abaf75577f28bf1a11b))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Joey for Reddit:** Add `Change OAuth client id` patch ([1bac47d](https://github.com/ReVanced/revanced-patches/commit/1bac47df889b5221bef1c03e652f894be8d39385))
|
||||||
|
* **Joey for Reddit:** Add `Disable ads` patch ([ad7e147](https://github.com/ReVanced/revanced-patches/commit/ad7e14771208dcab08fd6dc29403b1a4cf602111))
|
||||||
|
|
||||||
# [2.187.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.6...v2.187.0-dev.7) (2023-07-30)
|
# [2.187.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.6...v2.187.0-dev.7) (2023-07-30)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:12.0.0")
|
implementation("app.revanced:revanced-patcher:12.1.1")
|
||||||
implementation("app.revanced:multidexlib2:2.5.3-a3836654")
|
implementation("app.revanced:multidexlib2:2.5.3-a3836654")
|
||||||
// Required for meta
|
// Required for meta
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
|
|||||||
@@ -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.187.0-dev.7
|
version = 2.188.0-dev.4
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.adobe.lrmobile",)])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class DisableMandatoryLoginCompatibility
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.fingerprint
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object IsLoggedInFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.IF_NE,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.GOTO
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.lightroom.misc.login.annotations.DisableMandatoryLoginCompatibility
|
||||||
|
import app.revanced.patches.lightroom.misc.login.fingerprint.IsLoggedInFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Disable mandatory login")
|
||||||
|
@DisableMandatoryLoginCompatibility
|
||||||
|
class DisableMandatoryLoginPatch : BytecodePatch(listOf(IsLoggedInFingerprint)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
IsLoggedInFingerprint.result?.mutableMethod?.apply {
|
||||||
|
val index = implementation!!.instructions.lastIndex - 1
|
||||||
|
// Set isLoggedIn = true.
|
||||||
|
replaceInstruction(index, "const/4 v0, 0x1")
|
||||||
|
} ?: throw IsLoggedInFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.adobe.lrmobile")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class UnlockPremiumCompatibility
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.fingerprint
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object HasPurchasedFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
|
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.lightroom.misc.premium.annotations.UnlockPremiumCompatibility
|
||||||
|
import app.revanced.patches.lightroom.misc.premium.fingerprint.HasPurchasedFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Unlock premium")
|
||||||
|
@Description("Unlocks premium features.")
|
||||||
|
@UnlockPremiumCompatibility
|
||||||
|
class UnlockPremiumPatch : BytecodePatch(listOf(HasPurchasedFingerprint)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
// Set hasPremium = true.
|
||||||
|
HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1")
|
||||||
|
?: throw HasPurchasedFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentshuffle.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object DisableShuffleFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
listOf(),
|
||||||
|
listOf(
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentshuffle.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
|
import app.revanced.patches.music.interaction.permanentshuffle.fingerprints.DisableShuffleFingerprint
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("Permanent shuffle")
|
||||||
|
@Description("Permanently remember your shuffle preference " +
|
||||||
|
"even if the playlist ends or another track is played.")
|
||||||
|
@MusicCompatibility
|
||||||
|
class PermanentShuffleTogglePatch : BytecodePatch(
|
||||||
|
listOf(DisableShuffleFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
DisableShuffleFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||||
|
?: return DisableShuffleFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package app.revanced.patches.nova.prime.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility(
|
|
||||||
[
|
|
||||||
Package("com.teslacoilsw.launcher")
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class UnlockPrimeCompatibility
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package app.revanced.patches.nova.prime.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
object UnlockPrimeFingerprint : MethodFingerprint(
|
|
||||||
"V",
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.IPUT_OBJECT,
|
|
||||||
Opcode.CONST_STRING,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
|
||||||
Opcode.MOVE_RESULT
|
|
||||||
),
|
|
||||||
strings = listOf("1")
|
|
||||||
)
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
package app.revanced.patches.nova.prime.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.nova.prime.annotations.UnlockPrimeCompatibility
|
|
||||||
import app.revanced.patches.nova.prime.fingerprints.UnlockPrimeFingerprint
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Unlock prime")
|
|
||||||
@Description("Unlocks Nova Prime and all functions of the app.")
|
|
||||||
@UnlockPrimeCompatibility
|
|
||||||
class UnlockPrimePatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
UnlockPrimeFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
private companion object {
|
|
||||||
// Any value except 0 unlocks prime, but 512 is needed for a protection mechanism
|
|
||||||
// which would reset the preferences if the value on disk had changed after a restart.
|
|
||||||
const val PRIME_STATUS: Int = 512
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
UnlockPrimeFingerprint.result?.apply {
|
|
||||||
val insertIndex = scanResult.patternScanResult!!.endIndex + 1
|
|
||||||
|
|
||||||
val primeStatusRegister =
|
|
||||||
(mutableMethod.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
|
||||||
|
|
||||||
mutableMethod.addInstruction(
|
|
||||||
insertIndex,
|
|
||||||
"""
|
|
||||||
const/16 v$primeStatusRegister, $PRIME_STATUS
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
} ?: return UnlockPrimeFingerprint.toErrorResult()
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,11 +8,15 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
|||||||
import app.revanced.patcher.patch.*
|
import app.revanced.patcher.patch.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
abstract class AbstractChangeOAuthClientIdPatch(
|
abstract class AbstractSpoofClientPatch(
|
||||||
private val redirectUri: String,
|
private val redirectUri: String,
|
||||||
private val options: ChangeOAuthClientIdOptionsContainer,
|
private val options: SpoofClientOptionsContainer,
|
||||||
private val fingerprints: List<MethodFingerprint>
|
private val clientIdFingerprints: List<MethodFingerprint>,
|
||||||
) : BytecodePatch(fingerprints) {
|
private val userAgentFingerprints: List<MethodFingerprint>? = null,
|
||||||
|
) : BytecodePatch(buildList {
|
||||||
|
addAll(clientIdFingerprints)
|
||||||
|
userAgentFingerprints?.let(::addAll)
|
||||||
|
}) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
if (options.clientId == null) {
|
if (options.clientId == null) {
|
||||||
// Ensure device runs Android.
|
// Ensure device runs Android.
|
||||||
@@ -27,7 +31,7 @@ abstract class AbstractChangeOAuthClientIdPatch(
|
|||||||
|
|
||||||
val error = """
|
val error = """
|
||||||
In order to use this patch, you need to provide a client ID.
|
In order to use this patch, you need to provide a client ID.
|
||||||
You can do this by creating a file at ${it.absolutePath} with the client ID as its content.
|
You can do that by creating a file at ${it.absolutePath} with the client ID as its content.
|
||||||
Alternatively, you can provide the client ID using patch options.
|
Alternatively, you can provide the client ID using patch options.
|
||||||
|
|
||||||
You can get your client ID from https://www.reddit.com/prefs/apps.
|
You can get your client ID from https://www.reddit.com/prefs/apps.
|
||||||
@@ -38,13 +42,39 @@ abstract class AbstractChangeOAuthClientIdPatch(
|
|||||||
}.let { options.clientId = it.readText().trim() }
|
}.let { options.clientId = it.readText().trim() }
|
||||||
}
|
}
|
||||||
|
|
||||||
return fingerprints.map { it.result ?: throw it.toErrorResult() }.patch(context)
|
fun List<MethodFingerprint>?.executePatch(
|
||||||
|
patch: List<MethodFingerprintResult>.(BytecodeContext) -> PatchResult
|
||||||
|
) {
|
||||||
|
when (val result = this?.map { it.result ?: throw it.toErrorResult() }?.patch(context)) {
|
||||||
|
is PatchResultError -> throw result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clientIdFingerprints.executePatch { patchClientId(context) }
|
||||||
|
userAgentFingerprints.executePatch { patchUserAgent(context) }
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult
|
/**
|
||||||
|
* Patch the client ID. The fingerprints are guaranteed to be in the same order as in [clientIdFingerprints].
|
||||||
|
*
|
||||||
|
* @param context The current [BytecodeContext].
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch the user agent. The fingerprints are guaranteed to be in the same order as in [userAgentFingerprints].
|
||||||
|
*
|
||||||
|
* @param context The current [BytecodeContext].
|
||||||
|
*/
|
||||||
|
// Not every client needs to patch the user agent.
|
||||||
|
open fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult =
|
||||||
|
PatchResultSuccess()
|
||||||
|
|
||||||
companion object Options {
|
companion object Options {
|
||||||
open class ChangeOAuthClientIdOptionsContainer : OptionsContainer() {
|
open class SpoofClientOptionsContainer : OptionsContainer() {
|
||||||
var clientId by option(
|
var clientId by option(
|
||||||
PatchOption.StringOption(
|
PatchOption.StringOption(
|
||||||
"client-id",
|
"client-id",
|
||||||
@@ -5,5 +5,5 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Change OAuth client id")
|
@Name("Spoof client")
|
||||||
annotation class ChangeOAuthClientIdPatchAnnotation
|
annotation class SpoofClientAnnotation
|
||||||
@@ -9,15 +9,15 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint
|
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint
|
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"http://baconreader.com/auth\".")
|
"and the redirect URI has to be set to \"http://baconreader.com/auth\".")
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
@@ -26,11 +26,11 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
Package("com.onelouder.baconreader.premium")
|
Package("com.onelouder.baconreader.premium")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint)
|
"http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
fun MethodFingerprintResult.patch(replacementString: String) {
|
fun MethodFingerprintResult.patch(replacementString: String) {
|
||||||
val clientIdIndex = scanResult.stringsScanResult!!.matches.first().index
|
val clientIdIndex = scanResult.stringsScanResult!!.matches.first().index
|
||||||
|
|
||||||
@@ -52,5 +52,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
|||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -8,29 +8,29 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
|
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"http://rubenmayayo.com\".")
|
"and the redirect URI has to be set to \"http://rubenmayayo.com\".")
|
||||||
@Compatibility([Package("com.rubenmayayo.reddit")])
|
@Compatibility([Package("com.rubenmayayo.reddit")])
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"http://rubenmayayo.com", Options, listOf(GetClientIdFingerprint)
|
"http://rubenmayayo.com", Options, listOf(GetClientIdFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
first().mutableMethod.addInstructions(
|
first().mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const-string v0, "$clientId"
|
const-string v0, "$clientId"
|
||||||
return-object v0
|
return-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -9,23 +9,23 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint
|
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
|
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"infinity://localhost\".")
|
"and the redirect URI has to be set to \"infinity://localhost\".")
|
||||||
@Compatibility([Package("ml.docilealligator.infinityforreddit")])
|
@Compatibility([Package("ml.docilealligator.infinityforreddit")])
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"infinity://localhost",
|
"infinity://localhost",
|
||||||
Options,
|
Options,
|
||||||
listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
|
listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
forEach {
|
forEach {
|
||||||
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
@@ -41,5 +41,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
|||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object IsAdFreeUserFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
|
strings = listOf("AD_FREE_USER")
|
||||||
|
)
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.joeyforreddit.ads.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints.IsAdFreeUserFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Disable ads")
|
||||||
|
@DependsOn([DisablePiracyDetectionPatch::class])
|
||||||
|
@Compatibility([Package("o.o.joey")])
|
||||||
|
class DisableAdsPatch : BytecodePatch(listOf(IsAdFreeUserFingerprint)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
IsAdFreeUserFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
) ?: return IsAdFreeUserFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object GetClientIdFingerprint : MethodFingerprint(
|
||||||
|
returnType = "L",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.CONST, // R.string.valuable_cid
|
||||||
|
Opcode.INVOKE_STATIC, // StringMaster.decrypt
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.RETURN_OBJECT
|
||||||
|
),
|
||||||
|
customFingerprint = custom@{ _, classDef ->
|
||||||
|
classDef.sourceFile == "AuthUtility.java"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.joeyforreddit.api.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints.GetClientIdFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
||||||
|
|
||||||
|
@SpoofClientAnnotation
|
||||||
|
@Description(
|
||||||
|
"Spoofs the client in order to allow logging in. " +
|
||||||
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
|
"and the redirect URI has to be set to \"https://127.0.0.1:65023/authorize_callback\"."
|
||||||
|
)
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("o.o.joey"),
|
||||||
|
Package("o.o.joey.pro"),
|
||||||
|
Package("o.o.joey.dev")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@DependsOn([DisablePiracyDetectionPatch::class])
|
||||||
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
|
"https://127.0.0.1:65023/authorize_callback", Options, listOf(GetClientIdFingerprint)
|
||||||
|
) {
|
||||||
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
|
first().mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const-string v0, "$clientId"
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object PiracyDetectionFingerprint : MethodFingerprint(
|
||||||
|
returnType = "V",
|
||||||
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.STATIC,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.NEW_INSTANCE, // new PiracyDetectionRunnable()
|
||||||
|
Opcode.CONST_16,
|
||||||
|
Opcode.CONST_WIDE_16,
|
||||||
|
Opcode.INVOKE_DIRECT, // <init>(..)
|
||||||
|
Opcode.INVOKE_VIRTUAL, // run()
|
||||||
|
Opcode.RETURN_VOID
|
||||||
|
),
|
||||||
|
customFingerprint = custom@{ _, classDef ->
|
||||||
|
classDef.type.endsWith("ProcessLifeCyleListener;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint
|
||||||
|
|
||||||
|
class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
PiracyDetectionFingerprint.result?.mutableMethod?.addInstruction(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
) ?: return PiracyDetectionFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object GetUserAgentFingerprint : MethodFingerprint(
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
emptyList(),
|
||||||
|
listOf(
|
||||||
|
Opcode.NEW_ARRAY,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.APUT_OBJECT,
|
||||||
|
Opcode.CONST,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -4,32 +4,32 @@ import app.revanced.patcher.annotation.Compatibility
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Package
|
import app.revanced.patcher.annotation.Package
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult.MethodFingerprintScanResult.StringsScanResult.StringMatch
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult.MethodFingerprintScanResult.StringsScanResult.StringMatch
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint
|
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint
|
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.GetUserAgentFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"redditisfun://auth\".")
|
"and the redirect URI has to be set to \"redditisfun://auth\".")
|
||||||
@Compatibility([Package("com.andrewshu.android.reddit"), Package("com.andrewshu.android.redditdonation")])
|
@Compatibility([Package("com.andrewshu.android.reddit"), Package("com.andrewshu.android.redditdonation")])
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"redditisfun://auth",
|
"redditisfun://auth",
|
||||||
Options,
|
Options,
|
||||||
listOf(
|
listOf(BuildAuthorizationStringFingerprint, BasicAuthorizationFingerprint),
|
||||||
BuildAuthorizationStringFingerprint,
|
listOf(GetUserAgentFingerprint)
|
||||||
BasicAuthorizationFingerprint,
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
/**
|
/**
|
||||||
* Replaces a one register instruction with a const-string instruction
|
* Replaces a one register instruction with a const-string instruction
|
||||||
* at the index returned by [getReplacementIndex].
|
* at the index returned by [getReplacementIndex].
|
||||||
@@ -57,5 +57,21 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
|||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult {
|
||||||
|
// Use a random user agent.
|
||||||
|
val randomName = (0..100000).random()
|
||||||
|
val userAgent = "android:app.revanced.$randomName:v1.0.0 (by /u/revanced)"
|
||||||
|
|
||||||
|
first().mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const-string v0, "$userAgent"
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -9,20 +9,20 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedInBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedInBearerTokenFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"dbrady://relay\".")
|
"and the redirect URI has to be set to \"dbrady://relay\".")
|
||||||
@Compatibility([Package("free.reddit.news"), Package("reddit.news")])
|
@Compatibility([Package("free.reddit.news"), Package("reddit.news")])
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"dbrady://relay",
|
"dbrady://relay",
|
||||||
Options,
|
Options,
|
||||||
listOf(
|
listOf(
|
||||||
@@ -32,7 +32,7 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
|||||||
GetRefreshTokenFingerprint
|
GetRefreshTokenFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
forEach {
|
forEach {
|
||||||
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
@@ -48,5 +48,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
|||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -1,36 +1,36 @@
|
|||||||
package app.revanced.patches.reddit.customclients.slide.api.patch
|
package app.revanced.patches.reddit.customclients.slide.api.patch
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Package
|
import app.revanced.patcher.annotation.Package
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
|
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"http://www.ccrama.me\".")
|
"and the redirect URI has to be set to \"http://www.ccrama.me\".")
|
||||||
@Compatibility([Package("me.ccrama.redditslide")])
|
@Compatibility([Package("me.ccrama.redditslide")])
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"http://www.ccrama.me", Options, listOf(GetClientIdFingerprint)
|
"http://www.ccrama.me", Options, listOf(GetClientIdFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
first().mutableMethod.addInstructions(
|
first().mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const-string v0, "$clientId"
|
const-string v0, "$clientId"
|
||||||
return-object v0
|
return-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,6 @@ import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.
|
|||||||
@Patch
|
@Patch
|
||||||
@Name("Disable ads")
|
@Name("Disable ads")
|
||||||
@DependsOn([DisablePiracyDetectionPatch::class])
|
@DependsOn([DisablePiracyDetectionPatch::class])
|
||||||
@Description("Disables ads.")
|
|
||||||
@Compatibility([Package("com.laurencedawson.reddit_sync")])
|
@Compatibility([Package("com.laurencedawson.reddit_sync")])
|
||||||
class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) {
|
class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
|||||||
@@ -12,17 +12,19 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
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.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.reference.StringReference
|
import org.jf.dexlib2.iface.reference.StringReference
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@ChangeOAuthClientIdPatchAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Changes the OAuth client ID. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
"The OAuth application type has to be \"Installed app\" " +
|
||||||
"and the redirect URI has to be set to \"http://redditsync/auth\".")
|
"and the redirect URI has to be set to \"http://redditsync/auth\".")
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
@@ -32,10 +34,11 @@ import java.util.*
|
|||||||
Package("com.laurencedawson.reddit_sync.dev")
|
Package("com.laurencedawson.reddit_sync.dev")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
@DependsOn([DisablePiracyDetectionPatch::class])
|
||||||
|
class SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint)
|
"http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
|
||||||
forEach { fingerprintResult ->
|
forEach { fingerprintResult ->
|
||||||
fingerprintResult.also { result ->
|
fingerprintResult.also { result ->
|
||||||
GetBearerTokenFingerprint.also { it.resolve(context, result.classDef) }.result?.mutableMethod?.apply {
|
GetBearerTokenFingerprint.also { it.resolve(context, result.classDef) }.result?.mutableMethod?.apply {
|
||||||
@@ -72,5 +75,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
|||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object ShouldShowSeekBarFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf(
|
||||||
|
"can not show seekbar, state: 1, not in resume"
|
||||||
|
),
|
||||||
|
)
|
||||||
@@ -5,14 +5,13 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
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.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
|
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
|
||||||
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint
|
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22t
|
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.ShouldShowSeekBarFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Show seekbar")
|
@Name("Show seekbar")
|
||||||
@@ -21,11 +20,21 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction22t
|
|||||||
class ShowSeekbarPatch : BytecodePatch(
|
class ShowSeekbarPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
SetSeekBarShowTypeFingerprint,
|
SetSeekBarShowTypeFingerprint,
|
||||||
|
ShouldShowSeekBarFingerprint,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
ShouldShowSeekBarFingerprint.result?.mutableMethod?.apply {
|
||||||
|
addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
SetSeekBarShowTypeFingerprint.result?.mutableMethod?.apply {
|
SetSeekBarShowTypeFingerprint.result?.mutableMethod?.apply {
|
||||||
val typeRegister = getInstruction<Instruction22t>(1).registerB
|
val typeRegister = implementation!!.registerCount - 1
|
||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.player.flyoutmenupanel.patch
|
|||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -21,7 +20,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
|||||||
@Description("Hides player flyout menu items.")
|
@Description("Hides player flyout menu items.")
|
||||||
@DependsOn([LithoFilterPatch::class, SettingsPatch::class])
|
@DependsOn([LithoFilterPatch::class, SettingsPatch::class])
|
||||||
@HidePlayerFlyoutMenuItemsCompatibility
|
@HidePlayerFlyoutMenuItemsCompatibility
|
||||||
@Version("0.0.1")
|
|
||||||
class HidePlayerFlyoutMenuPatch : ResourcePatch {
|
class HidePlayerFlyoutMenuPatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Client spoof")
|
@Name("Client spoof")
|
||||||
@Description("Spoofs a patched client to allow playback.")
|
@Description("Spoofs the client to allow playback.")
|
||||||
@ClientSpoofCompatibility
|
@ClientSpoofCompatibility
|
||||||
@DependsOn([SpoofSignatureVerificationPatch::class])
|
@DependsOn([SpoofSignatureVerificationPatch::class])
|
||||||
class ClientSpoofPatch : BytecodePatch(
|
class ClientSpoofPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -14,13 +14,16 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.*
|
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ScrubbedPreviewLayoutFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.StoryboardThumbnailFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.StoryboardThumbnailParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
|
||||||
@Name("Spoof signature verification")
|
@Name("Spoof signature verification")
|
||||||
@Description("Spoofs a patched client to prevent playback issues.")
|
@Description("Spoofs the client to prevent playback issues.")
|
||||||
@DependsOn([
|
@DependsOn([
|
||||||
SpoofSignatureVerificationResourcePatch::class,
|
SpoofSignatureVerificationResourcePatch::class,
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
|
|||||||
Reference in New Issue
Block a user