mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 21:51:04 +00:00
Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b792be5b78 | ||
|
|
025b480175 | ||
|
|
e1b53b214f | ||
|
|
30939e5efe | ||
|
|
4d9c41488d | ||
|
|
2fffcde357 | ||
|
|
7af08e0ba7 | ||
|
|
228834fda8 | ||
|
|
7466aecc5b | ||
|
|
8ee36541b4 | ||
|
|
a4fd6603fe | ||
|
|
510cb8f590 | ||
|
|
c02ebd752c | ||
|
|
b4d7eca5fa | ||
|
|
c6125c071b | ||
|
|
478de297f9 | ||
|
|
ebc4a12cd7 | ||
|
|
b3c0291e70 | ||
|
|
c43588ee40 | ||
|
|
c74b5d4e47 | ||
|
|
91ae954210 | ||
|
|
65172cad4f | ||
|
|
c2122494bc | ||
|
|
6ed94935ca | ||
|
|
a934821fa7 | ||
|
|
f3785c4e47 | ||
|
|
67e0db5ac9 | ||
|
|
aaa820430b | ||
|
|
cf5ed1baea | ||
|
|
206341cec4 | ||
|
|
e8f4890edd | ||
|
|
9463f11dbf | ||
|
|
2b3e153b60 | ||
|
|
4b6bf69366 | ||
|
|
38e8e7898b | ||
|
|
3175e864af | ||
|
|
d320dd4e58 | ||
|
|
f5ae96defb | ||
|
|
bfe3876cea | ||
|
|
3ad2c42a53 | ||
|
|
0d22fc2d2f | ||
|
|
6e6dbd0c1a | ||
|
|
4272fade4f | ||
|
|
2095e34db8 | ||
|
|
1483a9d8bb | ||
|
|
ea113f01a3 | ||
|
|
d4658c7056 | ||
|
|
a615717580 | ||
|
|
04db353154 | ||
|
|
7cb0312a9d | ||
|
|
5357ff2e48 | ||
|
|
62083ead98 | ||
|
|
6f04169117 | ||
|
|
cc1b283cb7 | ||
|
|
4597a74e32 | ||
|
|
3734545ca6 | ||
|
|
60ef90c745 | ||
|
|
ece4ac1a9e | ||
|
|
d6e17f948d | ||
|
|
9ab3bd0313 | ||
|
|
0f10888aa3 | ||
|
|
63c0e5dc84 | ||
|
|
41bc0222b9 | ||
|
|
71e4cc964b | ||
|
|
afc9886ebd | ||
|
|
de06d96ea0 | ||
|
|
1139f77cb9 | ||
|
|
5a801b1562 | ||
|
|
7f301090b9 | ||
|
|
28a687c605 | ||
|
|
9b74a08ae1 |
173
CHANGELOG.md
173
CHANGELOG.md
@@ -1,3 +1,176 @@
|
|||||||
|
# [2.120.0](https://github.com/revanced/revanced-patches/compare/v2.119.0...v2.120.0) (2022-11-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** `remove-player-button-background` patch ([#855](https://github.com/revanced/revanced-patches/issues/855)) ([9e14817](https://github.com/revanced/revanced-patches/commit/9e14817fd2ef29b9f3ec161d74ab972ba19066b0))
|
||||||
|
|
||||||
|
# [2.119.0](https://github.com/revanced/revanced-patches/compare/v2.118.1...v2.119.0) (2022-11-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **twitch:** ˋintegrationsˋ dependency patch ([#1074](https://github.com/revanced/revanced-patches/issues/1074)) ([a84ca7e](https://github.com/revanced/revanced-patches/commit/a84ca7ec04389c3665358a7d239c615214fd327d))
|
||||||
|
|
||||||
|
## [2.118.1](https://github.com/revanced/revanced-patches/compare/v2.118.0...v2.118.1) (2022-11-22)
|
||||||
|
|
||||||
|
# [2.118.0](https://github.com/revanced/revanced-patches/compare/v2.117.1...v2.118.0) (2022-11-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** bump patches compatibility to v17.45.36 ([ab7dfd8](https://github.com/revanced/revanced-patches/commit/ab7dfd8ee1d902095811ed91b80aa0ed362ee9c5))
|
||||||
|
|
||||||
|
## [2.117.1](https://github.com/revanced/revanced-patches/compare/v2.117.0...v2.117.1) (2022-11-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/general-ads:** hide reels shelf ([a436663](https://github.com/revanced/revanced-patches/commit/a436663e7755fc714c735df626d39bbd94f83dbb))
|
||||||
|
|
||||||
|
# [2.117.0](https://github.com/revanced/revanced-patches/compare/v2.116.0...v2.117.0) (2022-11-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **tiktok:** `tiktok-web-login` patch ([#593](https://github.com/revanced/revanced-patches/issues/593)) ([233e578](https://github.com/revanced/revanced-patches/commit/233e578b4d1cd5e783369e0c855e8246d158f8ed))
|
||||||
|
|
||||||
|
# [2.116.0](https://github.com/revanced/revanced-patches/compare/v2.115.0...v2.116.0) (2022-11-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/theme:** make amoled the default color for dark theme background" ([2b68ac7](https://github.com/revanced/revanced-patches/commit/2b68ac7796e54ed07c697909a84b3847f4ed7f01))
|
||||||
|
|
||||||
|
# [2.115.0](https://github.com/revanced/revanced-patches/compare/v2.114.2...v2.115.0) (2022-11-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/general-ads:** normalize switch names ([7636180](https://github.com/revanced/revanced-patches/commit/763618002ab6ccd9cd23889275c0e9b23642763e))
|
||||||
|
* **youtube/theme:** exclude the patch by default ([57358ed](https://github.com/revanced/revanced-patches/commit/57358edc4cf3ae6b05cfb51359f66fc94c71cb5c))
|
||||||
|
* **youtube/theme:** make dark the default color for dark theme background ([db44fa6](https://github.com/revanced/revanced-patches/commit/db44fa6f5adad19384970dad58784b2bf5fe1007))
|
||||||
|
|
||||||
|
## [2.114.2](https://github.com/revanced/revanced-patches/compare/v2.114.1...v2.114.2) (2022-11-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/general-ads:** hide bytecode home ad view ([4976ad4](https://github.com/revanced/revanced-patches/commit/4976ad44b1867c93e976d91075b5bcead8d69c90))
|
||||||
|
* **youtube/general-ads:** remove unused switch ([43cddcc](https://github.com/revanced/revanced-patches/commit/43cddcc85830524cd88d87ae1178f11451f158d8))
|
||||||
|
|
||||||
|
## [2.114.1](https://github.com/revanced/revanced-patches/compare/v2.114.0...v2.114.1) (2022-11-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **tiktok/settings:** make compatible with newer versions ([#1057](https://github.com/revanced/revanced-patches/issues/1057)) ([e1d5d64](https://github.com/revanced/revanced-patches/commit/e1d5d6492ed660f43c87c796a59e766ea6b8ead0))
|
||||||
|
|
||||||
|
# [2.114.0](https://github.com/revanced/revanced-patches/compare/v2.113.0...v2.114.0) (2022-11-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** `disable-zoom-haptics` patch ([#1079](https://github.com/revanced/revanced-patches/issues/1079)) ([a7cfba5](https://github.com/revanced/revanced-patches/commit/a7cfba54fbb3ee0ee5511a45d0b3c4620eb0c861))
|
||||||
|
|
||||||
|
# [2.113.0](https://github.com/revanced/revanced-patches/compare/v2.112.0...v2.113.0) (2022-11-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/general-ads:** hide ads with buttons ([97fd3fd](https://github.com/revanced/revanced-patches/commit/97fd3fda79ff4bb2fadd0e6c4aa80b96d71f46da))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/general-ads:** custom component filter ([b5e81d0](https://github.com/revanced/revanced-patches/commit/b5e81d0eaff3ab67a59ccd45eac6bf9414ed1380))
|
||||||
|
* **youtube/general-ads:** hide gray separators ([59693f0](https://github.com/revanced/revanced-patches/commit/59693f007192c195258cea3a222d7fb94b6385c2))
|
||||||
|
|
||||||
|
# [2.112.0](https://github.com/revanced/revanced-patches/compare/v2.111.3...v2.112.0) (2022-11-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **anytracker:** `unlock-premium` patch ([#1076](https://github.com/revanced/revanced-patches/issues/1076)) ([52b3d90](https://github.com/revanced/revanced-patches/commit/52b3d909bbe59dafaea0cb9da1c27bdd0cda502f))
|
||||||
|
|
||||||
|
## [2.111.3](https://github.com/revanced/revanced-patches/compare/v2.111.2...v2.111.3) (2022-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/litho-filter:** use correct type for switch case ([#1068](https://github.com/revanced/revanced-patches/issues/1068)) ([ab03511](https://github.com/revanced/revanced-patches/commit/ab03511e23d07c7c40b58eae5791fb2a798289de))
|
||||||
|
|
||||||
|
## [2.111.2](https://github.com/revanced/revanced-patches/compare/v2.111.1...v2.111.2) (2022-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/general-ads:** import correct compatibility annotation ([#1065](https://github.com/revanced/revanced-patches/issues/1065)) ([db2085c](https://github.com/revanced/revanced-patches/commit/db2085c217311a8b7d45a01c03c6162bc60a9298))
|
||||||
|
|
||||||
|
## [2.111.1](https://github.com/revanced/revanced-patches/compare/v2.111.0...v2.111.1) (2022-11-18)
|
||||||
|
|
||||||
|
# [2.111.0](https://github.com/revanced/revanced-patches/compare/v2.110.0...v2.111.0) (2022-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **iconpackstudio:** `unlock-pro` patch ([#1047](https://github.com/revanced/revanced-patches/issues/1047)) ([fcbca9c](https://github.com/revanced/revanced-patches/commit/fcbca9cf0ff3940c48df53a9e5e4d06d65f9a1b1))
|
||||||
|
|
||||||
|
# [2.110.0](https://github.com/revanced/revanced-patches/compare/v2.109.0...v2.110.0) (2022-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/debugging:** include by default & add option to debug on Android ([9d6d5b2](https://github.com/revanced/revanced-patches/commit/9d6d5b29227980aacb4c1331161afb3fa265bbe4))
|
||||||
|
* **youtube/debugging:** use more suitable preference title ([d182351](https://github.com/revanced/revanced-patches/commit/d182351e789bcbfb7982774406449e8d973765b2))
|
||||||
|
* **youtube/general-ads:** hide chapter teaser under videos ([9cf415a](https://github.com/revanced/revanced-patches/commit/9cf415a894ab5458134ef1cd5a4c5bf7579e592c))
|
||||||
|
* **youtube/general-ads:** hide self sponsored cards ([b627d75](https://github.com/revanced/revanced-patches/commit/b627d751b49c228e52f7f9fb5d2bcacb9d243a64))
|
||||||
|
* **youtube/general-ads:** hide shorts in search ([c01ba5c](https://github.com/revanced/revanced-patches/commit/c01ba5cbcc694f8c9ee83a4e9eb081cf5b45753c))
|
||||||
|
|
||||||
|
# [2.109.0](https://github.com/revanced/revanced-patches/compare/v2.108.0...v2.109.0) (2022-11-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **twitch:** `block-audio-ads` patch ([#1041](https://github.com/revanced/revanced-patches/issues/1041)) ([3419bae](https://github.com/revanced/revanced-patches/commit/3419baed489ce231f84b3e2d600cf123cdfa7ff7))
|
||||||
|
* **twitch:** `block-video-ads` patch ([#1040](https://github.com/revanced/revanced-patches/issues/1040)) ([b47bf24](https://github.com/revanced/revanced-patches/commit/b47bf24d1b52cfa1883a942894a6216ae81b8325))
|
||||||
|
|
||||||
|
# [2.108.0](https://github.com/revanced/revanced-patches/compare/v2.107.0...v2.108.0) (2022-11-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **twitch:** `debug-mode` patch ([#1031](https://github.com/revanced/revanced-patches/issues/1031)) ([c514860](https://github.com/revanced/revanced-patches/commit/c514860bc4a46295b11f09df9ffc1c556b798eb3))
|
||||||
|
|
||||||
|
# [2.107.0](https://github.com/revanced/revanced-patches/compare/v2.106.1...v2.107.0) (2022-11-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **ticktick:** `unlock-themes` patch ([#1028](https://github.com/revanced/revanced-patches/issues/1028)) ([7f1fedc](https://github.com/revanced/revanced-patches/commit/7f1fedcddd4330a5f884b813a20f2f8e84e2c9da))
|
||||||
|
* **twitch/show-deleted-messages:** `show-deleted-messages` patch ([#1030](https://github.com/revanced/revanced-patches/issues/1030)) ([7e6b453](https://github.com/revanced/revanced-patches/commit/7e6b4534013a03ddc7eb11a1f911fa0564372118))
|
||||||
|
|
||||||
|
## [2.106.1](https://github.com/revanced/revanced-patches/compare/v2.106.0...v2.106.1) (2022-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/custom-branding:** use high resolution icons ([#1018](https://github.com/revanced/revanced-patches/issues/1018)) ([1c9d1ac](https://github.com/revanced/revanced-patches/commit/1c9d1acf2b7aff4cd52d17009ff01246f74d2214))
|
||||||
|
|
||||||
|
# [2.106.0](https://github.com/revanced/revanced-patches/compare/v2.105.0...v2.106.0) (2022-11-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** `open-links-directly` patch ([#999](https://github.com/revanced/revanced-patches/issues/999)) ([bf85f62](https://github.com/revanced/revanced-patches/commit/bf85f62f30242f91bdaf53b44ae6a9a2b3b6e1b4))
|
||||||
|
|
||||||
|
# [2.105.0](https://github.com/revanced/revanced-patches/compare/v2.104.2...v2.105.0) (2022-11-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **nyx:** `unlock-pro` patch ([#1004](https://github.com/revanced/revanced-patches/issues/1004)) ([9dd8239](https://github.com/revanced/revanced-patches/commit/9dd82391f3f97247224e09e0143b2272a3d47053))
|
||||||
|
|
||||||
## [2.104.2](https://github.com/revanced/revanced-patches/compare/v2.104.1...v2.104.2) (2022-11-08)
|
## [2.104.2](https://github.com/revanced/revanced-patches/compare/v2.104.1...v2.104.2) (2022-11-08)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ The file contains an array of objects, each object representing a patch. The obj
|
|||||||
| `description` | The description of the patch. |
|
| `description` | The description of the patch. |
|
||||||
| `version` | The version 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. |
|
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
|
||||||
| `deprecated` | Whether the patch is deprecated. |
|
|
||||||
| `options` | An array of options for this patch. |
|
| `options` | An array of options for this patch. |
|
||||||
| `options.key` | The key of the option. |
|
| `options.key` | The key of the option. |
|
||||||
| `options.title` | The title of the option. |
|
| `options.title` | The title of the option. |
|
||||||
@@ -39,7 +38,6 @@ Example:
|
|||||||
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"excluded": false,
|
"excluded": false,
|
||||||
"deprecated": false,
|
|
||||||
"options": [],
|
"options": [],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"integrations",
|
"integrations",
|
||||||
|
|||||||
124
README.md
124
README.md
@@ -4,6 +4,14 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
> Looking for the JSON variant of this? [Click here](patches.json).
|
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||||
|
|
||||||
|
### 📦 `ginlemon.iconpackstudio`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
### 📦 `com.ss.android.ugc.trill`
|
### 📦 `com.ss.android.ugc.trill`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
@@ -13,8 +21,9 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
|
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
|
||||||
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
||||||
| `tiktok-settings` | Add settings menu to TikTok. | all |
|
| `tiktok-settings` | Adds settings for ReVanced to TikTok. | all |
|
||||||
| `tiktok-force-login` | Do not force login. | all |
|
| `tiktok-force-login` | Do not force login. | all |
|
||||||
|
| `tiktok-web-login` | Allows logging in with a Google account. | all |
|
||||||
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -27,8 +36,9 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
|
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
|
||||||
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
||||||
| `tiktok-settings` | Add settings menu to TikTok. | all |
|
| `tiktok-settings` | Adds settings for ReVanced to TikTok. | all |
|
||||||
| `tiktok-force-login` | Do not force login. | all |
|
| `tiktok-force-login` | Do not force login. | all |
|
||||||
|
| `tiktok-web-login` | Allows logging in with a Google account. | all |
|
||||||
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -73,50 +83,53 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.43.36 |
|
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.45.36 |
|
||||||
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.43.36 |
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.45.36 |
|
||||||
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.43.36 |
|
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.45.36 |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.43.36 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.43.36 |
|
||||||
| `hide-captions-button` | Hides the captions button on video player. | 17.43.36 |
|
| `hide-captions-button` | Hides the captions button on video player. | 17.45.36 |
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.43.36 |
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.43.36 |
|
||||||
| `hide-create-button` | Hides the create button in the navigation bar. | 17.43.36 |
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.43.36 |
|
||||||
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.43.36 |
|
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.45.36 |
|
||||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.43.36 |
|
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.45.36 |
|
||||||
|
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.45.36 |
|
||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.43.36 |
|
| `sponsorblock` | Integrate SponsorBlock. | 17.45.36 |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.43.36 |
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.45.36 |
|
||||||
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.43.36 |
|
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.45.36 |
|
||||||
| `hide-album-cards` | Hides the album cards below the artist description. | 17.43.36 |
|
| `hide-album-cards` | Hides the album cards below the artist description. | 17.45.36 |
|
||||||
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.43.36 |
|
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.45.36 |
|
||||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.43.36 |
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.45.36 |
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.43.36 |
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.45.36 |
|
||||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.43.36 |
|
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.45.36 |
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.43.36 |
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.45.36 |
|
||||||
| `comments` | Hides components related to comments. | 17.43.36 |
|
| `comments` | Hides components related to comments. | 17.45.36 |
|
||||||
| `theme` | Applies a custom theme. | all |
|
| `theme` | Applies a custom theme. | all |
|
||||||
| `hide-email-address` | Hides the email address in the account switcher. | 17.43.36 |
|
| `hide-email-address` | Hides the email address in the account switcher. | 17.45.36 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.43.36 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.45.36 |
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.43.36 |
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.45.36 |
|
||||||
| `hide-info-cards` | Hides info-cards in videos. | 17.43.36 |
|
| `hide-info-cards` | Hides info-cards in videos. | 17.45.36 |
|
||||||
| `hide-my-mix` | Hides mix playlists. | 17.43.36 |
|
| `hide-my-mix` | Hides mix playlists. | 17.45.36 |
|
||||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.43.36 |
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.45.36 |
|
||||||
| `general-ads` | Removes general ads. | 17.43.36 |
|
| `general-ads` | Removes general ads. | 17.45.36 |
|
||||||
| `video-ads` | Removes ads in the video player. | 17.43.36 |
|
| `video-ads` | Removes ads in the video player. | 17.45.36 |
|
||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.43.36 |
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.45.36 |
|
||||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.43.36 |
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.45.36 |
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.43.36 |
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.45.36 |
|
||||||
|
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.43.36 |
|
| `open-links-directly` | Bypasses redirect links and allows opening links directly. | 17.45.36 |
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.43.36 |
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.45.36 |
|
||||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.45.36 |
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.43.36 |
|
|
||||||
| `debugging` | Adds debugging options. | all |
|
| `debugging` | Adds debugging options. | all |
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.43.36 |
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
| `custom-video-speed` | Adds more video speed options. | 17.43.36 |
|
| `always-autorepeat` | Always repeats the playing video again. | 17.45.36 |
|
||||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.43.36 |
|
| `minimized-playback` | Enables minimized and background playback. | 17.45.36 |
|
||||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.43.36 |
|
| `custom-video-speed` | Adds more video speed options. | 17.45.36 |
|
||||||
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.45.36 |
|
||||||
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.45.36 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.vanced.android.youtube`
|
### 📦 `com.vanced.android.youtube`
|
||||||
@@ -127,6 +140,33 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.ticktick.task`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-themes` | Unlocks all themes. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.shervinkoushan.anyTracker`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-premium` | Unlocks all premium features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `tv.twitch.android.app`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
|
||||||
|
| `block-audio-ads` | Blocks audio ads in streams and VODs. | all |
|
||||||
|
| `block-video-ads` | Blocks video ads in streams and VODs. | all |
|
||||||
|
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
### 📦 `com.garzotto.pflotsh.ecmwf_a`
|
### 📦 `com.garzotto.pflotsh.ecmwf_a`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
@@ -161,6 +201,14 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
|
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.awedea.nyx`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 📝 JSON Format
|
## 📝 JSON Format
|
||||||
@@ -175,7 +223,6 @@ The file contains an array of objects, each object representing a patch. The obj
|
|||||||
| `description` | The description of the patch. |
|
| `description` | The description of the patch. |
|
||||||
| `version` | The version 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. |
|
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
|
||||||
| `deprecated` | Whether the patch is deprecated. |
|
|
||||||
| `options` | An array of options for this patch. |
|
| `options` | An array of options for this patch. |
|
||||||
| `options.key` | The key of the option. |
|
| `options.key` | The key of the option. |
|
||||||
| `options.title` | The title of the option. |
|
| `options.title` | The title of the option. |
|
||||||
@@ -196,7 +243,6 @@ Example:
|
|||||||
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"excluded": false,
|
"excluded": false,
|
||||||
"deprecated": false,
|
|
||||||
"options": [],
|
"options": [],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"integrations",
|
"integrations",
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:6.0.0")
|
implementation("app.revanced:revanced-patcher:6.1.0")
|
||||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
// Required for meta
|
// Required for meta
|
||||||
implementation("com.google.code.gson:gson:2.9.1")
|
implementation("com.google.code.gson:gson:2.10")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.104.2
|
version = 2.120.0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -18,17 +18,6 @@ import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
|
|||||||
import org.w3c.dom.Node
|
import org.w3c.dom.Node
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
// TODO: this method does not make sense here
|
|
||||||
internal fun MutableMethodImplementation.injectHideCall(
|
|
||||||
index: Int,
|
|
||||||
register: Int
|
|
||||||
) {
|
|
||||||
this.addInstruction(
|
|
||||||
index,
|
|
||||||
"invoke-static { v$register }, Lapp/revanced/integrations/patches/HideHomeAdsPatch;->HideHomeAds(Landroid/view/View;)V".toInstruction()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* traverse the class hierarchy starting from the given root class
|
* traverse the class hierarchy starting from the given root class
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package app.revanced.meta.json
|
|||||||
import app.revanced.meta.Bundle
|
import app.revanced.meta.Bundle
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.deprecated
|
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.include
|
import app.revanced.patcher.extensions.PatchExtensions.include
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.options
|
import app.revanced.patcher.extensions.PatchExtensions.options
|
||||||
@@ -22,7 +21,6 @@ fun generateJson(bundle: Bundle) {
|
|||||||
it.description ?: "This patch has no description.",
|
it.description ?: "This patch has no description.",
|
||||||
it.version ?: "0.0.0",
|
it.version ?: "0.0.0",
|
||||||
!it.include,
|
!it.include,
|
||||||
it.deprecated != null,
|
|
||||||
it.options?.map { option ->
|
it.options?.map { option ->
|
||||||
Option(
|
Option(
|
||||||
option.key,
|
option.key,
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ data class JsonPatch(
|
|||||||
val description: String,
|
val description: String,
|
||||||
val version: String,
|
val version: String,
|
||||||
val excluded: Boolean,
|
val excluded: Boolean,
|
||||||
val deprecated: Boolean,
|
|
||||||
val options: Array<Option>,
|
val options: Array<Option>,
|
||||||
val dependencies: Array<String>,
|
val dependencies: Array<String>,
|
||||||
val compatiblePackages: Array<CompatiblePackage>,
|
val compatiblePackages: Array<CompatiblePackage>,
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.hexeditor.ad.fingerprints
|
package app.revanced.patches.hexeditor.ad.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility
|
|
||||||
|
|
||||||
@Name("ads-fingerprint-primary")
|
|
||||||
@HexEditorAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PrimaryAdsFingerprint : MethodFingerprint(
|
object PrimaryAdsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("ginlemon.iconpackstudio")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
customFingerprint = { it.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||||
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.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.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
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.iconpackstudio.misc.pro.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks all pro features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
CheckProFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,18 +1,11 @@
|
|||||||
package app.revanced.patches.music.ad.video.fingerprints
|
package app.revanced.patches.music.ad.video.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("show-video-ads-constructor-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@MusicVideoAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
|
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
package app.revanced.patches.music.ad.video.fingerprints
|
package app.revanced.patches.music.ad.video.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("show-video-ads-method-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
|
||||||
@MusicVideoAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
||||||
Opcode.IPUT_BOOLEAN,
|
Opcode.IPUT_BOOLEAN,
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
package app.revanced.patches.music.audio.codecs.fingerprints
|
package app.revanced.patches.music.audio.codecs.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("all-codecs-reference-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@CodecsUnlockCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object AllCodecsReferenceFingerprint : MethodFingerprint(
|
object AllCodecsReferenceFingerprint : MethodFingerprint(
|
||||||
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
|
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
|
||||||
Opcode.INVOKE_STATIC,
|
Opcode.INVOKE_STATIC,
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
package app.revanced.patches.music.audio.codecs.fingerprints
|
package app.revanced.patches.music.audio.codecs.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("codec-lock-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@CodecsUnlockCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CodecsLockFingerprint : MethodFingerprint(
|
object CodecsLockFingerprint : MethodFingerprint(
|
||||||
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("audio-only-enabler-fingerprint")
|
|
||||||
|
|
||||||
@ExclusiveAudioCompatibility
|
|
||||||
@Version(
|
|
||||||
"0.0.1"
|
|
||||||
)
|
|
||||||
object AudioOnlyEnablerFingerprint: MethodFingerprint(
|
object AudioOnlyEnablerFingerprint: MethodFingerprint(
|
||||||
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("exclusive-audio-fingerprints")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@ExclusiveAudioCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ExclusiveAudioFingerprint : MethodFingerprint(
|
object ExclusiveAudioFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.compactheader.fingerprints
|
package app.revanced.patches.music.layout.compactheader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("compact-header-constructor-fingerprint")
|
|
||||||
@CompactHeaderCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CompactHeaderConstructorFingerprint : MethodFingerprint(
|
object CompactHeaderConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("minimized-playback-manager-fingerprint")
|
|
||||||
@MinimizedPlaybackCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.premium.fingerprints
|
package app.revanced.patches.music.layout.premium.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("hide-get-premium-fingerprint")
|
|
||||||
@HideGetPremiumCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object HideGetPremiumFingerprint : MethodFingerprint(
|
object HideGetPremiumFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
Opcode.IF_NEZ,
|
Opcode.IF_NEZ,
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.premium.fingerprints
|
package app.revanced.patches.music.layout.premium.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("hide-get-premium-parent-fingerprint")
|
|
||||||
@HideGetPremiumCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
Opcode.IGET_BOOLEAN,
|
Opcode.IGET_BOOLEAN,
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
package app.revanced.patches.music.layout.tastebuilder.fingerprints
|
package app.revanced.patches.music.layout.tastebuilder.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("taste-builder-constructor-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@RemoveTasteBuilderCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object TasteBuilderConstructorFingerprint : MethodFingerprint(
|
object TasteBuilderConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
package app.revanced.patches.music.layout.upgradebutton.fingerprints
|
package app.revanced.patches.music.layout.upgradebutton.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("pivot-bar-constructor-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@RemoveUpgradeButtonCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PivotBarConstructorFingerprint : MethodFingerprint(
|
object PivotBarConstructorFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("cast-context-fetch-fingerprint")
|
|
||||||
|
|
||||||
@MicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CastContextFetchFingerprint : MethodFingerprint(
|
object CastContextFetchFingerprint : MethodFingerprint(
|
||||||
strings = listOf("Error fetching CastContext.")
|
strings = listOf("Error fetching CastContext.")
|
||||||
)
|
)
|
||||||
@@ -1,15 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("cast-module-fingerprint")
|
|
||||||
|
|
||||||
@MicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CastDynamiteModuleFingerprint : MethodFingerprint(
|
object CastDynamiteModuleFingerprint : MethodFingerprint(
|
||||||
strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
|
strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
|
||||||
)
|
)
|
||||||
@@ -1,15 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("cast-context-fetch-fingerprint")
|
|
||||||
|
|
||||||
@MicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
|
object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
|
||||||
strings = listOf("Failed to load module via V2: ")
|
strings = listOf("Failed to load module via V2: ")
|
||||||
)
|
)
|
||||||
@@ -1,17 +1,9 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("google-play-utility-fingerprint")
|
|
||||||
|
|
||||||
@MusicMicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("google-play-prime-fingerprint")
|
|
||||||
|
|
||||||
@MusicMicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PrimeFingerprint : MethodFingerprint(
|
object PrimeFingerprint : MethodFingerprint(
|
||||||
strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
|
strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
|
||||||
)
|
)
|
||||||
@@ -1,17 +1,12 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("google-play-service-checker-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@MusicMicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ServiceCheckFingerprint : MethodFingerprint(
|
object ServiceCheckFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
package app.revanced.patches.music.premium.backgroundplay.fingerprints
|
package app.revanced.patches.music.premium.backgroundplay.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("background-playback-disabler-fingerprint")
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@BackgroundPlayCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object BackgroundPlaybackDisableFingerprint : MethodFingerprint(
|
object BackgroundPlaybackDisableFingerprint : MethodFingerprint(
|
||||||
"Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf(
|
"Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf(
|
||||||
Opcode.CONST_4,
|
Opcode.CONST_4,
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.nyx.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.awedea.nyx")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.nyx.misc.pro.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.nyx.misc.pro.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.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
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.nyx.misc.pro.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks all pro features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
CheckProFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.reddit.layout.premiumicon.fingerprints
|
package app.revanced.patches.reddit.layout.premiumicon.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility
|
|
||||||
|
|
||||||
@Name("premium-icon-fingerprint")
|
|
||||||
@PremiumIconCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PremiumIconFingerprint : MethodFingerprint(
|
object PremiumIconFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.misc.mapping.patch
|
package app.revanced.patches.shared.mapping.patch
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
@@ -16,7 +16,7 @@ import java.util.concurrent.TimeUnit
|
|||||||
@Name("resource-mapping")
|
@Name("resource-mapping")
|
||||||
@Description("Creates a map of public resources.")
|
@Description("Creates a map of public resources.")
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class ResourceMappingResourcePatch : ResourcePatch {
|
class ResourceMappingPatch : ResourcePatch {
|
||||||
companion object {
|
companion object {
|
||||||
internal lateinit var resourceMappings: List<ResourceElement>
|
internal lateinit var resourceMappings: List<ResourceElement>
|
||||||
private set
|
private set
|
||||||
@@ -1,15 +1,8 @@
|
|||||||
package app.revanced.patches.spotify.audio.fingerprints
|
package app.revanced.patches.spotify.audio.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.spotify.audio.annotation.DisableCaptureRestrictionCompatibility
|
|
||||||
|
|
||||||
@Name("disable-capture-restriction-audio-driver-fingerprint")
|
|
||||||
|
|
||||||
@DisableCaptureRestrictionCompatibility
|
|
||||||
@Version("0.0.2")
|
|
||||||
object DisableCaptureRestrictionAudioDriverFingerprint : MethodFingerprint(
|
object DisableCaptureRestrictionAudioDriverFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass == "Lcom/spotify/playback/playbacknative/AudioDriver;" && methodDef.name == "constructAudioAttributes"
|
methodDef.definingClass == "Lcom/spotify/playback/playbacknative/AudioDriver;" && methodDef.name == "constructAudioAttributes"
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.spotify.premium_navbar_tab.fingerprints
|
package app.revanced.patches.spotify.premium_navbar_tab.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.spotify.premium_navbar_tab.annotations.PremiumNavbarTabCompatibility
|
|
||||||
|
|
||||||
@Name("premium-navbar-fingerprint")
|
|
||||||
@Version("0.0.1")
|
|
||||||
@PremiumNavbarTabCompatibility
|
|
||||||
object AddPremiumNavbarTabFingerprint : MethodFingerprint(
|
object AddPremiumNavbarTabFingerprint : MethodFingerprint(
|
||||||
parameters = listOf("L", "L", "L", "L", "L", "L")
|
parameters = listOf("L", "L", "L", "L", "L", "L")
|
||||||
)
|
)
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.spotify.premium_navbar_tab.fingerprints
|
package app.revanced.patches.spotify.premium_navbar_tab.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.spotify.premium_navbar_tab.annotations.PremiumNavbarTabCompatibility
|
|
||||||
|
|
||||||
@Name("add-premium-navbar-tab-parent-fingerprint")
|
|
||||||
@Version("0.0.1")
|
|
||||||
@PremiumNavbarTabCompatibility
|
|
||||||
object AddPremiumNavbarTabParentFingerprint : MethodFingerprint(
|
object AddPremiumNavbarTabParentFingerprint : MethodFingerprint(
|
||||||
strings = listOf("com.samsung.android.samsungaccount.action.REQUEST_AUTHCODE")
|
strings = listOf("com.samsung.android.samsungaccount.action.REQUEST_AUTHCODE")
|
||||||
)
|
)
|
||||||
@@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patches.spotify.premium_navbar_tab.annotations.PremiumNavbarTabCompatibility
|
import app.revanced.patches.spotify.premium_navbar_tab.annotations.PremiumNavbarTabCompatibility
|
||||||
import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabFingerprint
|
import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabFingerprint
|
||||||
import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabParentFingerprint
|
import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
import app.revanced.patches.shared.mapping.patch.ResourceMappingPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|||||||
@Description("Removes the premium tab from the navbar.")
|
@Description("Removes the premium tab from the navbar.")
|
||||||
@PremiumNavbarTabCompatibility
|
@PremiumNavbarTabCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
@DependsOn([ResourceMappingResourcePatch::class])
|
@DependsOn([ResourceMappingPatch::class])
|
||||||
class PremiumNavbarTabPatch : BytecodePatch(
|
class PremiumNavbarTabPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
AddPremiumNavbarTabParentFingerprint
|
AddPremiumNavbarTabParentFingerprint
|
||||||
@@ -40,7 +40,7 @@ class PremiumNavbarTabPatch : BytecodePatch(
|
|||||||
val lastInstructionIdx = methodInstructions.size - 1
|
val lastInstructionIdx = methodInstructions.size - 1
|
||||||
|
|
||||||
val premiumTabId =
|
val premiumTabId =
|
||||||
ResourceMappingResourcePatch.resourceMappings.single { it.type == "id" && it.name == "premium_tab" }.id
|
ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == "premium_tab" }.id
|
||||||
|
|
||||||
var removeAmount = 2
|
var removeAmount = 2
|
||||||
// 2nd const remove method
|
// 2nd const remove method
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.ticktick.misc.themeunlock.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.ticktick.task")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockThemesCompatibility
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.ticktick.misc.themeunlock.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CheckLockedThemesFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("Theme;") && methodDef.name == "isLockedTheme"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.ticktick.misc.themeunlock.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object SetThemeFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("ThemePreviewActivity;") && methodDef.name == "lambda\$updateUserBtn\$1"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package app.revanced.patches.ticktick.misc.themeunlock.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.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstructions
|
||||||
|
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.ticktick.misc.themeunlock.annotations.UnlockThemesCompatibility
|
||||||
|
import app.revanced.patches.ticktick.misc.themeunlock.fingerprints.CheckLockedThemesFingerprint
|
||||||
|
import app.revanced.patches.ticktick.misc.themeunlock.fingerprints.SetThemeFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-themes")
|
||||||
|
@Description("Unlocks all themes.")
|
||||||
|
@UnlockThemesCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
CheckLockedThemesFingerprint,
|
||||||
|
SetThemeFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val lockedThemesMethod = CheckLockedThemesFingerprint.result!!.mutableMethod
|
||||||
|
lockedThemesMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
val setThemeMethod = SetThemeFingerprint.result!!.mutableMethod
|
||||||
|
setThemeMethod.removeInstructions(0, 9)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.tiktok.ad.fingerprints
|
package app.revanced.patches.tiktok.ad.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
|
|
||||||
|
|
||||||
@Name("convert-help-v2-feeditemlist-fingerprint")
|
|
||||||
@TiktokAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ConvertHelpFeedItemListFingerprint : MethodFingerprint(
|
object ConvertHelpFeedItemListFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("/ConvertHelp;") &&
|
methodDef.definingClass.endsWith("/ConvertHelp;") &&
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.tiktok.ad.fingerprints
|
package app.revanced.patches.tiktok.ad.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
|
|
||||||
|
|
||||||
@Name("feed-item-clone-fingerprint")
|
|
||||||
@TiktokAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object FeedItemListCloneFingerprint : MethodFingerprint(
|
object FeedItemListCloneFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
|
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
package app.revanced.patches.tiktok.feedfilter.fingerprints
|
package app.revanced.patches.tiktok.feedfilter.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("feed-api-service-fingerprint")
|
|
||||||
@FeedFilterCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object FeedApiServiceLIZFingerprint : MethodFingerprint(
|
object FeedApiServiceLIZFingerprint : MethodFingerprint(
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL or AccessFlags.SYNTHETIC,
|
access = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL or AccessFlags.SYNTHETIC,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("acl-common-share-get-code")
|
|
||||||
@DownloadsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ACLCommonShareFingerprint : MethodFingerprint(
|
object ACLCommonShareFingerprint : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("download-path-parent-fingerprint")
|
|
||||||
@DownloadsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object DownloadPathParentFingerprint : MethodFingerprint(
|
object DownloadPathParentFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
|
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.interaction.seekbar.annotations.SeekbarCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("aweme-get-video-control")
|
|
||||||
@SeekbarCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object AwemeGetVideoControlFingerprint : MethodFingerprint(
|
object AwemeGetVideoControlFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
AccessFlags.PUBLIC.value,
|
AccessFlags.PUBLIC.value,
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
package app.revanced.patches.tiktok.interaction.speed.fingerprints
|
package app.revanced.patches.tiktok.interaction.speed.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.interaction.speed.annotations.SpeedCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("speed-control-parent-fingerprint")
|
|
||||||
@SpeedCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object SpeedControlParentFingerprint : MethodFingerprint(
|
object SpeedControlParentFingerprint : MethodFingerprint(
|
||||||
returnType = "L",
|
returnType = "L",
|
||||||
access = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
access = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints
|
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
|
|
||||||
|
|
||||||
@Name("mandatory-login-service-fingerprint")
|
|
||||||
@DisableForceLoginCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object MandatoryLoginServiceFingerprint : MethodFingerprint(
|
object MandatoryLoginServiceFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
package app.revanced.patches.tiktok.misc.integrations.fingerprints
|
package app.revanced.patches.tiktok.misc.integrations.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.shared.patches.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
|
|
||||||
|
|
||||||
@Name("init-fingerprint")
|
object InitFingerprint : IntegrationsFingerprint(
|
||||||
@TikTokIntegrationsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object InitFingerprint : MethodFingerprint(
|
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("/AwemeHostApplication;") &&
|
methodDef.definingClass.endsWith("/AwemeHostApplication;") &&
|
||||||
methodDef.name == "onCreate"
|
methodDef.name == "onCreate"
|
||||||
|
|||||||
@@ -1,38 +1,13 @@
|
|||||||
package app.revanced.patches.tiktok.misc.integrations.patch
|
package app.revanced.patches.tiktok.misc.integrations.patch
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
|
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
|
||||||
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
|
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
|
||||||
|
import app.revanced.shared.patches.AbstractIntegrationsPatch
|
||||||
|
|
||||||
@Name("tiktok-integrations")
|
@Name("tiktok-integrations")
|
||||||
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
|
||||||
@TikTokIntegrationsCompatibility
|
@TikTokIntegrationsCompatibility
|
||||||
@Version("0.0.1")
|
class TikTokIntegrationsPatch : AbstractIntegrationsPatch(
|
||||||
class TikTokIntegrationsPatch : BytecodePatch(
|
"Lapp/revanced/tiktok/utils/ReVancedUtils;",
|
||||||
listOf(
|
listOf(InitFingerprint)
|
||||||
InitFingerprint
|
)
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
if (context.findClass("Lapp/revanced/tiktok/utils/ReVancedUtils") == null)
|
|
||||||
return PatchResultError("Integrations have not been merged yet. This patch can not succeed without the integrations.")
|
|
||||||
val result = InitFingerprint.result!!
|
|
||||||
|
|
||||||
val method = result.mutableMethod
|
|
||||||
val implementation = method.implementation!!
|
|
||||||
val count = implementation.registerCount - 1
|
|
||||||
|
|
||||||
method.addInstruction(
|
|
||||||
0, "sput-object v$count, Lapp/revanced/tiktok/utils/ReVancedUtils;->context:Landroid/content/Context;"
|
|
||||||
)
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.loginfallback.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.ss.android.ugc.trill"),
|
||||||
|
Package("com.zhiliaoapp.musically")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class TikTokWebLoginCompatibility
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.loginfallback.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object GoogleAuthAvailableFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
parameters = listOf(),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleAuth;"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.loginfallback.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object GoogleOneTapAuthAvailableFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
parameters = listOf(),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleOneTapAuth;"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.loginfallback.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.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.tiktok.misc.loginfallback.annotations.TikTokWebLoginCompatibility
|
||||||
|
import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleAuthAvailableFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleOneTapAuthAvailableFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("tiktok-web-login")
|
||||||
|
@Description("Allows logging in with a Google account.")
|
||||||
|
@TikTokWebLoginCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class TikTokLoginFallbackPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
GoogleOneTapAuthAvailableFingerprint,
|
||||||
|
GoogleAuthAvailableFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
listOf(
|
||||||
|
GoogleOneTapAuthAvailableFingerprint,
|
||||||
|
GoogleAuthAvailableFingerprint
|
||||||
|
).forEach {
|
||||||
|
with(it.result!!.mutableMethod) {
|
||||||
|
addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object AboutOnClickMethodFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf(
|
||||||
|
"//setting/about",
|
||||||
|
"enter_from",
|
||||||
|
"settings_page",
|
||||||
|
"enter_settings_about"
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
|
||||||
|
|
||||||
@Name("ad-personalization-activity-fingerprint")
|
|
||||||
@TikTokSettingsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object AdPersonalizationActivityFingerprint : MethodFingerprint(
|
|
||||||
customFingerprint = { methodDef ->
|
|
||||||
methodDef.definingClass.endsWith("/AdPersonalizationActivity;") &&
|
|
||||||
methodDef.name == "onCreate"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object AdPersonalizationActivityOnCreateFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/AdPersonalizationActivity;") &&
|
||||||
|
methodDef.name == "onCreate"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
|
||||||
|
|
||||||
@Name("copyright-settings-string-fingerprint")
|
|
||||||
@TikTokSettingsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CopyRightSettingsStringFingerprint : MethodFingerprint(
|
|
||||||
customFingerprint = { methodDef ->
|
|
||||||
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
|
|
||||||
methodDef.name == "onViewCreated"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object SettingsOnViewCreatedFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
|
||||||
|
methodDef.name == "onViewCreated"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
|
||||||
|
|
||||||
@Name("settings-status-load-fingerprint")
|
|
||||||
@TikTokSettingsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object SettingsStatusLoadFingerprint : MethodFingerprint(
|
object SettingsStatusLoadFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
|
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
@@ -14,85 +15,111 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
||||||
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
||||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityFingerprint
|
import app.revanced.patches.tiktok.misc.settings.fingerprints.AboutOnClickMethodFingerprint
|
||||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.CopyRightSettingsStringFingerprint
|
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityOnCreateFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
|
||||||
import org.jf.dexlib2.iface.reference.StringReference
|
import org.jf.dexlib2.iface.reference.StringReference
|
||||||
|
import org.jf.dexlib2.iface.reference.TypeReference
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn([TikTokIntegrationsPatch::class])
|
@DependsOn([TikTokIntegrationsPatch::class])
|
||||||
@Name("tiktok-settings")
|
@Name("tiktok-settings")
|
||||||
@Description("Add settings menu to TikTok.")
|
@Description("Adds settings for ReVanced to TikTok.")
|
||||||
@TikTokSettingsCompatibility
|
@TikTokSettingsCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class TikTokSettingsPatch : BytecodePatch(
|
class TikTokSettingsPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
AdPersonalizationActivityFingerprint,
|
AdPersonalizationActivityOnCreateFingerprint,
|
||||||
CopyRightSettingsStringFingerprint
|
SettingsOnViewCreatedFingerprint,
|
||||||
|
AboutOnClickMethodFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
//Replace string `Copyright Policy` to 'Revanced Settings` in TikTok settings.
|
// Patch Settings UI to add 'Revanced Settings'.
|
||||||
val method1 = CopyRightSettingsStringFingerprint.result!!.mutableMethod
|
val targetIndexes = findOptionsOnClickIndex()
|
||||||
val implementation1 = method1.implementation!!
|
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
|
||||||
for ((index, instruction) in implementation1.instructions.withIndex()) {
|
for (index in targetIndexes) {
|
||||||
if (instruction.opcode != Opcode.CONST_STRING) continue
|
if (
|
||||||
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
instruction(index).opcode != Opcode.NEW_INSTANCE ||
|
||||||
if (string != "copyright_policy") continue
|
instruction(index - 4).opcode != Opcode.MOVE_RESULT_OBJECT
|
||||||
var targetIndex = index
|
)
|
||||||
while (targetIndex >= 0) {
|
return PatchResultError("Hardcode offset changed.")
|
||||||
targetIndex--
|
patchOptionNameAndOnClickEvent(index, context)
|
||||||
val invokeInstruction = implementation1.instructions[targetIndex]
|
}
|
||||||
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) continue
|
}
|
||||||
val methodName = ((invokeInstruction as Instruction35c).reference as MethodReference).name
|
// Implement settings screen in `AdPersonalizationActivity`
|
||||||
if (methodName != "getString") continue
|
with(AdPersonalizationActivityOnCreateFingerprint.result!!.mutableMethod) {
|
||||||
val resultInstruction = implementation1.instructions[targetIndex + 1]
|
for ((index, instruction) in implementation!!.instructions.withIndex()) {
|
||||||
if (resultInstruction.opcode != Opcode.MOVE_RESULT_OBJECT) continue
|
if (instruction.opcode != Opcode.INVOKE_SUPER) continue
|
||||||
val overrideRegister = (resultInstruction as OneRegisterInstruction).registerA
|
val thisRegister = (instruction as Instruction35c).registerC
|
||||||
method1.replaceInstruction(
|
addInstructions(
|
||||||
targetIndex + 1,
|
index + 1,
|
||||||
"""
|
"""
|
||||||
const-string v$overrideRegister, "Revanced Settings"
|
invoke-static {v$thisRegister}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->initializeSettings(Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;)V
|
||||||
|
return-void
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
//Change onClick to start settings activity.
|
|
||||||
val clickInstruction = implementation1.instructions[index - 1]
|
|
||||||
if (clickInstruction.opcode != Opcode.INVOKE_DIRECT)
|
|
||||||
return PatchResultError("Can not find click listener.")
|
|
||||||
val clickClass = ((clickInstruction as ReferenceInstruction).reference as MethodReference).definingClass
|
|
||||||
val mutableClickClass = context.findClass(clickClass)!!.mutableClass
|
|
||||||
val mutableOnClickMethod = mutableClickClass.methods.first {
|
|
||||||
it.name == "onClick"
|
|
||||||
}
|
|
||||||
mutableOnClickMethod.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->startSettingsActivity()V
|
|
||||||
return-void
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
//Implement revanced settings screen in `AdPersonalizationActivity`
|
|
||||||
val method2 = AdPersonalizationActivityFingerprint.result!!.mutableMethod
|
|
||||||
for ((index, instruction) in method2.implementation!!.instructions.withIndex()) {
|
|
||||||
if (instruction.opcode != Opcode.INVOKE_SUPER) continue
|
|
||||||
val thisRegister = (instruction as Instruction35c).registerC
|
|
||||||
method2.addInstructions(
|
|
||||||
index + 1,
|
|
||||||
"""
|
|
||||||
invoke-static {v$thisRegister}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->initializeSettings(Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;)V
|
|
||||||
return-void
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun findOptionsOnClickIndex(): IntArray {
|
||||||
|
val results = IntArray(2)
|
||||||
|
var found = 0
|
||||||
|
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
|
||||||
|
for ((index, instruction) in implementation!!.instructions.withIndex()) {
|
||||||
|
// Old UI settings option to replace to 'Revanced Settings'
|
||||||
|
if (instruction.opcode == Opcode.CONST_STRING) {
|
||||||
|
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
||||||
|
if (string == "copyright_policy") {
|
||||||
|
results[0] = index - 2
|
||||||
|
found++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// New UI settings option to replace to 'Revanced Settings'
|
||||||
|
if (instruction.opcode == Opcode.NEW_INSTANCE) {
|
||||||
|
val onClickClass = ((instruction as Instruction21c).reference as TypeReference).type
|
||||||
|
if (onClickClass == AboutOnClickMethodFingerprint.result!!.mutableMethod.definingClass) {
|
||||||
|
results[1] = index
|
||||||
|
found++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found > 1) break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun patchOptionNameAndOnClickEvent(index: Int, context: BytecodeContext) {
|
||||||
|
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
|
||||||
|
// Patch option name
|
||||||
|
val overrideRegister = (instruction(index - 4) as OneRegisterInstruction).registerA
|
||||||
|
replaceInstruction(
|
||||||
|
index - 4,
|
||||||
|
"""
|
||||||
|
const-string v$overrideRegister, "Revanced Settings"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
// Patch option OnClick Event
|
||||||
|
with(((instruction(index) as ReferenceInstruction).reference as TypeReference).type) {
|
||||||
|
context.findClass(this)!!.mutableClass.methods.first { it.name == "onClick" }
|
||||||
|
.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->startSettingsActivity()V
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.audio.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("tv.twitch.android.app")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class AudioAdsCompatibility
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.audio.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object AudioAdsPresenterPlayFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { method ->
|
||||||
|
method.definingClass.endsWith("AudioAdsPlayerPresenter;") && method.name == "playAd"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.audio.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.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.Patch
|
||||||
|
import app.revanced.patches.twitch.ad.audio.annotations.AudioAdsCompatibility
|
||||||
|
import app.revanced.patches.twitch.ad.audio.fingerprints.AudioAdsPresenterPlayFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("block-audio-ads")
|
||||||
|
@Description("Blocks audio ads in streams and VODs.")
|
||||||
|
@AudioAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class AudioAdsPatch : BytecodePatch(
|
||||||
|
listOf(AudioAdsPresenterPlayFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
// Block playAds call
|
||||||
|
with(AudioAdsPresenterPlayFingerprint.result!!) {
|
||||||
|
mutableMethod.addInstruction(0, "return-void")
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.video.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("tv.twitch.android.app")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class VideoAdsCompatibility
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object AdsManagerFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { method ->
|
||||||
|
method.definingClass.endsWith("AdsManagerImpl;") && method.name == "playAds"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object CheckAdEligibilityLambdaFingerprint : MethodFingerprint(
|
||||||
|
"L",
|
||||||
|
AccessFlags.PRIVATE or AccessFlags.FINAL or AccessFlags.STATIC,
|
||||||
|
listOf("L", "L", "L"),
|
||||||
|
customFingerprint = { method ->
|
||||||
|
method.definingClass.endsWith("AdEligibilityFetcher;") &&
|
||||||
|
method.name.contains("shouldRequestAd")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object ContentConfigShowAdsFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { method ->
|
||||||
|
method.definingClass.endsWith("ContentConfigData;") && method.name == "getShowAds"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package app.revanced.patches.twitch.ad.video.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.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.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.twitch.ad.video.annotations.VideoAdsCompatibility
|
||||||
|
import app.revanced.patches.twitch.ad.video.fingerprints.AdsManagerFingerprint
|
||||||
|
import app.revanced.patches.twitch.ad.video.fingerprints.CheckAdEligibilityLambdaFingerprint
|
||||||
|
import app.revanced.patches.twitch.ad.video.fingerprints.ContentConfigShowAdsFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("block-video-ads")
|
||||||
|
@Description("Blocks video ads in streams and VODs.")
|
||||||
|
@VideoAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class VideoAdsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
ContentConfigShowAdsFingerprint,
|
||||||
|
AdsManagerFingerprint,
|
||||||
|
CheckAdEligibilityLambdaFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
// Pretend our player is ineligible for all ads
|
||||||
|
with(CheckAdEligibilityLambdaFingerprint.result!!) {
|
||||||
|
mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0
|
||||||
|
invoke-static {v0}, Lio/reactivex/Single;->just(Ljava/lang/Object;)Lio/reactivex/Single;
|
||||||
|
move-result-object p0
|
||||||
|
return-object p0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spoof showAds JSON field
|
||||||
|
with(ContentConfigShowAdsFingerprint.result!!) {
|
||||||
|
mutableMethod.addInstructions(0, """
|
||||||
|
const/4 v0, 0
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block playAds call
|
||||||
|
with(AdsManagerFingerprint.result!!) {
|
||||||
|
mutableMethod.addInstruction(0, "return-void")
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.chat.antidelete.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("tv.twitch.android.app")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class ShowDeletedMessagesCompatibility
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.twitch.chat.antidelete.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object DeletedMessageClickableSpanCtorFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.chat.antidelete.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object SetHasModAccessFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;") && methodDef.name == "setHasModAccess"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package app.revanced.patches.twitch.chat.antidelete.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.*
|
||||||
|
import app.revanced.patcher.patch.*
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.twitch.chat.antidelete.annotations.ShowDeletedMessagesCompatibility
|
||||||
|
import app.revanced.patches.twitch.chat.antidelete.fingerprints.*
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction10x
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("show-deleted-messages")
|
||||||
|
@Description("Shows deleted chat messages behind a clickable spoiler.")
|
||||||
|
@ShowDeletedMessagesCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class ShowDeletedMessagesPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
SetHasModAccessFingerprint,
|
||||||
|
DeletedMessageClickableSpanCtorFingerprint,
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
// Force set hasModAccess member to true in constructor
|
||||||
|
with(DeletedMessageClickableSpanCtorFingerprint.result!!.mutableMethod) {
|
||||||
|
addInstructions(
|
||||||
|
implementation!!.instructions.lastIndex, /* place in front of return-void */
|
||||||
|
"""
|
||||||
|
const/4 v0, 1
|
||||||
|
iput-boolean v0, p0, $definingClass->hasModAccess:Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disable setHasModAccess setter
|
||||||
|
with(SetHasModAccessFingerprint.result!!.mutableMethod.implementation!!) {
|
||||||
|
addInstruction(0, BuilderInstruction10x(Opcode.RETURN_VOID))
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.debug.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("tv.twitch.android.app")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class DebugModeCompatibility
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.debug.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object IsDebugConfigEnabledFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.debug.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object IsOmVerificationEnabledFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.twitch.debug.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object ShouldShowDebugOptionsFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package app.revanced.patches.twitch.debug.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.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.twitch.debug.annotations.DebugModeCompatibility
|
||||||
|
import app.revanced.patches.twitch.debug.fingerprints.IsDebugConfigEnabledFingerprint
|
||||||
|
import app.revanced.patches.twitch.debug.fingerprints.IsOmVerificationEnabledFingerprint
|
||||||
|
import app.revanced.patches.twitch.debug.fingerprints.ShouldShowDebugOptionsFingerprint
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("debug-mode")
|
||||||
|
@Description("Enables Twitch's internal debugging mode.")
|
||||||
|
@DebugModeCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class DebugModePatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
IsDebugConfigEnabledFingerprint,
|
||||||
|
IsOmVerificationEnabledFingerprint,
|
||||||
|
ShouldShowDebugOptionsFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
listOf(
|
||||||
|
IsDebugConfigEnabledFingerprint,
|
||||||
|
IsOmVerificationEnabledFingerprint,
|
||||||
|
ShouldShowDebugOptionsFingerprint
|
||||||
|
).forEach {
|
||||||
|
with(it.result!!) {
|
||||||
|
with(mutableMethod) {
|
||||||
|
addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.twitch.misc.integrations.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("tv.twitch.android.app")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class IntegrationsCompatibility
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package app.revanced.patches.twitch.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patches.twitch.misc.integrations.annotations.IntegrationsCompatibility
|
||||||
|
import app.revanced.shared.patches.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
|
||||||
|
@Name("init-fingerprint")
|
||||||
|
@IntegrationsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object InitFingerprint : IntegrationsFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/TwitchApplication;") &&
|
||||||
|
methodDef.name == "onCreate"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.twitch.misc.integrations.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patches.twitch.misc.integrations.fingerprints.InitFingerprint
|
||||||
|
import app.revanced.patches.twitch.misc.integrations.annotations.IntegrationsCompatibility
|
||||||
|
import app.revanced.shared.patches.AbstractIntegrationsPatch
|
||||||
|
|
||||||
|
@Name("integrations")
|
||||||
|
@IntegrationsCompatibility
|
||||||
|
class IntegrationsPatch : AbstractIntegrationsPatch(
|
||||||
|
"Lapp/revanced/twitch/utils/ReVancedUtils;",
|
||||||
|
listOf(InitFingerprint)
|
||||||
|
)
|
||||||
@@ -1,14 +1,8 @@
|
|||||||
package app.revanced.patches.twitter.ad.timeline.fingerprints
|
package app.revanced.patches.twitter.ad.timeline.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.twitter.ad.timeline.annotations.TimelineAdsCompatibility
|
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("timeline-tweet-json-parser-fingerprint")
|
|
||||||
@TimelineAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object TimelineTweetJsonParserFingerprint : MethodFingerprint(
|
object TimelineTweetJsonParserFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IPUT_OBJECT,
|
Opcode.IPUT_OBJECT,
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints
|
package app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility
|
|
||||||
|
|
||||||
@Name("messaging-app-certificate-fingerprint")
|
|
||||||
@FirebaseGetCertPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object GetMessagingCertFingerprint : MethodFingerprint(
|
object GetMessagingCertFingerprint : MethodFingerprint(
|
||||||
"Ljava/lang/String;",
|
"Ljava/lang/String;",
|
||||||
strings = listOf(
|
strings = listOf(
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints
|
package app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility
|
|
||||||
|
|
||||||
@Name("registration-app-certificate-fingerprint")
|
|
||||||
@FirebaseGetCertPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object GetReqistrationCertFingerprint : MethodFingerprint(
|
object GetReqistrationCertFingerprint : MethodFingerprint(
|
||||||
"Ljava/lang/String;",
|
"Ljava/lang/String;",
|
||||||
strings = listOf(
|
strings = listOf(
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
package app.revanced.patches.warnwetter.misc.promocode.fingerprints
|
package app.revanced.patches.warnwetter.misc.promocode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility
|
|
||||||
|
|
||||||
@Name("promo-code-unlock-fingerprint")
|
|
||||||
@PromoCodeUnlockCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PromoCodeUnlockFingerprint : MethodFingerprint(
|
object PromoCodeUnlockFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
|
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36")
|
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36", "17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.ad.general.bytecode.extensions
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.softCompareTo
|
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
|
||||||
import org.jf.dexlib2.iface.Method
|
|
||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
|
||||||
import org.jf.dexlib2.iface.reference.Reference
|
|
||||||
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
|
|
||||||
|
|
||||||
internal object MethodExtensions {
|
|
||||||
internal fun MutableClass.findMutableMethodOf(
|
|
||||||
method: Method
|
|
||||||
) = this.methods.first {
|
|
||||||
it.softCompareTo(
|
|
||||||
ImmutableMethodReference(
|
|
||||||
method.definingClass, method.name, method.parameters, method.returnType
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
internal inline fun <reified T : Reference> Instruction.toDescriptor(): String {
|
|
||||||
val reference = (this as ReferenceInstruction).reference
|
|
||||||
return when (T::class) {
|
|
||||||
MethodReference::class -> {
|
|
||||||
val methodReference = reference as MethodReference
|
|
||||||
"${methodReference.definingClass}->${methodReference.name}(${
|
|
||||||
methodReference.parameterTypes.joinToString(
|
|
||||||
""
|
|
||||||
) { it }
|
|
||||||
})${methodReference.returnType}"
|
|
||||||
}
|
|
||||||
|
|
||||||
FieldReference::class -> {
|
|
||||||
val fieldReference = reference as FieldReference
|
|
||||||
"${fieldReference.definingClass}->${fieldReference.name}:${fieldReference.type}"
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> throw PatchResultError("Unsupported reference type")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package app.revanced.patches.youtube.ad.general.bytecode.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.ad.general.resource.patch.GeneralAdsResourcePatch
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
|
object ReelConstructorFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_VIRTUAL
|
||||||
|
),
|
||||||
|
customFingerprint = { method ->
|
||||||
|
method.implementation?.instructions?.any {
|
||||||
|
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral == GeneralAdsResourcePatch.reelMultipleItemShelfId
|
||||||
|
} ?: false
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package app.revanced.patches.youtube.ad.general.bytecode.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.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
import app.revanced.patcher.extensions.softCompareTo
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
|
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
|
||||||
|
import app.revanced.patches.youtube.ad.general.bytecode.fingerprints.ReelConstructorFingerprint
|
||||||
|
import app.revanced.patches.youtube.ad.general.resource.patch.GeneralAdsResourcePatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.*
|
||||||
|
import org.jf.dexlib2.iface.Method
|
||||||
|
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||||
|
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
|
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([GeneralAdsResourcePatch::class])
|
||||||
|
@Name("general-ads")
|
||||||
|
@Description("Removes general ads.")
|
||||||
|
@GeneralAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class GeneralAdsPatch : BytecodePatch(
|
||||||
|
listOf(ReelConstructorFingerprint)
|
||||||
|
) {
|
||||||
|
internal companion object {
|
||||||
|
private fun MutableClass.findMutableMethodOf(
|
||||||
|
method: Method
|
||||||
|
) = this.methods.first {
|
||||||
|
it.softCompareTo(
|
||||||
|
ImmutableMethodReference(
|
||||||
|
method.definingClass, method.name, method.parameters, method.returnType
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
fun String.buildHideCall(viewRegister: Int) = "invoke-static { v$viewRegister }, " +
|
||||||
|
"Lapp/revanced/integrations/patches/GeneralAdsPatch;" +
|
||||||
|
"->" +
|
||||||
|
"$this(Landroid/view/View;)V"
|
||||||
|
|
||||||
|
fun MutableMethod.injectHideCall(insertIndex: Int, viewRegister: Int, method: String) =
|
||||||
|
this.addInstruction(insertIndex, method.buildHideCall(viewRegister))
|
||||||
|
|
||||||
|
context.classes.forEach { classDef ->
|
||||||
|
classDef.methods.forEach { method ->
|
||||||
|
with(method.implementation) {
|
||||||
|
this?.instructions?.forEachIndexed { index, instruction ->
|
||||||
|
if (instruction.opcode != org.jf.dexlib2.Opcode.CONST)
|
||||||
|
return@forEachIndexed
|
||||||
|
// Instruction to store the id adAttribution into a register
|
||||||
|
if ((instruction as Instruction31i).wideLiteral != GeneralAdsResourcePatch.adAttributionId)
|
||||||
|
return@forEachIndexed
|
||||||
|
|
||||||
|
val insertIndex = index + 1
|
||||||
|
|
||||||
|
// Call to get the view with the id adAttribution
|
||||||
|
with(instructions.elementAt(insertIndex)) {
|
||||||
|
if (opcode != org.jf.dexlib2.Opcode.INVOKE_VIRTUAL)
|
||||||
|
return@forEachIndexed
|
||||||
|
|
||||||
|
// Hide the view
|
||||||
|
val viewRegister = (this as Instruction35c).registerC
|
||||||
|
context.proxy(classDef)
|
||||||
|
.mutableClass
|
||||||
|
.findMutableMethodOf(method)
|
||||||
|
.injectHideCall(insertIndex, viewRegister, "hideAdAttributionView")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
with(
|
||||||
|
ReelConstructorFingerprint.result
|
||||||
|
?: return PatchResultError("Could not resolve fingerprint")
|
||||||
|
) {
|
||||||
|
// iput-object v$viewRegister, ...
|
||||||
|
val insertIndex = this.scanResult.patternScanResult!!.startIndex + 2
|
||||||
|
|
||||||
|
with(this.mutableMethod) {
|
||||||
|
val viewRegister = (instruction(insertIndex) as TwoRegisterInstruction).registerA
|
||||||
|
|
||||||
|
injectHideCall(insertIndex, viewRegister, "hideReelView")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,336 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.ad.general.bytecode.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.injectHideCall
|
|
||||||
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.addInstructions
|
|
||||||
import app.revanced.patcher.extensions.instruction
|
|
||||||
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.PatchResultError
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
|
||||||
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
|
|
||||||
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.findMutableMethodOf
|
|
||||||
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.toDescriptor
|
|
||||||
import app.revanced.patches.youtube.ad.general.resource.patch.GeneralResourceAdsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction10x
|
|
||||||
import org.jf.dexlib2.dexbacked.instruction.DexBackedInstruction21c
|
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.formats.*
|
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
|
||||||
import org.jf.dexlib2.iface.reference.StringReference
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@DependsOn([ResourceMappingResourcePatch::class, IntegrationsPatch::class, SettingsPatch::class, GeneralResourceAdsPatch::class])
|
|
||||||
@Name("general-ads")
|
|
||||||
@Description("Removes general ads.")
|
|
||||||
@GeneralAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class GeneralBytecodeAdsPatch : BytecodePatch() {
|
|
||||||
// a constant used by litho
|
|
||||||
private val lithoConstant = 0xaed2868
|
|
||||||
|
|
||||||
// list of resource names to get the id of
|
|
||||||
private val resourceIds = arrayOf(
|
|
||||||
"ad_attribution",
|
|
||||||
"reel_multiple_items_shelf",
|
|
||||||
"info_cards_drawer_header",
|
|
||||||
).map { name ->
|
|
||||||
ResourceMappingResourcePatch.resourceMappings.single { it.name == name }.id
|
|
||||||
}
|
|
||||||
|
|
||||||
private val stringReferences = arrayOf(
|
|
||||||
"Claiming to use more elements than provided",
|
|
||||||
"loadVideo() called on LocalDirector in wrong state",
|
|
||||||
"LoggingProperties are not in proto format"
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
SettingsPatch.PreferenceScreen.ADS.addPreferences(
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_home_ads_removal",
|
|
||||||
StringResource("revanced_home_ads_removal_title", "Remove home ads"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_home_ads_removal_summary_on", "Home ads are hidden"),
|
|
||||||
StringResource("revanced_home_ads_removal_summary_off", "Home ads are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_ad_removal",
|
|
||||||
StringResource("revanced_adremover_ad_removal_enabled_title", "Remove general ads"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_ad_removal_enabled_summary_on", "General ads are hidden"),
|
|
||||||
StringResource("revanced_adremover_ad_removal_enabled_summary_off", "General ads are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_merchandise",
|
|
||||||
StringResource("revanced_adremover_merchandise_enabled_title", "Remove merchandise banners"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_merchandise_enabled_summary_on", "Merchandise banners are hidden"),
|
|
||||||
StringResource("revanced_adremover_merchandise_enabled_summary_off", "Merchandise banners are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_community_posts_removal",
|
|
||||||
StringResource("revanced_adremover_community_posts_enabled_title", "Remove community posts"),
|
|
||||||
false,
|
|
||||||
StringResource("revanced_adremover_community_posts_enabled_summary_on", "Community posts are hidden"),
|
|
||||||
StringResource("revanced_adremover_community_posts_enabled_summary_off", "Community posts are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_compact_banner_removal",
|
|
||||||
StringResource("revanced_adremover_compact_banner_enabled_title", "Remove compact banners"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_compact_banner_enabled_summary_on", "Compact banners are hidden"),
|
|
||||||
StringResource("revanced_adremover_compact_banner_enabled_summary_off", "Compact banners are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_movie",
|
|
||||||
StringResource("revanced_adremover_movie_enabled_title", "Remove movies section"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_movie_enabled_summary_on", "Movies section is hidden"),
|
|
||||||
StringResource("revanced_adremover_movie_enabled_summary_off", "Movies section is shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_feed_survey",
|
|
||||||
StringResource("revanced_adremover_feed_survey_enabled_title", "Remove feed surveys"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_feed_survey_enabled_summary_on", "Feed surveys are hidden"),
|
|
||||||
StringResource("revanced_adremover_feed_survey_enabled_summary_off", "Feed surveys are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_shorts_shelf",
|
|
||||||
StringResource("revanced_adremover_shorts_shelf_enabled_title", "Remove shorts shelf"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_shorts_shelf_enabled_summary_on", "Shorts shelves are hidden"),
|
|
||||||
StringResource("revanced_adremover_shorts_shelf_enabled_summary_off", "Shorts shelves are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_community_guidelines",
|
|
||||||
StringResource("revanced_adremover_community_guidelines_enabled_title", "Remove community guidelines"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_community_guidelines_enabled_summary_on", "Community guidelines are hidden"),
|
|
||||||
StringResource("revanced_adremover_community_guidelines_enabled_summary_off", "Community guidelines are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_emergency_box_removal",
|
|
||||||
StringResource("revanced_adremover_emergency_box_enabled_title", "Remove emergency boxes"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_emergency_box_enabled_summary_on", "Emergency boxes are hidden"),
|
|
||||||
StringResource("revanced_adremover_emergency_box_enabled_summary_off", "Emergency boxes are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_info_panel",
|
|
||||||
StringResource("revanced_adremover_info_panel_enabled_title", "Remove info panels"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_info_panel_enabled_summary_on", "Info panels are hidden"),
|
|
||||||
StringResource("revanced_adremover_info_panel_enabled_summary_off", "Info panels are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_medical_panel",
|
|
||||||
StringResource("revanced_adremover_medical_panel_enabled_title", "Remove medical panels"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_medical_panel_enabled_summary_on", "Medical panels are hidden"),
|
|
||||||
StringResource("revanced_adremover_medical_panel_enabled_summary_off", "Medical panels are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_paid_content",
|
|
||||||
StringResource("revanced_adremover_paid_content_enabled_title", "Remove paid content"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_paid_content_enabled_summary_on", "Paid content is hidden"),
|
|
||||||
StringResource("revanced_adremover_paid_content_enabled_summary_off", "Paid content is shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_hide_suggestions",
|
|
||||||
StringResource("revanced_adremover_hide_suggestions_enabled_title", "Hide suggestions"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_hide_suggestions_enabled_summary_on", "Suggestions are hidden"),
|
|
||||||
StringResource("revanced_adremover_hide_suggestions_enabled_summary_off", "Suggestions are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_hide_latest_posts",
|
|
||||||
StringResource("revanced_adremover_hide_latest_posts_enabled_title", "Hide latest posts"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_hide_latest_posts_enabled_summary_on", "Latest posts are hidden"),
|
|
||||||
StringResource("revanced_adremover_hide_latest_posts_enabled_summary_off", "Latest posts are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_hide_channel_guidelines",
|
|
||||||
StringResource("revanced_adremover_hide_channel_guidelines_enabled_title", "Hide channel guidelines"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_hide_channel_guidelines_enabled_summary_on", "Channel guidelines are hidden"),
|
|
||||||
StringResource("revanced_adremover_hide_channel_guidelines_enabled_summary_off", "Channel guidelines are shown")
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
// iterating through all classes is expensive
|
|
||||||
for (classDef in context.classes) {
|
|
||||||
var mutableClass: MutableClass? = null
|
|
||||||
|
|
||||||
method@ for (method in classDef.methods) {
|
|
||||||
var mutableMethod: MutableMethod? = null
|
|
||||||
|
|
||||||
if (method.implementation == null) continue@method
|
|
||||||
|
|
||||||
val instructions = method.implementation!!.instructions
|
|
||||||
instructions.forEachIndexed { index, instruction ->
|
|
||||||
when (instruction.opcode) {
|
|
||||||
Opcode.CONST -> {
|
|
||||||
// TODO: find a way to de-duplicate code.
|
|
||||||
// The issue is we need to save mutableClass and mutableMethod to the existing fields
|
|
||||||
when ((instruction as Instruction31i).wideLiteral) {
|
|
||||||
resourceIds[0] -> { // general ads
|
|
||||||
// and is followed by an instruction with the mnemonic INVOKE_VIRTUAL
|
|
||||||
val insertIndex = index + 1
|
|
||||||
val invokeInstruction = instructions.elementAt(insertIndex)
|
|
||||||
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed
|
|
||||||
|
|
||||||
// create proxied method, make sure to not re-resolve() the current class
|
|
||||||
if (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
|
|
||||||
if (mutableMethod == null) mutableMethod =
|
|
||||||
mutableClass!!.findMutableMethodOf(method)
|
|
||||||
|
|
||||||
// insert hide call to hide the view corresponding to the resource
|
|
||||||
val viewRegister = (invokeInstruction as Instruction35c).registerC
|
|
||||||
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
resourceIds[1] -> { // reel ads
|
|
||||||
// and is followed by an instruction at insertIndex with the mnemonic IPUT_OBJECT
|
|
||||||
val insertIndex = index + 4
|
|
||||||
val iPutInstruction = instructions.elementAt(insertIndex)
|
|
||||||
if (iPutInstruction.opcode != Opcode.IPUT_OBJECT) return@forEachIndexed
|
|
||||||
|
|
||||||
// create proxied method, make sure to not re-resolve() the current class
|
|
||||||
if (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
|
|
||||||
if (mutableMethod == null) mutableMethod =
|
|
||||||
mutableClass!!.findMutableMethodOf(method)
|
|
||||||
|
|
||||||
val viewRegister = (iPutInstruction as Instruction22c).registerA
|
|
||||||
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
|
|
||||||
}
|
|
||||||
|
|
||||||
resourceIds[2] -> { // info cards ads
|
|
||||||
// and is followed by an instruction with the mnemonic INVOKE_VIRTUAL
|
|
||||||
val removeIndex = index - 1
|
|
||||||
val invokeInstruction = instructions.elementAt(removeIndex)
|
|
||||||
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed
|
|
||||||
|
|
||||||
// create proxied method, make sure to not re-resolve() the current class
|
|
||||||
if (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
|
|
||||||
if (mutableMethod == null) mutableMethod =
|
|
||||||
mutableClass!!.findMutableMethodOf(method)
|
|
||||||
|
|
||||||
//ToDo: Add Settings toggle for whatever this is
|
|
||||||
mutableMethod!!.implementation!!.removeInstruction(removeIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Opcode.CONST_STRING -> {
|
|
||||||
when (((instruction as Instruction21c).reference as StringReference).string) {
|
|
||||||
stringReferences[0] -> {
|
|
||||||
val stringInstruction = instructions.elementAt(3)
|
|
||||||
if (stringInstruction.opcode == Opcode.CONST_STRING) return@forEachIndexed
|
|
||||||
|
|
||||||
// create proxied method, make sure to not re-resolve() the current class
|
|
||||||
if (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
|
|
||||||
if (mutableMethod == null) mutableMethod =
|
|
||||||
mutableClass!!.findMutableMethodOf(method)
|
|
||||||
|
|
||||||
// return the method
|
|
||||||
val insertIndex = 1 // after super constructor
|
|
||||||
//ToDo: Add setting here
|
|
||||||
mutableMethod!!.implementation!!.addInstruction(
|
|
||||||
insertIndex, BuilderInstruction10x(Opcode.RETURN_VOID)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
stringReferences[1] -> {
|
|
||||||
// TODO: migrate video ads patch to here if necessary
|
|
||||||
}
|
|
||||||
|
|
||||||
stringReferences[2] -> { // Litho ads
|
|
||||||
val proxy = context.proxy(classDef)
|
|
||||||
val proxiedClass = proxy.mutableClass
|
|
||||||
|
|
||||||
val lithoMethod = getLithoMethod(proxiedClass)
|
|
||||||
?: return PatchResultError("Could not find required Litho method to patch.")
|
|
||||||
|
|
||||||
val instructionWithNeededDescriptor =
|
|
||||||
lithoMethod.implementation!!.instructions.indexOfFirst {
|
|
||||||
it.opcode == Opcode.INVOKE_STATIC_RANGE
|
|
||||||
}
|
|
||||||
|
|
||||||
// get required descriptors
|
|
||||||
val createEmptyComponentDescriptor =
|
|
||||||
lithoMethod.instruction(instructionWithNeededDescriptor)
|
|
||||||
.toDescriptor<MethodReference>()
|
|
||||||
val emptyComponentFieldDescriptor =
|
|
||||||
lithoMethod.instruction(instructionWithNeededDescriptor + 2)
|
|
||||||
.toDescriptor<FieldReference>()
|
|
||||||
|
|
||||||
val pathBuilderAnchorFingerprint = object : MethodFingerprint(
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.CONST_16,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.IPUT_OBJECT
|
|
||||||
)
|
|
||||||
) {}
|
|
||||||
|
|
||||||
val pathBuilderScanResult = pathBuilderAnchorFingerprint.also {
|
|
||||||
it.resolve(context, lithoMethod, classDef)
|
|
||||||
}.result!!.scanResult.patternScanResult!!
|
|
||||||
|
|
||||||
val clobberedRegister =
|
|
||||||
(lithoMethod.instruction(pathBuilderScanResult.startIndex) as OneRegisterInstruction).registerA
|
|
||||||
|
|
||||||
val insertIndex = pathBuilderScanResult.endIndex + 1
|
|
||||||
lithoMethod.addInstructions(
|
|
||||||
insertIndex, // right after setting the component.pathBuilder field,
|
|
||||||
"""
|
|
||||||
invoke-static {v5, v2}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
|
|
||||||
move-result v$clobberedRegister
|
|
||||||
if-eqz v$clobberedRegister, :not_an_ad
|
|
||||||
move-object/from16 v2, p1
|
|
||||||
invoke-static {v2}, $createEmptyComponentDescriptor
|
|
||||||
move-result-object v0
|
|
||||||
iget-object v0, v0, $emptyComponentFieldDescriptor
|
|
||||||
return-object v0
|
|
||||||
""",
|
|
||||||
listOf(ExternalLabel("not_an_ad", lithoMethod.instruction(insertIndex)))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> return@forEachIndexed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getLithoMethod(mutableClass: MutableClass) = mutableClass.methods.firstOrNull {
|
|
||||||
it.implementation?.instructions?.any { instruction ->
|
|
||||||
instruction.opcode == Opcode.CONST && (instruction as Instruction31i).narrowLiteral == lithoConstant
|
|
||||||
} ?: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.ad.general.bytecode.utils
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
|
||||||
import org.jf.dexlib2.iface.MethodImplementation
|
|
||||||
import org.jf.dexlib2.immutable.ImmutableMethod
|
|
||||||
import org.jf.dexlib2.immutable.ImmutableMethodParameter
|
|
||||||
|
|
||||||
internal object MethodUtils {
|
|
||||||
internal fun createMutableMethod(
|
|
||||||
definingClass: String, name: String, returnType: String, parameter: String, implementation: MethodImplementation
|
|
||||||
) = ImmutableMethod(
|
|
||||||
definingClass, name, listOf(
|
|
||||||
ImmutableMethodParameter(
|
|
||||||
parameter, null, null
|
|
||||||
)
|
|
||||||
), returnType, AccessFlags.PRIVATE or AccessFlags.STATIC, null, null, implementation
|
|
||||||
).toMutable()
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
package app.revanced.patches.youtube.ad.general.resource.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
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.patches.shared.mapping.patch.ResourceMappingPatch
|
||||||
|
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
|
||||||
|
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||||
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.*
|
||||||
|
|
||||||
|
@DependsOn(dependencies = [
|
||||||
|
FixLocaleConfigErrorPatch::class,
|
||||||
|
LithoFilterPatch::class,
|
||||||
|
SettingsPatch::class,
|
||||||
|
ResourceMappingPatch::class
|
||||||
|
])
|
||||||
|
@GeneralAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class GeneralAdsResourcePatch : ResourcePatch {
|
||||||
|
internal companion object {
|
||||||
|
var adAttributionId: Long = -1
|
||||||
|
var reelMultipleItemShelfId: Long = -1
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
PreferenceScreen.ADS.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_ad_removal",
|
||||||
|
StringResource("revanced_adremover_ad_removal_enabled_title", "Hide general ads"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_ad_removal_enabled_summary_on", "General ads are hidden"),
|
||||||
|
StringResource("revanced_adremover_ad_removal_enabled_summary_off", "General ads are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_buttoned",
|
||||||
|
StringResource("revanced_adremover_buttoned_enabled_title", "Hide buttoned ad"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_buttoned_enabled_summary_on", "Buttoned ads are hidden"),
|
||||||
|
StringResource("revanced_adremover_buttoned_enabled_summary_off", "Buttoned ads are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_merchandise",
|
||||||
|
StringResource("revanced_adremover_merchandise_enabled_title", "Hide merchandise banners"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_merchandise_enabled_summary_on", "Merchandise banners are hidden"),
|
||||||
|
StringResource("revanced_adremover_merchandise_enabled_summary_off", "Merchandise banners are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_community_posts_removal",
|
||||||
|
StringResource("revanced_adremover_community_posts_enabled_title", "Hide community posts"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_adremover_community_posts_enabled_summary_on", "Community posts are hidden"),
|
||||||
|
StringResource("revanced_adremover_community_posts_enabled_summary_off", "Community posts are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_compact_banner_removal",
|
||||||
|
StringResource("revanced_adremover_compact_banner_enabled_title", "Hide compact banners"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_compact_banner_enabled_summary_on", "Compact banners are hidden"),
|
||||||
|
StringResource("revanced_adremover_compact_banner_enabled_summary_off", "Compact banners are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_movie",
|
||||||
|
StringResource("revanced_adremover_movie_enabled_title", "Hide movies section"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_movie_enabled_summary_on", "Movies section is hidden"),
|
||||||
|
StringResource("revanced_adremover_movie_enabled_summary_off", "Movies section is shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_feed_survey",
|
||||||
|
StringResource("revanced_adremover_feed_survey_enabled_title", "Hide feed surveys"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_feed_survey_enabled_summary_on", "Feed surveys are hidden"),
|
||||||
|
StringResource("revanced_adremover_feed_survey_enabled_summary_off", "Feed surveys are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_shorts",
|
||||||
|
StringResource("revanced_adremover_shorts_enabled_title", "Hide shorts"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_shorts_enabled_summary_on", "Shorts are hidden"),
|
||||||
|
StringResource("revanced_adremover_shorts_enabled_summary_off", "Shorts are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_community_guidelines",
|
||||||
|
StringResource("revanced_adremover_community_guidelines_enabled_title", "Hide community guidelines"),
|
||||||
|
true,
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_community_guidelines_enabled_summary_on",
|
||||||
|
"Community guidelines are hidden"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_community_guidelines_enabled_summary_off",
|
||||||
|
"Community guidelines are shown"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_emergency_box_removal",
|
||||||
|
StringResource("revanced_adremover_emergency_box_enabled_title", "Hide emergency boxes"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_emergency_box_enabled_summary_on", "Emergency boxes are hidden"),
|
||||||
|
StringResource("revanced_adremover_emergency_box_enabled_summary_off", "Emergency boxes are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_info_panel",
|
||||||
|
StringResource("revanced_adremover_info_panel_enabled_title", "Hide info panels"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_info_panel_enabled_summary_on", "Info panels are hidden"),
|
||||||
|
StringResource("revanced_adremover_info_panel_enabled_summary_off", "Info panels are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_medical_panel",
|
||||||
|
StringResource("revanced_adremover_medical_panel_enabled_title", "Hide medical panels"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_medical_panel_enabled_summary_on", "Medical panels are hidden"),
|
||||||
|
StringResource("revanced_adremover_medical_panel_enabled_summary_off", "Medical panels are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_paid_content",
|
||||||
|
StringResource("revanced_adremover_paid_content_enabled_title", "Hide paid content"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_paid_content_enabled_summary_on", "Paid content is hidden"),
|
||||||
|
StringResource("revanced_adremover_paid_content_enabled_summary_off", "Paid content is shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_hide_suggestions",
|
||||||
|
StringResource("revanced_adremover_hide_suggestions_enabled_title", "Hide suggestions"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_hide_suggestions_enabled_summary_on", "Suggestions are hidden"),
|
||||||
|
StringResource("revanced_adremover_hide_suggestions_enabled_summary_off", "Suggestions are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_hide_latest_posts",
|
||||||
|
StringResource("revanced_adremover_hide_latest_posts_enabled_title", "Hide latest posts"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_hide_latest_posts_enabled_summary_on", "Latest posts are hidden"),
|
||||||
|
StringResource("revanced_adremover_hide_latest_posts_enabled_summary_off", "Latest posts are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_hide_channel_guidelines",
|
||||||
|
StringResource("revanced_adremover_hide_channel_guidelines_enabled_title", "Hide channel guidelines"),
|
||||||
|
true,
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_hide_channel_guidelines_enabled_summary_on",
|
||||||
|
"Channel guidelines are hidden"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_hide_channel_guidelines_enabled_summary_off",
|
||||||
|
"Channel guidelines are shown"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_self_sponsor",
|
||||||
|
StringResource("revanced_adremover_self_sponsor_enabled_title", "Hide self sponsored cards"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_self_sponsor_enabled_summary_on", "Self sponsored cards are hidden"),
|
||||||
|
StringResource("revanced_adremover_self_sponsor_enabled_summary_off", "Self sponsored cards are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_separator",
|
||||||
|
StringResource("revanced_adremover_separator_title", "Hide gray separator"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_adremover_separator_summary_on", "Gray separators are hidden"),
|
||||||
|
StringResource("revanced_adremover_separator_summary_off", "Gray separators are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_chapter_teaser",
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_chapter_teaser_enabled_title",
|
||||||
|
"Hide chapter teaser under videos"
|
||||||
|
),
|
||||||
|
true,
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_chapter_teaser_enabled_summary_on",
|
||||||
|
"Chapter teasers are hidden"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_chapter_teaser_enabled_summary_off",
|
||||||
|
"Chapter teasers are shown"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
PreferenceScreen(
|
||||||
|
"revanced_adremover_custom",
|
||||||
|
StringResource("revanced_adremover_custom_title", "Custom filter"),
|
||||||
|
listOf(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_adremover_custom_enabled",
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_enabled_title",
|
||||||
|
"Enable custom filter"
|
||||||
|
),
|
||||||
|
false,
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_enabled_summary_on",
|
||||||
|
"Custom filter is enabled"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_enabled_summary_off",
|
||||||
|
"Custom filter is disabled"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// TODO: This should be a ListPreference, which does not exist yet
|
||||||
|
TextPreference(
|
||||||
|
"revanced_adremover_custom_strings",
|
||||||
|
StringResource("revanced_adremover_custom_strings_title", "Custom filter"),
|
||||||
|
InputType.STRING,
|
||||||
|
"",
|
||||||
|
StringResource(
|
||||||
|
"revanced_adremover_custom_strings_summary",
|
||||||
|
"Filter components by their name separated by a comma"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
fun String.getId() = ResourceMappingPatch.resourceMappings.single { it.name == this }.id
|
||||||
|
|
||||||
|
adAttributionId = "ad_attribution".getId()
|
||||||
|
reelMultipleItemShelfId = "reel_multiple_items_shelf".getId()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.ad.general.resource.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.doRecursively
|
|
||||||
import app.revanced.extensions.startsWithAny
|
|
||||||
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.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
|
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
|
||||||
import org.w3c.dom.Element
|
|
||||||
|
|
||||||
@DependsOn(dependencies = [FixLocaleConfigErrorPatch::class])
|
|
||||||
@Name("general-resource-ads")
|
|
||||||
@Description("Patch to remove general ads in resources.")
|
|
||||||
@GeneralAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class GeneralResourceAdsPatch : ResourcePatch {
|
|
||||||
// list of resource file names which need to be hidden
|
|
||||||
private val resourceFileNames = arrayOf(
|
|
||||||
"compact_promoted_",
|
|
||||||
"promoted_video_",
|
|
||||||
)
|
|
||||||
|
|
||||||
// the attributes to change the value of
|
|
||||||
private val replacements = arrayOf(
|
|
||||||
"height",
|
|
||||||
"width",
|
|
||||||
"marginTop",
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
|
||||||
context.forEach {
|
|
||||||
if (!it.name.startsWithAny(*resourceFileNames)) return@forEach
|
|
||||||
|
|
||||||
// for each file in the "layouts" directory replace all necessary attributes content
|
|
||||||
context.xmlEditor[it.absolutePath].use { editor ->
|
|
||||||
editor.file.doRecursively { node ->
|
|
||||||
replacements.forEach replacement@{ replacement ->
|
|
||||||
if (node !is Element) return@replacement
|
|
||||||
|
|
||||||
node.getAttributeNode("android:layout_$replacement")?.let { attribute ->
|
|
||||||
attribute.textContent = "1.0dip"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36")
|
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36", "17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
package app.revanced.patches.youtube.ad.video.fingerprints
|
package app.revanced.patches.youtube.ad.video.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
|
|
||||||
|
|
||||||
@Name("load-ads-fingerprint")
|
|
||||||
@VideoAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object LoadVideoAdsFingerprint : MethodFingerprint(
|
object LoadVideoAdsFingerprint : MethodFingerprint(
|
||||||
strings = listOf(
|
strings = listOf(
|
||||||
"TriggerBundle doesn't have the required metadata specified by the trigger ",
|
"TriggerBundle doesn't have the required metadata specified by the trigger ",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user