Compare commits

..

35 Commits

Author SHA1 Message Date
semantic-release-bot
0d96921226 chore(release): 2.182.1-dev.1 [skip ci]
## [2.182.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.182.1-dev.1) (2023-07-08)

### Bug Fixes

* **youtube/custom-video-buffer:** remove non functional deprecated patch ([e5abe4f](e5abe4f0e5))
2023-07-08 18:37:45 +00:00
LisoUseInAIKyrios
e5abe4f0e5 fix(youtube/custom-video-buffer): remove non functional deprecated patch 2023-07-08 22:34:41 +04:00
semantic-release-bot
114cdf5571 chore(release): 2.182.0 [skip ci]
# [2.182.0](https://github.com/revanced/revanced-patches/compare/v2.181.0...v2.182.0) (2023-07-08)

### Bug Fixes

* **youtube/hide-layout-components:**  hide mix playlists ([4af3c46](4af3c462e3))

### Features

* **pixiv:** add `hide-ads` patch ([#2578](https://github.com/revanced/revanced-patches/issues/2578)) ([6c55d13](6c55d13c80))
* remove unnecessary notice ([1efe5de](1efe5de0ac))
* **slideforreddit:** add `change-oauth-client-id` patch ([#2571](https://github.com/revanced/revanced-patches/issues/2571)) ([f8f5326](f8f5326670))
* **youtube:** support version `18.23.35` ([#2461](https://github.com/revanced/revanced-patches/issues/2461)) ([34514b0](34514b04f1))
2023-07-08 02:36:59 +00:00
oSumAtrIX
31b61f5d70 chore: merge branch dev to main (#2582) 2023-07-08 04:32:55 +02:00
semantic-release-bot
438cd97278 chore(release): 2.182.0-dev.5 [skip ci]
# [2.182.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.4...v2.182.0-dev.5) (2023-07-08)

### Bug Fixes

* **youtube/hide-layout-components:**  hide mix playlists ([4af3c46](4af3c462e3))
2023-07-08 02:32:31 +00:00
oSumAtrIX
4af3c462e3 fix(youtube/hide-layout-components): hide mix playlists 2023-07-08 04:27:45 +02:00
semantic-release-bot
996e6134b8 chore(release): 2.182.0-dev.4 [skip ci]
# [2.182.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.3...v2.182.0-dev.4) (2023-07-07)

### Features

* **youtube:** support version `18.23.35` ([#2461](https://github.com/revanced/revanced-patches/issues/2461)) ([34514b0](34514b04f1))
2023-07-07 23:06:05 +00:00
LisoUseInAIKyrios
34514b04f1 feat(youtube): support version 18.23.35 (#2461)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-07-08 01:02:32 +02:00
oSumAtrIX
67294c76cd chore: remove ReadmeGenerator
This is not necessary anymore because the list of patches is now parsed and displayed by revanced/revanced-website
2023-07-06 20:19:10 +02:00
semantic-release-bot
ff26938651 chore(release): 2.182.0-dev.3 [skip ci]
# [2.182.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.2...v2.182.0-dev.3) (2023-07-05)

### Features

* **pixiv:** add `hide-ads` patch ([#2578](https://github.com/revanced/revanced-patches/issues/2578)) ([6c55d13](6c55d13c80))
2023-07-05 21:04:56 +00:00
Sculas
6c55d13c80 feat(pixiv): add hide-ads patch (#2578)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-07-05 23:01:27 +02:00
Pun
04bac73a18 build: update gradle (#2583)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-07-05 22:38:39 +02:00
semantic-release-bot
a9d9fc64d4 chore(release): 2.182.0-dev.2 [skip ci]
# [2.182.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.1...v2.182.0-dev.2) (2023-07-05)

### Features

* **slideforreddit:** add `change-oauth-client-id` patch ([#2571](https://github.com/revanced/revanced-patches/issues/2571)) ([f8f5326](f8f5326670))
2023-07-05 20:22:07 +00:00
Valerio Mazza
f8f5326670 feat(slideforreddit): add change-oauth-client-id patch (#2571) 2023-07-05 22:19:44 +02:00
semantic-release-bot
1f490d3fe7 chore(release): 2.182.0-dev.1 [skip ci]
# [2.182.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.181.0...v2.182.0-dev.1) (2023-07-05)

### Features

* remove unnecessary notice ([1efe5de](1efe5de0ac))
2023-07-05 13:57:34 +00:00
oSumAtrIX
1efe5de0ac feat: remove unnecessary notice 2023-07-05 15:54:41 +02:00
semantic-release-bot
e7f623a734 chore(release): 2.181.0 [skip ci]
# [2.181.0](https://github.com/revanced/revanced-patches/compare/v2.180.0...v2.181.0) (2023-07-03)

### Bug Fixes

* **infinityforreddit/change-oauth-client-id:** patch correct method ([#2564](https://github.com/revanced/revanced-patches/issues/2564)) ([1e40f37](1e40f37ff3))
* **reddit/hide-comment-ads:** do not require integrations ([ba260c9](ba260c9589))
* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#2575](https://github.com/revanced/revanced-patches/issues/2575)) ([269a694](269a694a82))
* **trakt:** bump compatibility to newer version ([#2554](https://github.com/revanced/revanced-patches/issues/2554)) ([288b1eb](288b1ebe7b))
* **youtube-music/bypass-certificate-checks:** fix fingerprint for the latest target app ([#2567](https://github.com/revanced/revanced-patches/issues/2567)) ([24715a7](24715a76c9))
* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#2556](https://github.com/revanced/revanced-patches/issues/2556)) ([1f26cee](1f26ceeed8))

### Features

* **baconreader/change-oauth-client-id:** add compatibility for premium package ([#2550](https://github.com/revanced/revanced-patches/issues/2550)) ([fb16f7a](fb16f7a65d))
2023-07-03 21:37:27 +00:00
oSumAtrIX
3bd32bd0fc chore: merge branch dev to main (#2553) 2023-07-03 23:35:19 +02:00
semantic-release-bot
8228a4c16c chore(release): 2.181.0-dev.7 [skip ci]
# [2.181.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.6...v2.181.0-dev.7) (2023-07-03)

### Bug Fixes

* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#2575](https://github.com/revanced/revanced-patches/issues/2575)) ([269a694](269a694a82))
2023-07-03 19:32:34 +00:00
LisoUseInAIKyrios
269a694a82 fix(reddit/sanitize-sharing-links): update patch to support latest app version (#2575) 2023-07-03 23:29:14 +04:00
LisoUseInAIKyrios
352c183e39 refactor(youtube-music/bypass-certificate-checks): use simpler patch 2023-07-02 17:37:16 +04:00
semantic-release-bot
3bb86c16be chore(release): 2.181.0-dev.6 [skip ci]
# [2.181.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.5...v2.181.0-dev.6) (2023-07-02)

### Bug Fixes

* **reddit/hide-comment-ads:** do not require integrations ([ba260c9](ba260c9589))
2023-07-02 11:38:24 +00:00
oSumAtrIX
ba260c9589 fix(reddit/hide-comment-ads): do not require integrations 2023-07-02 13:36:07 +02:00
semantic-release-bot
021f9bd49f chore(release): 2.181.0-dev.5 [skip ci]
# [2.181.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.4...v2.181.0-dev.5) (2023-07-02)

### Bug Fixes

* **infinityforreddit/change-oauth-client-id:** patch correct method ([#2564](https://github.com/revanced/revanced-patches/issues/2564)) ([1e40f37](1e40f37ff3))
2023-07-02 11:32:02 +00:00
johnconner122
1e40f37ff3 fix(infinityforreddit/change-oauth-client-id): patch correct method (#2564) 2023-07-02 13:29:55 +02:00
semantic-release-bot
ddbdd0eb9a chore(release): 2.181.0-dev.4 [skip ci]
# [2.181.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.3...v2.181.0-dev.4) (2023-07-02)

### Bug Fixes

* **youtube-music/bypass-certificate-checks:** fix fingerprint for the latest target app ([#2567](https://github.com/revanced/revanced-patches/issues/2567)) ([24715a7](24715a76c9))
2023-07-02 08:41:06 +00:00
LisoUseInAIKyrios
24715a76c9 fix(youtube-music/bypass-certificate-checks): fix fingerprint for the latest target app (#2567) 2023-07-02 12:39:06 +04:00
semantic-release-bot
7aff30c010 chore(release): 2.181.0-dev.3 [skip ci]
# [2.181.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.2...v2.181.0-dev.3) (2023-07-02)

### Bug Fixes

* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#2556](https://github.com/revanced/revanced-patches/issues/2556)) ([1f26cee](1f26ceeed8))
2023-07-02 08:28:01 +00:00
LisoUseInAIKyrios
1f26ceeed8 fix(youtube/spoof-signature-verification): remove auto re-enable functionality (#2556) 2023-07-02 12:25:59 +04:00
semantic-release-bot
503b000e79 chore(release): 2.181.0-dev.2 [skip ci]
# [2.181.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.1...v2.181.0-dev.2) (2023-07-01)

### Bug Fixes

* **trakt:** bump compatibility to newer version ([#2554](https://github.com/revanced/revanced-patches/issues/2554)) ([288b1eb](288b1ebe7b))
2023-07-01 14:46:51 +00:00
johnconner122
288b1ebe7b fix(trakt): bump compatibility to newer version (#2554) 2023-07-01 16:44:45 +02:00
semantic-release-bot
2ed95497bb chore(release): 2.181.0-dev.1 [skip ci]
# [2.181.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.180.0...v2.181.0-dev.1) (2023-07-01)

### Features

* **baconreader/change-oauth-client-id:** add compatibility for premium package ([#2550](https://github.com/revanced/revanced-patches/issues/2550)) ([fb16f7a](fb16f7a65d))
2023-07-01 12:48:21 +00:00
Aunali321
fb16f7a65d feat(baconreader/change-oauth-client-id): add compatibility for premium package (#2550) 2023-07-01 14:46:17 +02:00
semantic-release-bot
926f38055a chore(release): 2.180.0 [skip ci]
# [2.180.0](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0) (2023-07-01)

### Features

* use clearer descriptions for patches ([7814e46](7814e464e1))
2023-07-01 01:12:52 +00:00
oSumAtrIX
8e32956dd6 chore: merge branch dev to main (#2542) 2023-07-01 03:10:51 +02:00
116 changed files with 847 additions and 1185 deletions

9
.gitattributes vendored Normal file
View File

@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf
# These are Windows script files and should use crlf
*.bat text eol=crlf

View File

@@ -1,3 +1,133 @@
## [2.182.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.182.1-dev.1) (2023-07-08)
### Bug Fixes
* **youtube/custom-video-buffer:** remove non functional deprecated patch ([de233e2](https://github.com/revanced/revanced-patches/commit/de233e28246b1716b42bf331d2355ff4beed9564))
# [2.182.0](https://github.com/revanced/revanced-patches/compare/v2.181.0...v2.182.0) (2023-07-08)
### Bug Fixes
* **youtube/hide-layout-components:** hide mix playlists ([33a87bd](https://github.com/revanced/revanced-patches/commit/33a87bd6eac1639687ebdf96ef8924cd674f81e4))
### Features
* **pixiv:** add `hide-ads` patch ([#2578](https://github.com/revanced/revanced-patches/issues/2578)) ([862a7ec](https://github.com/revanced/revanced-patches/commit/862a7ec5b0767c28e79454a44218069d3e9cbac7))
* remove unnecessary notice ([7e9f0b2](https://github.com/revanced/revanced-patches/commit/7e9f0b2d02e910984f08777fefcd2ad7df6a21ee))
* **slideforreddit:** add `change-oauth-client-id` patch ([#2571](https://github.com/revanced/revanced-patches/issues/2571)) ([8cd60ee](https://github.com/revanced/revanced-patches/commit/8cd60eea36bd49514ed1c42bf362dce7e9675fca))
* **youtube:** support version `18.23.35` ([#2461](https://github.com/revanced/revanced-patches/issues/2461)) ([d20fde1](https://github.com/revanced/revanced-patches/commit/d20fde1e57077fe9a943f9782b415d7a0249b083))
# [2.182.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.4...v2.182.0-dev.5) (2023-07-08)
### Bug Fixes
* **youtube/hide-layout-components:** hide mix playlists ([33a87bd](https://github.com/revanced/revanced-patches/commit/33a87bd6eac1639687ebdf96ef8924cd674f81e4))
# [2.182.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.3...v2.182.0-dev.4) (2023-07-07)
### Features
* **youtube:** support version `18.23.35` ([#2461](https://github.com/revanced/revanced-patches/issues/2461)) ([d20fde1](https://github.com/revanced/revanced-patches/commit/d20fde1e57077fe9a943f9782b415d7a0249b083))
# [2.182.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.2...v2.182.0-dev.3) (2023-07-05)
### Features
* **pixiv:** add `hide-ads` patch ([#2578](https://github.com/revanced/revanced-patches/issues/2578)) ([862a7ec](https://github.com/revanced/revanced-patches/commit/862a7ec5b0767c28e79454a44218069d3e9cbac7))
# [2.182.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.182.0-dev.1...v2.182.0-dev.2) (2023-07-05)
### Features
* **slideforreddit:** add `change-oauth-client-id` patch ([#2571](https://github.com/revanced/revanced-patches/issues/2571)) ([8cd60ee](https://github.com/revanced/revanced-patches/commit/8cd60eea36bd49514ed1c42bf362dce7e9675fca))
# [2.182.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.181.0...v2.182.0-dev.1) (2023-07-05)
### Features
* remove unnecessary notice ([7e9f0b2](https://github.com/revanced/revanced-patches/commit/7e9f0b2d02e910984f08777fefcd2ad7df6a21ee))
# [2.181.0](https://github.com/revanced/revanced-patches/compare/v2.180.0...v2.181.0) (2023-07-03)
### Bug Fixes
* **infinityforreddit/change-oauth-client-id:** patch correct method ([#2564](https://github.com/revanced/revanced-patches/issues/2564)) ([f1ba16e](https://github.com/revanced/revanced-patches/commit/f1ba16ebfe2fda86af96d094481ed472eebcb4f9))
* **reddit/hide-comment-ads:** do not require integrations ([c2211d4](https://github.com/revanced/revanced-patches/commit/c2211d458d5cab030999e604a87cc1d02805b7ef))
* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#2575](https://github.com/revanced/revanced-patches/issues/2575)) ([737be98](https://github.com/revanced/revanced-patches/commit/737be9815bad985328bbbead4d32f9398241eef2))
* **trakt:** bump compatibility to newer version ([#2554](https://github.com/revanced/revanced-patches/issues/2554)) ([2a2897d](https://github.com/revanced/revanced-patches/commit/2a2897dc9e81799a3318875122fc7b49692e3764))
* **youtube-music/bypass-certificate-checks:** fix fingerprint for the latest target app ([#2567](https://github.com/revanced/revanced-patches/issues/2567)) ([8eacb5b](https://github.com/revanced/revanced-patches/commit/8eacb5b5ace816da4d98b990eff0ea208691660c))
* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#2556](https://github.com/revanced/revanced-patches/issues/2556)) ([b8df8fb](https://github.com/revanced/revanced-patches/commit/b8df8fb99707fdac32e272fee8469dfeb940504d))
### Features
* **baconreader/change-oauth-client-id:** add compatibility for premium package ([#2550](https://github.com/revanced/revanced-patches/issues/2550)) ([4d1b0b4](https://github.com/revanced/revanced-patches/commit/4d1b0b442768be4f7a12de63d8b973b2ca113f23))
# [2.181.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.6...v2.181.0-dev.7) (2023-07-03)
### Bug Fixes
* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#2575](https://github.com/revanced/revanced-patches/issues/2575)) ([737be98](https://github.com/revanced/revanced-patches/commit/737be9815bad985328bbbead4d32f9398241eef2))
# [2.181.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.5...v2.181.0-dev.6) (2023-07-02)
### Bug Fixes
* **reddit/hide-comment-ads:** do not require integrations ([c2211d4](https://github.com/revanced/revanced-patches/commit/c2211d458d5cab030999e604a87cc1d02805b7ef))
# [2.181.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.4...v2.181.0-dev.5) (2023-07-02)
### Bug Fixes
* **infinityforreddit/change-oauth-client-id:** patch correct method ([#2564](https://github.com/revanced/revanced-patches/issues/2564)) ([f1ba16e](https://github.com/revanced/revanced-patches/commit/f1ba16ebfe2fda86af96d094481ed472eebcb4f9))
# [2.181.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.3...v2.181.0-dev.4) (2023-07-02)
### Bug Fixes
* **youtube-music/bypass-certificate-checks:** fix fingerprint for the latest target app ([#2567](https://github.com/revanced/revanced-patches/issues/2567)) ([8eacb5b](https://github.com/revanced/revanced-patches/commit/8eacb5b5ace816da4d98b990eff0ea208691660c))
# [2.181.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.2...v2.181.0-dev.3) (2023-07-02)
### Bug Fixes
* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#2556](https://github.com/revanced/revanced-patches/issues/2556)) ([b8df8fb](https://github.com/revanced/revanced-patches/commit/b8df8fb99707fdac32e272fee8469dfeb940504d))
# [2.181.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.1...v2.181.0-dev.2) (2023-07-01)
### Bug Fixes
* **trakt:** bump compatibility to newer version ([#2554](https://github.com/revanced/revanced-patches/issues/2554)) ([2a2897d](https://github.com/revanced/revanced-patches/commit/2a2897dc9e81799a3318875122fc7b49692e3764))
# [2.181.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.180.0...v2.181.0-dev.1) (2023-07-01)
### Features
* **baconreader/change-oauth-client-id:** add compatibility for premium package ([#2550](https://github.com/revanced/revanced-patches/issues/2550)) ([4d1b0b4](https://github.com/revanced/revanced-patches/commit/4d1b0b442768be4f7a12de63d8b973b2ca113f23))
# [2.180.0](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0) (2023-07-01)
### Features
* use clearer descriptions for patches ([ff3ca30](https://github.com/revanced/revanced-patches/commit/ff3ca30e31f4d603b80d35e150f49d996acf9988))
# [2.180.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0-dev.1) (2023-07-01)

View File

@@ -1,122 +0,0 @@
## 🧩 ReVanced Patches
The official ReVanced Patches.
## 📋 List of patches in this repository
{{ table }}
> Looking for the JSON variant of this? [Click here](patches.json).
## 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file.
The file contains an array of objects, each object representing a patch. The object contains the following properties:
| key | description |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | The name of the patch. |
| `description` | The description of the patch. |
| `version` | The version of the patch. |
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
| `options` | An array of options for this patch. |
| `options.key` | The key of the option. |
| `options.title` | The title of the option. |
| `options.description` | The description of the option. |
| `options.required` | Whether the option is required. |
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
| `dependencies` | An array of dependencies, which are patch names. |
| `compatiblePackages` | An array of packages compatible with this patch. |
| `compatiblePackages.name` | The name of the package. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
Example:
```json
[
{
"name": "remember-video-quality",
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
"version": "0.0.1",
"excluded": false,
"options": [],
"dependencies": [
"integrations",
"video-id-hook"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": [
"17.22.36",
"17.24.35",
"17.26.35",
"17.27.39",
"17.28.34",
"17.29.34",
"17.32.35",
"17.33.42"
]
}
]
},
{
"name": "theme",
"description": "Enables a custom theme.",
"version": "0.0.1",
"excluded": false,
"options": [
{
"key": "theme",
"title": "Theme",
"description": "Select a theme.",
"required": true,
"choices": [
"Amoled"
]
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": []
}
]
},
{
"name": "custom-branding",
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
"version": "0.0.1",
"excluded": false,
"options": [
{
"key": "appName",
"title": "Application Name",
"description": "The name of the application it will show on your home screen.",
"required": true,
"choices": null
},
{
"key": "appIconPath",
"title": "Application Icon Path",
"description": "A path to the icon of the application.",
"required": false,
"choices": null
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": []
}
]
}
]
```

602
README.md
View File

@@ -1,603 +1,3 @@
## 🧩 ReVanced Patches
The official ReVanced Patches.
## 📋 List of patches in this repository
### [📦 `com.google.android.youtube`](https://play.google.com/store/apps/details?id=com.google.android.youtube)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `always-autorepeat` | Always repeats the playing video again. | 18.19.35 |
| `client-spoof` | Spoofs a patched client to allow playback. | 18.19.35 |
| `comments` | Hides components related to comments. | 18.19.35 |
| `copy-video-url` | Adds buttons in player to copy video links. | 18.19.35 |
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.19.35 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.19.35 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.19.35 |
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.19.35 |
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.19.35 |
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
| `enable-debugging` | Adds debugging options. | all |
| `external-downloads` | Adds support to download and save YouTube videos using an external app. | 18.19.35 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.19.35 |
| `hide-ads` | Removes general ads. | 18.19.35 |
| `hide-album-cards` | Hides the album cards below the artist description. | 18.19.35 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.19.35 |
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.19.35 |
| `hide-captions-button` | Hides the captions button on video player. | 18.19.35 |
| `hide-cast-button` | Hides the cast button in the video player. | all |
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.19.35 |
| `hide-email-address` | Hides the email address in the account switcher. | 18.19.35 |
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.19.35 |
| `hide-filter-bar` | Hides the filter bar in video feeds. | 18.19.35 |
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.19.35 |
| `hide-info-cards` | Hides info cards in videos. | 18.19.35 |
| `hide-layout-components` | Hides general layout components. | 18.19.35 |
| `hide-load-more-button` | Hides the button under videos that loads similar videos. | 18.19.35 |
| `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | 18.19.35 |
| `hide-player-overlay` | Hides the dark background overlay from the player when player controls are visible. | all |
| `hide-seekbar` | Hides the seekbar. | 18.19.35 |
| `hide-shorts-components` | Hides components from YouTube Shorts. | 18.19.35 |
| `hide-timestamp` | Hides timestamp in video player. | 18.19.35 |
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.19.35 |
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.19.35 |
| `hide-watermark` | Hides creator's watermarks on videos. | 18.19.35 |
| `minimized-playback` | Enables minimized and background playback. | 18.19.35 |
| `navigation-buttons` | Adds options to hide or change navigation buttons. | 18.19.35 |
| `old-quality-layout` | Enables the original video quality flyout in the video player settings. | 18.19.35 |
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.19.35 |
| `premium-heading` | Shows premium branding on the home screen. | all |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.19.35 |
| `remove-player-controls-background` | Removes the background from the video player controls. | 18.19.35 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.19.35 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.19.35 |
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.19.35 |
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.19.35 |
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.19.35 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.19.35 |
| `theme` | Applies a custom theme. | all |
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.19.35 |
| `video-ads` | Removes ads in the video player. | 18.19.35 |
| `video-speed` | Adds custom video speeds and ability to remember the playback speed you chose in the video playback speed flyout. | 18.19.35 |
| `wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.19.35 |
</details>
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `background-play` | Enables playing music in the background. | all |
| `bypass-certificate-checks` | Bypasses certificate checks which prevent YouTube Music from working on Android Auto. | all |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | all |
| `compact-header` | Hides the music category bar at the top of the homepage. | all |
| `exclusive-audio-playback` | Enables the option to play music without video. | all |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | all |
| `minimized-playback-music` | Enables minimized playback on Kids music. | all |
| `music-video-ads` | Removes ads in the music player. | all |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | all |
| `vanced-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | all |
</details>
### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-login-requirement` | Do not force login. | all |
| `downloads` | Removes download restrictions and changes the default path to download to. | all |
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
| `fix-google-login` | Allows logging in with a Google account. | all |
| `hide-ads` | Removes ads from TikTok. | all |
| `playback-speed` | Enables the playback speed option for all videos. | all |
| `settings` | Adds ReVanced settings to TikTok. | all |
| `show-seekbar` | Shows progress bar for all video. | all |
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
</details>
### [📦 `com.zhiliaoapp.musically`](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-login-requirement` | Do not force login. | all |
| `downloads` | Removes download restrictions and changes the default path to download to. | all |
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
| `fix-google-login` | Allows logging in with a Google account. | all |
| `hide-ads` | Removes ads from TikTok. | all |
| `playback-speed` | Enables the playback speed option for all videos. | all |
| `settings` | Adds ReVanced settings to TikTok. | all |
| `show-seekbar` | Shows progress bar for all video. | all |
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
</details>
### [📦 `tv.twitch.android.app`](https://play.google.com/store/apps/details?id=tv.twitch.android.app)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `auto-claim-channel-points` | Automatically claim Channel Points. | 15.4.1 |
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 15.4.1 |
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 15.4.1 |
| `block-video-ads` | Blocks video ads in streams and VODs. | 15.4.1 |
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
| `settings` | Adds settings menu to Twitch. | all |
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | 15.4.1 |
</details>
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-screenshot-popup` | Disables the popup that shows up when taking a screenshot. | all |
| `hide-ads` | Removes ads from the Reddit. | all |
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
| `sanitize-sharing-links` | Removes (tracking) query parameters from the URLs when sharing links. | all |
</details>
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
| `hide-ads` | Hides ads. | all |
| `hide-recommended-users` | Hides recommended users. | all |
| `hide-views-stats` | Hides the view stats under tweets. | 9.71.0-release.0 |
</details>
### [📦 `com.facebook.orca`](https://play.google.com/store/apps/details?id=com.facebook.orca)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-switching-emoji-to-sticker-in-message-input-field` | Disables switching from emoji to sticker search mode in message input field | all |
| `disable-typing-indicator` | Disables the indicator while typing a message | all |
| `hide-inbox-ads` | Hides ads in inbox. | all |
</details>
### [📦 `com.laurencedawson.reddit_sync`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://redditsync/auth". | all |
| `disable-ads` | Disables ads. | all |
</details>
### [📦 `com.spotify.music`](https://play.google.com/store/apps/details?id=com.spotify.music)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-premium-navbar` | Removes the premium tab from the navbar. | all |
| `spotify-theme` | Applies a custom theme. | all |
</details>
### [📦 `com.sony.songpal.mdr`](https://play.google.com/store/apps/details?id=com.sony.songpal.mdr)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-badge-tab` | Removes the badge tab from the activity tab. | all |
| `remove-notification-badge` | Removes the red notification badge from the activity tab. | all |
</details>
### [📦 `at.gv.bmf.bmf2go`](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-bootloader-detection` | Removes the check for an unlocked bootloader. | all |
| `remove-root-detection` | Removes the check for root permissions. | all |
</details>
### [📦 `at.gv.oe.app`](https://play.google.com/store/apps/details?id=at.gv.oe.app)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-root-detection` | Removes the check for root permissions and unlocked bootloader. | all |
| `spoof-signature` | Spoofs the signature of the app. | all |
</details>
### [📦 `ml.docilealligator.infinityforreddit`](https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "infinity://localhost". | all |
</details>
### [📦 `free.reddit.news`](https://play.google.com/store/apps/details?id=free.reddit.news)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "dbrady://relay". | all |
</details>
### [📦 `reddit.news`](https://play.google.com/store/apps/details?id=reddit.news)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "dbrady://relay". | all |
</details>
### [📦 `com.rubenmayayo.reddit`](https://play.google.com/store/apps/details?id=com.rubenmayayo.reddit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://rubenmayayo.com". | all |
</details>
### [📦 `com.andrewshu.android.reddit`](https://play.google.com/store/apps/details?id=com.andrewshu.android.reddit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "redditisfun://auth". | all |
</details>
### [📦 `com.andrewshu.android.redditdonation`](https://play.google.com/store/apps/details?id=com.andrewshu.android.redditdonation)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "redditisfun://auth". | all |
</details>
### [📦 `com.laurencedawson.reddit_sync.pro`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync.pro)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://redditsync/auth". | all |
</details>
### [📦 `com.laurencedawson.reddit_sync.dev`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync.dev)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://redditsync/auth". | all |
</details>
### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-ads` | Disables ads in HexEditor. | all |
</details>
### [📦 `com.spotify.lite`](https://play.google.com/store/apps/details?id=com.spotify.lite)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `enable-on-demand` | Enables listening to songs on-demand, allowing to play any song from playlists, albums or artists without limitations. This does not remove ads. | all |
</details>
### [📦 `com.nis.app`](https://play.google.com/store/apps/details?id=com.nis.app)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-ads` | Removes ads from Inshorts. | all |
</details>
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-ads` | Removes general ads. | all |
</details>
### [📦 `com.instagram.android`](https://play.google.com/store/apps/details?id=com.instagram.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-timeline-ads` | Removes ads from the timeline. | 275.0.0.27.98 |
</details>
### [📦 `com.backdrops.wallpapers`](https://play.google.com/store/apps/details?id=com.backdrops.wallpapers)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `pro-unlock` | Unlocks pro-only functions. | 4.52 |
</details>
### [📦 `de.dwd.warnapp`](https://play.google.com/store/apps/details?id=de.dwd.warnapp)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
</details>
### [📦 `net.binarymode.android.irplus`](https://play.google.com/store/apps/details?id=net.binarymode.android.irplus)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-ads` | Removes all ads from the app. | all |
</details>
### [📦 `eu.faircode.netguard`](https://play.google.com/store/apps/details?id=eu.faircode.netguard)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-broadcasts-restriction` | Enables starting/stopping NetGuard via broadcasts. | all |
</details>
### [📦 `com.scb.phone`](https://play.google.com/store/apps/details?id=com.scb.phone)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-debugging-detection` | Removes the USB and wireless debugging checks. | all |
</details>
### [📦 `com.google.android.apps.recorder`](https://play.google.com/store/apps/details?id=com.google.android.apps.recorder)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-device-restrictions` | Removes restrictions from using the app on any device. | all |
</details>
### [📦 `com.dci.dev.androidtwelvewidgets`](https://play.google.com/store/apps/details?id=com.dci.dev.androidtwelvewidgets)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-paid-widgets` | Unlocks paid widgets of the app | all |
</details>
### [📦 `com.microblink.photomath`](https://play.google.com/store/apps/details?id=com.microblink.photomath)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-plus` | Unlocks plus features. | 8.20.0 |
</details>
### [📦 `io.yuka.android`](https://play.google.com/store/apps/details?id=io.yuka.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-premium` | Unlocks premium features. | all |
</details>
### [📦 `com.teslacoilsw.launcher`](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
</details>
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
</details>
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | 4.6377 |
</details>
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.vsco.cam`](https://play.google.com/store/apps/details?id=com.vsco.cam)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details>
### [📦 `com.wakdev.apps.nfctools.se`](https://play.google.com/store/apps/details?id=com.wakdev.apps.nfctools.se)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details>
### [📦 `com.candylink.openvpn`](https://play.google.com/store/apps/details?id=com.candylink.openvpn)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks premium features. | all |
</details>
### [📦 `tv.trakt.trakt`](https://play.google.com/store/apps/details?id=tv.trakt.trakt)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details>
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-themes` | Unlocks all themes that are inaccessible until a certain level is reached. | all |
</details>
### [📦 `net.dinglisch.android.taskerm`](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-trial` | Unlocks the trial version. | all |
</details>
> Looking for the JSON variant of this? [Click here](patches.json).
## 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file.
The file contains an array of objects, each object representing a patch. The object contains the following properties:
| key | description |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | The name of the patch. |
| `description` | The description of the patch. |
| `version` | The version of the patch. |
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
| `options` | An array of options for this patch. |
| `options.key` | The key of the option. |
| `options.title` | The title of the option. |
| `options.description` | The description of the option. |
| `options.required` | Whether the option is required. |
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
| `dependencies` | An array of dependencies, which are patch names. |
| `compatiblePackages` | An array of packages compatible with this patch. |
| `compatiblePackages.name` | The name of the package. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
Example:
```json
[
{
"name": "remember-video-quality",
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
"version": "0.0.1",
"excluded": false,
"options": [],
"dependencies": [
"integrations",
"video-id-hook"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": [
"17.22.36",
"17.24.35",
"17.26.35",
"17.27.39",
"17.28.34",
"17.29.34",
"17.32.35",
"17.33.42"
]
}
]
},
{
"name": "theme",
"description": "Enables a custom theme.",
"version": "0.0.1",
"excluded": false,
"options": [
{
"key": "theme",
"title": "Theme",
"description": "Select a theme.",
"required": true,
"choices": [
"Amoled"
]
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": []
}
]
},
{
"name": "custom-branding",
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
"version": "0.0.1",
"excluded": false,
"options": [
{
"key": "appName",
"title": "Application Name",
"description": "The name of the application it will show on your home screen.",
"required": true,
"choices": null
},
{
"key": "appIconPath",
"title": "Application Icon Path",
"description": "A path to the icon of the application.",
"required": false,
"choices": null
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": []
}
]
}
]
```
Patches for ReVanced.

View File

@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.8.10"
kotlin("jvm") version "1.8.20"
}
group = "app.revanced"

View File

@@ -1,2 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.180.0-dev.1
version = 2.182.1-dev.1

Binary file not shown.

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

5
gradlew vendored
View File

@@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.

File diff suppressed because one or more lines are too long

View File

@@ -19,7 +19,7 @@ internal interface PatchesFileGenerator {
).loadPatches().also {
if (it.isEmpty()) throw IllegalStateException("No patches found")
}.let { bundle ->
arrayOf(JsonGenerator(), ReadmeGenerator()).forEach { it.generate(bundle) }
arrayOf(JsonGenerator()).forEach { it.generate(bundle) }
}
}
}

View File

@@ -1,69 +0,0 @@
package app.revanced.meta
import app.revanced.patcher.data.Context
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.patch.Patch
import com.unascribed.flexver.FlexVerComparator
import java.io.File
internal class ReadmeGenerator : PatchesFileGenerator {
private companion object {
private const val TABLE_HEADER =
"| \uD83D\uDC8A Patch | \uD83D\uDCDC Description | \uD83C\uDFF9 Target Version |\n" +
"|:--------:|:--------------:|:-----------------:|"
}
override fun generate(bundle: PatchBundlePatches) {
val output = StringBuilder()
mutableMapOf<String, MutableList<Class<out Patch<Context>>>>()
.apply {
for (patch in bundle) {
patch.compatiblePackages?.forEach { pkg ->
if (!contains(pkg.name)) put(pkg.name, mutableListOf())
this[pkg.name]!!.add(patch)
}
}
}
.entries
.sortedByDescending { it.value.size }
.forEach { (`package`, patches) ->
val mostCommonVersion = buildMap {
patches.forEach { patch ->
patch.compatiblePackages?.single { compatiblePackage -> compatiblePackage.name == `package` }?.versions?.let {
it.forEach { version -> merge(version, 1, Integer::sum) }
}
}
}.let { commonMap ->
commonMap.maxByOrNull { it.value }?.value?.let {
commonMap.entries.filter { mostCommon -> mostCommon.value == it }
.maxOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key)
} ?: "all"
}
output.apply {
appendLine("### [\uD83D\uDCE6 `${`package`}`](https://play.google.com/store/apps/details?id=${`package`})")
appendLine("<details>\n")
appendLine(TABLE_HEADER)
patches.forEach { patch ->
val recommendedPatchVersion = if (
patch.compatiblePackages?.single { it.name == `package` }?.versions?.isNotEmpty() == true
) mostCommonVersion else "all"
appendLine(
"| `${patch.patchName}` " +
"| ${patch.description} " +
"| $recommendedPatchVersion |"
)
}
appendLine("</details>\n")
}
}
StringBuilder(File("README-template.md").readText())
.replace(Regex("\\{\\{\\s?table\\s?}}"), output.toString())
.let(File("README.md")::writeText)
}
}

View File

@@ -1,9 +1,12 @@
package app.revanced.patches.music.misc.androidauto.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object CheckCertificateFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "Z",
parameters = listOf("Ljava/lang/String;"),
strings = listOf("X509", "Failed to get public key.", "Failed to get certificate.")
strings = listOf("X509", "Failed to get certificate.")
)

View File

@@ -5,8 +5,7 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -23,15 +22,13 @@ class BypassCertificateChecksPatch : BytecodePatch(
listOf(CheckCertificateFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
CheckCertificateFingerprint.result?.let { result ->
val noMatchIndex = result.scanResult.stringsScanResult!!.matches.first().index
result.mutableMethod.apply {
val isPartnerIndex = noMatchIndex + 2
replaceInstruction(isPartnerIndex, "const/4 p1, 0x1")
addInstruction(isPartnerIndex + 1, "return p1")
}
CheckCertificateFingerprint.result?.apply {
mutableMethod.addInstructions(
0, """
const/4 v0, 0x1
return v0
"""
)
} ?: return CheckCertificateFingerprint.toErrorResult()
return PatchResultSuccess()

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.pixiv.ads.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object IsNotPremiumFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L"),
strings = listOf("pixivAccountManager"),
customFingerprint = custom@{ _, classDef ->
// The "isNotPremium" method is the only method in the class.
if (classDef.virtualMethods.count() != 1) return@custom false
classDef.virtualMethods.first().let { isNotPremiumMethod ->
isNotPremiumMethod.parameterTypes.size == 0 && isNotPremiumMethod.returnType == "Z"
}
}
)

View File

@@ -0,0 +1,33 @@
package app.revanced.patches.pixiv.ads.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.*
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.pixiv.ads.fingerprints.IsNotPremiumFingerprint
@Patch
@Name("hide-ads")
@Description("Hides ads.")
@Compatibility([Package("jp.pxv.android")])
@Version("0.0.1")
class HideAdsPatch : BytecodePatch(listOf(IsNotPremiumFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
// Always return false in the "isNotPremium" method which normally returns !this.accountManager.isPremium.
// However, this is not the method that controls the user's premium status.
// Instead, this method is used to determine whether ads should be shown.
IsNotPremiumFingerprint.result?.mutableClass?.virtualMethods?.first()?.addInstructions(
0,
"""
const/4 v0, 0x0
return v0
"""
) ?: return IsNotPremiumFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -8,12 +8,10 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFingerprint
@Name("hide-comment-ads")
@Description("Removes all comment ads.")
@RequiresIntegrations
@Version("0.0.1")
class HideCommentAdsPatch : BytecodePatch(
listOf(HideCommentAdsFingerprint)

View File

@@ -20,7 +20,12 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Changes the OAuth client ID. " +
"The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://baconreader.com/auth\".")
@Compatibility([Package("com.onelouder.baconreader")])
@Compatibility(
[
Package("com.onelouder.baconreader"),
Package("com.onelouder.baconreader.premium")
]
)
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
"http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint)
) {

View File

@@ -1,6 +1,6 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
object GetHTTPBasicAuthHeaderFingerprint : AbstractClientIdFingerprint(
object GetHttpBasicAuthHeaderFingerprint : AbstractClientIdFingerprint(
"APIUtils;",
"getHTTPBasicAuthHeader"
"getHttpBasicAuthHeader"
)

View File

@@ -11,7 +11,7 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHTTPBasicAuthHeaderFingerprint
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@@ -23,7 +23,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
"infinity://localhost",
Options,
listOf(GetHTTPBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
forEach {

View File

@@ -0,0 +1,11 @@
package app.revanced.patches.reddit.customclients.slide.api.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object GetClientIdFingerprint : MethodFingerprint(
customFingerprint = custom@{ methodDef, classDef ->
if (!classDef.type.endsWith("Credentials;")) return@custom false
methodDef.name == "getClientId"
}
)

View File

@@ -0,0 +1,36 @@
package app.revanced.patches.reddit.customclients.slide.api.patch
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
@ChangeOAuthClientIdPatchAnnotation
@Description("Changes the OAuth client ID. " +
"The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://www.ccrama.me\".")
@Compatibility([Package("me.ccrama.redditslide")])
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
"http://www.ccrama.me", Options, listOf(GetClientIdFingerprint)
) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult {
first().mutableMethod.addInstructions(
0,
"""
const-string v0, "$clientId"
return-object v0
"""
)
return PatchResultSuccess()
}
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
}

View File

@@ -1,22 +0,0 @@
package app.revanced.patches.reddit.misc.tracking.url.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object ShareLinkFactoryFingerprint : MethodFingerprint(
returnType = "L",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
opcodes = listOf(
Opcode.CONST_STRING,
Opcode.CONST_STRING,
Opcode.INVOKE_DIRECT,
Opcode.APUT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC, // Returns the URL.
Opcode.MOVE_RESULT_OBJECT
),
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("ShareLinkFactory;") }
)

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.reddit.misc.tracking.url.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object ShareLinkFormatterFingerprint : MethodFingerprint(
returnType = "Ljava/lang/String;",
parameters = listOf("Ljava/lang/String;", "Ljava/util/Map;"),
strings = listOf("uri.getQueryParameters(name)", "uri.queryParameterNames", "newUriBuilder.build().toString()"),
)

View File

@@ -6,47 +6,29 @@ import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patches.reddit.misc.tracking.url.annotations.SanitizeUrlQueryCompatibility
import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFactoryFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFormatterFingerprint
@Patch
@Name("sanitize-sharing-links")
@Description("Removes (tracking) query parameters from the URLs when sharing links.")
@SanitizeUrlQueryCompatibility
@Version("0.0.1")
@RequiresIntegrations
class SanitizeUrlQueryPatch : BytecodePatch(
listOf(ShareLinkFactoryFingerprint)
listOf(ShareLinkFormatterFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
ShareLinkFactoryFingerprint.result?.let { result ->
result.mutableMethod.apply {
val insertIndex = result.scanResult.patternScanResult!!.endIndex + 1
val urlRegister = getInstruction<OneRegisterInstruction>(insertIndex - 1).registerA
addInstructions(
insertIndex,
"""
invoke-static {v$urlRegister}, $SANITIZE_METHOD_DESCRIPTOR
move-result-object v$urlRegister
"""
)
}
} ?: return ShareLinkFactoryFingerprint.toErrorResult()
ShareLinkFormatterFingerprint.result?.mutableMethod?.addInstructions(
0,
"return-object p0"
) ?: return ShareLinkFormatterFingerprint.toErrorResult()
return PatchResultSuccess()
}
private companion object {
private const val SANITIZE_METHOD_DESCRIPTOR =
"Lapp/revanced/reddit/patches/SanitizeUrlQueryPatch;" +
"->stripQueryParameters(Ljava/lang/String;)Ljava/lang/String;"
}
}

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsVIPEPFingerprint : MethodFingerprint(
customFingerprint = custom@{ methodDef, _ ->
if (!methodDef.definingClass.endsWith("RealmUserSettings;")) return@custom false
if (!methodDef.definingClass.endsWith("RemoteUser;")) return@custom false
methodDef.name == "isVIPEP"
}

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsVIPFingerprint : MethodFingerprint(
customFingerprint = custom@{ methodDef, _ ->
if (!methodDef.definingClass.endsWith("RealmUserSettings;")) return@custom false
if (!methodDef.definingClass.endsWith("RemoteUser;")) return@custom false
methodDef.name == "isVIP"
}

View File

@@ -2,8 +2,8 @@ package app.revanced.patches.trakt.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object RealmUserSettingsFingerprint : MethodFingerprint(
object RemoteUserFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("RealmUserSettings;")
methodDef.definingClass.endsWith("RemoteUser;")
}
)

View File

@@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.trakt.annotations.UnlockProCompatibility
import app.revanced.patches.trakt.fingerprints.IsVIPEPFingerprint
import app.revanced.patches.trakt.fingerprints.IsVIPFingerprint
import app.revanced.patches.trakt.fingerprints.RealmUserSettingsFingerprint
import app.revanced.patches.trakt.fingerprints.RemoteUserFingerprint
@Patch
@Name("unlock-pro")
@@ -22,20 +22,20 @@ import app.revanced.patches.trakt.fingerprints.RealmUserSettingsFingerprint
@UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch(
listOf(RealmUserSettingsFingerprint)
listOf(RemoteUserFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
RealmUserSettingsFingerprint.result?.classDef?.let { realUserSettingsClass ->
RemoteUserFingerprint.result?.classDef?.let { remoteUserClass ->
arrayOf(IsVIPFingerprint, IsVIPEPFingerprint).onEach { fingerprint ->
// Resolve both fingerprints on the same class.
if (!fingerprint.resolve(context, realUserSettingsClass))
if (!fingerprint.resolve(context, remoteUserClass))
throw fingerprint.toErrorResult()
}.forEach { fingerprint ->
// Return true for both VIP check methods.
fingerprint.result?.mutableMethod?.addInstructions(0, RETURN_TRUE_INSTRUCTIONS)
?: return fingerprint.toErrorResult()
}
} ?: return RealmUserSettingsFingerprint.toErrorResult()
} ?: return RemoteUserFingerprint.toErrorResult()
return PatchResultSuccess()
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.ad.general.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideAdsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.ad.getpremium.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideGetPremiumCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.ad.video.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class VideoAdsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.interaction.copyvideourl.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class CopyVideoUrlCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.downloads.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class ExternalDownloadsCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.seekbar.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class SeekbarTappingCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.interaction.swipecontrols.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class SwipeControlsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.autocaptions.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AutoCaptionsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.action.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideButtonsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.autoplay.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AutoplayButtonCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.captions.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideCaptionsButtonCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class NavigationButtonsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.player.hide.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HidePlayerButtonsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.albumcards.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AlbumCardsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class BreakingNewsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.comments.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideCommentsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class CrowdfundingBoxCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideEndscreenCardsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.filterbar.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideFilterBar

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideFloatingMicrophoneButtonCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.hide.general.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideLayoutComponentsCompatibility

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.youtube.layout.hide.general.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
object ConvertElementToFlatBufferFingerprint : MethodFingerprint(
strings = listOf("Failed to convert Element to Flatbuffers: %s"),
opcodes = listOf(Opcode.IGET_OBJECT) // Patched at this opcodes index
)

View File

@@ -1,18 +1,24 @@
package app.revanced.patches.youtube.layout.hide.general.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
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.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.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.shared.settings.preference.impl.TextPreference
import app.revanced.patches.youtube.layout.hide.general.annotations.HideLayoutComponentsCompatibility
import app.revanced.patches.youtube.layout.hide.general.fingerprints.ConvertElementToFlatBufferFingerprint
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen
@@ -23,8 +29,10 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.P
@DependsOn([LithoFilterPatch::class, SettingsPatch::class])
@HideLayoutComponentsCompatibility
@Version("0.0.1")
class HideLayoutComponentsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
class HideLayoutComponentsPatch : BytecodePatch(
listOf(ConvertElementToFlatBufferFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_gray_separator",
@@ -237,6 +245,35 @@ class HideLayoutComponentsPatch : ResourcePatch {
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
// region Mix playlists
ConvertElementToFlatBufferFingerprint.result?.let {
val returnEmptyComponentIndex = it.scanResult.stringsScanResult!!.matches.first().index + 2
it.mutableMethod.apply {
// The last virtual register (not parameter). Used to store the byte array
// that may contain information about a mix playlist.
val freeRegister = (implementation!!.registerCount - 1) - parameterTypes.size - 1
// Check if the byte array contains anything about a mix playlist.
addInstructionsWithLabels(
it.scanResult.patternScanResult!!.startIndex,
"""
invoke-static {v$freeRegister}, $FILTER_CLASS_DESCRIPTOR->filterMixPlaylists([B)Z
move-result v$freeRegister
if-nez v$freeRegister, :return_empty_component
""",
ExternalLabel("return_empty_component", getInstruction(returnEmptyComponentIndex))
)
// Move the byte array to a free register.
addInstruction(0, "move-object/from16 v$freeRegister, p3")
}
} ?: return ConvertElementToFlatBufferFingerprint.toErrorResult()
// endregion
return PatchResultSuccess()
}

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.infocards.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideInfocardsCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideLoadMoreButtonCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideEmailAddressCompatibility

View File

@@ -1,12 +1,13 @@
package app.revanced.patches.youtube.layout.hide.player.overlay.bytecode.fingerprints
import app.revanced.extensions.containsConstantInstructionValue
import app.revanced.patcher.extensions.or
import app.revanced.util.patch.LiteralValueFingerprint
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.hide.player.overlay.resource.patch.HidePlayerOverlayResourcePatch
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object CreatePlayerOverviewFingerprint : LiteralValueFingerprint(
object CreatePlayerOverviewFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
opcodes = listOf(
@@ -15,5 +16,8 @@ object CreatePlayerOverviewFingerprint : LiteralValueFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST
),
literal = HidePlayerOverlayResourcePatch.scrimOverlayId
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
&& methodDef.containsConstantInstructionValue(HidePlayerOverlayResourcePatch.scrimOverlayId)
}
)

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.seekbar.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideSeekbarCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.shorts.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideShortsComponentsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.time.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideTimeCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.watchinvr.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class WatchInVRCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.watermark.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideWatermarkCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.panels.fullscreen.remove.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class FullscreenPanelsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.panels.popup.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class PlayerPopupPanelsCompatibility

View File

@@ -2,6 +2,6 @@ package app.revanced.patches.youtube.layout.player.background.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class PlayerControlsBackgroundCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class ReturnYouTubeDislikeCompatibility

View File

@@ -21,14 +21,11 @@ object TextComponentAtomicReferenceFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.MOVE_OBJECT, // CharSequence reference, and control flow label. Insert code here.
Opcode.INVOKE_VIRTUAL,
null, // invoke-interface or invoke-virtual
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.INVOKE_VIRTUAL,
null, // invoke-interface or invoke-virtual
Opcode.MOVE_RESULT_OBJECT,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL_RANGE,
Opcode.MOVE_RESULT_OBJECT,
)
)

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
/**
* Resolves against the same method that [TextComponentContextFingerprint] resolves to.
* Resolves against the same class that [TextComponentConstructorFingerprint] resolves to.
*/
object TextComponentContextFingerprint : MethodFingerprint(
returnType = "L",

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.searchbar.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class WideSearchbarCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.sponsorblock.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class SponsorBlockCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.spoofappversion.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class SpoofAppVersionCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.startupshortsreset.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class StartupShortsResetCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class TabletMiniPlayerCompatibility

View File

@@ -7,7 +7,7 @@ import org.jf.dexlib2.Opcode
object MiniPlayerOverrideFingerprint : MethodFingerprint(
"Z", AccessFlags.STATIC or AccessFlags.PUBLIC,
listOf("L"),
listOf("Landroid/content/Context;"),
opcodes = listOf(
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,

View File

@@ -3,5 +3,5 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object MiniPlayerOverrideParentFingerprint : MethodFingerprint(
strings = listOf("Possible Context wrapper loop - chain of wrappers larger than 10000")
strings = listOf("Unset or unknown Input OneOf case for dynamic input")
)

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.autorepeat.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AutoRepeatCompatibility

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patches.youtube.video.videoqualitymenu.patch.OldVideoQualityMenuResourcePatch
import app.revanced.util.patch.LiteralValueFingerprint
import org.jf.dexlib2.AccessFlags
object CreateBottomSheetFingerprint : LiteralValueFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("L"),
returnType = "Landroid/widget/LinearLayout;",
literal = OldVideoQualityMenuResourcePatch.bottomSheetMargins
)

View File

@@ -0,0 +1,43 @@
package app.revanced.patches.youtube.misc.bottomsheet.hook.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints.CreateBottomSheetFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@DependsOn([IntegrationsPatch::class])
class BottomSheetHookPatch : BytecodePatch(
listOf(CreateBottomSheetFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
CreateBottomSheetFingerprint.result?.let {
it.mutableMethod.apply {
val returnLinearLayoutIndex = implementation!!.instructions.lastIndex
val linearLayoutRegister = getInstruction<OneRegisterInstruction>(returnLinearLayoutIndex).registerA
addHook = { classDescriptor ->
addInstruction(
returnLinearLayoutIndex,
"invoke-static { v$linearLayoutRegister }, " +
"${classDescriptor}->" +
"onFlyoutMenuCreate(Landroid/widget/LinearLayout;)V"
)
}
}
} ?: return CreateBottomSheetFingerprint.toErrorResult()
return PatchResultSuccess()
}
internal companion object {
internal lateinit var addHook: (String) -> Unit
private set
}
}

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class FixBackToExitGestureCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.fix.playback.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class ClientSpoofCompatibility

View File

@@ -1,17 +0,0 @@
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
// Resolves to the method CronetDataSource.open
// https://androidx.tech/artifacts/media3/media3-datasource-cronet/1.0.0-alpha03-source/androidx/media3/datasource/cronet/CronetDataSource.java.html
object OpenCronetDataSourceFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.MOVE_RESULT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
),
strings = listOf(
"err_cleartext_not_permitted",
),
)

View File

@@ -7,7 +7,6 @@ import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -15,12 +14,10 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.OpenCronetDataSourceFingerprint
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("spoof-signature-verification")
@Description("Spoofs a patched client to prevent playback issues.")
@@ -33,7 +30,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
class SpoofSignatureVerificationPatch : BytecodePatch(
listOf(
ProtobufParameterBuilderFingerprint,
OpenCronetDataSourceFingerprint,
)
) {
override fun execute(context: BytecodeContext): PatchResult {
@@ -72,23 +68,6 @@ class SpoofSignatureVerificationPatch : BytecodePatch(
}
} ?: return ProtobufParameterBuilderFingerprint.toErrorResult()
// hook video playback result
OpenCronetDataSourceFingerprint.result?.let {
it.mutableMethod.apply {
val getHeadersInstructionIndex = it.scanResult.patternScanResult!!.endIndex
val responseCodeRegister =
(getInstruction(getHeadersInstructionIndex - 2) as OneRegisterInstruction).registerA
addInstructions(
getHeadersInstructionIndex + 1,
"""
invoke-static {v$responseCodeRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onResponse(I)V
"""
)
}
} ?: return OpenCronetDataSourceFingerprint.toErrorResult()
return PatchResultSuccess()
}

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.integrations.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class IntegrationsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.links.open.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class OpenLinksExternallyCompatibility

View File

@@ -1,25 +0,0 @@
package app.revanced.patches.youtube.misc.litho.filter.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
object ProtobufBufferFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.IGET_OBJECT, // References the field required below.
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
Opcode.IF_NEZ,
Opcode.CONST_4,
Opcode.GOTO,
Opcode.CHECK_CAST, // Casts the referenced field to a specific type that stores the protobuf buffer.
Opcode.INVOKE_VIRTUAL
)
)

View File

@@ -0,0 +1,18 @@
package app.revanced.patches.youtube.misc.litho.filter.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object ProtobufBufferReferenceFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("I", "Ljava/nio/ByteBuffer;"),
opcodes = listOf(
Opcode.IPUT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.SUB_INT_2ADDR
)
)

View File

@@ -4,50 +4,110 @@ import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.litho.filter.fingerprints.*
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
import org.jf.dexlib2.iface.instruction.Instruction
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.immutable.ImmutableField
import java.io.Closeable
@DependsOn([IntegrationsPatch::class])
@Description("Hooks the method which parses the bytes into a ComponentContext to filter components.")
@Version("0.0.1")
class LithoFilterPatch : BytecodePatch(
listOf(ComponentContextParserFingerprint, LithoFilterFingerprint)
listOf(ComponentContextParserFingerprint, LithoFilterFingerprint, ProtobufBufferReferenceFingerprint)
), Closeable {
/**
* The following patch inserts a hook into the method that parses the bytes into a ComponentContext.
* This method contains a StringBuilder object that represents the pathBuilder of the component.
* The pathBuilder is used to filter components by their path.
*
* Additionally, the method contains a reference to the components identifier.
* The identifier is used to filter components by their identifier.
*
* In addition to that, a static field is added to the class of this method. (See protobufBufferField).
* This field holds a reference to the protobuf buffer object.
* The field is being set in another method that holds a reference to the protobuf buffer object.
* The object contains a large byte array that represents the component tree.
* This byte array is searched for strings that indicate the current component.
*
* The following pseudo code shows how the patch works:
*
* class ComponentContextParser {
* public static ByteBuffer buffer; // Inserted by this patch.
*
* public ComponentContext parseBytesToComponentContext(...) {
* ...
* if (filter(identifier, pathBuilder, buffer)); // Inserted by this patch.
* return emptyComponent;
* ...
* }
* }
*
* class SomeOtherClass {
* // Called before ComponentContextParser.parseBytesToComponentContext method.
* public void someOtherMethod(ByteBuffer byteBuffer) {
* ComponentContextParser.buffer = byteBuffer; // Inserted by this patch.
* ...
* }
* }
*/
override fun execute(context: BytecodeContext): PatchResult {
ComponentContextParserFingerprint.result?.also {
arrayOf(
EmptyComponentBuilderFingerprint,
ReadComponentIdentifierFingerprint,
ProtobufBufferFingerprint
ReadComponentIdentifierFingerprint
).forEach { fingerprint ->
if (fingerprint.resolve(context, it.mutableMethod, it.mutableClass)) return@forEach
return fingerprint.toErrorResult()
}
}?.let { result ->
}?.let { bytesToComponentContextMethod ->
// region Add a static field that holds a reference to the protobuf buffer object.
val protobufBufferField = ImmutableField(
bytesToComponentContextMethod.mutableClass.type,
"buffer",
"Ljava/nio/ByteBuffer;",
AccessFlags.PUBLIC or AccessFlags.STATIC,
null,
null,
null
).toMutable()
bytesToComponentContextMethod.mutableClass.staticFields.add(protobufBufferField)
// Set the field with the reference to the protobuf buffer object.
ProtobufBufferReferenceFingerprint.result
?.mutableMethod?.addInstruction(0, "sput-object p2, $protobufBufferField")
?: return ProtobufBufferReferenceFingerprint.toErrorResult()
// endregion
// region Hook the method that parses bytes into a ComponentContext.
val builderMethodIndex = EmptyComponentBuilderFingerprint.patternScanEndIndex
val emptyComponentFieldIndex = builderMethodIndex + 2
result.mutableMethod.apply {
val insertHookIndex = result.scanResult.patternScanResult!!.endIndex
bytesToComponentContextMethod.mutableMethod.apply {
val insertHookIndex = bytesToComponentContextMethod.scanResult.patternScanResult!!.endIndex
// region Get free registers that this patch uses
// region Get free registers that this patch uses.
// Registers are overwritten right after they are used in this patch, therefore free to clobber.
val freeRegistersInstruction = getInstruction<FiveRegisterInstruction>(insertHookIndex - 2)
@@ -64,7 +124,7 @@ class LithoFilterPatch : BytecodePatch(
// endregion
// region Get references that this patch needs
// region Get references that this patch needs.
val builderMethodDescriptor = getInstruction(builderMethodIndex).descriptor
val emptyComponentFieldDescriptor = getInstruction(emptyComponentFieldIndex).descriptor
@@ -72,34 +132,18 @@ class LithoFilterPatch : BytecodePatch(
val identifierRegister =
getInstruction<OneRegisterInstruction>(ReadComponentIdentifierFingerprint.patternScanEndIndex).registerA
// Parameter that holds a ref to a type with a field that ref the protobuf buffer object.
val protobufParameterNumber = 3
// Get the field that stores an protobuf buffer required below.
val protobufBufferRefTypeRefFieldDescriptor =
getInstruction(ProtobufBufferFingerprint.patternScanStartIndex).descriptor
val protobufBufferRefTypeDescriptor =
getInstruction(ProtobufBufferFingerprint.patternScanEndIndex - 1).descriptor
val protobufBufferFieldDescriptor = "$protobufBufferRefTypeDescriptor->b:Ljava/nio/ByteBuffer;"
// endregion
// region Patch the method
// region Patch the method.
// Insert the instructions that are responsible
// to return an EmptyComponent instead of the original component if the filter method returns false.
addInstructionsWithLabels(
insertHookIndex,
"""
# Get the protobuf buffer object.
move-object/from16 v$free1, p$protobufParameterNumber
iget-object v$free1, v$free1, $protobufBufferRefTypeRefFieldDescriptor
check-cast v$free1, $protobufBufferRefTypeDescriptor
# Register "free" now holds the protobuf buffer object
# Register "free1" holds the protobuf buffer object
iget-object v$free1, v$free1, $protobufBufferFieldDescriptor
sget-object v$free1, $protobufBufferField
# Invoke the filter method.
@@ -119,6 +163,8 @@ class LithoFilterPatch : BytecodePatch(
)
// endregion
}
// endregion
} ?: return ComponentContextParserFingerprint.toErrorResult()
LithoFilterFingerprint.result?.mutableMethod?.apply {
@@ -150,9 +196,6 @@ class LithoFilterPatch : BytecodePatch(
private val MethodFingerprint.patternScanEndIndex
get() = patternScanResult.endIndex
private val MethodFingerprint.patternScanStartIndex
get() = patternScanResult.startIndex
private val Instruction.descriptor
get() = (this as ReferenceInstruction).reference.toString()

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.microg.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class MicroGPatchCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.minimizedplayback.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class MinimizedPlaybackCompatibility

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object MinimizedPlaybackSettingsFingerprint : MethodFingerprint(
returnType = "L",
returnType = "Ljava/lang/String;",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf(),
opcodes = listOf(

View File

@@ -8,7 +8,8 @@ import org.jf.dexlib2.AccessFlags
* Class fingerprint for [MinimizedPlaybackSettingsFingerprint]
*/
object MinimizedPlaybackSettingsParentFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
parameters = listOf("Landroid/content/Context;", "Landroid/support/v4/media/session/MediaSessionCompat"),
strings = listOf("sessionToken must not be null")
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
returnType = "I",
parameters = listOf(),
strings = listOf("BiometricManager", "Failure in canAuthenticate(). FingerprintManager was null.")
)

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.playercontrols.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class PlayerControlsCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.playeroverlay.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class PlayerOverlaysHookCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.playertype.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class PlayerTypeHookCompatibility

View File

@@ -1,9 +0,0 @@
package app.revanced.patches.youtube.misc.videobuffer.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
// TODO: delete this
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class CustomVideoBufferCompatibility

View File

@@ -1,36 +0,0 @@
package app.revanced.patches.youtube.misc.videobuffer.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.settings.preference.impl.*
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.videobuffer.annotations.CustomVideoBufferCompatibility
// TODO: delete this patch
@Patch(include = false)
@Name("custom-video-buffer")
@Description("Lets you change the buffers of videos.")
@DependsOn([SettingsPatch::class])
@CustomVideoBufferCompatibility
@Version("0.0.1")
class CustomVideoBufferPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.MISC.addPreferences(
NonInteractivePreference(
StringResource("revanced_custom_video_buffer_disclaimer_title", "Custom video buffer"),
StringResource("revanced_custom_video_buffer_disclaimer_title_summary",
"These settings have been removed, because they were not functional for the duration of their existence"),
)
)
return PatchResultSuccess()
}
}

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.hdrbrightness.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HDRBrightnessCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.information.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class VideoInformationCompatibility

View File

@@ -1,44 +0,0 @@
package app.revanced.patches.youtube.video.oldqualitylayout.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.video.oldqualitylayout.annotations.OldQualityLayoutCompatibility
import app.revanced.patches.youtube.video.oldqualitylayout.fingerprints.QualityMenuViewInflateFingerprint
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch
@DependsOn([IntegrationsPatch::class, OldQualityLayoutResourcePatch::class])
@Name("old-quality-layout")
@Description("Enables the original video quality flyout in the video player settings.")
@OldQualityLayoutCompatibility
@Version("0.0.1")
class OldQualityLayoutPatch : BytecodePatch(listOf(QualityMenuViewInflateFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
val inflateFingerprintResult = QualityMenuViewInflateFingerprint.result!!
val method = inflateFingerprintResult.mutableMethod
val instructions = method.implementation!!.instructions
// at this index the listener is added to the list view
val listenerInvokeRegister = instructions.size - 1 - 1
// get the register which stores the quality menu list view
val onItemClickViewRegister = (instructions[listenerInvokeRegister] as FiveRegisterInstruction).registerC
// insert the integrations method
method.addInstruction(
listenerInvokeRegister, // insert the integrations instructions right before the listener
"invoke-static { v$onItemClickViewRegister }, Lapp/revanced/integrations/patches/playback/quality/OldQualityLayoutPatch;->showOldQualityMenu(Landroid/widget/ListView;)V"
)
return PatchResultSuccess()
}
}

View File

@@ -1,36 +0,0 @@
package app.revanced.patches.youtube.video.oldqualitylayout.patch
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
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.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
class OldQualityLayoutResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
SwitchPreference(
"revanced_show_old_video_menu",
StringResource("revanced_show_old_video_menu_title", "Use old video quality player menu"),
StringResource("revanced_show_old_video_menu_summary_on", "Old video quality menu is used"),
StringResource("revanced_show_old_video_menu_summary_off", "Old video quality menu is not used")
)
)
videoQualityBottomSheetListFragmentTitle =
ResourceMappingPatch.resourceMappings.find { it.name == "video_quality_bottom_sheet_list_fragment_title" }
?.id ?: return PatchResultError("Could not find resource")
return PatchResultSuccess()
}
internal companion object {
var videoQualityBottomSheetListFragmentTitle = -1L
}
}

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.quality.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class RememberVideoQualityCompatibility

Some files were not shown because too many files have changed in this diff Show More