mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 18:03:55 +01:00
Compare commits
56 Commits
v2.145.0-d
...
v2.152.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
370067266c | ||
|
|
62a8ac4f9b | ||
|
|
37cfb6900c | ||
|
|
c0bc6fe658 | ||
|
|
ec64b8d1ff | ||
|
|
a52a692062 | ||
|
|
c372d7823c | ||
|
|
47dce0d01e | ||
|
|
b777d2e230 | ||
|
|
c98baf93fc | ||
|
|
4e4b0ecb0d | ||
|
|
e8391b3e93 | ||
|
|
1db7eebeaa | ||
|
|
50e210d94f | ||
|
|
ad6fab930d | ||
|
|
7966be827f | ||
|
|
6a6f05e2cb | ||
|
|
752b12b66d | ||
|
|
623a9bce98 | ||
|
|
6441b031e3 | ||
|
|
4227ffa40f | ||
|
|
9158fd5054 | ||
|
|
7f529d1038 | ||
|
|
bb38c02b51 | ||
|
|
b927e8b93f | ||
|
|
ba4676d500 | ||
|
|
1af1bf8342 | ||
|
|
2374af6f82 | ||
|
|
4da3e4f369 | ||
|
|
f89027609f | ||
|
|
7e3184b5f7 | ||
|
|
49cca5a258 | ||
|
|
63f5af5c3b | ||
|
|
82df77460f | ||
|
|
3227d66dc2 | ||
|
|
62102c9543 | ||
|
|
adc2f738c0 | ||
|
|
a3b3b613e2 | ||
|
|
e60173addf | ||
|
|
be80837218 | ||
|
|
528cbfc171 | ||
|
|
dc055a0b20 | ||
|
|
7f1f317c08 | ||
|
|
b18256a2a2 | ||
|
|
a3ece1e154 | ||
|
|
5ead461caf | ||
|
|
66c582795e | ||
|
|
c3641d90dd | ||
|
|
da108ca9bb | ||
|
|
96d88ae0fb | ||
|
|
6e0830929c | ||
|
|
e67f18b9c2 | ||
|
|
b2b1108c47 | ||
|
|
89215d6513 | ||
|
|
ce4d144910 | ||
|
|
dbd2f5b7da |
2
.github/workflows/pull_request.yml
vendored
2
.github/workflows/pull_request.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MESSAGE: merge branch \`${{ github.head_ref || github.ref_name }}\` to \`main\`
|
||||
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||
|
||||
jobs:
|
||||
pull-request:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"assets": [
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"gradle.properties",X
|
||||
"gradle.properties",
|
||||
"patches.json"
|
||||
]
|
||||
}
|
||||
@@ -32,13 +32,15 @@
|
||||
{
|
||||
"path": "patches.json"
|
||||
}
|
||||
]
|
||||
],
|
||||
successComment: false
|
||||
}
|
||||
],
|
||||
[
|
||||
"@saithodev/semantic-release-backmerge",
|
||||
{
|
||||
"branches": [{from: "main", to: "dev"}]
|
||||
branches: [{from: "main", to: "dev"}],
|
||||
clearWorkspace: true
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
187
CHANGELOG.md
187
CHANGELOG.md
@@ -1,3 +1,190 @@
|
||||
# [2.152.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.151.0...v2.152.0-dev.1) (2023-01-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/copy-video-url:** match icon style with native icon ([#1419](https://github.com/revanced/revanced-patches/issues/1419)) ([e89e54c](https://github.com/revanced/revanced-patches/commit/e89e54c316a2d99195d2b79e9176d34f6de0113c))
|
||||
|
||||
# [2.151.0](https://github.com/revanced/revanced-patches/compare/v2.150.0...v2.151.0) (2022-12-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/general-ads:** restore swipe back to exit gesture ([#1405](https://github.com/revanced/revanced-patches/issues/1405)) ([2440587](https://github.com/revanced/revanced-patches/commit/24405877dd935a757fa61c7580887c1a47a25ea9))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** `copy-video-url` patch ([#1402](https://github.com/revanced/revanced-patches/issues/1402)) ([bf982e8](https://github.com/revanced/revanced-patches/commit/bf982e8d7765c2a89a5475b6db8b203a3ac4ddf9))
|
||||
|
||||
# [2.151.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.150.0...v2.151.0-dev.1) (2022-12-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/general-ads:** restore swipe back to exit gesture ([#1405](https://github.com/revanced/revanced-patches/issues/1405)) ([2440587](https://github.com/revanced/revanced-patches/commit/24405877dd935a757fa61c7580887c1a47a25ea9))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** `copy-video-url` patch ([#1402](https://github.com/revanced/revanced-patches/issues/1402)) ([bf982e8](https://github.com/revanced/revanced-patches/commit/bf982e8d7765c2a89a5475b6db8b203a3ac4ddf9))
|
||||
|
||||
# [2.150.0](https://github.com/revanced/revanced-patches/compare/v2.149.0...v2.150.0) (2022-12-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/bottom-controls-resource-patch:** use correct length for `nameSpaceLength` ([#1401](https://github.com/revanced/revanced-patches/issues/1401)) ([7190066](https://github.com/revanced/revanced-patches/commit/7190066a8ded8b59970483a81d7902526d552093))
|
||||
* **youtube/general-ads:** resolve fingerprint to correct method ([#1404](https://github.com/revanced/revanced-patches/issues/1404)) ([e135485](https://github.com/revanced/revanced-patches/commit/e1354852501cb582549cbf0634b1a15e1d0012d9))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/return-youtube-dislike:** better formatting and LTR support ([#1370](https://github.com/revanced/revanced-patches/issues/1370)) ([fd0fe1c](https://github.com/revanced/revanced-patches/commit/fd0fe1c86ca99e395d340e85f4f1eb7b221e90ea))
|
||||
|
||||
## [2.149.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.149.1-dev.1...v2.149.1-dev.2) (2022-12-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/general-ads:** resolve fingerprint to correct method ([#1404](https://github.com/revanced/revanced-patches/issues/1404)) ([e135485](https://github.com/revanced/revanced-patches/commit/e1354852501cb582549cbf0634b1a15e1d0012d9))
|
||||
|
||||
## [2.149.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.149.0...v2.149.1-dev.1) (2022-12-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/bottom-controls-resource-patch:** use correct length for `nameSpaceLength` ([#1401](https://github.com/revanced/revanced-patches/issues/1401)) ([7190066](https://github.com/revanced/revanced-patches/commit/7190066a8ded8b59970483a81d7902526d552093))
|
||||
|
||||
# [2.149.0](https://github.com/revanced/revanced-patches/compare/v2.148.0...v2.149.0) (2022-12-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **tasker/unlock-license:** resolve fingerprint correctly ([92d7857](https://github.com/revanced/revanced-patches/commit/92d78576f033dd7155c80cb08d5911048b06c36c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads-patch:** hide channel member shelf ([#1380](https://github.com/revanced/revanced-patches/issues/1380)) ([ce2b104](https://github.com/revanced/revanced-patches/commit/ce2b104f508f1581ec531446d60bd3d41dafbd2c))
|
||||
|
||||
# [2.149.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.148.0...v2.149.0-dev.1) (2022-12-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **tasker/unlock-license:** resolve fingerprint correctly ([92d7857](https://github.com/revanced/revanced-patches/commit/92d78576f033dd7155c80cb08d5911048b06c36c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads-patch:** hide channel member shelf ([#1380](https://github.com/revanced/revanced-patches/issues/1380)) ([ce2b104](https://github.com/revanced/revanced-patches/commit/ce2b104f508f1581ec531446d60bd3d41dafbd2c))
|
||||
|
||||
# [2.148.0](https://github.com/revanced/revanced-patches/compare/v2.147.0...v2.148.0) (2022-12-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/general-ads:** don't early return when not necessary ([#1353](https://github.com/revanced/revanced-patches/issues/1353)) ([003a400](https://github.com/revanced/revanced-patches/commit/003a400ce41ff543fb5484c576f5ec2df0a87273))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **tasker:** `unlock-license` patch ([#1339](https://github.com/revanced/revanced-patches/issues/1339)) ([78a43b8](https://github.com/revanced/revanced-patches/commit/78a43b8abd972172eab99519dfa636ce77d9e64f))
|
||||
* **twitter:** `hide-views-stats` patch ([#1371](https://github.com/revanced/revanced-patches/issues/1371)) ([2f04a06](https://github.com/revanced/revanced-patches/commit/2f04a06e3b782931870d973fd0937f8731062f12))
|
||||
* **youtube/general-ads-patch:** hide guidelines for subscriber ([#1352](https://github.com/revanced/revanced-patches/issues/1352)) ([2d10932](https://github.com/revanced/revanced-patches/commit/2d1093251d5d50b476ca44f76acb9a8597b37aea))
|
||||
* **youtube/theme:** add option to color the seekbar ([53b91fe](https://github.com/revanced/revanced-patches/commit/53b91fe2b5a41f1a63deec8d919f2a1bc1cae12a))
|
||||
* **youtube/theme:** include the patch by default ([c363997](https://github.com/revanced/revanced-patches/commit/c3639975683fb0ca0e271e8fc3ef7fbf79f33414))
|
||||
* **youtube:** `hide-breaking-news-shelf` patch ([#1381](https://github.com/revanced/revanced-patches/issues/1381)) ([38a9877](https://github.com/revanced/revanced-patches/commit/38a987744fbb49c2b7d5d0e69297e95f5ee405c4))
|
||||
|
||||
# [2.148.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.148.0-dev.5...v2.148.0-dev.6) (2022-12-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/theme:** add option to color the seekbar ([53b91fe](https://github.com/revanced/revanced-patches/commit/53b91fe2b5a41f1a63deec8d919f2a1bc1cae12a))
|
||||
* **youtube/theme:** include the patch by default ([c363997](https://github.com/revanced/revanced-patches/commit/c3639975683fb0ca0e271e8fc3ef7fbf79f33414))
|
||||
|
||||
# [2.148.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.148.0-dev.4...v2.148.0-dev.5) (2022-12-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** `hide-breaking-news-shelf` patch ([#1381](https://github.com/revanced/revanced-patches/issues/1381)) ([38a9877](https://github.com/revanced/revanced-patches/commit/38a987744fbb49c2b7d5d0e69297e95f5ee405c4))
|
||||
|
||||
# [2.148.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.148.0-dev.3...v2.148.0-dev.4) (2022-12-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **twitter:** `hide-views-stats` patch ([#1371](https://github.com/revanced/revanced-patches/issues/1371)) ([2f04a06](https://github.com/revanced/revanced-patches/commit/2f04a06e3b782931870d973fd0937f8731062f12))
|
||||
|
||||
# [2.148.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.148.0-dev.2...v2.148.0-dev.3) (2022-12-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/general-ads:** don't early return when not necessary ([#1353](https://github.com/revanced/revanced-patches/issues/1353)) ([003a400](https://github.com/revanced/revanced-patches/commit/003a400ce41ff543fb5484c576f5ec2df0a87273))
|
||||
|
||||
# [2.148.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.148.0-dev.1...v2.148.0-dev.2) (2022-12-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads-patch:** hide guidelines for subscriber ([#1352](https://github.com/revanced/revanced-patches/issues/1352)) ([2d10932](https://github.com/revanced/revanced-patches/commit/2d1093251d5d50b476ca44f76acb9a8597b37aea))
|
||||
|
||||
# [2.148.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.147.0...v2.148.0-dev.1) (2022-12-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **tasker:** `unlock-license` patch ([#1339](https://github.com/revanced/revanced-patches/issues/1339)) ([78a43b8](https://github.com/revanced/revanced-patches/commit/78a43b8abd972172eab99519dfa636ce77d9e64f))
|
||||
|
||||
# [2.147.0](https://github.com/revanced/revanced-patches/compare/v2.146.0...v2.147.0) (2022-12-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/return-youtube-dislike:** debug connection statistics, toast on error, high priority background threads ([#1320](https://github.com/revanced/revanced-patches/issues/1320)) ([30273a9](https://github.com/revanced/revanced-patches/commit/30273a9bbdd40453baeb09f26ac9d218569a3e71))
|
||||
|
||||
# [2.147.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.146.0...v2.147.0-dev.1) (2022-12-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/return-youtube-dislike:** debug connection statistics, toast on error, high priority background threads ([#1320](https://github.com/revanced/revanced-patches/issues/1320)) ([30273a9](https://github.com/revanced/revanced-patches/commit/30273a9bbdd40453baeb09f26ac9d218569a3e71))
|
||||
|
||||
# [2.146.0](https://github.com/revanced/revanced-patches/compare/v2.145.0...v2.146.0) (2022-12-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **predictive-back-gesture:** exclude by default ([176d34b](https://github.com/revanced/revanced-patches/commit/176d34b2ff92d0eb627dad86ad87f559df3db815))
|
||||
* **twitter/timeline-ads:** add clarifying notice to description ([0eca2af](https://github.com/revanced/revanced-patches/commit/0eca2af1a4a688903c61ff6469ffea90c60f06a6))
|
||||
* **youtube:** bump patches compatibility to v17.49.37 ([83ebc73](https://github.com/revanced/revanced-patches/commit/83ebc731130d3d216ac4b815382d8f13548cf665))
|
||||
|
||||
# [2.146.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.145.0...v2.146.0-dev.1) (2022-12-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **predictive-back-gesture:** exclude by default ([176d34b](https://github.com/revanced/revanced-patches/commit/176d34b2ff92d0eb627dad86ad87f559df3db815))
|
||||
* **twitter/timeline-ads:** add clarifying notice to description ([0eca2af](https://github.com/revanced/revanced-patches/commit/0eca2af1a4a688903c61ff6469ffea90c60f06a6))
|
||||
* **youtube:** bump patches compatibility to v17.49.37 ([83ebc73](https://github.com/revanced/revanced-patches/commit/83ebc731130d3d216ac4b815382d8f13548cf665))
|
||||
|
||||
# [2.145.0](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **tiktok/settings:** make compatible with newer versions ([c88740d](https://github.com/revanced/revanced-patches/commit/c88740dc2bf040747d9704d5bed52a7b533c22d6))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **crunchyroll:** remove `enable-downloads` patch ([2ac1546](https://github.com/revanced/revanced-patches/commit/2ac15460f5734fc2c6d2d78d34083a8e6b2f7012))
|
||||
* **youtube-music:** bump compatibility to 5.36.51 ([c4a3099](https://github.com/revanced/revanced-patches/commit/c4a3099c1ca39431fba9beb94cc2b43e260561d9))
|
||||
|
||||
# [2.145.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0-dev.1) (2022-12-18)
|
||||
|
||||
|
||||
|
||||
109
README.md
109
README.md
@@ -9,53 +9,55 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `always-autorepeat` | Always repeats the playing video again. | 17.45.36 |
|
||||
| `always-autorepeat` | Always repeats the playing video again. | 17.49.37 |
|
||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||
| `comments` | Hides components related to comments. | 17.45.36 |
|
||||
| `comments` | Hides components related to comments. | 17.49.37 |
|
||||
| `copy-video-url` | Adds buttons in player to copy video links. | 17.49.37 |
|
||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.45.36 |
|
||||
| `custom-video-speed` | Adds more video speed options. | 17.45.36 |
|
||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.49.37 |
|
||||
| `custom-video-speed` | Adds more video speed options. | 17.49.37 |
|
||||
| `debugging` | Adds debugging options. | all |
|
||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.45.36 |
|
||||
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.45.36 |
|
||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.45.36 |
|
||||
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.45.36 |
|
||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.49.37 |
|
||||
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.49.37 |
|
||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.49.37 |
|
||||
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.49.37 |
|
||||
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.45.36 |
|
||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.45.36 |
|
||||
| `general-ads` | Removes general ads. | 17.45.36 |
|
||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.45.36 |
|
||||
| `hide-album-cards` | Hides the album cards below the artist description. | 17.45.36 |
|
||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.45.36 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.45.36 |
|
||||
| `hide-captions-button` | Hides the captions button on video player. | 17.45.36 |
|
||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.49.37 |
|
||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.49.37 |
|
||||
| `general-ads` | Removes general ads. | 17.49.37 |
|
||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.49.37 |
|
||||
| `hide-album-cards` | Hides the album cards below the artist description. | 17.49.37 |
|
||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.49.37 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.49.37 |
|
||||
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 17.49.37 |
|
||||
| `hide-captions-button` | Hides the captions button on video player. | 17.49.37 |
|
||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||
| `hide-create-button` | Hides the create button in the navigation bar. | 17.45.36 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.45.36 |
|
||||
| `hide-email-address` | Hides the email address in the account switcher. | 17.45.36 |
|
||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.45.36 |
|
||||
| `hide-info-cards` | Hides info-cards in videos. | 17.45.36 |
|
||||
| `hide-my-mix` | Hides mix playlists. | 17.45.36 |
|
||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.45.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.45.36 |
|
||||
| `hide-watch-in-vr` | Hides the Watch in VR option in the player settings flyout panel. | 17.45.36 |
|
||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.45.36 |
|
||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.45.36 |
|
||||
| `minimized-playback` | Enables minimized and background playback. | 17.45.36 |
|
||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 17.45.36 |
|
||||
| `open-links-directly` | Bypasses URL redirects and opens links directly inside YouTube app. | 17.45.36 |
|
||||
| `hide-create-button` | Hides the create button in the navigation bar. | 17.49.37 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.49.37 |
|
||||
| `hide-email-address` | Hides the email address in the account switcher. | 17.49.37 |
|
||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.49.37 |
|
||||
| `hide-info-cards` | Hides info-cards in videos. | 17.49.37 |
|
||||
| `hide-my-mix` | Hides mix playlists. | 17.49.37 |
|
||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.49.37 |
|
||||
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.49.37 |
|
||||
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.49.37 |
|
||||
| `hide-watch-in-vr` | Hides the Watch in VR option in the player settings flyout panel. | 17.49.37 |
|
||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.49.37 |
|
||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.49.37 |
|
||||
| `minimized-playback` | Enables minimized and background playback. | 17.49.37 |
|
||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 17.49.37 |
|
||||
| `open-links-directly` | Bypasses URL redirects and opens links directly inside YouTube app. | 17.49.37 |
|
||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.45.36 |
|
||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.45.36 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.45.36 |
|
||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.45.36 |
|
||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.49.37 |
|
||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.49.37 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.49.37 |
|
||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.49.37 |
|
||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||
| `sponsorblock` | Integrate SponsorBlock. | 17.45.36 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.45.36 |
|
||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.45.36 |
|
||||
| `sponsorblock` | Integrate SponsorBlock. | 17.49.37 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.49.37 |
|
||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.49.37 |
|
||||
| `theme` | Applies a custom theme. | all |
|
||||
| `video-ads` | Removes ads in the video player. | 17.45.36 |
|
||||
| `video-ads` | Removes ads in the video player. | 17.49.37 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||
@@ -120,6 +122,17 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
|
||||
| `hide-views-stats` | Hides the view stats under tweets. | all |
|
||||
| `monochrome-icon` | Adds a monochrome icon. | all |
|
||||
| `timeline-ads` | Removes ads from the Twitter timeline. Might require clearing app data to remove already cached ads. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.spotify.music`](https://play.google.com/store/apps/details?id=com.spotify.music)
|
||||
<details>
|
||||
|
||||
@@ -130,16 +143,6 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `spotify-theme` | Applies a custom theme. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
|
||||
| `monochrome-icon` | Adds a monochrome icon. | all |
|
||||
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
|
||||
<details>
|
||||
|
||||
@@ -245,6 +248,14 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `unlock-themes` | Unlocks all themes. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `net.dinglisch.android.taskerm`](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-trial` | Unlocks the trial version. | all |
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## 📝 JSON Format
|
||||
|
||||
@@ -20,7 +20,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("app.revanced:revanced-patcher:6.3.1")
|
||||
implementation("app.revanced:revanced-patcher:6.4.0")
|
||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||
// Required for meta
|
||||
implementation("com.google.code.gson:gson:2.10")
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.145.0-dev.1
|
||||
version = 2.152.0-dev.1
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
|
||||
@Patch
|
||||
@Patch(false)
|
||||
@Name("predictive-back-gesture")
|
||||
@Description("Enables the predictive back gesture introduced on Android 13.")
|
||||
@Version("0.0.1")
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package app.revanced.patches.shared.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object SeekbarFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
strings = listOf("timed_markers_width")
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.shared.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object SeekbarOnDrawFingerprint : MethodFingerprint(
|
||||
customFingerprint = { it.name == "onDraw" }
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package app.revanced.patches.tasker.trial.unlock.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("net.dinglisch.android.taskerm")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class UnlockTrialCompatibility
|
||||
@@ -0,0 +1,7 @@
|
||||
package app.revanced.patches.tasker.trial.unlock.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object CheckLicenseFingerprint : MethodFingerprint(
|
||||
strings = listOf("Can't check license")
|
||||
)
|
||||
@@ -0,0 +1,32 @@
|
||||
package app.revanced.patches.tasker.trial.unlock.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tasker.trial.unlock.annotations.UnlockTrialCompatibility
|
||||
import app.revanced.patches.tasker.trial.unlock.fingerprints.CheckLicenseFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("unlock-trial")
|
||||
@Description("Unlocks the trial version.")
|
||||
@UnlockTrialCompatibility
|
||||
@Version("0.0.1")
|
||||
class UnlockLicensePatch : BytecodePatch(
|
||||
listOf(
|
||||
CheckLicenseFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) = CheckLicenseFingerprint
|
||||
.result
|
||||
?.mutableMethod
|
||||
// Return the method early, which prompts the user with a non dismissible dialog, when the trial period is over.
|
||||
?.addInstruction(0, "return-void")
|
||||
?.let { PatchResultSuccess() }
|
||||
?: CheckLicenseFingerprint.toErrorResult()
|
||||
}
|
||||
@@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.reference.StringReference
|
||||
|
||||
@Patch
|
||||
@Name("timeline-ads")
|
||||
@Description("Removes ads from the Twitter timeline.")
|
||||
@Description("Removes ads from the Twitter timeline. Might require clearing app data to remove already cached ads.")
|
||||
@TimelineAdsCompatibility
|
||||
@Version("0.0.1")
|
||||
class TimelineAdsPatch : BytecodePatch(
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.twitter.android")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class HideViewsCompatibility
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object InlineActionTypesFingerprint : MethodFingerprint(
|
||||
returnType = "Ljava/util/List",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
strings = listOf(
|
||||
"getCurrentMemoizing()",
|
||||
"android_animated_reply_icon_enabled",
|
||||
"reply_voting_android_position_before_favorite_enabled"
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object TweetStatsContainerConstructorFingerprint : MethodFingerprint(
|
||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
parameters = listOf("L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.INVOKE_VIRTUAL
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object TweetStatsContainerWrapperConstructorFingerprint : MethodFingerprint(
|
||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
parameters = listOf("L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IPUT_OBJECT
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object TweetStatsViewDelegateBinderFingerprint : MethodFingerprint(
|
||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
opcodes = listOf(
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.CONST_16,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.CONST_16,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_OBJECT
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,114 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.patch
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.removeInstruction
|
||||
import app.revanced.patcher.extensions.removeInstructions
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.twitter.layout.hideviews.fingerprints.InlineActionTypesFingerprint
|
||||
import app.revanced.patches.twitter.layout.hideviews.fingerprints.TweetStatsContainerConstructorFingerprint
|
||||
import app.revanced.patches.twitter.layout.hideviews.fingerprints.TweetStatsContainerWrapperConstructorFingerprint
|
||||
import app.revanced.patches.twitter.layout.hideviews.fingerprints.TweetStatsViewDelegateBinderFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
class HideViewsBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
InlineActionTypesFingerprint,
|
||||
TweetStatsContainerWrapperConstructorFingerprint,
|
||||
TweetStatsContainerConstructorFingerprint,
|
||||
TweetStatsViewDelegateBinderFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
removeViewsFromTimeline(context)
|
||||
removeTweetStatViewInitializer(context)
|
||||
removeTweetStatViewWrapperInitializer(context)
|
||||
removeViewDelegateBinderSubscription()
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private fun removeViewsFromTimeline(context: BytecodeContext) {
|
||||
val addViewsToActionBarMethodFingerprint = object : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IF_EQZ,
|
||||
)
|
||||
) {}
|
||||
transformMethodAtPattern(
|
||||
context,
|
||||
InlineActionTypesFingerprint,
|
||||
addViewsToActionBarMethodFingerprint
|
||||
) { patternScanResult, method ->
|
||||
method.removeInstruction(patternScanResult.endIndex - 1)
|
||||
}
|
||||
}
|
||||
|
||||
private fun removeTweetStatViewInitializer(context: BytecodeContext) {
|
||||
val returnFingerprint = object : MethodFingerprint(
|
||||
opcodes = listOf(Opcode.RETURN_VOID)
|
||||
) {}
|
||||
transformMethodAtPattern(
|
||||
context,
|
||||
TweetStatsContainerConstructorFingerprint,
|
||||
returnFingerprint
|
||||
) { patternScanResult, method ->
|
||||
method.removeInstructions(patternScanResult.endIndex - 3, 2)
|
||||
}
|
||||
}
|
||||
|
||||
private fun removeTweetStatViewWrapperInitializer(context: BytecodeContext) {
|
||||
val wrapperReturnFingerprint = object : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.RETURN_VOID,
|
||||
)
|
||||
) {}
|
||||
transformMethodAtPattern(
|
||||
context,
|
||||
TweetStatsContainerWrapperConstructorFingerprint,
|
||||
wrapperReturnFingerprint
|
||||
) { patternScanResult, method ->
|
||||
method.removeInstructions(patternScanResult.startIndex - 4, 3)
|
||||
}
|
||||
}
|
||||
|
||||
private fun removeViewDelegateBinderSubscription() {
|
||||
transformMethod(TweetStatsViewDelegateBinderFingerprint) { result, method ->
|
||||
method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 9)
|
||||
}
|
||||
}
|
||||
|
||||
private fun transformMethodAtPattern(
|
||||
context: BytecodeContext, methodFingerprint: MethodFingerprint,
|
||||
patternFingerprint: MethodFingerprint, transformer: TransformerAtPattern
|
||||
) {
|
||||
transformMethod(methodFingerprint) { result, method ->
|
||||
val patternResult = patternFingerprint.also {
|
||||
it.resolve(context, method, result.classDef)
|
||||
}.result!!
|
||||
transformer(patternResult.scanResult.patternScanResult!!, method)
|
||||
}
|
||||
}
|
||||
|
||||
private fun transformMethod(methodFingerprint: MethodFingerprint, transformer: Transformer) {
|
||||
val result = methodFingerprint.result!!
|
||||
val method = result.mutableMethod
|
||||
transformer(result, method)
|
||||
}
|
||||
}
|
||||
|
||||
private typealias Transformer = (MethodFingerprintResult, MutableMethod) -> Unit
|
||||
|
||||
private typealias TransformerAtPattern = (MethodFingerprintResult.MethodFingerprintScanResult.PatternScanResult, MutableMethod) -> Unit
|
||||
@@ -0,0 +1,34 @@
|
||||
package app.revanced.patches.twitter.layout.hideviews.patch
|
||||
|
||||
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.*
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.twitter.layout.hideviews.annotations.HideViewsCompatibility
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
@DependsOn([HideViewsBytecodePatch::class])
|
||||
@Name("hide-views-stats")
|
||||
@Description("Hides the view stats under tweets.")
|
||||
@HideViewsCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideViewsResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
arrayOf(
|
||||
"res/layout/condensed_tweet_stats.xml",
|
||||
"res/layout/focal_tweet_stats.xml"
|
||||
).forEach { file ->
|
||||
context.xmlEditor[file].use { editor ->
|
||||
val tags = editor.file.getElementsByTagName("com.twitter.ui.tweet.TweetStatView")
|
||||
List(tags.length) { tags.item(it) as Element }
|
||||
.filter { it.getAttribute("android:id").contains("views_stat") }
|
||||
.forEach { it.parentNode.removeChild(it) }
|
||||
}
|
||||
}
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -17,6 +17,7 @@ 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.fix.backtoexitgesture.patch.FixBackToExitGesturePatch
|
||||
import app.revanced.patches.youtube.misc.fix.verticalscroll.patch.VerticalScrollPatch
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
@@ -24,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
|
||||
|
||||
@Patch
|
||||
@DependsOn([GeneralAdsResourcePatch::class, VerticalScrollPatch::class])
|
||||
@DependsOn([GeneralAdsResourcePatch::class, VerticalScrollPatch::class, FixBackToExitGesturePatch::class])
|
||||
@Name("general-ads")
|
||||
@Description("Removes general ads.")
|
||||
@GeneralAdsCompatibility
|
||||
|
||||
@@ -102,6 +102,20 @@ class GeneralAdsResourcePatch : ResourcePatch {
|
||||
"Community guidelines are shown"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_adremover_subscribers_community_guidelines_removal",
|
||||
StringResource("revanced_adremover_subscribers_community_guidelines_enabled_title", "Hide subscribers community guidelines"),
|
||||
true,
|
||||
StringResource("revanced_adremover_subscribers_community_guidelines_enabled_summary_on", "Subscribers community guidelines are hidden"),
|
||||
StringResource("revanced_adremover_subscribers_community_guidelines_enabled_summary_off", "Subscribers community guidelines are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_adremover_channel_member_shelf_removal",
|
||||
StringResource("revanced_adremover_channel_member_shelf_enabled_title", "Hide channel member shelf"),
|
||||
true,
|
||||
StringResource("revanced_adremover_channel_member_shelf_enabled_summary_on", "Channel member shelf is hidden"),
|
||||
StringResource("revanced_adremover_channel_member_shelf_enabled_summary_off", "Channel member shelf is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_adremover_emergency_box_removal",
|
||||
StringResource("revanced_adremover_emergency_box_enabled_title", "Hide emergency boxes"),
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.youtube.interaction.copyvideourl.annotation
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.google.android.youtube", arrayOf("17.49.37"))
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class CopyVideoUrlCompatibility
|
||||
@@ -0,0 +1,49 @@
|
||||
package app.revanced.patches.youtube.interaction.copyvideourl.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.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.interaction.copyvideourl.annotation.CopyVideoUrlCompatibility
|
||||
import app.revanced.patches.youtube.interaction.copyvideourl.resource.patch.CopyVideoUrlResourcePatch
|
||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch
|
||||
|
||||
@Patch
|
||||
@Name("copy-video-url")
|
||||
@Description("Adds buttons in player to copy video links.")
|
||||
@DependsOn([
|
||||
CopyVideoUrlResourcePatch::class,
|
||||
PlayerControlsBytecodePatch::class,
|
||||
VideoInformationPatch::class
|
||||
])
|
||||
@CopyVideoUrlCompatibility
|
||||
@Version("0.0.1")
|
||||
class CopyVideoUrlBytecodePatch : BytecodePatch() {
|
||||
private companion object {
|
||||
const val INTEGRATIONS_PACKAGE = "Lapp/revanced/integrations"
|
||||
const val INTEGRATIONS_PLAYER_PACKAGE = "$INTEGRATIONS_PACKAGE/videoplayer"
|
||||
val BUTTONS_DESCRIPTORS = listOf(
|
||||
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlButton;",
|
||||
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlTimestampButton;"
|
||||
)
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
// Initialize buttons and inject visibility control
|
||||
BUTTONS_DESCRIPTORS.forEach { descriptor ->
|
||||
val initializeButtonDescriptor = "$descriptor->initializeButton(Ljava/lang/Object;)V"
|
||||
val visibilityDescriptor = "$descriptor->changeVisibility(Z)V"
|
||||
PlayerControlsBytecodePatch.initializeControl(initializeButtonDescriptor)
|
||||
PlayerControlsBytecodePatch.injectVisibilityCheckCall(visibilityDescriptor)
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package app.revanced.patches.youtube.interaction.copyvideourl.resource.patch
|
||||
|
||||
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.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.interaction.copyvideourl.annotation.CopyVideoUrlCompatibility
|
||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||
import app.revanced.patches.youtube.misc.playercontrols.resource.patch.BottomControlsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.util.resources.ResourceUtils
|
||||
import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
|
||||
@Name("copy-video-url-resource")
|
||||
@Description("Makes necessary changes to resources for copy video link buttons.")
|
||||
@DependsOn([BottomControlsResourcePatch::class, FixLocaleConfigErrorPatch::class, SettingsPatch::class])
|
||||
@CopyVideoUrlCompatibility
|
||||
@Version("0.0.1")
|
||||
class CopyVideoUrlResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_copy_video_url",
|
||||
StringResource("revanced_copy_video_url_title", "Copy video URL settings"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_copy_video_url",
|
||||
StringResource("revanced_copy_video_url_enabled_title", "Show copy video URL button"),
|
||||
true,
|
||||
StringResource("revanced_copy_video_url_enabled_summary_on", "Button is shown, click to copy video URL without timestamp"),
|
||||
StringResource("revanced_copy_video_url_enabled_summary_off", "Button is not shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_copy_video_url_timestamp",
|
||||
StringResource("revanced_copy_video_url_timestamp_enabled_title", "Show copy timestamp URL button"),
|
||||
true,
|
||||
StringResource("revanced_copy_video_url_timestamp_enabled_summary_on", "Button is shown, click to copy video URL with timestamp"),
|
||||
StringResource("revanced_copy_video_url_timestamp_enabled_summary_off", "Button is not shown")
|
||||
)
|
||||
),
|
||||
StringResource("revanced_copy_video_url_summary", "Settings related to copy URL buttons in video player")
|
||||
)
|
||||
)
|
||||
|
||||
context.copyResources("copyvideourl", ResourceUtils.ResourceGroup(
|
||||
resourceDirectoryName = "drawable",
|
||||
"revanced_yt_copy.xml",
|
||||
"revanced_yt_copy_timestamp.xml"
|
||||
))
|
||||
|
||||
BottomControlsResourcePatch.addControls("copyvideourl/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -12,11 +12,11 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.interaction.downloads.annotation.DownloadsCompatibility
|
||||
import app.revanced.patches.youtube.interaction.downloads.resource.patch.DownloadsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||
import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch
|
||||
|
||||
@Patch
|
||||
@Name("downloads")
|
||||
@DependsOn([DownloadsResourcePatch::class, PlayerControlsBytecodePatch::class, VideoIdPatch::class])
|
||||
@DependsOn([DownloadsResourcePatch::class, PlayerControlsBytecodePatch::class, VideoInformationPatch::class])
|
||||
@Description("Enables downloading music and videos from YouTube.")
|
||||
@DownloadsCompatibility
|
||||
@Version("0.0.1")
|
||||
@@ -29,7 +29,7 @@ class DownloadsBytecodePatch : BytecodePatch() {
|
||||
initialize the control
|
||||
*/
|
||||
|
||||
val initializeDownloadsDescriptor = "$classDescriptor->initializeDownloadButton(Ljava/lang/Object;)V"
|
||||
val initializeDownloadsDescriptor = "$classDescriptor->initializeButton(Ljava/lang/Object;)V"
|
||||
PlayerControlsBytecodePatch.initializeControl(initializeDownloadsDescriptor)
|
||||
|
||||
/*
|
||||
@@ -39,14 +39,6 @@ class DownloadsBytecodePatch : BytecodePatch() {
|
||||
val changeVisibilityDescriptor = "$classDescriptor->changeVisibility(Z)V"
|
||||
PlayerControlsBytecodePatch.injectVisibilityCheckCall(changeVisibilityDescriptor)
|
||||
|
||||
/*
|
||||
add code to change to update the video id
|
||||
*/
|
||||
|
||||
val setVideoIdDescriptor =
|
||||
"L$integrationsPackage/patches/downloads/DownloadsPatch;->setVideoId(Ljava/lang/String;)V"
|
||||
VideoIdPatch.injectCall(setVideoIdDescriptor)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,18 +5,20 @@ 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.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.CreateVideoPlayerSeekbarFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.fingerprints.SeekbarFingerprint
|
||||
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@@ -26,7 +28,7 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
@Version("0.0.1")
|
||||
class HideTimeAndSeekbarPatch : BytecodePatch(
|
||||
listOf(
|
||||
CreateVideoPlayerSeekbarFingerprint, TimeCounterFingerprint
|
||||
SeekbarFingerprint, TimeCounterFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
@@ -40,7 +42,9 @@ class HideTimeAndSeekbarPatch : BytecodePatch(
|
||||
)
|
||||
)
|
||||
|
||||
val createVideoPlayerSeekbarMethod = CreateVideoPlayerSeekbarFingerprint.result!!.mutableMethod
|
||||
val createVideoPlayerSeekbarMethod = SeekbarFingerprint.result!!.let {
|
||||
SeekbarOnDrawFingerprint.apply { resolve(context, it.mutableClass) }
|
||||
}.result!!.mutableMethod
|
||||
|
||||
createVideoPlayerSeekbarMethod.addInstructions(
|
||||
0, """
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.youtube.layout.homepage.breakingnews.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class BreakingNewsCompatibility
|
||||
@@ -0,0 +1,23 @@
|
||||
package app.revanced.patches.youtube.layout.homepage.breakingnews.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.resource.patch.BreakingNewsResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
object BreakingNewsFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.CONST,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.IPUT_OBJECT,
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == BreakingNewsResourcePatch.horizontalCardListId
|
||||
} == true
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,46 @@
|
||||
package app.revanced.patches.youtube.layout.homepage.breakingnews.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.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.annotations.BreakingNewsCompatibility
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.bytecode.fingerprints.BreakingNewsFingerprint
|
||||
import app.revanced.patches.youtube.layout.homepage.breakingnews.resource.patch.BreakingNewsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, BreakingNewsResourcePatch::class])
|
||||
@Name("hide-breaking-news-shelf")
|
||||
@Description("Hides the breaking news shelf on the homepage tab.")
|
||||
@BreakingNewsCompatibility
|
||||
@Version("0.0.1")
|
||||
class BreakingNewsPatch : BytecodePatch(
|
||||
listOf(
|
||||
BreakingNewsFingerprint,
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val breakingNewsResult = BreakingNewsFingerprint.result!!
|
||||
val breakingNewsMethod = breakingNewsResult.mutableMethod
|
||||
|
||||
val moveResultObjectIndex =
|
||||
breakingNewsResult.scanResult.patternScanResult!!.endIndex - 2
|
||||
|
||||
breakingNewsMethod.addInstruction(
|
||||
moveResultObjectIndex + 1, """
|
||||
invoke-static {v${(breakingNewsMethod.instruction(moveResultObjectIndex) as OneRegisterInstruction).registerA}}, Lapp/revanced/integrations/patches/HideBreakingNewsPatch;->hideBreakingNews(Landroid/view/View;)V
|
||||
"""
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package app.revanced.patches.youtube.layout.homepage.breakingnews.resource.patch
|
||||
|
||||
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.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
|
||||
@Name("breaking-news-shelf-resource-patch")
|
||||
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
|
||||
@Version("0.0.1")
|
||||
class BreakingNewsResourcePatch : ResourcePatch {
|
||||
companion object {
|
||||
internal var horizontalCardListId: Long = -1
|
||||
}
|
||||
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_breaking_news",
|
||||
StringResource("revanced_hide_breaking_news_title", "Hide breaking news"),
|
||||
true,
|
||||
StringResource("revanced_hide_breaking_news_summary_on", "Breaking news are hidden"),
|
||||
StringResource("revanced_hide_breaking_news_summary_off", "Breaking news are shown")
|
||||
)
|
||||
)
|
||||
|
||||
horizontalCardListId = ResourceMappingPatch.resourceMappings.single {
|
||||
it.type == "layout" && it.name == "horizontal_card_list"
|
||||
}.id
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.google.android.youtube", arrayOf("17.45.36"))
|
||||
Package("com.google.android.youtube", arrayOf("17.49.37"))
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.returnyoutubedislike.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -51,8 +52,8 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
VideoIdPatch.injectCall("Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->newVideoLoaded(Ljava/lang/String;)V")
|
||||
|
||||
with(TextComponentFingerprint
|
||||
.also { it.resolve(context, TextComponentSpecParentFingerprint.result!!.classDef) }
|
||||
.result ?: return PatchResultError("Could not find createComponent method")
|
||||
.apply { resolve(context, TextComponentSpecParentFingerprint.result!!.classDef) }
|
||||
.result ?: return TextComponentFingerprint.toErrorResult()
|
||||
) {
|
||||
val createComponentMethod = mutableMethod
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object CreateVideoPlayerSeekbarFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
strings = listOf("timed_markers_width")
|
||||
)
|
||||
@@ -16,12 +16,14 @@ 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.MutableMethod
|
||||
import app.revanced.patches.shared.fingerprints.SeekbarFingerprint
|
||||
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.StartVideoInformerFingerprint
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.*
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.resource.patch.SponsorBlockResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch
|
||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||
@@ -48,7 +50,7 @@ import org.jf.dexlib2.iface.reference.StringReference
|
||||
@Version("0.0.1")
|
||||
class SponsorBlockBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
CreateVideoPlayerSeekbarFingerprint,
|
||||
SeekbarFingerprint,
|
||||
NextGenWatchLayoutFingerprint,
|
||||
AppendTimeFingerprint,
|
||||
PlayerOverlaysLayoutInitFingerprint,
|
||||
@@ -85,7 +87,9 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
||||
/*
|
||||
Seekbar drawing
|
||||
*/
|
||||
val seekbarSignatureResult = CreateVideoPlayerSeekbarFingerprint.result!!
|
||||
val seekbarSignatureResult = SeekbarFingerprint.result!!.let {
|
||||
SeekbarOnDrawFingerprint.apply { resolve(context, it.mutableClass) }
|
||||
}.result!!
|
||||
val seekbarMethod = seekbarSignatureResult.mutableMethod
|
||||
val seekbarMethodInstructions = seekbarMethod.implementation!!.instructions
|
||||
|
||||
@@ -96,7 +100,7 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
||||
if (instruction.opcode != Opcode.MOVE_OBJECT_FROM16) continue
|
||||
seekbarMethod.addInstruction(
|
||||
index + 1,
|
||||
"invoke-static {v0}, $INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarRect(Ljava/lang/Object;)V"
|
||||
"invoke-static/range {p0 .. p0}, $INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarRect(Ljava/lang/Object;)V"
|
||||
)
|
||||
break
|
||||
}
|
||||
@@ -120,10 +124,10 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
||||
/*
|
||||
Set rectangle absolute left and right positions
|
||||
*/
|
||||
val drawRectangleInstructions = seekbarMethodInstructions.filter {
|
||||
it is ReferenceInstruction && (it.reference as? MethodReference)?.name == "drawRect" && it is FiveRegisterInstruction
|
||||
}.map { // TODO: improve code
|
||||
seekbarMethodInstructions.indexOf(it) to (it as FiveRegisterInstruction).registerD
|
||||
val drawRectangleInstructions = seekbarMethodInstructions.withIndex().filter { (_, instruction) ->
|
||||
instruction is ReferenceInstruction && (instruction.reference as? MethodReference)?.name == "drawRect"
|
||||
}.map { (index, instruction) -> // TODO: improve code
|
||||
index to (instruction as FiveRegisterInstruction).registerD
|
||||
}
|
||||
|
||||
val (indexRight, rectangleRightRegister) = drawRectangleInstructions[0]
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -13,7 +13,7 @@ import app.revanced.util.resources.ResourceUtils
|
||||
import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch(include = false)
|
||||
@Patch
|
||||
@DependsOn([LithoThemePatch::class, FixLocaleConfigErrorPatch::class])
|
||||
@Name("theme")
|
||||
@Description("Applies a custom theme.")
|
||||
@@ -23,6 +23,7 @@ class ThemePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
val darkThemeBackgroundColor = darkThemeBackgroundColor!!
|
||||
val lightThemeBackgroundColor = lightThemeBackgroundColor!!
|
||||
val darkThemeSeekbarColor = darkThemeSeekbarColor!!
|
||||
|
||||
context.xmlEditor["res/values/colors.xml"].use { editor ->
|
||||
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
||||
@@ -31,22 +32,20 @@ class ThemePatch : ResourcePatch {
|
||||
val node = resourcesNode.childNodes.item(i) as? Element ?: continue
|
||||
|
||||
node.textContent = when (node.getAttribute("name")) {
|
||||
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3",
|
||||
"yt_black4", "yt_status_bar_background_dark", "material_grey_100", "material_grey_50",
|
||||
"material_grey_600", "material_grey_800", "material_grey_850", "material_grey_900",
|
||||
"material_grey_white_1000", "sud_glif_v3_dialog_background_color_dark" -> darkThemeBackgroundColor
|
||||
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3", "yt_black4", "yt_status_bar_background_dark", "material_grey_850" -> darkThemeBackgroundColor
|
||||
|
||||
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98", "yt_white2", "yt_white3", "yt_white4",
|
||||
"sud_glif_v3_dialog_background_color_light" -> lightThemeBackgroundColor
|
||||
-> lightThemeBackgroundColor
|
||||
|
||||
"inline_time_bar_colorized_bar_played_color_dark" -> darkThemeSeekbarColor
|
||||
else -> continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// copies the resource file to change the splash screen color
|
||||
context.copyResources("theme",
|
||||
ResourceUtils.ResourceGroup("values-night-v31", "styles.xml")
|
||||
context.copyResources(
|
||||
"theme", ResourceUtils.ResourceGroup("values-night-v31", "styles.xml")
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
@@ -70,5 +69,14 @@ class ThemePatch : ResourcePatch {
|
||||
description = "The background color of the light theme. Can be a hex color or a resource reference.",
|
||||
)
|
||||
)
|
||||
|
||||
var darkThemeSeekbarColor: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "darkThemeSeekbarColor",
|
||||
default = "#ffff0000",
|
||||
title = "Dark theme seekbar color",
|
||||
description = "The background color of the seekbar of the dark theme. Leave empty for default color.",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object DrawActionBarFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||
listOf("I", "I"),
|
||||
listOf(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
),
|
||||
)
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object IsInOfflineModeCheckFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
strings = listOf("bundle_is_in_offline_mode")
|
||||
)
|
||||
@@ -1,18 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object IsInOfflineModeCheckResultFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
parameters = listOf("L", "L", "L", "L", "L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.MOVE_OBJECT,
|
||||
),
|
||||
)
|
||||
@@ -8,7 +8,6 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.data.toMethodWalker
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
@@ -18,8 +17,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.IsInOfflineModeCheckFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.IsInOfflineModeCheckResultFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.DrawActionBarFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.SetWordmarkHeaderFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
@@ -32,7 +30,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
@Version("0.0.1")
|
||||
class WideSearchbarPatch : BytecodePatch(
|
||||
listOf(
|
||||
SetWordmarkHeaderFingerprint, IsInOfflineModeCheckFingerprint
|
||||
SetWordmarkHeaderFingerprint, DrawActionBarFingerprint
|
||||
)
|
||||
) {
|
||||
private companion object {
|
||||
@@ -75,16 +73,12 @@ class WideSearchbarPatch : BytecodePatch(
|
||||
)
|
||||
)
|
||||
|
||||
// resolve fingerprints
|
||||
IsInOfflineModeCheckFingerprint.result?.let {
|
||||
if (!IsInOfflineModeCheckResultFingerprint.resolve(context, it.classDef))
|
||||
return IsInOfflineModeCheckResultFingerprint.toErrorResult()
|
||||
} ?: return IsInOfflineModeCheckFingerprint.toErrorResult()
|
||||
val result = DrawActionBarFingerprint.result ?: return DrawActionBarFingerprint.toErrorResult()
|
||||
|
||||
// patch methods
|
||||
mapOf(
|
||||
SetWordmarkHeaderFingerprint to 1,
|
||||
IsInOfflineModeCheckResultFingerprint to 0
|
||||
DrawActionBarFingerprint to result.scanResult.patternScanResult!!.endIndex
|
||||
).forEach { (fingerprint, callIndex) ->
|
||||
context.walkMutable(callIndex, fingerprint).injectSearchBarHook()
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture.annotation
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class FixBackToExitGestureCompatibility
|
||||
@@ -0,0 +1,14 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object OnBackPressedFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.RETURN_VOID
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass.endsWith("WatchWhileActivity;")
|
||||
&& methodDef.name == "onBackPressed"
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object RecyclerViewScrollingFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_LEZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.CONST_4,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,27 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object RecyclerViewTopScrollingFingerprint : MethodFingerprint(
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.GOTO,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object RecyclerViewTopScrollingParentFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST_16,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.NEW_INSTANCE
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.name == "<init>"
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,86 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
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.patches.youtube.misc.fix.backtoexitgesture.annotation.FixBackToExitGestureCompatibility
|
||||
import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.OnBackPressedFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.RecyclerViewScrollingFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.RecyclerViewTopScrollingFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.RecyclerViewTopScrollingParentFingerprint
|
||||
|
||||
@Description("Fixes the swipe back to exit gesture.")
|
||||
@FixBackToExitGestureCompatibility
|
||||
@Version("0.0.1")
|
||||
class FixBackToExitGesturePatch : BytecodePatch(
|
||||
listOf(
|
||||
RecyclerViewTopScrollingParentFingerprint,
|
||||
RecyclerViewScrollingFingerprint,
|
||||
OnBackPressedFingerprint,
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
RecyclerViewTopScrollingFingerprint.apply {
|
||||
resolve(
|
||||
context,
|
||||
RecyclerViewTopScrollingParentFingerprint.result?.classDef
|
||||
?: return RecyclerViewTopScrollingParentFingerprint.toErrorResult()
|
||||
)
|
||||
}
|
||||
|
||||
mapOf(
|
||||
RecyclerViewTopScrollingFingerprint to IntegrationsMethod(
|
||||
methodName = "onTopView"
|
||||
),
|
||||
RecyclerViewScrollingFingerprint to IntegrationsMethod(
|
||||
methodName = "onScrollingViews"
|
||||
),
|
||||
OnBackPressedFingerprint to IntegrationsMethod(
|
||||
"p0", "onBackPressed", "Lcom/google/android/apps/youtube/app/watchwhile/WatchWhileActivity;"
|
||||
)
|
||||
).forEach { (fingerprint, target) ->
|
||||
try {
|
||||
fingerprint.injectCall(target)
|
||||
} catch (error: PatchResultError) {
|
||||
return error
|
||||
}
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
/**
|
||||
* A reference to a method from the integrations for [FixBackToExitGesturePatch].
|
||||
*
|
||||
* @param register The method registers.
|
||||
* @param methodName The method name.
|
||||
* @param parameterTypes The parameters of the method.
|
||||
*/
|
||||
data class IntegrationsMethod(
|
||||
val register: String = "", val methodName: String, val parameterTypes: String = ""
|
||||
) {
|
||||
override fun toString() =
|
||||
"invoke-static {$register}, Lapp/revanced/integrations/patches/FixBackToExitGesturePatch;->$methodName($parameterTypes)V"
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject a call to a method from the integrations.
|
||||
*
|
||||
* @param targetMethod The target method to call.
|
||||
*/
|
||||
fun MethodFingerprint.injectCall(targetMethod: IntegrationsMethod) = result?.apply {
|
||||
mutableMethod.addInstruction(
|
||||
scanResult.patternScanResult!!.endIndex, targetMethod.toString()
|
||||
)
|
||||
} ?: throw this.toErrorResult()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -7,6 +7,11 @@ import org.jf.dexlib2.Opcode
|
||||
object CanScrollVerticallyFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
parameters = emptyList(),
|
||||
opcodes = listOf(Opcode.INSTANCE_OF),
|
||||
opcodes = listOf(
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.RETURN,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
),
|
||||
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
|
||||
)
|
||||
)
|
||||
|
||||
@@ -4,12 +4,14 @@ import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.youtube.misc.fix.verticalscroll.annotations.VerticalScrollCompatibility
|
||||
import app.revanced.patches.youtube.misc.fix.verticalscroll.fingerprints.CanScrollVerticallyFingerprint
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Description("Fixes issues with scrolling on the home screen when the first component is of type EmptyComponent.")
|
||||
@VerticalScrollCompatibility
|
||||
@@ -20,13 +22,17 @@ class VerticalScrollPatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = CanScrollVerticallyFingerprint.result ?: return CanScrollVerticallyFingerprint.toErrorResult()
|
||||
|
||||
result.mutableMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x0
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
with(result) {
|
||||
val method = mutableMethod
|
||||
|
||||
val moveResultIndex = scanResult.patternScanResult!!.endIndex
|
||||
val moveResultRegister = (method.instruction(moveResultIndex) as OneRegisterInstruction).registerA
|
||||
|
||||
method.addInstruction(
|
||||
moveResultIndex + 1,
|
||||
"const/4 v$moveResultRegister, 0x0"
|
||||
)
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -19,6 +19,7 @@ import app.revanced.patches.youtube.misc.litho.filter.fingerprints.EmptyComponen
|
||||
import org.jf.dexlib2.iface.instruction.Instruction
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import org.jf.dexlib2.iface.reference.FieldReference
|
||||
import org.jf.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@@ -44,14 +45,16 @@ class LithoFilterPatch : BytecodePatch(
|
||||
val builderMethodDescriptor = instruction(builderMethodIndex).toDescriptor()
|
||||
val emptyComponentFieldDescriptor = instruction(emptyComponentFieldIndex).toDescriptor()
|
||||
|
||||
val stringBuilderRegister = (instruction(insertHookIndex - 1) as TwoRegisterInstruction).registerA
|
||||
|
||||
addInstructions(
|
||||
insertHookIndex, // right after setting the component.pathBuilder field,
|
||||
"""
|
||||
invoke-static {v5, v2}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
|
||||
invoke-static {v$stringBuilderRegister, v0}, 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}, $builderMethodDescriptor
|
||||
move-object/from16 v0, p1
|
||||
invoke-static {v0}, $builderMethodDescriptor
|
||||
move-result-object v0
|
||||
iget-object v0, v0, $emptyComponentFieldDescriptor
|
||||
return-object v0
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -68,7 +68,7 @@ class BottomControlsResourcePatch : ResourcePatch {
|
||||
"$namespace/$lastLeftOf"
|
||||
|
||||
// set lastLeftOf attribute to the the current element
|
||||
val nameSpaceLength = 4
|
||||
val nameSpaceLength = 5
|
||||
lastLeftOf = element.attributes.getNamedItem("android:id").nodeValue.substring(nameSpaceLength)
|
||||
|
||||
// copy the element
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object ThemeConstructorFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
listOf("L"),
|
||||
strings = listOf("settings.SettingsActivity", ":android:show_fragment", "settings.GeneralPrefsFragment")
|
||||
)
|
||||
@@ -6,18 +6,7 @@ import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object ThemeSetterAppFingerprint : MethodFingerprint(
|
||||
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L", "L"), listOf(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.IF_NE,
|
||||
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
||||
Opcode.CONST, //target reference
|
||||
Opcode.GOTO,
|
||||
Opcode.CONST, //target reference
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package app.revanced.patches.youtube.misc.settings.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
@@ -16,6 +18,7 @@ import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.annotations.SettingsCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.LicenseActivityFingerprint
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeConstructorFingerprint
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterAppFingerprint
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterSystemFingerprint
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch
|
||||
@@ -33,7 +36,7 @@ import org.jf.dexlib2.util.MethodUtil
|
||||
@SettingsCompatibility
|
||||
@Version("0.0.1")
|
||||
class SettingsPatch : BytecodePatch(
|
||||
listOf(LicenseActivityFingerprint, ThemeSetterSystemFingerprint, ThemeSetterAppFingerprint)
|
||||
listOf(LicenseActivityFingerprint, ThemeSetterSystemFingerprint, ThemeConstructorFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
fun buildInvokeInstructionsString(
|
||||
@@ -44,48 +47,47 @@ class SettingsPatch : BytecodePatch(
|
||||
) = "invoke-static {$registers}, $classDescriptor->$methodName($parameters)V"
|
||||
|
||||
// apply the current theme of the settings page
|
||||
with(ThemeSetterSystemFingerprint.result!!) {
|
||||
with(mutableMethod) {
|
||||
val call = buildInvokeInstructionsString()
|
||||
|
||||
ThemeSetterSystemFingerprint.result!!.let { result ->
|
||||
val call = buildInvokeInstructionsString()
|
||||
result.mutableMethod.apply {
|
||||
addInstruction(
|
||||
scanResult.patternScanResult!!.startIndex,
|
||||
call
|
||||
result.scanResult.patternScanResult!!.startIndex, call
|
||||
)
|
||||
|
||||
addInstruction(
|
||||
mutableMethod.implementation!!.instructions.size - 1,
|
||||
call
|
||||
addInstructions(
|
||||
implementation!!.instructions.size - 1, call
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// set the theme based on the preference of the app
|
||||
with(ThemeSetterAppFingerprint.result!!) {
|
||||
with(mutableMethod) {
|
||||
fun buildInstructionsString(theme: Int) = """
|
||||
with((ThemeConstructorFingerprint.result?.let {
|
||||
ThemeSetterAppFingerprint.apply {
|
||||
if (!resolve(context, it.classDef)) return ThemeSetterAppFingerprint.toErrorResult()
|
||||
}
|
||||
} ?: return ThemeConstructorFingerprint.toErrorResult()).result!!) {
|
||||
fun buildInstructionsString(theme: Int) = """
|
||||
const/4 v0, 0x$theme
|
||||
${buildInvokeInstructionsString(parameters = "I")}
|
||||
"""
|
||||
|
||||
val patternScanResult = scanResult.patternScanResult!!
|
||||
|
||||
mutableMethod.apply {
|
||||
addInstructions(
|
||||
scanResult.patternScanResult!!.endIndex + 1,
|
||||
buildInstructionsString(1)
|
||||
patternScanResult.endIndex + 1, buildInstructionsString(1)
|
||||
)
|
||||
addInstructions(
|
||||
scanResult.patternScanResult!!.endIndex - 7,
|
||||
buildInstructionsString(0)
|
||||
patternScanResult.endIndex - 7, buildInstructionsString(0)
|
||||
)
|
||||
|
||||
addInstructions(
|
||||
scanResult.patternScanResult!!.endIndex - 9,
|
||||
buildInstructionsString(1)
|
||||
patternScanResult.endIndex - 9, buildInstructionsString(1)
|
||||
)
|
||||
addInstructions(
|
||||
mutableMethod.implementation!!.instructions.size - 2,
|
||||
buildInstructionsString(0)
|
||||
implementation!!.instructions.size - 2, buildInstructionsString(0)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// set the theme based on the preference of the device
|
||||
@@ -100,8 +102,7 @@ class SettingsPatch : BytecodePatch(
|
||||
|
||||
// initialize the settings
|
||||
addInstructions(
|
||||
1,
|
||||
"""
|
||||
1, """
|
||||
${buildSettingsActivityInvokeString()}
|
||||
return-void
|
||||
"""
|
||||
@@ -134,8 +135,7 @@ class SettingsPatch : BytecodePatch(
|
||||
fun addPreferenceScreen(preferenceScreen: app.revanced.patches.shared.settings.preference.impl.PreferenceScreen) =
|
||||
SettingsResourcePatch.addPreferenceScreen(preferenceScreen)
|
||||
|
||||
fun addPreference(preference: Preference) =
|
||||
SettingsResourcePatch.addPreference(preference)
|
||||
fun addPreference(preference: Preference) = SettingsResourcePatch.addPreference(preference)
|
||||
|
||||
fun renameIntentsTargetPackage(newPackage: String) {
|
||||
SettingsResourcePatch.overrideIntentsTargetPackage = newPackage
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -20,6 +20,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMu
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility
|
||||
import app.revanced.patches.youtube.misc.video.information.fingerprints.*
|
||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.builder.MutableMethodImplementation
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@@ -31,7 +32,7 @@ import org.jf.dexlib2.util.MethodUtil
|
||||
@Description("Hooks YouTube to get information about the current playing video.")
|
||||
@VideoInformationCompatibility
|
||||
@Version("0.0.1")
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@DependsOn([IntegrationsPatch::class, VideoIdPatch::class])
|
||||
class VideoInformationPatch : BytecodePatch(
|
||||
listOf(
|
||||
PlayerInitFingerprint,
|
||||
@@ -94,6 +95,11 @@ class VideoInformationPatch : BytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Inject call for video id
|
||||
*/
|
||||
VideoIdPatch.injectCall("$INTEGRATIONS_CLASS_DESCRIPTOR->setVideoId(Ljava/lang/String;)V")
|
||||
|
||||
/*
|
||||
Set the video time method
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf("17.45.36")
|
||||
"com.google.android.youtube", arrayOf("17.49.37")
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user