Compare commits

...

30 Commits

Author SHA1 Message Date
semantic-release-bot
6ad9225f3e chore(release): 2.193.1-dev.1 [skip ci]
## [2.193.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.193.0...v2.193.1-dev.1) (2023-10-09)
2023-10-09 16:58:22 +00:00
oSumAtrIX
540e6d63d1 build(Needs bump): Use artifacts from Jitpack 2023-10-09 18:54:59 +02:00
semantic-release-bot
a8b0781d76 chore(release): 2.193.0 [skip ci]
# [2.193.0](https://github.com/ReVanced/revanced-patches/compare/v2.192.0...v2.193.0) (2023-10-08)

### Bug Fixes

* **Boost for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([07d98ab](07d98ab3f7))
* Consolidate patches ([#3098](https://github.com/ReVanced/revanced-patches/issues/3098)) ([b4d33a1](b4d33a1dcf))
* **Infinity for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([caf1e6b](caf1e6b211))
* **Sync for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([5bd5f87](5bd5f87315))
* **YouTube:** Sort settings alphabetically despite punctuation ([#3097](https://github.com/ReVanced/revanced-patches/issues/3097)) ([debb07a](debb07ae21))

### Features

* **YouTube - Hide shorts components:** Hide subscribe button when paused separately from subscribe button ([992d85d](992d85ded8))
* **YouTube - Return YouTube Dislike:** Support version `18.37.36` ([#3061](https://github.com/ReVanced/revanced-patches/issues/3061)) ([bd10651](bd10651c3b))
* **YouTube:** Add `Disable fine scrubbing gesture` patch ([0424cea](0424cea8f0))
* **YouTube:** Bump compatibility to `18.38.44` ([#3071](https://github.com/ReVanced/revanced-patches/issues/3071)) ([42aea0c](42aea0c9ca))
2023-10-08 01:46:47 +00:00
oSumAtrIX
e398968762 chore: Merge branch dev to main (#3087) 2023-10-08 03:43:50 +02:00
semantic-release-bot
cf8e8a44e4 chore(release): 2.193.0-dev.7 [skip ci]
# [2.193.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.6...v2.193.0-dev.7) (2023-10-08)

### Features

* **YouTube:** Bump compatibility to `18.38.44` ([#3071](https://github.com/ReVanced/revanced-patches/issues/3071)) ([42aea0c](42aea0c9ca))
2023-10-08 01:40:43 +00:00
LisoUseInAIKyrios
42aea0c9ca feat(YouTube): Bump compatibility to 18.38.44 (#3071) 2023-10-08 03:37:42 +02:00
semantic-release-bot
d735520421 chore(release): 2.193.0-dev.6 [skip ci]
# [2.193.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.5...v2.193.0-dev.6) (2023-10-08)

### Bug Fixes

* **YouTube:** Sort settings alphabetically despite punctuation ([#3097](https://github.com/ReVanced/revanced-patches/issues/3097)) ([debb07a](debb07ae21))
2023-10-08 01:29:00 +00:00
LisoUseInAIKyrios
debb07ae21 fix(YouTube): Sort settings alphabetically despite punctuation (#3097)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-10-08 03:25:27 +02:00
semantic-release-bot
2fe71a18ea chore(release): 2.193.0-dev.5 [skip ci]
# [2.193.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.4...v2.193.0-dev.5) (2023-10-08)

### Bug Fixes

* Consolidate patches ([#3098](https://github.com/ReVanced/revanced-patches/issues/3098)) ([b4d33a1](b4d33a1dcf))
2023-10-08 01:25:15 +00:00
Pun Butrach
5b6e015e64 docs: Update social media links (#3091) 2023-10-08 03:22:17 +02:00
LisoUseInAIKyrios
b4d33a1dcf fix: Consolidate patches (#3098) 2023-10-08 03:21:28 +02:00
semantic-release-bot
ecb92d3f68 chore(release): 2.193.0-dev.4 [skip ci]
# [2.193.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.3...v2.193.0-dev.4) (2023-10-08)

### Bug Fixes

* **Boost for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([07d98ab](07d98ab3f7))
* **Infinity for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([caf1e6b](caf1e6b211))
* **Sync for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([5bd5f87](5bd5f87315))
2023-10-08 01:00:51 +00:00
oSumAtrIX
caf1e6b211 fix(Infinity for Reddit - Spoof client): Set user-agent for OAuth requests to fix login 2023-10-08 02:56:30 +02:00
oSumAtrIX
07d98ab3f7 fix(Boost for Reddit - Spoof client): Set user-agent for OAuth requests to fix login 2023-10-08 02:56:23 +02:00
oSumAtrIX
5bd5f87315 fix(Sync for Reddit - Spoof client): Set user-agent for OAuth requests to fix login 2023-10-08 02:56:08 +02:00
semantic-release-bot
fa0b788111 chore(release): 2.193.0-dev.3 [skip ci]
# [2.193.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.2...v2.193.0-dev.3) (2023-10-07)

### Features

* **YouTube - Return YouTube Dislike:** Support version `18.37.36` ([#3061](https://github.com/ReVanced/revanced-patches/issues/3061)) ([bd10651](bd10651c3b))
2023-10-07 09:35:06 +00:00
oSumAtrIX
bd10651c3b feat(YouTube - Return YouTube Dislike): Support version 18.37.36 (#3061)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2023-10-07 13:31:35 +04:00
semantic-release-bot
2d65ef676d chore(release): 2.193.0-dev.2 [skip ci]
# [2.193.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.1...v2.193.0-dev.2) (2023-10-07)

### Features

* **YouTube:** Add `Disable fine scrubbing gesture` patch ([0424cea](0424cea8f0))
2023-10-07 01:54:21 +00:00
oSumAtrIX
0424cea8f0 feat(YouTube): Add Disable fine scrubbing gesture patch 2023-10-07 03:50:42 +02:00
semantic-release-bot
f5acbe4315 chore(release): 2.193.0-dev.1 [skip ci]
# [2.193.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.192.0...v2.193.0-dev.1) (2023-10-05)

### Features

* **YouTube - Hide shorts components:** Hide subscribe button when paused separately from subscribe button ([992d85d](992d85ded8))
2023-10-05 16:52:40 +00:00
oSumAtrIX
992d85ded8 feat(YouTube - Hide shorts components): Hide subscribe button when paused separately from subscribe button 2023-10-05 18:49:07 +02:00
semantic-release-bot
f25d085d25 chore(release): 2.192.0 [skip ci]
# [2.192.0](https://github.com/ReVanced/revanced-patches/compare/v2.191.0...v2.192.0) (2023-10-05)

### Bug Fixes

* **Relay for Reddit - Spoof client:** Prevent OAuth login being disabled remotely ([fd2daa3](fd2daa37b1))
* Remove `dependencies` from generated JSON file ([23dec85](23dec85068))

### Features

* **TikTok:** Constrain patches to last working version ([9417b67](9417b67e74))
* **YouTube - Hide "Get YouTube Premium" advertisements:** Name patch correctly ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([883f69e](883f69ee9a))
2023-10-05 16:18:54 +00:00
oSumAtrIX
002cc9d810 chore: Merge branch dev to main (#3074) 2023-10-05 18:15:56 +02:00
semantic-release-bot
2919eb26e6 chore(release): 2.192.0-dev.3 [skip ci]
# [2.192.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.192.0-dev.2...v2.192.0-dev.3) (2023-10-05)

### Bug Fixes

* **Relay for Reddit - Spoof client:** Prevent OAuth login being disabled remotely ([fd2daa3](fd2daa37b1))
2023-10-05 15:36:49 +00:00
oSumAtrIX
3b5141d4b4 build: Bump dependencies 2023-10-05 17:32:57 +02:00
oSumAtrIX
fd2daa37b1 fix(Relay for Reddit - Spoof client): Prevent OAuth login being disabled remotely 2023-10-05 17:28:10 +02:00
semantic-release-bot
9ff6f84642 chore(release): 2.192.0-dev.2 [skip ci]
# [2.192.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.192.0-dev.1...v2.192.0-dev.2) (2023-10-05)

### Features

* **TikTok:** Constrain patches to last working version ([9417b67](9417b67e74))
2023-10-05 14:35:30 +00:00
oSumAtrIX
9417b67e74 feat(TikTok): Constrain patches to last working version 2023-10-05 16:32:31 +02:00
semantic-release-bot
f41e657191 chore(release): 2.192.0-dev.1 [skip ci]
# [2.192.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.191.1-dev.1...v2.192.0-dev.1) (2023-10-05)

### Features

* **YouTube - Hide "Get YouTube Premium" advertisements:** Name patch correctly ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([883f69e](883f69ee9a))
2023-10-05 03:08:38 +00:00
KobeW50
883f69ee9a feat(YouTube - Hide "Get YouTube Premium" advertisements): Name patch correctly (#3079)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-10-05 05:05:50 +02:00
78 changed files with 521 additions and 155 deletions

View File

@@ -1,3 +1,110 @@
## [2.193.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.193.0...v2.193.1-dev.1) (2023-10-09)
# [2.193.0](https://github.com/ReVanced/revanced-patches/compare/v2.192.0...v2.193.0) (2023-10-08)
### Bug Fixes
* **Boost for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([2223951](https://github.com/ReVanced/revanced-patches/commit/2223951fa16011d735ef4c4cda11eba13403f62d))
* Consolidate patches ([#3098](https://github.com/ReVanced/revanced-patches/issues/3098)) ([02f767d](https://github.com/ReVanced/revanced-patches/commit/02f767df3cd1b2d0155e7360d2b26fa5d1cfcace))
* **Infinity for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([a710f05](https://github.com/ReVanced/revanced-patches/commit/a710f05bb46156e66ca56aa4731e1028f459c414))
* **Sync for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([a48c4a7](https://github.com/ReVanced/revanced-patches/commit/a48c4a7cc1dbb3ecfce2e345240bca8142740b77))
* **YouTube:** Sort settings alphabetically despite punctuation ([#3097](https://github.com/ReVanced/revanced-patches/issues/3097)) ([46e3c97](https://github.com/ReVanced/revanced-patches/commit/46e3c97d24e282e4d7d444603af4fb475ae03315))
### Features
* **YouTube - Hide shorts components:** Hide subscribe button when paused separately from subscribe button ([52d07ec](https://github.com/ReVanced/revanced-patches/commit/52d07ecd39b1c37cfbfbfa699ccbef849600d9f8))
* **YouTube - Return YouTube Dislike:** Support version `18.37.36` ([#3061](https://github.com/ReVanced/revanced-patches/issues/3061)) ([fe11db7](https://github.com/ReVanced/revanced-patches/commit/fe11db70eafb481db87231d3db22eafbaa479871))
* **YouTube:** Add `Disable fine scrubbing gesture` patch ([6c9baf2](https://github.com/ReVanced/revanced-patches/commit/6c9baf22614b1be4870be684915445f7a138cf31))
* **YouTube:** Bump compatibility to `18.38.44` ([#3071](https://github.com/ReVanced/revanced-patches/issues/3071)) ([a73868c](https://github.com/ReVanced/revanced-patches/commit/a73868cb270295c871a9f1e4d543f728d6152146))
# [2.193.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.6...v2.193.0-dev.7) (2023-10-08)
### Features
* **YouTube:** Bump compatibility to `18.38.44` ([#3071](https://github.com/ReVanced/revanced-patches/issues/3071)) ([a73868c](https://github.com/ReVanced/revanced-patches/commit/a73868cb270295c871a9f1e4d543f728d6152146))
# [2.193.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.5...v2.193.0-dev.6) (2023-10-08)
### Bug Fixes
* **YouTube:** Sort settings alphabetically despite punctuation ([#3097](https://github.com/ReVanced/revanced-patches/issues/3097)) ([46e3c97](https://github.com/ReVanced/revanced-patches/commit/46e3c97d24e282e4d7d444603af4fb475ae03315))
# [2.193.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.4...v2.193.0-dev.5) (2023-10-08)
### Bug Fixes
* Consolidate patches ([#3098](https://github.com/ReVanced/revanced-patches/issues/3098)) ([02f767d](https://github.com/ReVanced/revanced-patches/commit/02f767df3cd1b2d0155e7360d2b26fa5d1cfcace))
# [2.193.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.3...v2.193.0-dev.4) (2023-10-08)
### Bug Fixes
* **Boost for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([2223951](https://github.com/ReVanced/revanced-patches/commit/2223951fa16011d735ef4c4cda11eba13403f62d))
* **Infinity for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([a710f05](https://github.com/ReVanced/revanced-patches/commit/a710f05bb46156e66ca56aa4731e1028f459c414))
* **Sync for Reddit - Spoof client:** Set user-agent for OAuth requests to fix login ([a48c4a7](https://github.com/ReVanced/revanced-patches/commit/a48c4a7cc1dbb3ecfce2e345240bca8142740b77))
# [2.193.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.2...v2.193.0-dev.3) (2023-10-07)
### Features
* **YouTube - Return YouTube Dislike:** Support version `18.37.36` ([#3061](https://github.com/ReVanced/revanced-patches/issues/3061)) ([fe11db7](https://github.com/ReVanced/revanced-patches/commit/fe11db70eafb481db87231d3db22eafbaa479871))
# [2.193.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.1...v2.193.0-dev.2) (2023-10-07)
### Features
* **YouTube:** Add `Disable fine scrubbing gesture` patch ([6c9baf2](https://github.com/ReVanced/revanced-patches/commit/6c9baf22614b1be4870be684915445f7a138cf31))
# [2.193.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.192.0...v2.193.0-dev.1) (2023-10-05)
### Features
* **YouTube - Hide shorts components:** Hide subscribe button when paused separately from subscribe button ([52d07ec](https://github.com/ReVanced/revanced-patches/commit/52d07ecd39b1c37cfbfbfa699ccbef849600d9f8))
# [2.192.0](https://github.com/ReVanced/revanced-patches/compare/v2.191.0...v2.192.0) (2023-10-05)
### Bug Fixes
* **Relay for Reddit - Spoof client:** Prevent OAuth login being disabled remotely ([a0aa2be](https://github.com/ReVanced/revanced-patches/commit/a0aa2be86d25aab2803901b4100fdc75461e94bc))
* Remove `dependencies` from generated JSON file ([79bb3e1](https://github.com/ReVanced/revanced-patches/commit/79bb3e164f84094c639ac9e567dc0a5ce70300bd))
### Features
* **TikTok:** Constrain patches to last working version ([066023c](https://github.com/ReVanced/revanced-patches/commit/066023ca148b413b0848c0939e0bab2b3ff32b3a))
* **YouTube - Hide "Get YouTube Premium" advertisements:** Name patch correctly ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([5c140ea](https://github.com/ReVanced/revanced-patches/commit/5c140ea38dc7b7da1efd4b98315fb401267b99f8))
# [2.192.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.192.0-dev.2...v2.192.0-dev.3) (2023-10-05)
### Bug Fixes
* **Relay for Reddit - Spoof client:** Prevent OAuth login being disabled remotely ([a0aa2be](https://github.com/ReVanced/revanced-patches/commit/a0aa2be86d25aab2803901b4100fdc75461e94bc))
# [2.192.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.192.0-dev.1...v2.192.0-dev.2) (2023-10-05)
### Features
* **TikTok:** Constrain patches to last working version ([066023c](https://github.com/ReVanced/revanced-patches/commit/066023ca148b413b0848c0939e0bab2b3ff32b3a))
# [2.192.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.191.1-dev.1...v2.192.0-dev.1) (2023-10-05)
### Features
* **YouTube - Hide "Get YouTube Premium" advertisements:** Name patch correctly ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([5c140ea](https://github.com/ReVanced/revanced-patches/commit/5c140ea38dc7b7da1efd4b98315fb401267b99f8))
## [2.191.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.191.0...v2.191.1-dev.1) (2023-10-05)

View File

@@ -28,12 +28,15 @@
<a href="https://t.me/app_revanced">
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
</a>&nbsp;&nbsp;&nbsp;
<a href="https://twitter.com/revancedapp">
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
<a href="https://x.com/revancedapp">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
<picture/>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://www.youtube.com/@ReVanced">
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
</a>&nbsp;&nbsp;&nbsp;
</a>
<br>
<br>
Continuing the legacy of Vanced

View File

@@ -28,18 +28,20 @@
<a href="https://t.me/app_revanced">
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
</a>&nbsp;&nbsp;&nbsp;
<a href="https://twitter.com/revancedapp">
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
<a href="https://x.com/revancedapp">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
<picture/>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://www.youtube.com/@ReVanced">
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
</a>&nbsp;&nbsp;&nbsp;
</a>
<br>
<br>
Continuing the legacy of Vanced
</p>
# 🧩 ReVanced Patches
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/ReVanced/revanced-patches/release.yml)

View File

@@ -9,13 +9,7 @@ repositories {
mavenCentral()
mavenLocal()
google()
maven {
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
credentials {
username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
}
}
maven { url = uri("https://jitpack.io") }
// Required for FlexVer-Java
maven {
url = uri("https://repo.sleeping.town")

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.191.1-dev.1
version = 2.193.1-dev.1

View File

@@ -1,14 +1,14 @@
[versions]
revanced-patcher = "16.0.0"
revanced-patch-annotation-processor = "16.0.0"
revanced-patcher = "17.0.0"
revanced-patch-annotation-processor = "17.0.0"
ksp = "1.9.0-1.0.11"
smali = "3.0.3"
guava = "32.1.2-jre"
gson = "2.10.1"
[libraries]
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
revanced-patch-annotation-processor = { module = "app.revanced:revanced-patch-annotation-processor", version.ref = "revanced-patch-annotation-processor" }
revanced-patcher = { module = "app.revanced.revanced-patcher:revanced-patcher", version.ref = "revanced-patcher" }
revanced-patch-annotation-processor = { module = "app.revanced.revanced-patcher:revanced-patch-annotation-processor", version.ref = "revanced-patch-annotation-processor" }
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
package app.revanced.patches.reddit.customclients
object Constants {
const val OAUTH_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " +
"Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.60"
}

View File

@@ -6,7 +6,9 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
@Patch(
name = "Spoof client",
@@ -15,7 +17,9 @@ import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints
)
@Suppress("unused")
object SpoofClientPatch : AbstractSpoofClientPatch(
"http://rubenmayayo.com", listOf(GetClientIdFingerprint)
"http://rubenmayayo.com",
clientIdFingerprints = listOf(GetClientIdFingerprint),
userAgentFingerprints = listOf(LoginActivityOnCreateFingerprint)
) {
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
first().mutableMethod.addInstructions(
@@ -26,4 +30,20 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
"""
)
}
override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
first().let { result ->
result.mutableMethod.apply {
val insertIndex = result.scanResult.patternScanResult!!.endIndex
addInstructions(
insertIndex,
"""
const-string v7, "$OAUTH_USER_AGENT"
invoke-virtual {v4, v7}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V
"""
)
}
}
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
object LoginActivityOnCreateFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_4
),
customFingerprint = { method, classDef ->
method.name == "onCreate" && classDef.type.endsWith("LoginActivity;")
}
)

View File

@@ -1,14 +1,17 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api
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.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT
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.SetWebViewSettingsFingerprint
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
@@ -32,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Suppress("unused")
object SpoofClientPatch : AbstractSpoofClientPatch(
"infinity://localhost",
listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
clientIdFingerprints = listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint),
userAgentFingerprints = listOf(SetWebViewSettingsFingerprint)
) {
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
forEach {
@@ -48,4 +52,18 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
}
}
}
override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
first().let { result ->
val insertIndex = result.scanResult.stringsScanResult!!.matches.first().index
result.mutableMethod.addInstructions(
insertIndex,
"""
const-string v0, "$OAUTH_USER_AGENT"
invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V
"""
)
}
}
}

View File

@@ -0,0 +1,7 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SetWebViewSettingsFingerprint : MethodFingerprint(
strings= listOf("https://www.reddit.com/api/v1/authorize.compact")
)

View File

@@ -9,6 +9,9 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.*
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction10t
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction21t
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
@@ -28,7 +31,10 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
GetLoggedOutBearerTokenFingerprint,
GetRefreshTokenFingerprint
),
miscellaneousFingerprints = listOf(SetRemoteConfigFingerprint)
miscellaneousFingerprints = listOf(
SetRemoteConfigFingerprint,
RedditCheckDisableAPIFingerprint
)
) {
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
forEach {
@@ -44,7 +50,24 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
}
}
override fun List<MethodFingerprintResult>.patchMiscellaneous(context: BytecodeContext) =
// Do not load remote config which disables OAuth login remotely
override fun List<MethodFingerprintResult>.patchMiscellaneous(context: BytecodeContext) {
// Do not load remote config which disables OAuth login remotely.
first().mutableMethod.addInstructions(0, "return-void")
// Prevent OAuth login being disabled remotely.
last().let {
val checkIsOAuthRequestIndex = it.scanResult.patternScanResult!!.startIndex
it.mutableMethod.apply {
val returnNextChain = getInstruction<BuilderInstruction21t>(checkIsOAuthRequestIndex).target
replaceInstruction(
checkIsOAuthRequestIndex,
BuilderInstruction10t(
Opcode.GOTO,
returnNextChain
)
)
}
}
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
object RedditCheckDisableAPIFingerprint : MethodFingerprint(
strings = listOf("Reddit Disabled"),
opcodes = listOf(Opcode.IF_EQZ)
)

View File

@@ -10,9 +10,11 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT
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.ImgurImageAPIFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.LoadBrowserURLFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.DisablePiracyDetectionPatch
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
@@ -33,6 +35,7 @@ import java.util.*
object SpoofClientPatch : AbstractSpoofClientPatch(
"http://redditsync/auth",
clientIdFingerprints = listOf(GetAuthorizationStringFingerprint),
userAgentFingerprints = listOf(LoadBrowserURLFingerprint),
miscellaneousFingerprints = listOf(ImgurImageAPIFingerprint)
) {
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
@@ -79,4 +82,18 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
"const-string v1, \"https://api.imgur.com/3/image\""
)
}
override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
first().let { result ->
val insertIndex = result.scanResult.patternScanResult!!.startIndex
result.mutableMethod.addInstructions(
insertIndex,
"""
const-string v0, "$OAUTH_USER_AGENT"
invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V
"""
)
}
}
}

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
object LoadBrowserURLFingerprint : MethodFingerprint(
parameters = listOf("Landroid/view/View;", "Landroid/os/Bundle;"),
opcodes = listOf(Opcode.CONST_4),
strings = listOf("CustomInterface")
)

View File

@@ -40,4 +40,9 @@ internal fun <T> Element.addDefault(default: T) {
}
)
}
}
internal fun CharSequence.removePunctuation(): String {
val punctuation = "\\p{P}+".toRegex()
return this.replace(punctuation, "")
}

View File

@@ -4,6 +4,7 @@ import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.removePunctuation
import java.io.Closeable
abstract class AbstractPreferenceScreen(
@@ -35,8 +36,8 @@ abstract class AbstractPreferenceScreen(
return PreferenceScreen(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value.lowercase() } +
categories.sortedBy { it.title.lowercase() }.map { it.transform() },
preferences.sortedBy { it.title.value.removePunctuation().lowercase() } +
categories.sortedBy { it.title.removePunctuation().lowercase() }.map { it.transform() },
summary?.let { summary ->
StringResource("${key}_summary", summary)
}
@@ -63,7 +64,7 @@ abstract class AbstractPreferenceScreen(
return PreferenceCategory(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value.lowercase() }
preferences.sortedBy { it.title.value.removePunctuation().lowercase() }
)
}

View File

@@ -16,8 +16,8 @@ import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonS
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
@@ -28,8 +28,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
description = "Removes download restrictions and changes the default path to download to.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill"),
CompatiblePackage("com.zhiliaoapp.musically")
CompatiblePackage("com.ss.android.ugc.trill", ["30.8.4"]),
CompatiblePackage("com.zhiliaoapp.musically", ["30.8.4"])
]
)
@Suppress("unused")

View File

@@ -23,8 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
description = "Adds ReVanced settings to TikTok.",
dependencies = [IntegrationsPatch::class],
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill"),
CompatiblePackage("com.zhiliaoapp.musically")
CompatiblePackage("com.ss.android.ugc.trill", ["30.8.4"]),
CompatiblePackage("com.zhiliaoapp.musically", ["30.8.4"])
]
)
object SettingsPatch : BytecodePatch(

View File

@@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -15,7 +15,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
@Patch(
name = "Hide get premium",
description = "Hides YouTube Premium signup promotions under the video player.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
@@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]
@@ -41,15 +42,15 @@ object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
"revanced_hide_get_premium",
StringResource(
"revanced_hide_get_premium_title",
"Hide YouTube premium advertisement"
"Hide YouTube Premium promotions"
),
StringResource(
"revanced_hide_get_premium_summary_on",
"YouTube Premium advertisements under video player are hidden"
"YouTube Premium promotions under video player is hidden"
),
StringResource(
"revanced_hide_get_premium_summary_off",
"YouTube Premium advertisements under video player are shown"
"YouTube Premium promotions under video player is shown"
)
)
)

View File

@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
),
]

View File

@@ -0,0 +1,65 @@
package app.revanced.patches.youtube.interaction.seekbar
import app.revanced.extensions.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.IsSwipingUpFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch(
name = "Disable fine scrubbing gesture",
description = "Disables gesture that shows the fine scrubbing overlay when swiping up on the seekbar.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube",
[
"18.32.39",
"18.37.36",
"18.38.44"
]
)
]
)
@Suppress("unused")
object DisableFineScrubbingGesturePatch : BytecodePatch(
setOf(IsSwipingUpFingerprint)
) {
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
"Lapp/revanced/integrations/patches/DisableFineScrubbingGesturePatch;->" +
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
SwitchPreference(
"revanced_disable_fine_scrubbing_gesture",
StringResource("revanced_disable_fine_scrubbing_gesture_title", "Disable fine scrubbing gesture"),
StringResource("revanced_disable_fine_scrubbing_gesture_summary_on", "Gesture is disabled"),
StringResource("revanced_disable_fine_scrubbing_gesture_summary_off", "Gesture is enabled"),
)
)
IsSwipingUpFingerprint.result?.let {
val addMovementIndex = it.scanResult.patternScanResult!!.startIndex - 1
it.mutableMethod.apply {
val addMovementInstruction = getInstruction<FiveRegisterInstruction>(addMovementIndex)
val trackerRegister = addMovementInstruction.registerC
val eventRegister = addMovementInstruction.registerD
replaceInstruction(
addMovementIndex,
"invoke-static {v$trackerRegister, v$eventRegister}, $INTEGRATIONS_METHOD_DESCRIPTOR"
)
}
} ?: throw IsSwipingUpFingerprint.exception
}
}

View File

@@ -8,9 +8,12 @@ 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.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.OnTouchEventHandlerFingerprint
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@@ -19,9 +22,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
name = "Seekbar tapping",
description = "Enables tap-to-seek on the seekbar of the video player.",
dependencies = [
IntegrationsPatch::class,
EnableSeekbarTappingResourcePatch::class
],
IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube",
@@ -32,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]
@@ -45,6 +47,15 @@ object EnableSeekbarTappingPatch : BytecodePatch(
)
) {
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
SwitchPreference(
"revanced_seekbar_tapping",
StringResource("revanced_seekbar_tapping_title", "Enable seekbar tapping"),
StringResource("revanced_seekbar_tapping_summary_on", "Seekbar tapping is enabled"),
StringResource("revanced_seekbar_tapping_summary_off", "Seekbar tapping is disabled")
)
)
// Find the required methods to tap the seekbar.
val seekbarTappingMethods = OnTouchEventHandlerFingerprint.result?.let {
val patternScanResult = it.scanResult.patternScanResult!!

View File

@@ -1,24 +0,0 @@
package app.revanced.patches.youtube.interaction.seekbar
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
dependencies = [SettingsPatch::class]
)
object EnableSeekbarTappingResourcePatch : ResourcePatch() {
override fun execute(context: ResourceContext) {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
SwitchPreference(
"revanced_seekbar_tapping",
StringResource("revanced_seekbar_tapping_title", "Enable seekbar tapping"),
StringResource("revanced_seekbar_tapping_summary_on", "Seekbar tapping is enabled"),
StringResource("revanced_seekbar_tapping_summary_off", "Seekbar tapping is disabled")
)
)
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
object IsSwipingUpFingerprint : MethodFingerprint(
parameters = listOf("Landroid/view/MotionEvent;", "J"),
opcodes = listOf(Opcode.SGET_OBJECT)
)

View File

@@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
],

View File

@@ -28,7 +28,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.Opcode
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
CompatiblePackage(
"com.google.android.youtube", [
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]
@@ -53,14 +54,14 @@ object HideLayoutComponentsPatch : BytecodePatch(
),
SwitchPreference(
"revanced_hide_join_membership_button",
StringResource("revanced_hide_join_membership_button_title", "Hide \"Join\" button"),
StringResource("revanced_hide_join_membership_button_title", "Hide \\\'Join\\\' button"),
StringResource("revanced_hide_join_membership_button_summary_on", "Button is hidden"),
StringResource("revanced_hide_join_membership_button_summary_off", "Button is shown")
),
SwitchPreference(
"revanced_hide_notify_me_button",
StringResource("revanced_hide_notify_me_button_title", "Hide \"Notify me\" button"),
StringResource("revanced_hide_notify_me_button_title", "Hide \\\'Notify me\\\' button"),
StringResource("revanced_hide_notify_me_button_summary_on", "Button is hidden"),
StringResource("revanced_hide_notify_me_button_summary_off", "Button is shown")
),

View File

@@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -11,7 +11,7 @@ import app.revanced.patches.youtube.layout.hide.loadmorebutton.fingerprints.Hide
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
name = "Hide \"Load more\" button",
name = "Hide \'Load more\' button",
description = "Hides the button under videos that loads similar videos.",
dependencies = [HideLoadMoreButtonResourcePatch::class],
compatiblePackages = [
@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -21,7 +21,7 @@ object HideLoadMoreButtonResourcePatch : ResourcePatch() {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_load_more_button",
StringResource("revanced_hide_load_more_button_title", "Hide \"Load More\" button"),
StringResource("revanced_hide_load_more_button_title", "Hide \\\'Load More\\\' button"),
StringResource("revanced_hide_load_more_button_summary_on", "Button is hidden"),
StringResource("revanced_hide_load_more_button_summary_off", "Button is shown")
)

View File

@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
])
]
)

View File

@@ -33,7 +33,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]
@@ -122,7 +123,7 @@ object HideShortsComponentsPatch : BytecodePatch(
// Required to prevent a black bar from appearing at the bottom of the screen.
BottomNavigationBarFingerprint.result?.let {
it.mutableMethod.apply {
val moveResultIndex = it.scanResult.patternScanResult!!.startIndex
val moveResultIndex = it.scanResult.patternScanResult!!.startIndex + 2
val viewRegister = getInstruction<OneRegisterInstruction>(moveResultIndex).registerA
val insertIndex = moveResultIndex + 1

View File

@@ -38,6 +38,12 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
StringResource("revanced_hide_shorts_subscribe_button_on", "Subscribe button is hidden"),
StringResource("revanced_hide_shorts_subscribe_button_off", "Subscribe button is shown")
),
SwitchPreference(
"revanced_hide_shorts_subscribe_button_paused",
StringResource("revanced_hide_shorts_subscribe_button_paused_title", "Hide subscribe button when paused"),
StringResource("revanced_hide_shorts_subscribe_button_paused_on", "Subscribe button is hidden"),
StringResource("revanced_hide_shorts_subscribe_button_paused_off", "Subscribe button is shown")
),
SwitchPreference(
"revanced_hide_shorts_thanks_button",
StringResource("revanced_hide_shorts_thanks_button_title", "Hide thanks button"),

View File

@@ -1,18 +1,24 @@
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
object BottomNavigationBarFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("Landroid/view/View;", "Landroid/os/Bundle;"),
opcodes = listOf(
Opcode.MOVE_RESULT_OBJECT, // Refers to bottom navigation bar
Opcode.CONST, // R.id.app_engagement_panel_wrapper
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
),
strings = listOf(
"navigation_endpoint_interaction_logging_extension",
"reel_watch_fragment_watch_while",
"ReelWatchPaneFragmentViewModelKey"
),
)

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -19,7 +19,8 @@ import org.w3c.dom.Element
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
],

View File

@@ -14,6 +14,7 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.*
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
import app.revanced.patches.youtube.video.videoid.VideoIdPatch
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
@@ -26,12 +27,13 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
description = "Shows the dislike count of videos using the Return YouTube Dislike API.",
dependencies = [
IntegrationsPatch::class,
LithoFilterPatch::class,
VideoIdPatch::class,
ReturnYouTubeDislikeResourcePatch::class,
PlayerTypeHookPatch::class,
],
compatiblePackages = [
CompatiblePackage("com.google.android.youtube", ["18.32.39"])
CompatiblePackage("com.google.android.youtube", ["18.37.36", "18.38.44"])
]
)
@Suppress("unused")
@@ -48,11 +50,17 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;"
private const val FILTER_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/components/ReturnYouTubeDislikeFilterPatch;"
override fun execute(context: BytecodeContext) {
// region Inject newVideoLoaded event handler to update dislikes when a new video is loaded.
VideoIdPatch.hookVideoId("$INTEGRATIONS_CLASS_DESCRIPTOR->newVideoLoaded(Ljava/lang/String;)V")
// Hook the player response video id, to start loading RYD sooner in the background.
VideoIdPatch.hookPlayerResponseVideoId("$INTEGRATIONS_CLASS_DESCRIPTOR->preloadVideoId(Ljava/lang/String;)V")
// endregion
// region Hook like/dislike/remove like button clicks to send votes to the API.
@@ -89,49 +97,40 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
throw TextComponentAtomicReferenceFingerprint.exception
}?.let { textComponentContextFingerprintResult ->
val conversionContextIndex = textComponentContextFingerprintResult
.scanResult.patternScanResult!!.startIndex
.scanResult.patternScanResult!!.endIndex
val atomicReferenceStartIndex = TextComponentAtomicReferenceFingerprint.result!!
.scanResult.patternScanResult!!.startIndex
val insertIndex = atomicReferenceStartIndex + 6
val insertIndex = atomicReferenceStartIndex + 9
textComponentContextFingerprintResult.mutableMethod.apply {
// Get the conversion context obfuscated field name, and the registers for the AtomicReference and CharSequence
// Get the conversion context obfuscated field name
val conversionContextFieldReference =
getInstruction<ReferenceInstruction>(conversionContextIndex).reference
// Reuse the free register to make room for the atomic reference register.
// Free register to hold the conversion context
val freeRegister =
getInstruction<TwoRegisterInstruction>(atomicReferenceStartIndex).registerB
val atomicReferenceRegister =
getInstruction<FiveRegisterInstruction>(atomicReferenceStartIndex + 1).registerC
getInstruction<FiveRegisterInstruction>(atomicReferenceStartIndex + 6).registerC
val moveCharSequenceInstruction = getInstruction<TwoRegisterInstruction>(insertIndex - 1)
// Instruction that is replaced, and also has the CharacterSequence register.
val moveCharSequenceInstruction = getInstruction<TwoRegisterInstruction>(insertIndex)
val charSequenceSourceRegister = moveCharSequenceInstruction.registerB
val charSequenceTargetRegister = moveCharSequenceInstruction.registerA
// In order to preserve the atomic reference register, because it is overwritten,
// use another free register to store it.
replaceInstruction(
atomicReferenceStartIndex + 2,
"move-result-object v$freeRegister"
)
replaceInstruction(
atomicReferenceStartIndex + 3,
"move-object v$charSequenceSourceRegister, v$freeRegister"
)
// Move the current instance to the free register, and get the conversion context from it.
replaceInstruction(insertIndex - 1, "move-object/from16 v$freeRegister, p0")
// Must replace the instruction to preserve the control flow label.
replaceInstruction(insertIndex, "move-object/from16 v$freeRegister, p0")
addInstructions(
insertIndex,
insertIndex + 1,
"""
# Move context to free register
iget-object v$freeRegister, v$freeRegister, $conversionContextFieldReference
iget-object v$freeRegister, v$freeRegister, $conversionContextFieldReference
invoke-static {v$freeRegister, v$atomicReferenceRegister, v$charSequenceSourceRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object v$freeRegister
# Replace the original char sequence with the modified one.
# Replace the original instruction
move-object v${charSequenceTargetRegister}, v${freeRegister}
"""
)
@@ -140,7 +139,7 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
// endregion
// region Hook for Short videos.
// region Hook for non litho Short videos.
ShortsTextViewFingerprint.result?.let {
it.mutableMethod.apply {
@@ -150,7 +149,7 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
val isDisLikesBooleanReference = getInstruction<ReferenceInstruction>(patternResult.endIndex).reference
val textViewFieldReference = // Like/Dislike button TextView field
getInstruction<ReferenceInstruction>(patternResult.endIndex - 2).reference
getInstruction<ReferenceInstruction>(patternResult.endIndex - 1).reference
// Check if the hooked TextView object is that of the dislike button.
// If RYD is disabled, or the TextView object is not that of the dislike button, the execution flow is not interrupted.
@@ -180,6 +179,13 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
// endregion
// region Hook for litho Shorts
// Filter that parses the video id from the UI
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
// endregion
// region Hook old UI layout dislikes, for the older app spoofs used with spoof-app-version.
DislikesOldLayoutTextViewFingerprint.result?.let {

View File

@@ -27,7 +27,6 @@ object ShortsTextViewFingerprint : MethodFingerprint(
Opcode.IF_EQ,
Opcode.RETURN_VOID,
Opcode.IGET_OBJECT, // TextView field
Opcode.CHECK_CAST,
Opcode.IGET_BOOLEAN, // boolean field
)
)

View File

@@ -13,13 +13,17 @@ object TextComponentAtomicReferenceFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL,
parameters = listOf("L"),
opcodes = listOf(
Opcode.MOVE_OBJECT, // Register A and B is context, use B as context, reuse A as free register
Opcode.MOVE_OBJECT, // Register B is free register
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL, // Register C is atomic reference
Opcode.MOVE_RESULT_OBJECT, // Register A is char sequence
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.MOVE_OBJECT,
Opcode.INVOKE_INTERFACE, // Insert hook here
Opcode.MOVE_OBJECT, // Replace this instruction with patch code
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.INVOKE_INTERFACE,

View File

@@ -13,12 +13,14 @@ object TextComponentContextFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL,
parameters = listOf("L"),
opcodes = listOf(
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_STATIC_RANGE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT, // conversion context field name
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_BOOLEAN,
Opcode.IGET,
Opcode.IGET,
Opcode.IGET,
)
)

View File

@@ -28,7 +28,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -45,7 +45,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
],

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
)
)
]

View File

@@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import app.revanced.util.microg.MicroGBytecodeHelper
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -58,7 +58,7 @@ object PlayerControlsBytecodePatch : BytecodePatch(
* @param descriptor The descriptor of the method which should be calleed.
*/
fun initializeControl(descriptor: String) {
inflateFingerprintResult!!.mutableMethod.addInstruction(
inflateFingerprintResult.mutableMethod.addInstruction(
moveToRegisterInstructionIndex + 1,
"invoke-static {v$viewRegister}, $descriptor"
)

View File

@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -19,7 +19,8 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]