mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-08 10:23:55 +01:00
Compare commits
5 Commits
v2.187.0-d
...
v2.187.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557a9f7418 | ||
|
|
e7b2bfbde3 | ||
|
|
d442acaac8 | ||
|
|
a00eab6744 | ||
|
|
87f2f90fc5 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
|||||||
|
# [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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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.187.0-dev.8
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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.AbstractChangeOAuthClientIdPatch
|
||||||
|
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints.GetClientIdFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
||||||
|
|
||||||
|
@ChangeOAuthClientIdPatchAnnotation
|
||||||
|
@Description(
|
||||||
|
"Changes the OAuth client ID. " +
|
||||||
|
"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 ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||||
|
"https://127.0.0.1:65023/authorize_callback", Options, listOf(GetClientIdFingerprint)
|
||||||
|
) {
|
||||||
|
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
||||||
|
first().mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const-string v0, "$clientId"
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
||||||
|
}
|
||||||
@@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,10 +12,12 @@ 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.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
||||||
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
|
||||||
@@ -32,6 +34,7 @@ import java.util.*
|
|||||||
Package("com.laurencedawson.reddit_sync.dev")
|
Package("com.laurencedawson.reddit_sync.dev")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@DependsOn([DisablePiracyDetectionPatch::class])
|
||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||||
"http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint)
|
"http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint)
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user