mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-19 09:03:58 +00:00
Compare commits
11 Commits
v2.181.0-d
...
v2.181.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8228a4c16c | ||
|
|
269a694a82 | ||
|
|
352c183e39 | ||
|
|
3bb86c16be | ||
|
|
ba260c9589 | ||
|
|
021f9bd49f | ||
|
|
1e40f37ff3 | ||
|
|
ddbdd0eb9a | ||
|
|
24715a76c9 | ||
|
|
7aff30c010 | ||
|
|
1f26ceeed8 |
35
CHANGELOG.md
35
CHANGELOG.md
@@ -1,3 +1,38 @@
|
|||||||
|
# [2.181.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.6...v2.181.0-dev.7) (2023-07-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#2575](https://github.com/revanced/revanced-patches/issues/2575)) ([737be98](https://github.com/revanced/revanced-patches/commit/737be9815bad985328bbbead4d32f9398241eef2))
|
||||||
|
|
||||||
|
# [2.181.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.5...v2.181.0-dev.6) (2023-07-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **reddit/hide-comment-ads:** do not require integrations ([c2211d4](https://github.com/revanced/revanced-patches/commit/c2211d458d5cab030999e604a87cc1d02805b7ef))
|
||||||
|
|
||||||
|
# [2.181.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.4...v2.181.0-dev.5) (2023-07-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **infinityforreddit/change-oauth-client-id:** patch correct method ([#2564](https://github.com/revanced/revanced-patches/issues/2564)) ([f1ba16e](https://github.com/revanced/revanced-patches/commit/f1ba16ebfe2fda86af96d094481ed472eebcb4f9))
|
||||||
|
|
||||||
|
# [2.181.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.3...v2.181.0-dev.4) (2023-07-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube-music/bypass-certificate-checks:** fix fingerprint for the latest target app ([#2567](https://github.com/revanced/revanced-patches/issues/2567)) ([8eacb5b](https://github.com/revanced/revanced-patches/commit/8eacb5b5ace816da4d98b990eff0ea208691660c))
|
||||||
|
|
||||||
|
# [2.181.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.2...v2.181.0-dev.3) (2023-07-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#2556](https://github.com/revanced/revanced-patches/issues/2556)) ([b8df8fb](https://github.com/revanced/revanced-patches/commit/b8df8fb99707fdac32e272fee8469dfeb940504d))
|
||||||
|
|
||||||
# [2.181.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.1...v2.181.0-dev.2) (2023-07-01)
|
# [2.181.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.1...v2.181.0-dev.2) (2023-07-01)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.181.0-dev.2
|
version = 2.181.0-dev.7
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package app.revanced.patches.music.misc.androidauto.fingerprints
|
package app.revanced.patches.music.misc.androidauto.fingerprints
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
object CheckCertificateFingerprint : MethodFingerprint(
|
object CheckCertificateFingerprint : MethodFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
parameters = listOf("Ljava/lang/String;"),
|
parameters = listOf("Ljava/lang/String;"),
|
||||||
strings = listOf("X509", "Failed to get public key.", "Failed to get certificate.")
|
strings = listOf("X509", "Failed to get certificate.")
|
||||||
)
|
)
|
||||||
@@ -5,8 +5,7 @@ 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.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.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
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
|
||||||
@@ -23,15 +22,13 @@ class BypassCertificateChecksPatch : BytecodePatch(
|
|||||||
listOf(CheckCertificateFingerprint)
|
listOf(CheckCertificateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
CheckCertificateFingerprint.result?.let { result ->
|
CheckCertificateFingerprint.result?.apply {
|
||||||
val noMatchIndex = result.scanResult.stringsScanResult!!.matches.first().index
|
mutableMethod.addInstructions(
|
||||||
|
0, """
|
||||||
result.mutableMethod.apply {
|
const/4 v0, 0x1
|
||||||
val isPartnerIndex = noMatchIndex + 2
|
return v0
|
||||||
|
"""
|
||||||
replaceInstruction(isPartnerIndex, "const/4 p1, 0x1")
|
)
|
||||||
addInstruction(isPartnerIndex + 1, "return p1")
|
|
||||||
}
|
|
||||||
} ?: return CheckCertificateFingerprint.toErrorResult()
|
} ?: return CheckCertificateFingerprint.toErrorResult()
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|||||||
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.RequiresIntegrations
|
|
||||||
import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFingerprint
|
import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFingerprint
|
||||||
|
|
||||||
@Name("hide-comment-ads")
|
@Name("hide-comment-ads")
|
||||||
@Description("Removes all comment ads.")
|
@Description("Removes all comment ads.")
|
||||||
@RequiresIntegrations
|
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class HideCommentAdsPatch : BytecodePatch(
|
class HideCommentAdsPatch : BytecodePatch(
|
||||||
listOf(HideCommentAdsFingerprint)
|
listOf(HideCommentAdsFingerprint)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
|
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
|
||||||
|
|
||||||
object GetHTTPBasicAuthHeaderFingerprint : AbstractClientIdFingerprint(
|
object GetHttpBasicAuthHeaderFingerprint : AbstractClientIdFingerprint(
|
||||||
"APIUtils;",
|
"APIUtils;",
|
||||||
"getHTTPBasicAuthHeader"
|
"getHttpBasicAuthHeader"
|
||||||
)
|
)
|
||||||
@@ -11,7 +11,7 @@ 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.AbstractChangeOAuthClientIdPatch
|
||||||
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
|
||||||
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
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||||
"infinity://localhost",
|
"infinity://localhost",
|
||||||
Options,
|
Options,
|
||||||
listOf(GetHTTPBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
|
listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
|
||||||
forEach {
|
forEach {
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
package app.revanced.patches.reddit.misc.tracking.url.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 ShareLinkFactoryFingerprint : MethodFingerprint(
|
|
||||||
returnType = "L",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.CONST_STRING,
|
|
||||||
Opcode.CONST_STRING,
|
|
||||||
Opcode.INVOKE_DIRECT,
|
|
||||||
Opcode.APUT_OBJECT,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.INVOKE_STATIC, // Returns the URL.
|
|
||||||
Opcode.MOVE_RESULT_OBJECT
|
|
||||||
),
|
|
||||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("ShareLinkFactory;") }
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.reddit.misc.tracking.url.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object ShareLinkFormatterFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Ljava/lang/String;",
|
||||||
|
parameters = listOf("Ljava/lang/String;", "Ljava/util/Map;"),
|
||||||
|
strings = listOf("uri.getQueryParameters(name)", "uri.queryParameterNames", "newUriBuilder.build().toString()"),
|
||||||
|
)
|
||||||
@@ -6,47 +6,29 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
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.patcher.patch.annotations.RequiresIntegrations
|
|
||||||
import app.revanced.patches.reddit.misc.tracking.url.annotations.SanitizeUrlQueryCompatibility
|
import app.revanced.patches.reddit.misc.tracking.url.annotations.SanitizeUrlQueryCompatibility
|
||||||
import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFactoryFingerprint
|
import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFormatterFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("sanitize-sharing-links")
|
@Name("sanitize-sharing-links")
|
||||||
@Description("Removes (tracking) query parameters from the URLs when sharing links.")
|
@Description("Removes (tracking) query parameters from the URLs when sharing links.")
|
||||||
@SanitizeUrlQueryCompatibility
|
@SanitizeUrlQueryCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
@RequiresIntegrations
|
|
||||||
class SanitizeUrlQueryPatch : BytecodePatch(
|
class SanitizeUrlQueryPatch : BytecodePatch(
|
||||||
listOf(ShareLinkFactoryFingerprint)
|
listOf(ShareLinkFormatterFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
ShareLinkFactoryFingerprint.result?.let { result ->
|
|
||||||
result.mutableMethod.apply {
|
|
||||||
val insertIndex = result.scanResult.patternScanResult!!.endIndex + 1
|
|
||||||
val urlRegister = getInstruction<OneRegisterInstruction>(insertIndex - 1).registerA
|
|
||||||
|
|
||||||
addInstructions(
|
ShareLinkFormatterFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
insertIndex,
|
0,
|
||||||
"""
|
"return-object p0"
|
||||||
invoke-static {v$urlRegister}, $SANITIZE_METHOD_DESCRIPTOR
|
) ?: return ShareLinkFormatterFingerprint.toErrorResult()
|
||||||
move-result-object v$urlRegister
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} ?: return ShareLinkFactoryFingerprint.toErrorResult()
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
|
||||||
private const val SANITIZE_METHOD_DESCRIPTOR =
|
|
||||||
"Lapp/revanced/reddit/patches/SanitizeUrlQueryPatch;" +
|
|
||||||
"->stripQueryParameters(Ljava/lang/String;)Ljava/lang/String;"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
// Resolves to the method CronetDataSource.open
|
|
||||||
// https://androidx.tech/artifacts/media3/media3-datasource-cronet/1.0.0-alpha03-source/androidx/media3/datasource/cronet/CronetDataSource.java.html
|
|
||||||
object OpenCronetDataSourceFingerprint : MethodFingerprint(
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
),
|
|
||||||
strings = listOf(
|
|
||||||
"err_cleartext_not_permitted",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@@ -7,7 +7,6 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.data.toMethodWalker
|
import app.revanced.patcher.data.toMethodWalker
|
||||||
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
|
||||||
@@ -15,12 +14,10 @@ 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.shared.settings.preference.impl.StringResource
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.OpenCronetDataSourceFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
|
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
|
||||||
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 app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Name("spoof-signature-verification")
|
@Name("spoof-signature-verification")
|
||||||
@Description("Spoofs a patched client to prevent playback issues.")
|
@Description("Spoofs a patched client to prevent playback issues.")
|
||||||
@@ -33,7 +30,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
class SpoofSignatureVerificationPatch : BytecodePatch(
|
class SpoofSignatureVerificationPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
ProtobufParameterBuilderFingerprint,
|
ProtobufParameterBuilderFingerprint,
|
||||||
OpenCronetDataSourceFingerprint,
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
@@ -72,23 +68,6 @@ class SpoofSignatureVerificationPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
} ?: return ProtobufParameterBuilderFingerprint.toErrorResult()
|
} ?: return ProtobufParameterBuilderFingerprint.toErrorResult()
|
||||||
|
|
||||||
// hook video playback result
|
|
||||||
OpenCronetDataSourceFingerprint.result?.let {
|
|
||||||
it.mutableMethod.apply {
|
|
||||||
val getHeadersInstructionIndex = it.scanResult.patternScanResult!!.endIndex
|
|
||||||
val responseCodeRegister =
|
|
||||||
(getInstruction(getHeadersInstructionIndex - 2) as OneRegisterInstruction).registerA
|
|
||||||
|
|
||||||
addInstructions(
|
|
||||||
getHeadersInstructionIndex + 1,
|
|
||||||
"""
|
|
||||||
invoke-static {v$responseCodeRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onResponse(I)V
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
} ?: return OpenCronetDataSourceFingerprint.toErrorResult()
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user