mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-15 21:52:27 +01:00
Compare commits
3 Commits
v2.173.0-d
...
v2.171.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1025a888f | ||
|
|
19e82d97f2 | ||
|
|
2d3da2a579 |
116
CHANGELOG.md
116
CHANGELOG.md
@@ -1,122 +1,10 @@
|
||||
# [2.173.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.173.0-dev.1...v2.173.0-dev.2) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/theme:** change seekbar color via preference ([9b465d9](https://github.com/revanced/revanced-patches/commit/9b465d95887863f6b42baa6b710ed98c97383a82))
|
||||
|
||||
# [2.173.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.172.0...v2.173.0-dev.1) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** bump compatibility to `18.16.37` ([fe3fdd5](https://github.com/revanced/revanced-patches/commit/fe3fdd5c6cb186bcebc2f86b1d5b597109b25cb6))
|
||||
* **youtube:** support version `18.16.37` ([8beb5ea](https://github.com/revanced/revanced-patches/commit/8beb5ea860284be915c0ef0c6039821a50c14fa8))
|
||||
|
||||
# [2.172.0](https://github.com/revanced/revanced-patches/compare/v2.171.0...v2.172.0) (2023-05-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **change-package-name:** use `null` as default value for option `packageName` ([#1998](https://github.com/revanced/revanced-patches/issues/1998)) ([8128e6b](https://github.com/revanced/revanced-patches/commit/8128e6ba57ec4e4e01a0923a0d353cc934b93899))
|
||||
* **youtube/minimized-playback:** fix background play of kids videos ([#2016](https://github.com/revanced/revanced-patches/issues/2016)) ([89b1484](https://github.com/revanced/revanced-patches/commit/89b1484d1d8c1419ba8020d0571b25071d43e926))
|
||||
* **youtube/return-youtube-dislike:** support older UI layouts ([#2031](https://github.com/revanced/revanced-patches/issues/2031)) ([c82ccb5](https://github.com/revanced/revanced-patches/commit/c82ccb59955d7663a5be20338b4b5c9b7601195c))
|
||||
* **youtube/spoof-app-version:** adjust available app targets ([#2030](https://github.com/revanced/revanced-patches/issues/2030)) ([a16cb0d](https://github.com/revanced/revanced-patches/commit/a16cb0d32f40694f237cb1820b965cee26663fdd))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads:** hide multiple audio track button on video player overlay ([#2021](https://github.com/revanced/revanced-patches/issues/2021)) ([8d7f305](https://github.com/revanced/revanced-patches/commit/8d7f305aa2d8f86a9232a6a9577a87f58b53d51c))
|
||||
* **youtube/hide-get-premium:** hide get premium advertisements under video player ([#2020](https://github.com/revanced/revanced-patches/issues/2020)) ([05904a2](https://github.com/revanced/revanced-patches/commit/05904a2569cf9b82e3731692b93bc3a6bb005b03))
|
||||
* **youtube/hide-player-overlay:** exclude by default ([1c6fb94](https://github.com/revanced/revanced-patches/commit/1c6fb941f59599e2fe4a7d6f96babb6b0edac054))
|
||||
* **youtube/spoof-app-version:** user selectable version to spoof ([#2013](https://github.com/revanced/revanced-patches/issues/2013)) ([fd66417](https://github.com/revanced/revanced-patches/commit/fd6641747bd60bdd8b967db7cceaed454fb891a1))
|
||||
* **youtube/spoof-signature-verification:** list known spoofing side effects in revanced settings ([#2011](https://github.com/revanced/revanced-patches/issues/2011)) ([dc6e9b2](https://github.com/revanced/revanced-patches/commit/dc6e9b2268efe8a1bb72b80e5285d7002f448f4d))
|
||||
|
||||
# [2.172.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.8...v2.172.0-dev.9) (2023-05-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads:** hide multiple audio track button on video player overlay ([#2021](https://github.com/revanced/revanced-patches/issues/2021)) ([8d7f305](https://github.com/revanced/revanced-patches/commit/8d7f305aa2d8f86a9232a6a9577a87f58b53d51c))
|
||||
|
||||
# [2.172.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.7...v2.172.0-dev.8) (2023-05-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **change-package-name:** use `null` as default value for option `packageName` ([#1998](https://github.com/revanced/revanced-patches/issues/1998)) ([8128e6b](https://github.com/revanced/revanced-patches/commit/8128e6ba57ec4e4e01a0923a0d353cc934b93899))
|
||||
|
||||
# [2.172.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.6...v2.172.0-dev.7) (2023-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/return-youtube-dislike:** support older UI layouts ([#2031](https://github.com/revanced/revanced-patches/issues/2031)) ([c82ccb5](https://github.com/revanced/revanced-patches/commit/c82ccb59955d7663a5be20338b4b5c9b7601195c))
|
||||
|
||||
# [2.172.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.5...v2.172.0-dev.6) (2023-04-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/hide-get-premium:** hide get premium advertisements under video player ([#2020](https://github.com/revanced/revanced-patches/issues/2020)) ([05904a2](https://github.com/revanced/revanced-patches/commit/05904a2569cf9b82e3731692b93bc3a6bb005b03))
|
||||
|
||||
# [2.172.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.4...v2.172.0-dev.5) (2023-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/spoof-app-version:** adjust available app targets ([#2030](https://github.com/revanced/revanced-patches/issues/2030)) ([a16cb0d](https://github.com/revanced/revanced-patches/commit/a16cb0d32f40694f237cb1820b965cee26663fdd))
|
||||
|
||||
# [2.172.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.3...v2.172.0-dev.4) (2023-04-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/hide-player-overlay:** exclude by default ([1c6fb94](https://github.com/revanced/revanced-patches/commit/1c6fb941f59599e2fe4a7d6f96babb6b0edac054))
|
||||
|
||||
# [2.172.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.2...v2.172.0-dev.3) (2023-04-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/spoof-signature-verification:** list known spoofing side effects in revanced settings ([#2011](https://github.com/revanced/revanced-patches/issues/2011)) ([dc6e9b2](https://github.com/revanced/revanced-patches/commit/dc6e9b2268efe8a1bb72b80e5285d7002f448f4d))
|
||||
|
||||
# [2.172.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.1...v2.172.0-dev.2) (2023-04-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/minimized-playback:** fix background play of kids videos ([#2016](https://github.com/revanced/revanced-patches/issues/2016)) ([89b1484](https://github.com/revanced/revanced-patches/commit/89b1484d1d8c1419ba8020d0571b25071d43e926))
|
||||
|
||||
# [2.172.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.171.0...v2.172.0-dev.1) (2023-04-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/spoof-app-version:** user selectable version to spoof ([#2013](https://github.com/revanced/revanced-patches/issues/2013)) ([fd66417](https://github.com/revanced/revanced-patches/commit/fd6641747bd60bdd8b967db7cceaed454fb891a1))
|
||||
|
||||
# [2.171.0](https://github.com/revanced/revanced-patches/compare/v2.170.0...v2.171.0) (2023-04-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **enable-android-debugging:** make option `debuggable` false by default ([e717e26](https://github.com/revanced/revanced-patches/commit/e717e260fd0449a97929c3c82da577362586c5e1))
|
||||
* **youtube/minimized-playback:** disable minimized playback for shorts ([#1990](https://github.com/revanced/revanced-patches/issues/1990)) ([b91d18d](https://github.com/revanced/revanced-patches/commit/b91d18d24f332a9aa8721dc053e395d352b5796d))
|
||||
* **youtube/spoof-signature-verification:** additional fixes for subtitle window positions ([#1975](https://github.com/revanced/revanced-patches/issues/1975)) ([08584e6](https://github.com/revanced/revanced-patches/commit/08584e680fc658f37e8730499fa5197a08370776))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **id-austria:** remove compatibility version constraint ([#1952](https://github.com/revanced/revanced-patches/issues/1952)) ([94ffd5a](https://github.com/revanced/revanced-patches/commit/94ffd5a26fe42f223a09ad6bd7f34f1fac0986ad))
|
||||
* **youtube/sponsorblock:** automatically hide skip button ([#1956](https://github.com/revanced/revanced-patches/issues/1956)) ([c3c8ae6](https://github.com/revanced/revanced-patches/commit/c3c8ae6b4377b12838971cedc32779e12c07363c))
|
||||
* **youtube:** `hide-player-overlay` patch ([#1965](https://github.com/revanced/revanced-patches/issues/1965)) ([d233d96](https://github.com/revanced/revanced-patches/commit/d233d96faf838b22f4c458ad445af048362e7421))
|
||||
|
||||
# [2.171.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.171.0-dev.4...v2.171.0-dev.5) (2023-04-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **enable-android-debugging:** make option `debuggable` false by default ([e717e26](https://github.com/revanced/revanced-patches/commit/e717e260fd0449a97929c3c82da577362586c5e1))
|
||||
* **change-package-name:** make option `packageName` `null` by default ([b0ac972](https://github.com/revanced/revanced-patches/commit/b0ac972c129ff57d4cff1db99b92bde2b3ee19a3))
|
||||
* **enable-android-debugging:** make option `debuggable` false by default ([90e1357](https://github.com/revanced/revanced-patches/commit/90e13575c4d49873ee4f7e13ea90a04f3a5f7700))
|
||||
|
||||
# [2.171.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.171.0-dev.3...v2.171.0-dev.4) (2023-04-27)
|
||||
|
||||
|
||||
109
README.md
109
README.md
@@ -9,60 +9,60 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `always-autorepeat` | Always repeats the playing video again. | 18.16.37 |
|
||||
| `client-spoof` | Spoofs a patched client to allow playback. | 18.16.37 |
|
||||
| `comments` | Hides components related to comments. | 18.16.37 |
|
||||
| `copy-video-url` | Adds buttons in player to copy video links. | 18.16.37 |
|
||||
| `always-autorepeat` | Always repeats the playing video again. | 18.15.40 |
|
||||
| `client-spoof` | Spoofs a patched client to allow playback. | all |
|
||||
| `comments` | Hides components related to comments. | 18.15.40 |
|
||||
| `copy-video-url` | Adds buttons in player to copy video links. | 18.15.40 |
|
||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.16.37 |
|
||||
| `custom-video-speed` | Adds more video speed options. | 18.16.37 |
|
||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.16.37 |
|
||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.16.37 |
|
||||
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.16.37 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.16.37 |
|
||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.15.40 |
|
||||
| `custom-video-speed` | Adds more video speed options. | 18.15.40 |
|
||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.15.40 |
|
||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.15.40 |
|
||||
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.15.40 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.15.40 |
|
||||
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||
| `downloads` | Enables downloading music and videos from YouTube. | 18.16.37 |
|
||||
| `downloads` | Enables downloading music and videos from YouTube. | 18.15.40 |
|
||||
| `enable-debugging` | Adds debugging options. | all |
|
||||
| `general-ads` | Removes general ads. | 18.16.37 |
|
||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.16.37 |
|
||||
| `hide-album-cards` | Hides the album cards below the artist description. | 18.16.37 |
|
||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 18.16.37 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.16.37 |
|
||||
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.16.37 |
|
||||
| `hide-captions-button` | Hides the captions button on video player. | 18.16.37 |
|
||||
| `general-ads` | Removes general ads. | 18.15.40 |
|
||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.15.40 |
|
||||
| `hide-album-cards` | Hides the album cards below the artist description. | 18.15.40 |
|
||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 18.15.40 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.15.40 |
|
||||
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.15.40 |
|
||||
| `hide-captions-button` | Hides the captions button on video player. | 18.15.40 |
|
||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||
| `hide-create-button` | Hides the create button in the navigation bar. | 18.16.37 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.16.37 |
|
||||
| `hide-email-address` | Hides the email address in the account switcher. | 18.16.37 |
|
||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.16.37 |
|
||||
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.16.37 |
|
||||
| `hide-get-premium` | Hides advertisement for YouTube Premium under the video player. | 18.16.37 |
|
||||
| `hide-info-cards` | Hides info cards in videos. | 18.16.37 |
|
||||
| `hide-create-button` | Hides the create button in the navigation bar. | 18.15.40 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.15.40 |
|
||||
| `hide-email-address` | Hides the email address in the account switcher. | 18.15.40 |
|
||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.15.40 |
|
||||
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.15.40 |
|
||||
| `hide-info-cards` | Hides info cards in videos. | 18.15.40 |
|
||||
| `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | all |
|
||||
| `hide-player-overlay` | Hides the dark player overlay when player controls are visible. | all |
|
||||
| `hide-seekbar` | Hides the seekbar. | 18.16.37 |
|
||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 18.16.37 |
|
||||
| `hide-timestamp` | Hides timestamp in video player. | 18.16.37 |
|
||||
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.16.37 |
|
||||
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.16.37 |
|
||||
| `hide-watermark` | Hides creator's watermarks on videos. | 18.16.37 |
|
||||
| `minimized-playback` | Enables minimized and background playback. | 18.16.37 |
|
||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.16.37 |
|
||||
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.16.37 |
|
||||
| `hide-seekbar` | Hides the seekbar. | 18.15.40 |
|
||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 18.15.40 |
|
||||
| `hide-timestamp` | Hides timestamp in video player. | 18.15.40 |
|
||||
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.15.40 |
|
||||
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.15.40 |
|
||||
| `hide-watermark` | Hides creator's watermarks on videos. | 18.15.40 |
|
||||
| `minimized-playback` | Enables minimized and background playback. | 18.15.40 |
|
||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.15.40 |
|
||||
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.15.40 |
|
||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||
| `remember-playback-speed` | Adds the ability to remember the playback speed you chose in the video playback speed flyout. | 18.16.37 |
|
||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.16.37 |
|
||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 18.16.37 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.16.37 |
|
||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.16.37 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.16.37 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.16.37 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.16.37 |
|
||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.16.37 |
|
||||
| `remember-playback-speed` | Adds the ability to remember the playback speed you chose in the video playback speed flyout. | 18.15.40 |
|
||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.15.40 |
|
||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 18.15.40 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.15.40 |
|
||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.15.40 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.15.40 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.15.40 |
|
||||
| `spoof-signature-verification` | Spoofs a patched client to prevent playback issues. | 18.15.40 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.15.40 |
|
||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.15.40 |
|
||||
| `theme` | Applies a custom theme. | all |
|
||||
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.16.37 |
|
||||
| `video-ads` | Removes ads in the video player. | 18.16.37 |
|
||||
| `wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.16.37 |
|
||||
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.15.40 |
|
||||
| `video-ads` | Removes ads in the video player. | 18.15.40 |
|
||||
| `wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.15.40 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||
@@ -159,6 +159,15 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `client-spoof` | Spoofs a patched client to allow playback. | all |
|
||||
| `hide-ads` | Removes general ads. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `at.gv.bmf.bmf2go`](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go)
|
||||
<details>
|
||||
|
||||
@@ -201,14 +210,6 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `hide-ads` | Removes ads from Inshorts. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `hide-ads` | Removes general ads. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.facebook.orca`](https://play.google.com/store/apps/details?id=com.facebook.orca)
|
||||
<details>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.173.0-dev.2
|
||||
version = 2.171.0-dev.5
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
7
gradlew
vendored
7
gradlew
vendored
@@ -85,6 +85,9 @@ done
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
@@ -194,10 +197,6 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
|
||||
870
package-lock.json
generated
870
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ import app.revanced.patcher.patch.Patch
|
||||
import app.revanced.patcher.util.patch.PatchBundle
|
||||
import java.io.File
|
||||
|
||||
internal typealias PatchBundlePatches = List<Class<out Patch<Context>>>
|
||||
typealias PatchBundlePatches = List<Class<out Patch<Context>>>
|
||||
|
||||
internal interface PatchesFileGenerator {
|
||||
fun generate(bundle: PatchBundlePatches)
|
||||
|
||||
@@ -4,21 +4,10 @@ import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf(
|
||||
"17.49.37",
|
||||
"18.03.36",
|
||||
"18.03.42",
|
||||
"18.04.35",
|
||||
"18.04.41",
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
[
|
||||
Package("com.google.android.youtube"),
|
||||
Package("com.vanced.android.youtube")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ClientSpoofCompatibility
|
||||
|
||||
@@ -10,18 +10,15 @@ 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.shared.misc.fix.spoof.annotations.ClientSpoofCompatibility
|
||||
import app.revanced.patches.shared.misc.fix.spoof.fingerprints.UserAgentHeaderBuilderFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.playback.patch.SpoofSignatureVerificationPatch
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("client-spoof")
|
||||
@Description("Spoofs a patched client to allow playback.")
|
||||
@ClientSpoofCompatibility
|
||||
@DependsOn([SpoofSignatureVerificationPatch::class])
|
||||
@Version("0.0.1")
|
||||
class ClientSpoofPatch : BytecodePatch(
|
||||
listOf(UserAgentHeaderBuilderFingerprint)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -212,13 +212,6 @@ class GeneralAdsResourcePatch : ResourcePatch {
|
||||
true,
|
||||
StringResource("revanced_hide_image_shelf_summary_on", "Image shelf is hidden"),
|
||||
StringResource("revanced_hide_image_shelf_summary_off", "Image shelf is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_audio_track_button",
|
||||
StringResource("revanced_hide_audio_track_button_title", "Hide audio track button"),
|
||||
false,
|
||||
StringResource("revanced_hide_audio_track_button_on", "Audio track button is hidden"),
|
||||
StringResource("revanced_hide_audio_track_button_off", "Audio track button is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,8 +14,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.hide.getpremium.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40", "18.16.37"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class HideGetPremiumCompatibility
|
||||
@@ -1,17 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.hide.getpremium.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object GetPremiumViewFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.ADD_INT_2ADDR,
|
||||
Opcode.ADD_INT_2ADDR,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_VOID
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/red/presenter/CompactYpcOfferModuleView;"
|
||||
&& methodDef.name == "onMeasure"
|
||||
}
|
||||
)
|
||||
@@ -1,77 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.hide.getpremium.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.addInstructions
|
||||
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.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.getpremium.annotations.HideGetPremiumCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.getpremium.bytecode.fingerprints.GetPremiumViewFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("hide-get-premium")
|
||||
@Description("Hides advertisement for YouTube Premium under the video player.")
|
||||
@HideGetPremiumCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideGetPremiumPatch : BytecodePatch(
|
||||
listOf(
|
||||
GetPremiumViewFingerprint,
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_get_premium",
|
||||
StringResource("revanced_hide_get_premium_title", "Hide YouTube Premium advertisement"),
|
||||
true,
|
||||
StringResource("revanced_hide_get_premium_summary_on", "YouTube Premium advertisement are hidden"),
|
||||
StringResource("revanced_hide_get_premium_summary_off", "YouTube Premium advertisement are shown")
|
||||
)
|
||||
)
|
||||
|
||||
GetPremiumViewFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val startIndex = it.scanResult.patternScanResult!!.startIndex
|
||||
val measuredWidthRegister = (instruction(startIndex) as TwoRegisterInstruction).registerA
|
||||
val measuredHeightInstruction = instruction(startIndex + 1) as TwoRegisterInstruction
|
||||
val measuredHeightRegister = measuredHeightInstruction.registerA
|
||||
val tempRegister = measuredHeightInstruction.registerB
|
||||
|
||||
addInstructions(
|
||||
startIndex + 2,
|
||||
"""
|
||||
# Override the internal measurement of the layout with zero values.
|
||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->hideGetPremiumView()Z
|
||||
move-result v$tempRegister
|
||||
if-eqz v$tempRegister, :allow
|
||||
const/4 v$measuredWidthRegister, 0x0
|
||||
const/4 v$measuredHeightRegister, 0x0
|
||||
:allow
|
||||
nop
|
||||
# Layout width/height is then passed to a protected class method.
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return GetPremiumViewFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/HideGetPremiumPatch;"
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.hide.player.overlay.annotations.HidePlayerOverlayPatchCompatibility
|
||||
|
||||
@Patch(false)
|
||||
@Patch
|
||||
@Name("hide-player-overlay")
|
||||
@Description("Hides the dark player overlay when player controls are visible.")
|
||||
@HidePlayerOverlayPatchCompatibility
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40", "18.16.37"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ReturnYouTubeDislikeCompatibility
|
||||
@@ -1,28 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
object DislikesOldLayoutTextViewFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf("L"),
|
||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
opcodes = listOf(
|
||||
Opcode.CONST, // resource identifier register
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IF_NEZ, // textview register
|
||||
Opcode.GOTO,
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == ReturnYouTubeDislikeResourcePatch.oldUIDislikeId
|
||||
} == true
|
||||
}
|
||||
)
|
||||
@@ -1,8 +1,11 @@
|
||||
package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
|
||||
@FuzzyPatternScanMethod(2)
|
||||
object LikeFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
strings = listOf("like/like")
|
||||
strings = listOf("like/like")
|
||||
)
|
||||
@@ -7,7 +7,6 @@ import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.data.toMethodWalker
|
||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
@@ -49,7 +48,6 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
listOf(
|
||||
TextComponentConstructorFingerprint,
|
||||
ShortsTextComponentParentFingerprint,
|
||||
DislikesOldLayoutTextViewFingerprint,
|
||||
LikeFingerprint,
|
||||
DislikeFingerprint,
|
||||
RemoveLikeFingerprint,
|
||||
@@ -58,7 +56,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// region Inject newVideoLoaded event handler to update dislikes when a new video is loaded.
|
||||
|
||||
VideoIdPatch.injectCall("$INTEGRATIONS_CLASS_DESCRIPTOR->newVideoLoaded(Ljava/lang/String;)V")
|
||||
VideoIdPatch.injectCall("$INTEGRATIONS_PATCH_CLASS_DESCRIPTOR->newVideoLoaded(Ljava/lang/String;)V")
|
||||
|
||||
// endregion
|
||||
|
||||
@@ -74,7 +72,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, ${vote.value}
|
||||
invoke-static {v0}, $INTEGRATIONS_CLASS_DESCRIPTOR->sendVote(I)V
|
||||
invoke-static {v0}, $INTEGRATIONS_PATCH_CLASS_DESCRIPTOR->sendVote(I)V
|
||||
"""
|
||||
)
|
||||
} ?: return PatchResultError("Failed to find ${fingerprint.name} method.")
|
||||
@@ -122,7 +120,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
addInstructions(
|
||||
insertIndex + 1, """
|
||||
iget-object v$contextRegister, v$contextRegister, $conversionContextFieldReference # copy obfuscated context field into free register
|
||||
invoke-static {v$contextRegister, v$atomicReferenceRegister, v$charSequenceRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
||||
invoke-static {v$contextRegister, v$atomicReferenceRegister, v$charSequenceRegister}, $INTEGRATIONS_PATCH_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
||||
move-result-object v$charSequenceRegister
|
||||
move-object v${moveCharSequenceInstruction.registerA}, v${charSequenceRegister} # original instruction at the insertion point
|
||||
"""
|
||||
@@ -166,26 +164,11 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
|
||||
// endregion
|
||||
|
||||
// region Hook old UI layout dislikes, for the older app spoofs used with spoof-app-version.
|
||||
|
||||
DislikesOldLayoutTextViewFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val startIndex = it.scanResult.patternScanResult!!.startIndex
|
||||
val resourceIdentifierRegister = (instruction(startIndex) as OneRegisterInstruction).registerA
|
||||
val textViewRegister = (instruction(startIndex + 4) as OneRegisterInstruction).registerA
|
||||
addInstruction(startIndex + 4,
|
||||
"invoke-static {v$resourceIdentifierRegister, v$textViewRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->setOldUILayoutDislikes(ILandroid/widget/TextView;)V"
|
||||
)
|
||||
}
|
||||
} ?: return DislikesOldLayoutTextViewFingerprint.toErrorResult()
|
||||
|
||||
// endregion
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
const val INTEGRATIONS_PATCH_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;"
|
||||
|
||||
private fun MethodFingerprint.toPatch(voteKind: Vote) = VotePatch(this, voteKind)
|
||||
@@ -199,7 +182,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
private fun MutableMethod.insertShorts(index: Int, register: Int) {
|
||||
addInstructions(
|
||||
index, """
|
||||
invoke-static {v$register}, $INTEGRATIONS_CLASS_DESCRIPTOR->onShortsComponentCreated(Landroid/text/Spanned;)Landroid/text/Spanned;
|
||||
invoke-static {v$register}, $INTEGRATIONS_PATCH_CLASS_DESCRIPTOR->onShortsComponentCreated(Landroid/text/Spanned;)Landroid/text/Spanned;
|
||||
move-result-object v$register
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -8,7 +8,6 @@ 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.shared.settings.preference.impl.Preference
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility
|
||||
@@ -21,10 +20,6 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
||||
@ReturnYouTubeDislikeCompatibility
|
||||
@Version("0.0.1")
|
||||
class ReturnYouTubeDislikeResourcePatch : ResourcePatch {
|
||||
companion object {
|
||||
internal var oldUIDislikeId: Long = -1
|
||||
}
|
||||
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
val youtubePackage = "com.google.android.youtube"
|
||||
SettingsPatch.addPreference(
|
||||
@@ -41,10 +36,6 @@ class ReturnYouTubeDislikeResourcePatch : ResourcePatch {
|
||||
// merge strings
|
||||
context.mergeStrings("returnyoutubedislike/host/values/strings.xml")
|
||||
|
||||
oldUIDislikeId = ResourceMappingPatch.resourceMappings.single {
|
||||
it.type == "id" && it.name == "dislike_button"
|
||||
}.id
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40", "18.16.37"))]
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class SponsorBlockCompatibility
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -11,8 +11,6 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.ArrayResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.ListPreference
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.spoofappversion.annotations.SpoofAppVersionCompatibility
|
||||
@@ -38,36 +36,11 @@ class SpoofAppVersionPatch : BytecodePatch(
|
||||
"revanced_spoof_app_version",
|
||||
StringResource("revanced_spoof_app_version_title", "Spoof app version"),
|
||||
false,
|
||||
StringResource("revanced_spoof_app_version_summary_on", "Version spoofed"),
|
||||
StringResource("revanced_spoof_app_version_summary_on", "Version spoofed to 17.30.34"),
|
||||
StringResource("revanced_spoof_app_version_summary_off", "Version not spoofed"),
|
||||
StringResource("revanced_spoof_app_version_user_dialog_message",
|
||||
"App version will be spoofed to an older version of YouTube. This will change the appearance of the app, but unknown side effects may occur."
|
||||
+ " If later turned off, the old UI may remain until you log out or clear the app data.")
|
||||
),
|
||||
ListPreference(
|
||||
"revanced_spoof_app_version_target",
|
||||
StringResource(
|
||||
"revanced_spoof_app_version_target_title",
|
||||
"Spoof app version target"
|
||||
),
|
||||
ArrayResource(
|
||||
"revanced_spoof_app_version_target_entries",
|
||||
listOf(
|
||||
StringResource("revanced_spoof_app_version_target_entry_1", "17.30.35 - Restore old UI layout"),
|
||||
StringResource("revanced_spoof_app_version_target_entry_2", "17.01.35 - Enable sorting videos by oldest"),
|
||||
StringResource("revanced_spoof_app_version_target_entry_3", "16.08.35 - Restore explore tab"),
|
||||
StringResource("revanced_spoof_app_version_target_entry_4", "16.01.35 - Restore old shorts player"),
|
||||
)
|
||||
),
|
||||
ArrayResource(
|
||||
"revanced_spoof_app_version_target_entry_values",
|
||||
listOf(
|
||||
StringResource("revanced_spoof_app_version_target_entry_value_1", "17.30.35"),
|
||||
StringResource("revanced_spoof_app_version_target_entry_value_2", "17.01.35"),
|
||||
StringResource("revanced_spoof_app_version_target_entry_value_3", "16.08.35"),
|
||||
StringResource("revanced_spoof_app_version_target_entry_value_4", "16.01.35"),
|
||||
)
|
||||
)
|
||||
"App version will be spoofed to 17.30.34. This will give the old UI layout, but unknown side effects may occur."
|
||||
+ " If later turned off, the old UI layout may remain until you log out or clear the app data.")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40", "18.16.37"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class TabletMiniPlayerCompatibility
|
||||
|
||||
@@ -7,17 +7,5 @@ import org.jf.dexlib2.Opcode
|
||||
|
||||
object MiniPlayerOverrideFingerprint : MethodFingerprint(
|
||||
"Z", AccessFlags.STATIC or AccessFlags.PUBLIC,
|
||||
listOf("L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_EQ,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_EQ,
|
||||
Opcode.CONST_4, // override this value
|
||||
Opcode.RETURN,
|
||||
Opcode.CONST_4, // override this value
|
||||
Opcode.RETURN
|
||||
),
|
||||
opcodes = listOf(Opcode.RETURN), // anchor to insert the instruction
|
||||
)
|
||||
@@ -1,7 +1,13 @@
|
||||
package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
|
||||
object MiniPlayerOverrideParentFingerprint : MethodFingerprint(
|
||||
strings = listOf("Possible Context wrapper loop - chain of wrappers larger than 10000")
|
||||
returnType = "L",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
parameters = listOf("L"),
|
||||
strings = listOf("PLAYBACK_RATE_MENU_BOTTOM_SHEET_FRAGMENT")
|
||||
)
|
||||
@@ -10,7 +10,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
@@ -21,7 +20,6 @@ import app.revanced.patches.youtube.layout.tabletminiplayer.annotations.TabletMi
|
||||
import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.*
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@@ -70,28 +68,10 @@ class TabletMiniPlayerPatch : BytecodePatch(
|
||||
MiniPlayerOverrideParentFingerprint.result?.let {
|
||||
if (!MiniPlayerOverrideFingerprint.resolve(context, it.classDef))
|
||||
throw MiniPlayerOverrideFingerprint.toErrorResult()
|
||||
|
||||
MiniPlayerOverrideFingerprint.addProxyCall()
|
||||
} ?: return MiniPlayerOverrideParentFingerprint.toErrorResult()
|
||||
|
||||
/*
|
||||
* Override every return instruction with the proxy call.
|
||||
*/
|
||||
MiniPlayerOverrideFingerprint.result!!.mutableMethod.apply {
|
||||
implementation!!.let { implementation ->
|
||||
val returnIndices = implementation.instructions
|
||||
.withIndex()
|
||||
.filter { (_, instruction) -> instruction.opcode == Opcode.RETURN }
|
||||
.map { (index, _) -> index }
|
||||
|
||||
if (returnIndices.isEmpty()) throw PatchResultError("No return instructions found.")
|
||||
|
||||
// This method clobbers register p0 to return the value, calculate to override.
|
||||
val returnedRegister = implementation.registerCount - parameters.size
|
||||
|
||||
// Hook the returned register on every return instruction.
|
||||
returnIndices.forEach { index -> insertOverride(index, returnedRegister) }
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Size check return value override.
|
||||
*/
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.theme.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.CreateDarkThemeSeekbarFingerprint.indexOfInstructionWithSeekbarId
|
||||
import app.revanced.patches.youtube.layout.theme.resource.ThemeResourcePatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.Method
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
object CreateDarkThemeSeekbarFingerprint : MethodFingerprint(
|
||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
customFingerprint = { method -> method.indexOfInstructionWithSeekbarId != -1 },
|
||||
) {
|
||||
/**
|
||||
* The index of the instruction that loads the resource id of the seekbar.
|
||||
*/
|
||||
internal val Method.indexOfInstructionWithSeekbarId
|
||||
get() = implementation?.let {
|
||||
it.instructions.indexOfFirst { instruction ->
|
||||
instruction.opcode == Opcode.CONST && (instruction as WideLiteralInstruction).wideLiteral == ThemeResourcePatch.inlineTimeBarColorizedBarPlayedColorDarkId
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.theme.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.addInstructions
|
||||
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.theme.annotations.ThemeCompatibility
|
||||
import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.CreateDarkThemeSeekbarFingerprint
|
||||
import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.CreateDarkThemeSeekbarFingerprint.indexOfInstructionWithSeekbarId
|
||||
import app.revanced.patches.youtube.layout.theme.resource.ThemeResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("theme")
|
||||
@Description("Applies a custom theme.")
|
||||
@DependsOn([ThemeLithoComponentsPatch::class, ThemeResourcePatch::class, IntegrationsPatch::class])
|
||||
@ThemeCompatibility
|
||||
@Version("0.0.1")
|
||||
class ThemeBytecodePatch : BytecodePatch(listOf(CreateDarkThemeSeekbarFingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
CreateDarkThemeSeekbarFingerprint.result?.let {
|
||||
val putColorValueIndex = it.method.indexOfInstructionWithSeekbarId!! + 3
|
||||
|
||||
it.mutableMethod.apply {
|
||||
val overrideRegister = (instruction(putColorValueIndex) as TwoRegisterInstruction).registerA
|
||||
|
||||
addInstructions(
|
||||
putColorValueIndex,
|
||||
"""
|
||||
invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->getSeekbarColorValue()I
|
||||
move-result v$overrideRegister
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return CreateDarkThemeSeekbarFingerprint.toErrorResult()
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/theme/ThemePatch;"
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.theme.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.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility
|
||||
import app.revanced.patches.youtube.layout.theme.fingerprints.LithoThemeFingerprint
|
||||
|
||||
@Name("theme-litho-components")
|
||||
@Description("Applies a custom theme to Litho components.")
|
||||
@ThemeCompatibility
|
||||
@Version("0.0.1")
|
||||
class ThemeLithoComponentsPatch : BytecodePatch(listOf(LithoThemeFingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
LithoThemeFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val patchIndex = it.scanResult.patternScanResult!!.endIndex - 1
|
||||
|
||||
addInstructions(
|
||||
patchIndex,
|
||||
"""
|
||||
invoke-static {p1}, $INTEGRATIONS_CLASS_DESCRIPTOR->getValue(I)I
|
||||
move-result p1
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return LithoThemeFingerprint.toErrorResult()
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/theme/ThemeLithoComponentsPatch;"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package app.revanced.patches.youtube.layout.theme.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility
|
||||
import app.revanced.patches.youtube.layout.theme.fingerprints.LithoThemeFingerprint
|
||||
|
||||
@Name("litho-components-theme")
|
||||
@Description("Applies a custom theme to litho components.")
|
||||
@ThemeCompatibility
|
||||
@Version("0.0.1")
|
||||
class LithoThemePatch : BytecodePatch(
|
||||
listOf(
|
||||
LithoThemeFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = LithoThemeFingerprint.result!!
|
||||
val method = result.mutableMethod
|
||||
val patchIndex = result.scanResult.patternScanResult!!.endIndex - 1
|
||||
|
||||
method.addInstructions(
|
||||
patchIndex, """
|
||||
invoke-static {p1}, Lapp/revanced/integrations/patches/LithoThemePatch;->applyLithoTheme(I)I
|
||||
move-result p1
|
||||
"""
|
||||
)
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,29 @@
|
||||
package app.revanced.patches.youtube.layout.theme.resource
|
||||
package app.revanced.patches.youtube.layout.theme.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.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.InputType
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.TextPreference
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility
|
||||
import app.revanced.util.resources.ResourceUtils
|
||||
import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
|
||||
class ThemeResourcePatch : ResourcePatch {
|
||||
@Patch
|
||||
@DependsOn([LithoThemePatch::class])
|
||||
@Name("theme")
|
||||
@Description("Applies a custom theme.")
|
||||
@ThemeCompatibility
|
||||
@Version("0.0.1")
|
||||
class ThemePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
TextPreference(
|
||||
"revanced_seekbar_color",
|
||||
StringResource("revanced_seekbar_color_title", "Seekbar color"),
|
||||
InputType.STRING,
|
||||
"#ffff0000",
|
||||
StringResource(
|
||||
"revanced_seekbar_color_summary",
|
||||
"The color of the seekbar for the dark theme."
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
// Edit theme colors via bytecode.
|
||||
// For that the resource id is used in a bytecode patch to change the color.
|
||||
|
||||
inlineTimeBarColorizedBarPlayedColorDarkId = ResourceMappingPatch.resourceMappings
|
||||
.find { it.name == "inline_time_bar_colorized_bar_played_color_dark" }?.id
|
||||
?: return PatchResultError("Could not find seekbar resource")
|
||||
|
||||
|
||||
val darkThemeBackgroundColor = darkThemeBackgroundColor!!
|
||||
val lightThemeBackgroundColor = lightThemeBackgroundColor!!
|
||||
val darkThemeSeekbarColor = darkThemeSeekbarColor!!
|
||||
|
||||
// Edit theme colors via resources.
|
||||
context.xmlEditor["res/values/colors.xml"].use { editor ->
|
||||
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
||||
|
||||
@@ -47,19 +31,18 @@ class ThemeResourcePatch : 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_850" -> 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",
|
||||
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98", "yt_white2", "yt_white3", "yt_white4",
|
||||
-> lightThemeBackgroundColor
|
||||
|
||||
"inline_time_bar_colorized_bar_played_color_dark" -> darkThemeSeekbarColor
|
||||
else -> continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copy the resource file to change the splash screen color.
|
||||
// copies the resource file to change the splash screen color
|
||||
context.copyResources(
|
||||
"theme", ResourceUtils.ResourceGroup("values-night-v31", "styles.xml")
|
||||
)
|
||||
@@ -68,8 +51,6 @@ class ThemeResourcePatch : ResourcePatch {
|
||||
}
|
||||
|
||||
companion object : OptionsContainer() {
|
||||
internal var inlineTimeBarColorizedBarPlayedColorDarkId = -1L
|
||||
|
||||
var darkThemeBackgroundColor: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "darkThemeBackgroundColor",
|
||||
@@ -87,5 +68,14 @@ class ThemeResourcePatch : 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.",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package app.revanced.patches.youtube.misc.fix.playback.annotation
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf(
|
||||
"17.49.37",
|
||||
"18.03.36",
|
||||
"18.03.42",
|
||||
"18.04.35",
|
||||
"18.04.41",
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ProtobufSpoofCompatibility
|
||||
@@ -12,9 +12,12 @@ 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.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.misc.fix.spoof.patch.ClientSpoofPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.fix.playback.annotation.ProtobufSpoofCompatibility
|
||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.OpenCronetDataSourceFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.SubtitleWindowSettingsConstructorFingerprint
|
||||
@@ -24,12 +27,15 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("spoof-signature-verification")
|
||||
@Description("Spoofs a patched client to prevent playback issues.")
|
||||
@ProtobufSpoofCompatibility
|
||||
@DependsOn([
|
||||
IntegrationsPatch::class,
|
||||
SettingsPatch::class,
|
||||
PlayerTypeHookPatch::class,
|
||||
ClientSpoofPatch::class,
|
||||
VideoIdPatch::class
|
||||
])
|
||||
@Version("0.0.1")
|
||||
@@ -46,14 +52,10 @@ class SpoofSignatureVerificationPatch : BytecodePatch(
|
||||
"revanced_spoof_signature_verification",
|
||||
StringResource("revanced_spoof_signature_verification_title", "Spoof app signature"),
|
||||
true,
|
||||
StringResource("revanced_spoof_signature_verification_summary_on",
|
||||
"App signature spoofed\\n\\n"
|
||||
+ "Side effects include:\\n"
|
||||
+ "• End screen cards are always hidden\\n"
|
||||
+ "• Download button may be hidden"),
|
||||
StringResource("revanced_spoof_signature_verification_summary_on", "App signature spoofed"),
|
||||
StringResource("revanced_spoof_signature_verification_summary_off", "App signature not spoofed"),
|
||||
StringResource("revanced_spoof_signature_verification_user_dialog_message",
|
||||
"Turning off this setting may cause playback issues.")
|
||||
"Signature spoofing can fix playback issues, but may causes side effects.")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package app.revanced.patches.youtube.misc.minimizedplayback.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 KidsMinimizedPlaybackPolicyControllerFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("I", "L", "L"),
|
||||
opcodes = listOf(
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.IF_NE,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IPUT_BOOLEAN,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET,
|
||||
Opcode.INVOKE_STATIC
|
||||
),
|
||||
customFingerprint = { it.definingClass.endsWith("MinimizedPlaybackPolicyController;") }
|
||||
)
|
||||
@@ -6,7 +6,6 @@ import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.data.toMethodWalker
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
@@ -18,7 +17,6 @@ import app.revanced.patches.shared.settings.preference.impl.NonInteractivePrefer
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.minimizedplayback.annotations.MinimizedPlaybackCompatibility
|
||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.KidsMinimizedPlaybackPolicyControllerFingerprint
|
||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackSettingsFingerprint
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
@@ -35,8 +33,7 @@ import org.jf.dexlib2.iface.reference.MethodReference
|
||||
class MinimizedPlaybackPatch : BytecodePatch(
|
||||
listOf(
|
||||
MinimizedPlaybackManagerFingerprint,
|
||||
MinimizedPlaybackSettingsFingerprint,
|
||||
KidsMinimizedPlaybackPolicyControllerFingerprint
|
||||
MinimizedPlaybackSettingsFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
@@ -51,7 +48,7 @@ class MinimizedPlaybackPatch : BytecodePatch(
|
||||
MinimizedPlaybackManagerFingerprint.result?.apply {
|
||||
mutableMethod.addInstructions(
|
||||
0, """
|
||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->isPlaybackNotShort()Z
|
||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->playbackIsNotShort()Z
|
||||
move-result v0
|
||||
return v0
|
||||
"""
|
||||
@@ -76,15 +73,6 @@ class MinimizedPlaybackPatch : BytecodePatch(
|
||||
)
|
||||
} ?: return MinimizedPlaybackSettingsFingerprint.toErrorResult()
|
||||
|
||||
// Force allowing background play for videos labeled for kids.
|
||||
// Some regions and YouTube accounts do not require this patch.
|
||||
KidsMinimizedPlaybackPolicyControllerFingerprint.result?.apply {
|
||||
mutableMethod.addInstruction(
|
||||
0,
|
||||
"return-void"
|
||||
)
|
||||
} ?: return KidsMinimizedPlaybackPolicyControllerFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40", "18.16.37"))]
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class VideoInformationCompatibility
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40", "18.16.37"))]
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class RememberVideoQualityCompatibility
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40", "18.16.37"))]
|
||||
[Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class RememberPlaybackSpeedCompatibility
|
||||
|
||||
@@ -15,8 +15,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -16,8 +16,7 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
"18.15.40"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user