mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-26 02:44:08 +01:00
Compare commits
35 Commits
v4.8.0-dev
...
v4.8.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99888044de | ||
|
|
5ba63e1d7d | ||
|
|
c2624a10a4 | ||
|
|
7655619e02 | ||
|
|
245c2ad536 | ||
|
|
d859b15950 | ||
|
|
6fa80c5959 | ||
|
|
2f280784fa | ||
|
|
a4fbed5b78 | ||
|
|
8994c5dd5e | ||
|
|
41e91145e0 | ||
|
|
eec8a9f794 | ||
|
|
aff88dc71f | ||
|
|
5548bc5ef7 | ||
|
|
3f021dd3ac | ||
|
|
df91226d11 | ||
|
|
b7ec4de0a7 | ||
|
|
6e3f760379 | ||
|
|
dbd44830b6 | ||
|
|
0df7f22dad | ||
|
|
5466309691 | ||
|
|
18a790be6a | ||
|
|
616a514928 | ||
|
|
0f2ea93aaa | ||
|
|
1c0fd55361 | ||
|
|
81f452d1da | ||
|
|
d90025ff8e | ||
|
|
112513e4b0 | ||
|
|
8bf3670edf | ||
|
|
943c93593b | ||
|
|
a1e7253073 | ||
|
|
6768f98dd7 | ||
|
|
0d63b137aa | ||
|
|
a6d2cf5a93 | ||
|
|
fe461c1d14 |
119
CHANGELOG.md
119
CHANGELOG.md
@@ -1,3 +1,122 @@
|
||||
# [4.8.0-dev.20](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.19...v4.8.0-dev.20) (2024-05-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YT Music:** Add support for `7.01.52` ([#3177](https://github.com/ReVanced/revanced-patches/issues/3177)) ([e9bfb25](https://github.com/ReVanced/revanced-patches/commit/e9bfb25dfe85754fd7fa5c9db934bb4fc52e4694))
|
||||
|
||||
# [4.8.0-dev.19](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.18...v4.8.0-dev.19) (2024-05-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide Shorts components:** Hide 'Buy super thanks' button ([#3176](https://github.com/ReVanced/revanced-patches/issues/3176)) ([89c1548](https://github.com/ReVanced/revanced-patches/commit/89c154861c8b3afa665542e97ff201c3e84410b2))
|
||||
|
||||
# [4.8.0-dev.18](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.17...v4.8.0-dev.18) (2024-05-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube Music:** Make `Hide 'Get Music Premium' label` and `Remove upgrade button` compatible with latest version ([#3164](https://github.com/ReVanced/revanced-patches/issues/3164)) ([3ff20de](https://github.com/ReVanced/revanced-patches/commit/3ff20dee4aea49ca77dcd3fbe148287b55a2b5e3))
|
||||
|
||||
# [4.8.0-dev.17](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.16...v4.8.0-dev.17) (2024-05-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Photomath:** Support version `8.37.0` ([#3109](https://github.com/ReVanced/revanced-patches/issues/3109)) ([fb02b48](https://github.com/ReVanced/revanced-patches/commit/fb02b481e2be8c2bc4441dc5b3dc6a9df3a2a379))
|
||||
|
||||
# [4.8.0-dev.16](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.15...v4.8.0-dev.16) (2024-05-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **WarnWetter - Promo code unlock:** Constrain to last working version ([#3110](https://github.com/ReVanced/revanced-patches/issues/3110)) ([92fc8aa](https://github.com/ReVanced/revanced-patches/commit/92fc8aaad80f8fad35b75e6de032692986211536))
|
||||
|
||||
# [4.8.0-dev.15](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.14...v4.8.0-dev.15) (2024-05-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Restore old video quality menu:** Show advanced quality menu in Shorts quality flyout ([#3155](https://github.com/ReVanced/revanced-patches/issues/3155)) ([c2b5bb7](https://github.com/ReVanced/revanced-patches/commit/c2b5bb723416e43a920817f97b9e0ee4ceab4f6b))
|
||||
|
||||
# [4.8.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.13...v4.8.0-dev.14) (2024-05-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - SponsorBlock:** Show correct segment times if video is over 24 hours in length ([#3138](https://github.com/ReVanced/revanced-patches/issues/3138)) ([6cdf697](https://github.com/ReVanced/revanced-patches/commit/6cdf697e8e47f6d53964497703dbe79fab3b1821))
|
||||
|
||||
# [4.8.0-dev.13](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.12...v4.8.0-dev.13) (2024-05-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Navigation buttons:** Adjust summary text of switch notification button ([#3130](https://github.com/ReVanced/revanced-patches/issues/3130)) ([cc8b4c9](https://github.com/ReVanced/revanced-patches/commit/cc8b4c913ed25d07fd4000cfd6318bb06a9d27c0))
|
||||
|
||||
# [4.8.0-dev.12](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.11...v4.8.0-dev.12) (2024-05-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Player flyout menu:** Remove obsolete `Hide report menu` ([d627d44](https://github.com/ReVanced/revanced-patches/commit/d627d44ad07fa32bb2f247ce24a3591ec5e1be0e))
|
||||
|
||||
# [4.8.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.10...v4.8.0-dev.11) (2024-05-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Reddit is Fun - Spoof client:** Fix login by updating the authorization subdomain from "old" to "ssl" ([b156cb1](https://github.com/ReVanced/revanced-patches/commit/b156cb1d8996c4314d59e3441c6b85d8f704cdff))
|
||||
|
||||
# [4.8.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.9...v4.8.0-dev.10) (2024-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Tumblr:** Add `Disable Ad-Free Banner` patch ([#3091](https://github.com/ReVanced/revanced-patches/issues/3091)) ([54baf08](https://github.com/ReVanced/revanced-patches/commit/54baf08f777b7c975fa0b6508f0a4de19ac491f4))
|
||||
|
||||
# [4.8.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.8...v4.8.0-dev.9) (2024-04-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Correctly handle patches jar path if it contains exclamation marks ([056e2d7](https://github.com/ReVanced/revanced-patches/commit/056e2d7dd5bbacb7dc6b109b3e2d44d55e7eb7d3))
|
||||
|
||||
# [4.8.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.7...v4.8.0-dev.8) (2024-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide ads:** Fix string typo ([ecc56d6](https://github.com/ReVanced/revanced-patches/commit/ecc56d643a0c4e5f25b933431f097a03d4bf2e69))
|
||||
|
||||
# [4.8.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.6...v4.8.0-dev.7) (2024-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* URL decode path to JAR containing spaces to get JAR manifest ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([e1bbcb3](https://github.com/ReVanced/revanced-patches/commit/e1bbcb338dd7fce895b606440bd6f040d5486a64))
|
||||
|
||||
# [4.8.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.5...v4.8.0-dev.6) (2024-04-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Hide ads:** Add option to hide the 'Visit store' button on channel pages ([#3077](https://github.com/ReVanced/revanced-patches/issues/3077)) ([03d2cfa](https://github.com/ReVanced/revanced-patches/commit/03d2cfafbf977340456598a848858ac9452c853f))
|
||||
|
||||
# [4.8.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.4...v4.8.0-dev.5) (2024-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide Shorts components:** Rename option title to make it consistent ([4d6e34b](https://github.com/ReVanced/revanced-patches/commit/4d6e34b0540a3334bd77b2b48a1a5e10329171c8))
|
||||
|
||||
# [4.8.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.3...v4.8.0-dev.4) (2024-04-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Comments:** Add option to hide timestamp and emoji buttons ([#3076](https://github.com/ReVanced/revanced-patches/issues/3076)) ([7efe5ae](https://github.com/ReVanced/revanced-patches/commit/7efe5aefb252a2ed908907ff218b879e2ad1a331))
|
||||
|
||||
# [4.8.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.2...v4.8.0-dev.3) (2024-04-22)
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ This document describes how to contribute to ReVanced Patches.
|
||||
|
||||
## 📖 Resources to help you get started
|
||||
|
||||
* The [documentation](https://github.com/ReVanced/revanced-patcher/tree/docs/docs) contains the fundamentals
|
||||
* The [documentation](https://github.com/ReVanced/revanced-patcher/tree/main/docs) contains the fundamentals
|
||||
of ReVanced Patcher and how to use ReVanced Patcher to create patches
|
||||
* [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
|
||||
* [Issues](https://github.com/ReVanced/revanced-patches/issues) are where we keep track of bugs and feature requests
|
||||
|
||||
@@ -576,6 +576,7 @@ public final class app/revanced/patches/reddit/customclients/joeyforreddit/detec
|
||||
public final class app/revanced/patches/reddit/customclients/redditisfun/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/BaseSpoofClientPatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/redditisfun/api/SpoofClientPatch;
|
||||
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
public fun patchMiscellaneous (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
}
|
||||
|
||||
@@ -1062,6 +1063,12 @@ public final class app/revanced/patches/tumblr/ads/DisableDashboardAds : app/rev
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 4.8.0-dev.3
|
||||
version = 4.8.0-dev.20
|
||||
|
||||
@@ -12,8 +12,6 @@ internal object HideGetPremiumFingerprint : MethodFingerprint(
|
||||
listOf(
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.CONST_16,
|
||||
Opcode.GOTO,
|
||||
Opcode.NOP,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
),
|
||||
listOf("FEmusic_history", "FEmusic_offline"),
|
||||
|
||||
@@ -13,7 +13,6 @@ internal object PivotBarConstructorFingerprint : MethodFingerprint(
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.GOTO,
|
||||
Opcode.NOP,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.RETURN_VOID,
|
||||
),
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
package app.revanced.patches.music.misc.integrations.fingerprints
|
||||
|
||||
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal object ApplicationInitFingerprint : IntegrationsFingerprint(
|
||||
returnType = "V",
|
||||
parameters = emptyList(),
|
||||
opcodes = listOf(
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL
|
||||
),
|
||||
strings = listOf("activity"),
|
||||
customFingerprint = { methodDef, _ -> methodDef.name == "onCreate" },
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@ import kotlin.random.Random
|
||||
name = "Spoof device ID",
|
||||
description = "Spoofs device ID to mitigate manual bans by developers.",
|
||||
dependencies = [SignatureDetectionPatch::class],
|
||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
|
||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.37.0"])]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object SpoofDeviceIdPatch : BytecodePatch(
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
package app.revanced.patches.photomath.detection.deviceid.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal object GetDeviceIdFingerprint : MethodFingerprint(
|
||||
returnType = "Ljava/lang/String;",
|
||||
strings = listOf("androidId", "android_id"),
|
||||
opcodes = listOf(
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
),
|
||||
parameters = listOf()
|
||||
)
|
||||
@@ -5,11 +5,9 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal object CheckSignatureFingerprint : MethodFingerprint(
|
||||
strings = listOf(
|
||||
"packageInfo.signatures",
|
||||
"currentSignature"
|
||||
"signatures",
|
||||
),
|
||||
opcodes = listOf(
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.INVOKE_STATIC,
|
||||
|
||||
@@ -13,7 +13,7 @@ import app.revanced.util.exception
|
||||
name = "Hide update popup",
|
||||
description = "Prevents the update popup from showing up.",
|
||||
dependencies = [SignatureDetectionPatch::class],
|
||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
|
||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.37.0"])]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideUpdatePopupPatch : BytecodePatch(
|
||||
|
||||
@@ -13,7 +13,7 @@ import app.revanced.patches.photomath.misc.unlock.plus.fingerprints.IsPlusUnlock
|
||||
@Patch(
|
||||
name = "Unlock plus",
|
||||
dependencies = [SignatureDetectionPatch::class, EnableBookpointPatch::class],
|
||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
|
||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.37.0"])]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object UnlockPlusPatch : BytecodePatch(
|
||||
|
||||
@@ -10,8 +10,10 @@ import app.revanced.patches.reddit.customclients.BaseSpoofClientPatch
|
||||
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.GetUserAgentFingerprint
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||
|
||||
@Suppress("unused")
|
||||
object SpoofClientPatch : BaseSpoofClientPatch(
|
||||
@@ -20,8 +22,8 @@ object SpoofClientPatch : BaseSpoofClientPatch(
|
||||
userAgentFingerprints = setOf(GetUserAgentFingerprint),
|
||||
compatiblePackages = setOf(
|
||||
CompatiblePackage("com.andrewshu.android.reddit"),
|
||||
CompatiblePackage("com.andrewshu.android.redditdonation")
|
||||
)
|
||||
CompatiblePackage("com.andrewshu.android.redditdonation"),
|
||||
),
|
||||
) {
|
||||
override fun Set<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
|
||||
/**
|
||||
@@ -59,7 +61,23 @@ object SpoofClientPatch : BaseSpoofClientPatch(
|
||||
"""
|
||||
const-string v0, "$userAgent"
|
||||
return-object v0
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun Set<MethodFingerprintResult>.patchMiscellaneous(context: BytecodeContext) {
|
||||
// Reddit messed up and does not append a redirect uri to the authorization url to old.reddit.com/login.
|
||||
// Replace old.reddit.com with ssl.reddit.com to fix this.
|
||||
BuildAuthorizationStringFingerprint.result!!.mutableMethod.apply {
|
||||
val index = indexOfFirstInstruction {
|
||||
getReference<StringReference>()?.contains("old.reddit.com") == true
|
||||
}
|
||||
|
||||
val targetRegister = getInstruction<OneRegisterInstruction>(index).registerA
|
||||
replaceInstruction(
|
||||
index,
|
||||
"const-string v$targetRegister, \"https://ssl.reddit.com/api/v1/authorize.compact\"",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,13 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint.IRegisterResolver
|
||||
import app.revanced.patches.shared.misc.integrations.fingerprints.ReVancedUtilsPatchesVersionFingerprint
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.util.resultOrThrow
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import java.net.URLDecoder
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.jar.JarFile
|
||||
|
||||
abstract class BaseIntegrationsPatch(
|
||||
@@ -73,8 +76,8 @@ abstract class BaseIntegrationsPatch(
|
||||
val urlString = classUrl.toString()
|
||||
|
||||
if (urlString.startsWith("jar:file:")) {
|
||||
val end = urlString.indexOf('!')
|
||||
return urlString.substring("jar:file:".length, end)
|
||||
val end = urlString.lastIndexOf('!')
|
||||
return URLDecoder.decode(urlString.substring("jar:file:".length, end), StandardCharsets.UTF_8)
|
||||
}
|
||||
}
|
||||
throw IllegalStateException("Not running from inside a JAR file.")
|
||||
@@ -137,7 +140,7 @@ abstract class BaseIntegrationsPatch(
|
||||
"invoke-static/range { v$contextRegister .. v$contextRegister }, " +
|
||||
"$integrationsDescriptor->setContext(Landroid/content/Context;)V",
|
||||
)
|
||||
} ?: throw PatchException("Could not find hook target fingerprint.")
|
||||
} ?: throw this.exception
|
||||
}
|
||||
|
||||
interface IHookInsertIndexResolver : (Method) -> Int {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package app.revanced.patches.tumblr.annoyances.adfree
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.tumblr.featureflags.OverrideFeatureFlagsPatch
|
||||
|
||||
@Patch(
|
||||
name = "Disable Ad-Free Banner",
|
||||
description = "Disables the banner with a frog, prompting you to buy Tumblr Ad-Free.",
|
||||
dependencies = [OverrideFeatureFlagsPatch::class],
|
||||
compatiblePackages = [CompatiblePackage("com.tumblr")],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DisableAdFreeBannerPatch : BytecodePatch(emptySet()) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Disable the "AD_FREE_CTA_BANNER" ("Whether or not to show ad free prompt") feature flag.
|
||||
OverrideFeatureFlagsPatch.addOverride("adFreeCtaBanner", "false")
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import app.revanced.patches.warnwetter.misc.promocode.fingerprints.PromoCodeUnlo
|
||||
name = "Promo code unlock",
|
||||
description = "Disables the validation of promo code. Any code will work to unlock all features.",
|
||||
dependencies = [FirebaseGetCertPatch::class],
|
||||
compatiblePackages = [CompatiblePackage("de.dwd.warnapp")]
|
||||
compatiblePackages = [CompatiblePackage("de.dwd.warnapp", ["4.2.2"])]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object PromoCodeUnlockPatch : BytecodePatch(
|
||||
@@ -28,4 +28,4 @@ object PromoCodeUnlockPatch : BytecodePatch(
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ object HideAdsResourcePatch : ResourcePatch() {
|
||||
SwitchPreference("revanced_hide_self_sponsor_ads"),
|
||||
SwitchPreference("revanced_hide_products_banner"),
|
||||
SwitchPreference("revanced_hide_shopping_links"),
|
||||
SwitchPreference("revanced_hide_visit_store_button"),
|
||||
SwitchPreference("revanced_hide_web_search_results"),
|
||||
SwitchPreference("revanced_hide_merchandise_banners"),
|
||||
)
|
||||
|
||||
@@ -58,7 +58,8 @@ object CommentsPatch : ResourcePatch() {
|
||||
"revanced_comments_screen",
|
||||
preferences = setOf(
|
||||
SwitchPreference("revanced_hide_preview_comment"),
|
||||
SwitchPreference("revanced_hide_comments_section")
|
||||
SwitchPreference("revanced_hide_comments_section"),
|
||||
SwitchPreference("revanced_hide_comment_timestamp_and_emoji_buttons")
|
||||
),
|
||||
sorting = PreferenceScreen.Sorting.UNSORTED
|
||||
)
|
||||
|
||||
@@ -63,7 +63,6 @@ object HidePlayerFlyoutMenuPatch : ResourcePatch() {
|
||||
SwitchPreference("revanced_hide_player_flyout_additional_settings"),
|
||||
SwitchPreference("revanced_hide_player_flyout_loop_video"),
|
||||
SwitchPreference("revanced_hide_player_flyout_ambient_mode"),
|
||||
SwitchPreference("revanced_hide_player_flyout_report"),
|
||||
SwitchPreference("revanced_hide_player_flyout_help"),
|
||||
SwitchPreference("revanced_hide_player_flyout_speed"),
|
||||
SwitchPreference("revanced_hide_player_flyout_lock_screen"),
|
||||
|
||||
@@ -41,6 +41,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
|
||||
SwitchPreference("revanced_hide_shorts_shop_button"),
|
||||
SwitchPreference("revanced_hide_shorts_tagged_products"),
|
||||
SwitchPreference("revanced_hide_shorts_search_suggestions"),
|
||||
SwitchPreference("revanced_hide_shorts_super_thanks_button"),
|
||||
SwitchPreference("revanced_hide_shorts_location_label"),
|
||||
SwitchPreference("revanced_hide_shorts_channel_bar"),
|
||||
SwitchPreference("revanced_hide_shorts_info_panel"),
|
||||
|
||||
@@ -2,14 +2,18 @@ package app.revanced.patches.youtube.video.videoqualitymenu
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.recyclerviewtree.hook.RecyclerViewTreeHookPatch
|
||||
import app.revanced.patches.youtube.video.videoqualitymenu.fingerprints.VideoQualityMenuOptionsFingerprint
|
||||
import app.revanced.patches.youtube.video.videoqualitymenu.fingerprints.VideoQualityMenuViewInflateFingerprint
|
||||
import app.revanced.util.resultOrThrow
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch(
|
||||
@@ -50,7 +54,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
)
|
||||
@Suppress("unused")
|
||||
object RestoreOldVideoQualityMenuPatch : BytecodePatch(
|
||||
setOf(VideoQualityMenuViewInflateFingerprint)
|
||||
setOf(VideoQualityMenuViewInflateFingerprint, VideoQualityMenuOptionsFingerprint)
|
||||
) {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/youtube/patches/components/VideoQualityMenuFilterPatch;"
|
||||
@@ -60,7 +64,8 @@ object RestoreOldVideoQualityMenuPatch : BytecodePatch(
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// region Patch for the old type of the video quality menu.
|
||||
// Only used when spoofing to old app version.
|
||||
// Used for regular videos when spoofing to old app version,
|
||||
// and for the Shorts quality flyout on newer app versions.
|
||||
|
||||
VideoQualityMenuViewInflateFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
@@ -76,6 +81,29 @@ object RestoreOldVideoQualityMenuPatch : BytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
// Force YT to add the 'advanced' quality menu for Shorts.
|
||||
VideoQualityMenuOptionsFingerprint.resultOrThrow().let {
|
||||
val result = it.scanResult.patternScanResult!!
|
||||
val startIndex = result.startIndex
|
||||
val endIndex = result.endIndex
|
||||
|
||||
it.mutableMethod.apply {
|
||||
val freeRegister = getInstruction<OneRegisterInstruction>(startIndex).registerA
|
||||
|
||||
// A condition controls whether to show the three or four items quality menu.
|
||||
// Force the four items quality menu to make the "Advanced" item visible, necessary for the patch.
|
||||
addInstructionsWithLabels(
|
||||
startIndex + 1,
|
||||
"""
|
||||
invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->forceAdvancedVideoQualityMenuCreation()Z
|
||||
move-result v$freeRegister
|
||||
if-nez v$freeRegister, :includeAdvancedMenu
|
||||
""",
|
||||
ExternalLabel("includeAdvancedMenu", getInstruction(endIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region Patch for the new type of the video quality menu.
|
||||
|
||||
@@ -13,6 +13,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
)
|
||||
object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() {
|
||||
internal var videoQualityBottomSheetListFragmentTitle = -1L
|
||||
internal var videoQualityQuickMenuAdvancedMenuDescription = -1L
|
||||
|
||||
override fun execute(context: ResourceContext) {
|
||||
AddResourcesPatch(this::class)
|
||||
@@ -26,5 +27,10 @@ object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() {
|
||||
"layout",
|
||||
"video_quality_bottom_sheet_list_fragment_title",
|
||||
]
|
||||
|
||||
videoQualityQuickMenuAdvancedMenuDescription = ResourceMappingPatch[
|
||||
"string",
|
||||
"video_quality_quick_menu_advanced_menu_description"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package app.revanced.patches.youtube.video.videoqualitymenu.fingerprints
|
||||
|
||||
import app.revanced.patches.youtube.video.videoqualitymenu.RestoreOldVideoQualityMenuResourcePatch
|
||||
import app.revanced.util.patch.LiteralValueFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal object VideoQualityMenuOptionsFingerprint : LiteralValueFingerprint(
|
||||
accessFlags = AccessFlags.STATIC.value,
|
||||
parameters = listOf("Landroid/content/Context", "L", "L"),
|
||||
returnType = "[L",
|
||||
opcodes = listOf(
|
||||
Opcode.IF_EQZ, // Check if advanced menu should be shown.
|
||||
Opcode.NEW_ARRAY,
|
||||
Opcode.APUT_OBJECT,
|
||||
Opcode.APUT_OBJECT,
|
||||
Opcode.APUT_OBJECT,
|
||||
Opcode.RETURN_OBJECT,
|
||||
Opcode.CONST_4 // Advanced menu code path.
|
||||
),
|
||||
literalSupplier = { RestoreOldVideoQualityMenuResourcePatch.videoQualityQuickMenuAdvancedMenuDescription }
|
||||
)
|
||||
@@ -266,6 +266,10 @@
|
||||
<string name="revanced_hide_shopping_links_title">Hide shopping links in video description</string>
|
||||
<string name="revanced_hide_shopping_links_summary_on">Shopping links are hidden</string>
|
||||
<string name="revanced_hide_shopping_links_summary_off">Shopping links are shown</string>
|
||||
<!-- 'Visit store' should be translated with the same localized wording that YouTube displays. -->
|
||||
<string name="revanced_hide_visit_store_button_title">Hide the \'Visit store\' button on channel pages</string>
|
||||
<string name="revanced_hide_visit_store_button_summary_on">Button is hidden</string>
|
||||
<string name="revanced_hide_visit_store_button_summary_off">Button is shown</string>
|
||||
<string name="revanced_hide_web_search_results_title">Hide web search results</string>
|
||||
<string name="revanced_hide_web_search_results_summary_on">Web search results are hidden</string>
|
||||
<string name="revanced_hide_web_search_results_summary_off">Web search results are shown</string>
|
||||
@@ -431,7 +435,7 @@
|
||||
<string name="revanced_hide_subscriptions_button_summary_off">Subscriptions button is shown</string>
|
||||
<!-- 'Notifications' should be translated using the same localized wording YouTube displays the tab. -->
|
||||
<string name="revanced_switch_create_with_notifications_button_title">Switch Create with Notifications</string>
|
||||
<string name="revanced_switch_create_with_notifications_button_summary_on">Create button is switched with Notifications button</string>
|
||||
<string name="revanced_switch_create_with_notifications_button_summary_on">Create button is switched with Notifications button\n\nNote: Enabling this also forcibly hides video ads</string>
|
||||
<string name="revanced_switch_create_with_notifications_button_summary_off">Create button is not switched with Notifications button</string>
|
||||
</patch>
|
||||
<patch id="layout.hide.player.flyoutmenupanel.HidePlayerFlyoutMenuPatch">
|
||||
@@ -453,11 +457,6 @@
|
||||
<string name="revanced_hide_player_flyout_ambient_mode_title">Hide Ambient mode</string>
|
||||
<string name="revanced_hide_player_flyout_ambient_mode_summary_on">Ambient mode menu is hidden</string>
|
||||
<string name="revanced_hide_player_flyout_ambient_mode_summary_off">Ambient mode menu is shown</string>
|
||||
<!-- 'Report' should be translated using the same localized wording YouTube displays for the menu item.
|
||||
This item may not appear in some regions. Translate the name normally if the menu cannot be found. -->
|
||||
<string name="revanced_hide_player_flyout_report_title">Hide Report</string>
|
||||
<string name="revanced_hide_player_flyout_report_summary_on">Report menu is hidden</string>
|
||||
<string name="revanced_hide_player_flyout_report_summary_off">Report menu is shown</string>
|
||||
<!-- 'Help & feedback' should be translated using the same localized wording YouTube displays for the menu item. -->
|
||||
<string name="revanced_hide_player_flyout_help_title">Hide Help & feedback</string>
|
||||
<string name="revanced_hide_player_flyout_help_summary_on">Help & feedback menu is hidden</string>
|
||||
@@ -503,6 +502,9 @@
|
||||
<string name="revanced_hide_comments_section_title">Hide comments section</string>
|
||||
<string name="revanced_hide_comments_section_summary_on">Comment section is hidden</string>
|
||||
<string name="revanced_hide_comments_section_summary_off">Comment section is shown</string>
|
||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_title">Hide timestamp and emoji buttons</string>
|
||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_summary_on">Comment timestamp and emoji buttons are hidden</string>
|
||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_summary_off">Comment timestamp and emoji buttons are shown</string>
|
||||
</patch>
|
||||
<patch id="layout.hide.crowdfundingbox.CrowdfundingBoxResourcePatch">
|
||||
<string name="revanced_hide_crowdfunding_box_title">Hide crowdfunding box</string>
|
||||
@@ -581,6 +583,9 @@
|
||||
<string name="revanced_hide_shorts_shop_button_title">Hide shop button</string>
|
||||
<string name="revanced_hide_shorts_shop_button_summary_on">Shop button is hidden</string>
|
||||
<string name="revanced_hide_shorts_shop_button_summary_off">Shop button is shown</string>
|
||||
<string name="revanced_hide_shorts_super_thanks_button_title">Hide super thanks button</string>
|
||||
<string name="revanced_hide_shorts_super_thanks_button_summary_on">Super thanks button is hidden</string>
|
||||
<string name="revanced_hide_shorts_super_thanks_button_summary_off">Super thanks button is shown</string>
|
||||
<string name="revanced_hide_shorts_tagged_products_title">Hide tagged products</string>
|
||||
<string name="revanced_hide_shorts_tagged_products_summary_on">Tagged products are hidden</string>
|
||||
<string name="revanced_hide_shorts_tagged_products_summary_off">Tagged products are shown</string>
|
||||
@@ -616,7 +621,7 @@
|
||||
<string name="revanced_hide_shorts_channel_bar_title">Hide channel bar</string>
|
||||
<string name="revanced_hide_shorts_channel_bar_summary_on">Channel bar is hidden</string>
|
||||
<string name="revanced_hide_shorts_channel_bar_summary_off">Channel bar is shown</string>
|
||||
<string name="revanced_hide_shorts_video_title_title">Hide Shorts video title</string>
|
||||
<string name="revanced_hide_shorts_video_title_title">Hide video title</string>
|
||||
<string name="revanced_hide_shorts_video_title_summary_on">Title is hidden</string>
|
||||
<string name="revanced_hide_shorts_video_title_summary_off">Title is shown</string>
|
||||
<string name="revanced_hide_shorts_sound_metadata_label_title">Hide sound metadata label</string>
|
||||
@@ -856,7 +861,7 @@
|
||||
<string name="revanced_sb_new_segment_confirm_title">Are the times correct?</string>
|
||||
<!-- Do not rearrange the (hour):(minute):second) time format operators here.
|
||||
YT shows the same seekbar time format for all languages, and this string is confirming the segment time as it appears in the seekbar. -->
|
||||
<string name="revanced_sb_new_segment_confirm_content">The segment lasts from %1$02d:%2$02d to %3$02d:%4$02d (%5$d minutes %6$02d seconds)\nIs it ready to submit?</string>
|
||||
<string name="revanced_sb_new_segment_confirm_content">The segment is from\n\n%1$s\nto\n%2$s\n\n(%3$s)\n\nReady to submit?</string>
|
||||
<string name="revanced_sb_new_segment_start_is_before_end">Start must be before the end</string>
|
||||
<string name="revanced_sb_new_segment_mark_locations_first">Mark two locations on the time bar first</string>
|
||||
<string name="revanced_sb_new_segment_preview_segment_first">Preview the segment, and ensure it skips smoothly</string>
|
||||
|
||||
Reference in New Issue
Block a user