mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-27 12:41:03 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24d03387de | ||
|
|
04310901b7 | ||
|
|
3011c1fa45 | ||
|
|
6b83fe572a | ||
|
|
32d303f4b7 | ||
|
|
837c381e19 | ||
|
|
09ae60bb28 | ||
|
|
f9d180aad4 | ||
|
|
c40181140d | ||
|
|
c5e190a4d5 | ||
|
|
24e3f8b24e | ||
|
|
53b0485642 | ||
|
|
b362b560b6 | ||
|
|
b285bf96bd | ||
|
|
bfb47eb1c4 | ||
|
|
4e2d30228a | ||
|
|
dce28760f5 | ||
|
|
68ec6d2258 | ||
|
|
83498fd29c | ||
|
|
1ab35a1cfa | ||
|
|
e0b45237bb | ||
|
|
161a1b0af1 | ||
|
|
7618376388 | ||
|
|
2bdb857a9f | ||
|
|
be02acecfc | ||
|
|
9e873329c6 |
12
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
12
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
@@ -59,3 +59,15 @@ body:
|
|||||||
description: Add additional context here.
|
description: Add additional context here.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: acknowledgements
|
||||||
|
attributes:
|
||||||
|
label: Acknowledgements
|
||||||
|
description: Your issue will be closed if you haven't done these steps.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||||
|
required: true
|
||||||
|
- label: I have written a short but informative title.
|
||||||
|
required: true
|
||||||
|
- label: I filled out all of the requested information in this issue properly.
|
||||||
|
required: true
|
||||||
12
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
12
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
@@ -27,3 +27,15 @@ body:
|
|||||||
description: Why should your patch request should be considered? What makes it valuable to the community?
|
description: Why should your patch request should be considered? What makes it valuable to the community?
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: acknowledgements
|
||||||
|
attributes:
|
||||||
|
label: Acknowledgements
|
||||||
|
description: Your issue will be closed if you haven't done these steps.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||||
|
required: true
|
||||||
|
- label: I have written a short but informative title.
|
||||||
|
required: true
|
||||||
|
- label: I filled out all of the requested information in this issue properly.
|
||||||
|
required: true
|
||||||
81
CHANGELOG.md
81
CHANGELOG.md
@@ -1,3 +1,84 @@
|
|||||||
|
## [2.66.2](https://github.com/revanced/revanced-patches/compare/v2.66.1...v2.66.2) (2022-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **custom-playback-speed:** implement own method instead of `takeWhile` ([8522d4c](https://github.com/revanced/revanced-patches/commit/8522d4cd705118bf1108ec88bbed542a0cb15943))
|
||||||
|
|
||||||
|
## [2.66.1](https://github.com/revanced/revanced-patches/compare/v2.66.0...v2.66.1) (2022-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **sponsorblock:** broken fingerprint and invert setting `shorts_playing` ([#579](https://github.com/revanced/revanced-patches/issues/579)) ([59fb674](https://github.com/revanced/revanced-patches/commit/59fb674437207aeabed5b92ba32bda120820fb8f))
|
||||||
|
|
||||||
|
# [2.66.0](https://github.com/revanced/revanced-patches/compare/v2.65.0...v2.66.0) (2022-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **custom-playback-speed:** max, min, granularity option ([b1e423d](https://github.com/revanced/revanced-patches/commit/b1e423d9cdca51e54c154cc39a24c508ca322f60))
|
||||||
|
|
||||||
|
# [2.65.0](https://github.com/revanced/revanced-patches/compare/v2.64.2...v2.65.0) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `tiktok-feed-filter` , `tiktok-settings` and `tiktok-force-login` patch ([#501](https://github.com/revanced/revanced-patches/issues/501)) ([10e0286](https://github.com/revanced/revanced-patches/commit/10e028626f2b9d9d01279682198daf135bc82c20))
|
||||||
|
* **theme:** arbitrary background color for light theme ([#565](https://github.com/revanced/revanced-patches/issues/565)) ([da40e7e](https://github.com/revanced/revanced-patches/commit/da40e7e0cf266edc89353e62b9821b450f8f0295))
|
||||||
|
|
||||||
|
## [2.64.2](https://github.com/revanced/revanced-patches/compare/v2.64.1...v2.64.2) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **custom-video-buffer:** use correct offset for `getMaxBuffer` call injection ([6773122](https://github.com/revanced/revanced-patches/commit/6773122d0b1598af78d4619b8af2811be11f6b95))
|
||||||
|
|
||||||
|
## [2.64.1](https://github.com/revanced/revanced-patches/compare/v2.64.0...v2.64.1) (2022-09-21)
|
||||||
|
|
||||||
|
# [2.64.0](https://github.com/revanced/revanced-patches/compare/v2.63.0...v2.64.0) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* explicit support for YouTube v17.34.35 and v17.34.36 ([#527](https://github.com/revanced/revanced-patches/issues/527)) ([1b6a64b](https://github.com/revanced/revanced-patches/commit/1b6a64b49c54ab53df463981a9ad7ec67729939f))
|
||||||
|
|
||||||
|
# [2.63.0](https://github.com/revanced/revanced-patches/compare/v2.62.0...v2.63.0) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `disable-auto-player-popup-panels` ([#543](https://github.com/revanced/revanced-patches/issues/543)) ([d1fa2c3](https://github.com/revanced/revanced-patches/commit/d1fa2c3bc359018146f1f90b1ed4448b7f19b247))
|
||||||
|
* disable sponsorblock on shorts ([#439](https://github.com/revanced/revanced-patches/issues/439)) ([47fbcba](https://github.com/revanced/revanced-patches/commit/47fbcba3f845b5c3ef35c4dded8d6f9ffafc5d9e))
|
||||||
|
|
||||||
|
# [2.62.0](https://github.com/revanced/revanced-patches/compare/v2.61.1...v2.62.0) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `hide-time-and-seekbar` patch ([#544](https://github.com/revanced/revanced-patches/issues/544)) ([ef7afc7](https://github.com/revanced/revanced-patches/commit/ef7afc7231f8fa6b9b7f84c2b5b9a9fda80aa0f4))
|
||||||
|
|
||||||
|
## [2.61.1](https://github.com/revanced/revanced-patches/compare/v2.61.0...v2.61.1) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **sponsorblock:** reflect strings from official guidelines ([#523](https://github.com/revanced/revanced-patches/issues/523)) ([1c83959](https://github.com/revanced/revanced-patches/commit/1c83959e69bfbf5140edbf7ef4d2c8901975bfd4))
|
||||||
|
|
||||||
|
# [2.61.0](https://github.com/revanced/revanced-patches/compare/v2.60.0...v2.61.0) (2022-09-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* section `acknowledgements` for issue templates ([f663935](https://github.com/revanced/revanced-patches/commit/f663935382036cfdccf04627ca77306c5f951b4c))
|
||||||
|
|
||||||
|
# [2.60.0](https://github.com/revanced/revanced-patches/compare/v2.59.0...v2.60.0) (2022-09-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **downloads:** missing package installation request ([bc9e81a](https://github.com/revanced/revanced-patches/commit/bc9e81a6c343a912cab6fe3c2560d759fbf1be8a))
|
||||||
|
|
||||||
# [2.59.0](https://github.com/revanced/revanced-patches/compare/v2.58.0...v2.59.0) (2022-09-18)
|
# [2.59.0](https://github.com/revanced/revanced-patches/compare/v2.58.0...v2.59.0) (2022-09-18)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
150
README.md
150
README.md
@@ -4,12 +4,60 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
> Looking for the JSON variant of this? [Click here](patches.json).
|
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||||
|
|
||||||
### 📦 `com.twitter.android`
|
### 📦 `com.google.android.youtube`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
|
| `theme` | Applies a custom theme. | all |
|
||||||
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
|
||||||
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
|
||||||
|
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
||||||
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
|
||||||
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
|
||||||
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.36.37 |
|
||||||
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
|
||||||
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
||||||
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
|
||||||
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
|
||||||
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
||||||
|
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.36.37 |
|
||||||
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
||||||
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
|
| `video-ads` | Removes ads in the video player. | 17.36.37 |
|
||||||
|
| `general-ads` | Removes general ads. | 17.36.37 |
|
||||||
|
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.36.37 |
|
||||||
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.36.37 |
|
||||||
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.36.37 |
|
||||||
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.36.37 |
|
||||||
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.36.37 |
|
||||||
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
|
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
|
||||||
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.36.37 |
|
||||||
|
| `custom-playback-speed` | Adds more video playback speed options. | 17.36.37 |
|
||||||
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.36.37 |
|
||||||
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.36.37 |
|
||||||
|
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
||||||
|
| `always-autorepeat` | Always repeats the playing video again. | 17.36.37 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.vanced.android.youtube`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `de.dwd.warnapp`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.reddit.frontpage`
|
### 📦 `com.reddit.frontpage`
|
||||||
@@ -21,6 +69,23 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
|
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.google.android.apps.youtube.music`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `background-play` | Enables playing music in the background. | 5.23.50 |
|
||||||
|
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.23.50 |
|
||||||
|
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.23.50 |
|
||||||
|
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.23.50 |
|
||||||
|
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.23.50 |
|
||||||
|
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.23.50 |
|
||||||
|
| `music-video-ads` | Removes ads in the music player. | 5.23.50 |
|
||||||
|
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.23.50 |
|
||||||
|
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.23.50 |
|
||||||
|
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.23.50 |
|
||||||
|
</details>
|
||||||
|
|
||||||
### 📦 `com.garzotto.pflotsh.ecmwf_a`
|
### 📦 `com.garzotto.pflotsh.ecmwf_a`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
@@ -29,39 +94,17 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 |
|
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.google.android.apps.youtube.music`
|
|
||||||
<details>
|
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|
||||||
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.23.50 |
|
|
||||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.23.50 |
|
|
||||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.23.50 |
|
|
||||||
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.23.50 |
|
|
||||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.23.50 |
|
|
||||||
| `background-play` | Enables playing music in the background. | 5.23.50 |
|
|
||||||
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.23.50 |
|
|
||||||
| `music-video-ads` | Removes ads in the music player. | 5.23.50 |
|
|
||||||
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.23.50 |
|
|
||||||
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.23.50 |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### 📦 `de.dwd.warnapp`
|
|
||||||
<details>
|
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|
||||||
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### 📦 `com.ss.android.ugc.trill`
|
### 📦 `com.ss.android.ugc.trill`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
||||||
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
|
||||||
| `tiktok-ads` | Removes ads from TikTok. | all |
|
| `tiktok-ads` | Removes ads from TikTok. | all |
|
||||||
|
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
||||||
|
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
|
| `tiktok-settings` | Add settings menu to TikTok. | all |
|
||||||
|
| `tiktok-force-login` | Do not force login. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.zhiliaoapp.musically`
|
### 📦 `com.zhiliaoapp.musically`
|
||||||
@@ -69,55 +112,20 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
||||||
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
|
||||||
| `tiktok-ads` | Removes ads from TikTok. | all |
|
| `tiktok-ads` | Removes ads from TikTok. | all |
|
||||||
|
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
||||||
|
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
|
| `tiktok-settings` | Add settings menu to TikTok. | all |
|
||||||
|
| `tiktok-force-login` | Do not force login. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.google.android.youtube`
|
### 📦 `com.twitter.android`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.36.37 |
|
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
|
||||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.36.37 |
|
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.36.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.36.37 |
|
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
|
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
|
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
|
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
|
||||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
|
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
|
|
||||||
| `theme` | Applies a custom theme. | all |
|
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
|
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
|
||||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
|
|
||||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.36.37 |
|
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.36.37 |
|
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.36.37 |
|
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
|
||||||
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
|
||||||
| `custom-playback-speed` | Adds more video playback speed options. | 17.36.37 |
|
|
||||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.36.37 |
|
|
||||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.36.37 |
|
|
||||||
| `video-ads` | Removes ads in the video player. | 17.36.37 |
|
|
||||||
| `general-ads` | Removes general ads. | 17.36.37 |
|
|
||||||
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.36.37 |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### 📦 `com.vanced.android.youtube`
|
|
||||||
<details>
|
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|
||||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:4.4.2")
|
implementation("app.revanced:revanced-patcher:5.0.0")
|
||||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
// Required for meta
|
// Required for meta
|
||||||
implementation("com.google.code.gson:gson:2.9.1")
|
implementation("com.google.code.gson:gson:2.9.1")
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.59.0
|
version = 2.66.2
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
@@ -30,7 +30,7 @@ class MusicVideoAdsPatch : BytecodePatch(
|
|||||||
val result = ShowMusicVideoAdsFingerprint.result!!
|
val result = ShowMusicVideoAdsFingerprint.result!!
|
||||||
|
|
||||||
result.mutableMethod.addInstructions(
|
result.mutableMethod.addInstructions(
|
||||||
result.patternScanResult!!.startIndex, """
|
result.scanResult.patternScanResult!!.startIndex, """
|
||||||
const/4 p1, 0x0
|
const/4 p1, 0x0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class CodecsUnlockPatch : BytecodePatch(
|
|||||||
|
|
||||||
val implementation = codecsLockResult.mutableMethod.implementation!!
|
val implementation = codecsLockResult.mutableMethod.implementation!!
|
||||||
|
|
||||||
val scanResultStartIndex = codecsLockResult.patternScanResult!!.startIndex
|
val scanResultStartIndex = codecsLockResult.scanResult.patternScanResult!!.startIndex
|
||||||
val instructionIndex = scanResultStartIndex +
|
val instructionIndex = scanResultStartIndex +
|
||||||
if (implementation.instructions[scanResultStartIndex - 1].opcode == Opcode.CHECK_CAST) {
|
if (implementation.instructions[scanResultStartIndex - 1].opcode == Opcode.CHECK_CAST) {
|
||||||
// for 5.16.xx and lower
|
// for 5.16.xx and lower
|
||||||
@@ -43,7 +43,7 @@ class CodecsUnlockPatch : BytecodePatch(
|
|||||||
val allCodecsResult = AllCodecsReferenceFingerprint.result!!
|
val allCodecsResult = AllCodecsReferenceFingerprint.result!!
|
||||||
val allCodecsMethod =
|
val allCodecsMethod =
|
||||||
data.toMethodWalker(allCodecsResult.method)
|
data.toMethodWalker(allCodecsResult.method)
|
||||||
.nextMethod(allCodecsResult.patternScanResult!!.startIndex)
|
.nextMethod(allCodecsResult.scanResult.patternScanResult!!.startIndex)
|
||||||
.getMethod()
|
.getMethod()
|
||||||
|
|
||||||
implementation.replaceInstruction(
|
implementation.replaceInstruction(
|
||||||
|
|||||||
@@ -6,14 +6,12 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
|
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.ExclusiveAudioFingerprint
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("exclusive-audio-playback")
|
@Name("exclusive-audio-playback")
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class CompactHeaderPatch : BytecodePatch(
|
|||||||
val result = CompactHeaderConstructorFingerprint.result!!
|
val result = CompactHeaderConstructorFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
val insertIndex = result.patternScanResult!!.endIndex
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
insertIndex, """
|
insertIndex, """
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
@@ -29,9 +29,11 @@ class HideGetPremiumPatch : BytecodePatch(
|
|||||||
val parentResult = HideGetPremiumParentFingerprint.result!!
|
val parentResult = HideGetPremiumParentFingerprint.result!!
|
||||||
HideGetPremiumFingerprint.resolve(data, parentResult.classDef)
|
HideGetPremiumFingerprint.resolve(data, parentResult.classDef)
|
||||||
|
|
||||||
|
val startIndex = parentResult.scanResult.patternScanResult!!.startIndex
|
||||||
|
|
||||||
val parentMethod = parentResult.mutableMethod
|
val parentMethod = parentResult.mutableMethod
|
||||||
parentMethod.replaceInstruction(
|
parentMethod.replaceInstruction(
|
||||||
parentResult.patternScanResult!!.startIndex, """
|
startIndex, """
|
||||||
const/4 v1, 0x0
|
const/4 v1, 0x0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -39,7 +41,7 @@ class HideGetPremiumPatch : BytecodePatch(
|
|||||||
val result = HideGetPremiumFingerprint.result!!
|
val result = HideGetPremiumFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
result.patternScanResult!!.startIndex, """
|
startIndex, """
|
||||||
const/16 v0, 0x8
|
const/16 v0, 0x8
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class RemoveTasteBuilderPatch : BytecodePatch(
|
|||||||
val result = TasteBuilderConstructorFingerprint.result!!
|
val result = TasteBuilderConstructorFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
val insertIndex = result.patternScanResult!!.endIndex - 8
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex - 8
|
||||||
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
|
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
insertIndex, """
|
insertIndex, """
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
val implementation = result.mutableMethod.implementation!!
|
val implementation = result.mutableMethod.implementation!!
|
||||||
|
|
||||||
val pivotBarElementFieldRef =
|
val pivotBarElementFieldRef =
|
||||||
(implementation.instructions[result.patternScanResult!!.endIndex - 1] as Instruction22c).reference
|
(implementation.instructions[result.scanResult.patternScanResult!!.endIndex - 1] as Instruction22c).reference
|
||||||
|
|
||||||
val register = (implementation.instructions.first() as Instruction35c).registerC
|
val register = (implementation.instructions.first() as Instruction35c).registerC
|
||||||
// first compile all the needed instructions
|
// first compile all the needed instructions
|
||||||
@@ -46,16 +46,18 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
""".toInstructions().toMutableList()
|
""".toInstructions().toMutableList()
|
||||||
|
|
||||||
|
|
||||||
|
val endIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
// replace the instruction to retain the label at given index
|
// replace the instruction to retain the label at given index
|
||||||
implementation.replaceInstruction(
|
implementation.replaceInstruction(
|
||||||
result.patternScanResult!!.endIndex - 1, instructionList[0] // invoke-interface
|
endIndex - 1, instructionList[0] // invoke-interface
|
||||||
)
|
)
|
||||||
// do not forget to remove this instruction since we added it already
|
// do not forget to remove this instruction since we added it already
|
||||||
instructionList.removeFirst()
|
instructionList.removeFirst()
|
||||||
|
|
||||||
val exitInstruction = instructionList.last() // iput-object
|
val exitInstruction = instructionList.last() // iput-object
|
||||||
implementation.addInstruction(
|
implementation.addInstruction(
|
||||||
result.patternScanResult!!.endIndex, exitInstruction
|
endIndex, exitInstruction
|
||||||
)
|
)
|
||||||
// do not forget to remove this instruction since we added it already
|
// do not forget to remove this instruction since we added it already
|
||||||
instructionList.removeLast()
|
instructionList.removeLast()
|
||||||
@@ -64,12 +66,12 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
instructionList.add(
|
instructionList.add(
|
||||||
2, // if-le
|
2, // if-le
|
||||||
BuilderInstruction22t(
|
BuilderInstruction22t(
|
||||||
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(result.patternScanResult!!.endIndex)
|
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(endIndex)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
implementation.addInstructions(
|
implementation.addInstructions(
|
||||||
result.patternScanResult!!.endIndex, instructionList
|
endIndex, instructionList
|
||||||
)
|
)
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.feedfilter.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.ss.android.ugc.trill"),
|
||||||
|
Package("com.zhiliaoapp.musically")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class FeedFilterCompatibility
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.patches.tiktok.feedfilter.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
@Name("feed-api-service-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lcom/ss/android/ugc/aweme/feed/FeedApiService;",
|
||||||
|
"LIZ",
|
||||||
|
)
|
||||||
|
@FeedFilterCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object FeedApiServiceLIZFingerprint : MethodFingerprint(
|
||||||
|
access = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL or AccessFlags.SYNTHETIC,
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/FeedApiService;") && methodDef.name == "LIZ"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package app.revanced.patches.tiktok.feedfilter.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
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.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
|
||||||
|
import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class])
|
||||||
|
@Name("tiktok-feed-filter")
|
||||||
|
@Description("Filters tiktok videos: removing ads, removing livestreams.")
|
||||||
|
@FeedFilterCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class TiktokFeedFilter : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
FeedApiServiceLIZFingerprint,
|
||||||
|
SettingsStatusLoadFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
val method = FeedApiServiceLIZFingerprint.result!!.mutableMethod
|
||||||
|
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
|
||||||
|
if (instruction.opcode != Opcode.RETURN_OBJECT) continue
|
||||||
|
val feedItemsRegister = (instruction as OneRegisterInstruction).registerA
|
||||||
|
method.addInstruction(
|
||||||
|
index,
|
||||||
|
"invoke-static {v$feedItemsRegister}, Lapp/revanced/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V"
|
||||||
|
)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
val method2 = SettingsStatusLoadFingerprint.result!!.mutableMethod
|
||||||
|
method2.addInstruction(
|
||||||
|
0,
|
||||||
|
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableFeedFilter()V"
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.forcelogin.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.ss.android.ugc.trill"),
|
||||||
|
Package("com.zhiliaoapp.musically")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class DisableForceLoginCompatibility
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
|
||||||
|
|
||||||
|
@Name("mandatory-login-service-fingerprint")
|
||||||
|
@MatchingMethod("/MandatoryLoginService;", "enableForcedLogin")
|
||||||
|
@DisableForceLoginCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object MandatoryLoginServiceFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
||||||
|
methodDef.name == "enableForcedLogin"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
|
||||||
|
|
||||||
|
@Name("mandatory-login-service-fingerprint2")
|
||||||
|
@MatchingMethod("/MandatoryLoginService;", "shouldShowForcedLogin")
|
||||||
|
@DisableForceLoginCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
||||||
|
methodDef.name == "shouldShowForcedLogin"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.forcelogin.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
|
||||||
|
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint2
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("tiktok-force-login")
|
||||||
|
@Description("Do not force login.")
|
||||||
|
@DisableForceLoginCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class DisableForceLoginPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
MandatoryLoginServiceFingerprint,
|
||||||
|
MandatoryLoginServiceFingerprint2
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
listOf(
|
||||||
|
MandatoryLoginServiceFingerprint,
|
||||||
|
MandatoryLoginServiceFingerprint2
|
||||||
|
).forEach { fingerprint ->
|
||||||
|
val method = fingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.integrations.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.ss.android.ugc.trill"),
|
||||||
|
Package("com.zhiliaoapp.musically")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class TikTokIntegrationsCompatibility
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
|
||||||
|
|
||||||
|
@Name("init-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lcom/ss/android/ugc/aweme/app/host/AwemeHostApplication;", "onCreate"
|
||||||
|
)
|
||||||
|
@TikTokIntegrationsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object InitFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/AwemeHostApplication;") &&
|
||||||
|
methodDef.name == "onCreate"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.integrations.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
|
||||||
|
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
|
||||||
|
|
||||||
|
@Name("tiktok-integrations")
|
||||||
|
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
||||||
|
@TikTokIntegrationsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class TikTokIntegrationsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
InitFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
if (data.findClass("Lapp/revanced/tiktok/utils/ReVancedUtils") == null)
|
||||||
|
return PatchResultError("Integrations have not been merged yet. This patch can not succeed without the integrations.")
|
||||||
|
val result = InitFingerprint.result!!
|
||||||
|
|
||||||
|
val method = result.mutableMethod
|
||||||
|
val implementation = method.implementation!!
|
||||||
|
val count = implementation.registerCount - 1
|
||||||
|
|
||||||
|
method.addInstruction(
|
||||||
|
0, "sput-object v$count, Lapp/revanced/tiktok/utils/ReVancedUtils;->context:Landroid/content/Context;"
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.ss.android.ugc.trill"),
|
||||||
|
Package("com.zhiliaoapp.musically")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class TikTokSettingsCompatibility
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
||||||
|
|
||||||
|
@Name("ad-personalization-activity-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;",
|
||||||
|
"onCreate"
|
||||||
|
)
|
||||||
|
@TikTokSettingsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object AdPersonalizationActivityFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/AdPersonalizationActivity;") &&
|
||||||
|
methodDef.name == "onCreate"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
||||||
|
|
||||||
|
@Name("copyright-settings-string-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lcom/ss/android/ugc/aweme/setting/ui/SettingNewVersionFragment;",
|
||||||
|
"onViewCreated"
|
||||||
|
)
|
||||||
|
@TikTokSettingsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object CopyRightSettingsStringFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
|
||||||
|
methodDef.name == "onViewCreated"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
||||||
|
|
||||||
|
@Name("settings-status-load-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lapp/revanced/tiktok/settingsmenu/SettingsStatus;",
|
||||||
|
"load"
|
||||||
|
)
|
||||||
|
@TikTokSettingsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object SettingsStatusLoadFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
|
||||||
|
methodDef.name == "load"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package app.revanced.patches.tiktok.misc.settings.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityFingerprint
|
||||||
|
import app.revanced.patches.tiktok.misc.settings.fingerprints.CopyRightSettingsStringFingerprint
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
|
import org.jf.dexlib2.iface.reference.MethodReference
|
||||||
|
import org.jf.dexlib2.iface.reference.StringReference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([TikTokIntegrationsPatch::class])
|
||||||
|
@Name("tiktok-settings")
|
||||||
|
@Description("Add settings menu to TikTok.")
|
||||||
|
@TikTokSettingsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class TikTokSettingsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
AdPersonalizationActivityFingerprint,
|
||||||
|
CopyRightSettingsStringFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
//Replace string `Copyright Policy` to 'Revanced Settings` in TikTok settings.
|
||||||
|
val method1 = CopyRightSettingsStringFingerprint.result!!.mutableMethod
|
||||||
|
val implementation1 = method1.implementation!!
|
||||||
|
for ((index, instruction) in implementation1.instructions.withIndex()) {
|
||||||
|
if (instruction.opcode != Opcode.CONST_STRING) continue
|
||||||
|
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
||||||
|
if (string != "copyright_policy") continue
|
||||||
|
var targetIndex = index
|
||||||
|
while (targetIndex >= 0) {
|
||||||
|
targetIndex--
|
||||||
|
val invokeInstruction = implementation1.instructions[targetIndex]
|
||||||
|
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) continue
|
||||||
|
val methodName = ((invokeInstruction as Instruction35c).reference as MethodReference).name
|
||||||
|
if (methodName != "getString") continue
|
||||||
|
val resultInstruction = implementation1.instructions[targetIndex + 1]
|
||||||
|
if (resultInstruction.opcode != Opcode.MOVE_RESULT_OBJECT) continue
|
||||||
|
val overrideRegister = (resultInstruction as OneRegisterInstruction).registerA
|
||||||
|
method1.replaceInstruction(
|
||||||
|
targetIndex + 1,
|
||||||
|
"""
|
||||||
|
const-string v$overrideRegister, "Revanced Settings"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
//Change onClick to start settings activity.
|
||||||
|
val clickInstruction = implementation1.instructions[index - 1]
|
||||||
|
if (clickInstruction.opcode != Opcode.INVOKE_DIRECT)
|
||||||
|
return PatchResultError("Can not find click listener.")
|
||||||
|
val clickClass = ((clickInstruction as ReferenceInstruction).reference as MethodReference).definingClass
|
||||||
|
val mutableClickClass = data.findClass(clickClass)!!.resolve()
|
||||||
|
val mutableOnClickMethod = mutableClickClass.methods.first {
|
||||||
|
it.name == "onClick"
|
||||||
|
}
|
||||||
|
mutableOnClickMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->startSettingsActivity()V
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
//Implement revanced settings screen in `AdPersonalizationActivity`
|
||||||
|
val method2 = AdPersonalizationActivityFingerprint.result!!.mutableMethod
|
||||||
|
for ((index, instruction) in method2.implementation!!.instructions.withIndex()) {
|
||||||
|
if (instruction.opcode != Opcode.INVOKE_SUPER) continue
|
||||||
|
val thisRegister = (instruction as Instruction35c).registerC
|
||||||
|
method2.addInstructions(
|
||||||
|
index + 1,
|
||||||
|
"""
|
||||||
|
invoke-static {v$thisRegister}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->initializeSettings(Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;)V
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,7 +58,7 @@ class TimelineAdsPatch : BytecodePatch(
|
|||||||
// Set the tweetId field to null
|
// Set the tweetId field to null
|
||||||
// This will cause twitter to not show the promoted ads, because we set it to null, when the tweet is promoted
|
// This will cause twitter to not show the promoted ads, because we set it to null, when the tweet is promoted
|
||||||
parserFingerprintResult.mutableMethod.addInstructions(
|
parserFingerprintResult.mutableMethod.addInstructions(
|
||||||
parserFingerprintResult.patternScanResult!!.startIndex + 1,
|
parserFingerprintResult.scanResult.patternScanResult!!.startIndex + 1,
|
||||||
"""
|
"""
|
||||||
const/4 v2, 0x0
|
const/4 v2, 0x0
|
||||||
iput-object v2, p0, Lcom/twitter/model/json/timeline/urt/JsonTimelineTweet;->${tweetIdFieldReference.name}:Ljava/lang/String;
|
iput-object v2, p0, Lcom/twitter/model/json/timeline/urt/JsonTimelineTweet;->${tweetIdFieldReference.name}:Ljava/lang/String;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.27.39", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.27.39", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -79,15 +79,17 @@ class EnableSeekbarTappingPatch : BytecodePatch(
|
|||||||
val pMethod = tapSeekMethods["P"]!!
|
val pMethod = tapSeekMethods["P"]!!
|
||||||
val oMethod = tapSeekMethods["O"]!!
|
val oMethod = tapSeekMethods["O"]!!
|
||||||
|
|
||||||
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex + 1
|
||||||
|
|
||||||
// get the required register
|
// get the required register
|
||||||
val instruction = implementation.instructions[result.patternScanResult!!.endIndex]
|
val instruction = implementation.instructions[insertIndex - 1]
|
||||||
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return PatchResultError("Could not find the correct register")
|
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return PatchResultError("Could not find the correct register")
|
||||||
val register = (instruction as Instruction35c).registerC
|
val register = (instruction as Instruction35c).registerC
|
||||||
|
|
||||||
val elseLabel = implementation.newLabelForIndex(result.patternScanResult!!.endIndex + 1)
|
val elseLabel = implementation.newLabelForIndex(insertIndex)
|
||||||
// the instructions are written in reverse order.
|
// the instructions are written in reverse order.
|
||||||
result.mutableMethod.addInstructions(
|
result.mutableMethod.addInstructions(
|
||||||
result.patternScanResult!!.endIndex + 1, """
|
insertIndex, """
|
||||||
invoke-virtual { v$register, v2 }, ${oMethod.definingClass}->${oMethod.name}(I)V
|
invoke-virtual { v$register, v2 }, ${oMethod.definingClass}->${oMethod.name}(I)V
|
||||||
invoke-virtual { v$register, v2 }, ${pMethod.definingClass}->${pMethod.name}(I)V
|
invoke-virtual { v$register, v2 }, ${pMethod.definingClass}->${pMethod.name}(I)V
|
||||||
"""
|
"""
|
||||||
@@ -95,10 +97,10 @@ class EnableSeekbarTappingPatch : BytecodePatch(
|
|||||||
|
|
||||||
// if tap-seeking is disabled, do not invoke the two methods above by jumping to the else label
|
// if tap-seeking is disabled, do not invoke the two methods above by jumping to the else label
|
||||||
implementation.addInstruction(
|
implementation.addInstruction(
|
||||||
result.patternScanResult!!.endIndex + 1, BuilderInstruction21t(Opcode.IF_EQZ, 0, elseLabel)
|
insertIndex, BuilderInstruction21t(Opcode.IF_EQZ, 0, elseLabel)
|
||||||
)
|
)
|
||||||
result.mutableMethod.addInstructions(
|
result.mutableMethod.addInstructions(
|
||||||
result.patternScanResult!!.endIndex + 1, """
|
insertIndex, """
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/SeekbarTappingPatch;->isTapSeekingEnabled()Z
|
invoke-static { }, Lapp/revanced/integrations/patches/SeekbarTappingPatch;->isTapSeekingEnabled()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -50,7 +50,7 @@ class FullscreenPanelsRemoverPatch : BytecodePatch(
|
|||||||
|
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
val ifIndex = result.patternScanResult!!.startIndex + 2
|
val ifIndex = result.scanResult.patternScanResult!!.startIndex + 2
|
||||||
|
|
||||||
method.removeInstruction(ifIndex)
|
method.removeInstruction(ifIndex)
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class HideTimeAndSeekbarCompatibility
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("inline-time-bar-wrapper-fingerprint")
|
||||||
|
@MatchingMethod("Lcom/google/android/apps/youtube/app/common/player/overlay/InlineTimeBarWrapper;", "onLayout")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
|
@HideTimeAndSeekbarCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object InlineTimeBarWrapperFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PROTECTED or AccessFlags.FINAL, listOf("Z", "I", "I", "I", "I"), listOf(
|
||||||
|
Opcode.SUB_INT_2ADDR,
|
||||||
|
Opcode.SUB_INT,
|
||||||
|
Opcode.IF_EQZ,
|
||||||
|
Opcode.IF_NEZ,
|
||||||
|
Opcode.GOTO_16,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.SUB_INT,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("time-counter-fingerprint")
|
||||||
|
@MatchingMethod("Lfez", "a")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
|
@HideTimeAndSeekbarCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object TimeCounterFingerprint : MethodFingerprint(
|
||||||
|
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("J"), listOf(
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.CONST_WIDE_16,
|
||||||
|
Opcode.ADD_LONG_2ADDR,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_WIDE,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.hidetimeandseekbar.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
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.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.InlineTimeBarWrapperFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
|
@Name("hide-time-and-seekbar")
|
||||||
|
@Description("Hides progress bar and time counter on videos.")
|
||||||
|
@HideTimeAndSeekbarCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HideTimeAndSeekbarPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
InlineTimeBarWrapperFingerprint, TimeCounterFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_time_and_seekbar",
|
||||||
|
StringResource("revanced_hide_time_and_seekbar_title", "Hide time and seekbar"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_hide_time_and_seekbar_summary_on", "Time and seekbar are hidden"),
|
||||||
|
StringResource("revanced_hide_time_and_seekbar_summary_off", "Time and seekbar are visible")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val inlineTimeBarWrapperMethod = InlineTimeBarWrapperFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
inlineTimeBarWrapperMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
invoke-static { }, Lapp/revanced/integrations/patches/HideTimeAndSeekbarPatch;->hideTimeAndSeekbar()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :hide_time_and_seekbar
|
||||||
|
return-void
|
||||||
|
:hide_time_and_seekbar
|
||||||
|
nop
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
val timeCounterMethod = TimeCounterFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
timeCounterMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
invoke-static { }, Lapp/revanced/integrations/patches/HideTimeAndSeekbarPatch;->hideTimeAndSeekbar()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :hide_time_and_seekbar
|
||||||
|
const-string v0, ""
|
||||||
|
return-object v0
|
||||||
|
:hide_time_and_seekbar
|
||||||
|
nop
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -55,7 +55,7 @@ class CreateButtonRemoverPatch : BytecodePatch(
|
|||||||
return PatchResultError("${PivotBarCreateButtonViewFingerprint.name} failed")
|
return PatchResultError("${PivotBarCreateButtonViewFingerprint.name} failed")
|
||||||
|
|
||||||
val createButtonResult = PivotBarCreateButtonViewFingerprint.result!!
|
val createButtonResult = PivotBarCreateButtonViewFingerprint.result!!
|
||||||
val insertIndex = createButtonResult.patternScanResult!!.endIndex
|
val insertIndex = createButtonResult.scanResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inject hooks
|
* Inject hooks
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -58,7 +58,7 @@ class ShortsButtonRemoverPatch : BytecodePatch(
|
|||||||
|
|
||||||
if (!resolutionSucceeded) return PatchResultError("${it.name} failed")
|
if (!resolutionSucceeded) return PatchResultError("${it.name} failed")
|
||||||
}
|
}
|
||||||
.map { it.result!!.patternScanResult!! }
|
.map { it.result!!.scanResult.patternScanResult!! }
|
||||||
|
|
||||||
val enumScanResult = fingerprintResults[0]
|
val enumScanResult = fingerprintResults[0]
|
||||||
val buttonViewResult = fingerprintResults[1]
|
val buttonViewResult = fingerprintResults[1]
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.playerpopuppanels.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class PlayerPopupPanelsCompatibility
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.playerpopuppanels.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.playerpopuppanels.annotations.PlayerPopupPanelsCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("engagement-player-controller-fingerprint")
|
||||||
|
@MatchingMethod("Lucf;", "L")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
|
@PlayerPopupPanelsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object EngagementPanelControllerFingerprint : MethodFingerprint(
|
||||||
|
"L", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("L", "L", "Z", "Z", "Z"), listOf(
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_FROM16,
|
||||||
|
Opcode.IGET_BOOLEAN,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.IF_NEZ,
|
||||||
|
Opcode.CONST_STRING,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.CONST_STRING,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.RETURN_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.playerpopuppanels.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
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.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.layout.playerpopuppanels.annotations.PlayerPopupPanelsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.playerpopuppanels.fingerprints.EngagementPanelControllerFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
|
@Name("disable-auto-player-popup-panels")
|
||||||
|
@Description("Disable automatic popup panels (playlist or live chat) on video player.")
|
||||||
|
@PlayerPopupPanelsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class PlayerPopupPanelsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
EngagementPanelControllerFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_player_popup_panels_enabled",
|
||||||
|
StringResource("revanced_player_popup_panels_title", "Disable player popup panels"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_player_popup_panels_summary_on", "Player popup panels are enabled"),
|
||||||
|
StringResource("revanced_player_popup_panels_summary_off", "Player popup panels are disabled")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val engagementPanelControllerMethod = EngagementPanelControllerFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
engagementPanelControllerMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
invoke-static { }, Lapp/revanced/integrations/patches/DisablePlayerPopupPanelsPatch;->disablePlayerPopupPanels()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :player_popup_panels
|
||||||
|
if-eqz p4, :player_popup_panels
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return-object v0
|
||||||
|
:player_popup_panels
|
||||||
|
nop
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class HideReelsPatch : BytecodePatch(
|
|||||||
// HideReel will hide the reel view before it is being used,
|
// HideReel will hide the reel view before it is being used,
|
||||||
// so we pass the view to the HideReel method
|
// so we pass the view to the HideReel method
|
||||||
result.mutableMethod.addInstruction(
|
result.mutableMethod.addInstruction(
|
||||||
result.patternScanResult!!.endIndex,
|
result.scanResult.patternScanResult!!.endIndex,
|
||||||
"invoke-static { v2 }, Lapp/revanced/integrations/patches/HideReelsPatch;->HideReel(Landroid/view/View;)V"
|
"invoke-static { v2 }, Lapp/revanced/integrations/patches/HideReelsPatch;->HideReel(Landroid/view/View;)V"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.sponsorblock.resource.patch.SponsorBlockResourcePatch
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
|
@Name("shorts-player-constructor-fingerprint")
|
||||||
|
@MatchingMethod("Lhgp;", "<init>")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
|
@SponsorBlockCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object ShortsPlayerConstructorFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.INVOKE_DIRECT_RANGE,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.CONST_4
|
||||||
|
),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
|
(instruction as? WideLiteralInstruction)?.wideLiteral == SponsorBlockResourcePatch.reelButtonGroupResourceId
|
||||||
|
} == true
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.extensions.addInstructions
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
@@ -25,6 +25,7 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
|||||||
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||||
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
||||||
|
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.StartVideoInformerFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.builder.MutableMethodImplementation
|
import org.jf.dexlib2.builder.MutableMethodImplementation
|
||||||
@@ -39,7 +40,7 @@ import org.jf.dexlib2.util.MethodUtil
|
|||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn(
|
@DependsOn(
|
||||||
dependencies = [PlayerControlsBytecodePatch::class, IntegrationsPatch::class, ResourceIdMappingProviderResourcePatch::class, SponsorBlockResourcePatch::class, VideoIdPatch::class]
|
dependencies = [PlayerControlsBytecodePatch::class, IntegrationsPatch::class, SponsorBlockResourcePatch::class, VideoIdPatch::class]
|
||||||
)
|
)
|
||||||
@Name("sponsorblock")
|
@Name("sponsorblock")
|
||||||
@Description("Integrate SponsorBlock.")
|
@Description("Integrate SponsorBlock.")
|
||||||
@@ -53,7 +54,8 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
NextGenWatchLayoutFingerprint,
|
NextGenWatchLayoutFingerprint,
|
||||||
AppendTimeFingerprint,
|
AppendTimeFingerprint,
|
||||||
PlayerInitFingerprint,
|
PlayerInitFingerprint,
|
||||||
PlayerOverlaysLayoutInitFingerprint
|
PlayerOverlaysLayoutInitFingerprint,
|
||||||
|
ShortsPlayerConstructorFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {/*
|
override fun execute(data: BytecodeData): PatchResult {/*
|
||||||
@@ -61,7 +63,7 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
*/
|
*/
|
||||||
val referenceResult = PlayerControllerSetTimeReferenceFingerprint.result!!
|
val referenceResult = PlayerControllerSetTimeReferenceFingerprint.result!!
|
||||||
val playerControllerSetTimeMethod =
|
val playerControllerSetTimeMethod =
|
||||||
data.toMethodWalker(referenceResult.method).nextMethod(referenceResult.patternScanResult!!.startIndex, true)
|
data.toMethodWalker(referenceResult.method).nextMethod(referenceResult.scanResult.patternScanResult!!.startIndex, true)
|
||||||
.getMethod() as MutableMethod
|
.getMethod() as MutableMethod
|
||||||
playerControllerSetTimeMethod.addInstruction(
|
playerControllerSetTimeMethod.addInstruction(
|
||||||
2,
|
2,
|
||||||
@@ -161,11 +163,11 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
val videoLengthMethodInstructions = videoLengthMethod.implementation!!.instructions
|
val videoLengthMethodInstructions = videoLengthMethod.implementation!!.instructions
|
||||||
|
|
||||||
val videoLengthRegister =
|
val videoLengthRegister =
|
||||||
(videoLengthMethodInstructions[videoLengthMethodResult.patternScanResult!!.endIndex - 2] as OneRegisterInstruction).registerA
|
(videoLengthMethodInstructions[videoLengthMethodResult.scanResult.patternScanResult!!.endIndex - 2] as OneRegisterInstruction).registerA
|
||||||
val dummyRegisterForLong =
|
val dummyRegisterForLong =
|
||||||
videoLengthRegister + 1 // this is required for long values since they are 64 bit wide
|
videoLengthRegister + 1 // this is required for long values since they are 64 bit wide
|
||||||
videoLengthMethod.addInstruction(
|
videoLengthMethod.addInstruction(
|
||||||
videoLengthMethodResult.patternScanResult!!.endIndex,
|
videoLengthMethodResult.scanResult.patternScanResult!!.endIndex,
|
||||||
"invoke-static {v$videoLengthRegister, v$dummyRegisterForLong}, Lapp/revanced/integrations/sponsorblock/PlayerController;->setVideoLength(J)V"
|
"invoke-static {v$videoLengthRegister, v$dummyRegisterForLong}, Lapp/revanced/integrations/sponsorblock/PlayerController;->setVideoLength(J)V"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -229,7 +231,7 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
|
|
||||||
// append the new time to the player layout
|
// append the new time to the player layout
|
||||||
val appendTimeFingerprintResult = AppendTimeFingerprint.result!!
|
val appendTimeFingerprintResult = AppendTimeFingerprint.result!!
|
||||||
val appendTimePatternScanStartIndex = appendTimeFingerprintResult.patternScanResult!!.startIndex
|
val appendTimePatternScanStartIndex = appendTimeFingerprintResult.scanResult.patternScanResult!!.startIndex
|
||||||
val targetRegister =
|
val targetRegister =
|
||||||
(appendTimeFingerprintResult.method.implementation!!.instructions.elementAt(appendTimePatternScanStartIndex + 1) as OneRegisterInstruction).registerA
|
(appendTimeFingerprintResult.method.implementation!!.instructions.elementAt(appendTimePatternScanStartIndex + 1) as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
@@ -324,6 +326,23 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val startVideoInformerMethod = StartVideoInformerFingerprint.result!!.mutableMethod
|
||||||
|
startVideoInformerMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
const/4 v0, 0x0
|
||||||
|
sput-boolean v0, Lapp/revanced/integrations/settings/SettingsEnum;->shorts_playing:Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
val shortsPlayerConstructorMethod = ShortsPlayerConstructorFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
shortsPlayerConstructorMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
const/4 v0, 0x1
|
||||||
|
sput-boolean v0, Lapp/revanced/integrations/settings/SettingsEnum;->shorts_playing:Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
// TODO: isSBChannelWhitelisting implementation
|
// TODO: isSBChannelWhitelisting implementation
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||||
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.Preference
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.Preference
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
@@ -19,9 +20,13 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
|||||||
|
|
||||||
@Name("sponsorblock-resource-patch")
|
@Name("sponsorblock-resource-patch")
|
||||||
@SponsorBlockCompatibility
|
@SponsorBlockCompatibility
|
||||||
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class])
|
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class, ResourceIdMappingProviderResourcePatch::class])
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SponsorBlockResourcePatch : ResourcePatch() {
|
class SponsorBlockResourcePatch : ResourcePatch() {
|
||||||
|
companion object {
|
||||||
|
internal var reelButtonGroupResourceId: Long = 0
|
||||||
|
}
|
||||||
|
|
||||||
override fun execute(data: ResourceData): PatchResult {
|
override fun execute(data: ResourceData): PatchResult {
|
||||||
val youtubePackage = "com.google.android.youtube"
|
val youtubePackage = "com.google.android.youtube"
|
||||||
SettingsPatch.addPreference(
|
SettingsPatch.addPreference(
|
||||||
@@ -102,6 +107,10 @@ class SponsorBlockResourcePatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
}.close() // close afterwards
|
}.close() // close afterwards
|
||||||
|
|
||||||
|
reelButtonGroupResourceId = ResourceIdMappingProviderResourcePatch.resourceMappings.single {
|
||||||
|
it.type == "id" && it.name == "reel_persistent_edu_button_group"
|
||||||
|
}.id
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.26.35", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.26.35", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
@@ -92,7 +92,7 @@ class TabletMiniPlayerPatch : BytecodePatch(
|
|||||||
|
|
||||||
fun MethodFingerprint.unwrap(): Triple<MutableMethod, Int, Int> {
|
fun MethodFingerprint.unwrap(): Triple<MutableMethod, Int, Int> {
|
||||||
val result = this.result!!
|
val result = this.result!!
|
||||||
val scanIndex = result.patternScanResult!!.endIndex
|
val scanIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
val instructions = method.implementation!!.instructions
|
val instructions = method.implementation!!.instructions
|
||||||
val parameterRegister = (instructions[scanIndex] as OneRegisterInstruction).registerA
|
val parameterRegister = (instructions[scanIndex] as OneRegisterInstruction).registerA
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import org.w3c.dom.Element
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class ThemePatch : ResourcePatch() {
|
class ThemePatch : ResourcePatch() {
|
||||||
override fun execute(data: ResourceData): PatchResult {
|
override fun execute(data: ResourceData): PatchResult {
|
||||||
val backgroundColor = backgroundColor!!
|
val darkThemeBackgroundColor = darkThemeBackgroundColor!!
|
||||||
|
val lightThemeBackgroundColor = lightThemeBackgroundColor!!
|
||||||
|
|
||||||
data.xmlEditor["res/values/colors.xml"].use { editor ->
|
data.xmlEditor["res/values/colors.xml"].use { editor ->
|
||||||
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
||||||
@@ -33,7 +34,11 @@ class ThemePatch : ResourcePatch() {
|
|||||||
|
|
||||||
node.textContent = when (node.getAttribute("name")) {
|
node.textContent = when (node.getAttribute("name")) {
|
||||||
"yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4",
|
"yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4",
|
||||||
"yt_status_bar_background_dark" -> backgroundColor
|
"yt_status_bar_background_dark" -> darkThemeBackgroundColor
|
||||||
|
|
||||||
|
"yt_white1", "yt_white1_opacity95", "yt_white2", "yt_white3",
|
||||||
|
"yt_white4" -> lightThemeBackgroundColor
|
||||||
|
|
||||||
else -> continue
|
else -> continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,7 +48,7 @@ class ThemePatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object : OptionsContainer() {
|
companion object : OptionsContainer() {
|
||||||
var backgroundColor: String? by option(
|
var darkThemeBackgroundColor: String? by option(
|
||||||
PatchOption.StringOption(
|
PatchOption.StringOption(
|
||||||
key = "darkThemeBackgroundColor",
|
key = "darkThemeBackgroundColor",
|
||||||
default = "@android:color/black",
|
default = "@android:color/black",
|
||||||
@@ -51,5 +56,14 @@ class ThemePatch : ResourcePatch() {
|
|||||||
description = "The background color of the dark theme. Can be a hex color or a resource reference.",
|
description = "The background color of the dark theme. Can be a hex color or a resource reference.",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var lightThemeBackgroundColor: String? by option(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
key = "lightThemeBackgroundColor",
|
||||||
|
default = "@android:color/white",
|
||||||
|
title = "Background color for the light theme",
|
||||||
|
description = "The background color of the light theme. Can be a hex color or a resource reference.",
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.data.impl.toMethodWalker
|
import app.revanced.patcher.data.impl.toMethodWalker
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
@@ -52,7 +52,7 @@ class WideSearchbarPatch : BytecodePatch(
|
|||||||
|
|
||||||
//This should be the method aF in class fbn
|
//This should be the method aF in class fbn
|
||||||
val targetMethodOne =
|
val targetMethodOne =
|
||||||
data.toMethodWalker(resultOne!!.method).nextMethod(resultOne.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
|
data.toMethodWalker(resultOne!!.method).nextMethod(resultOne.scanResult.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
|
||||||
|
|
||||||
//Since both methods have the same smali code, inject instructions using a method.
|
//Since both methods have the same smali code, inject instructions using a method.
|
||||||
addInstructions(targetMethodOne)
|
addInstructions(targetMethodOne)
|
||||||
@@ -61,7 +61,7 @@ class WideSearchbarPatch : BytecodePatch(
|
|||||||
|
|
||||||
//This should be the method aB in class fbn
|
//This should be the method aB in class fbn
|
||||||
val targetMethodTwo =
|
val targetMethodTwo =
|
||||||
data.toMethodWalker(resultTwo!!.method).nextMethod(resultTwo.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
data.toMethodWalker(resultTwo!!.method).nextMethod(resultTwo.scanResult.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
||||||
|
|
||||||
//Since both methods have the same smali code, inject instructions using a method.
|
//Since both methods have the same smali code, inject instructions using a method.
|
||||||
addInstructions(targetMethodTwo)
|
addInstructions(targetMethodTwo)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class ClientSpoofPatch : BytecodePatch(
|
|||||||
val result = UserAgentHeaderBuilderFingerprint.result!!
|
val result = UserAgentHeaderBuilderFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
val insertIndex = result.patternScanResult!!.endIndex
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
val packageNameRegister = (method.instruction(insertIndex) as FiveRegisterInstruction).registerD
|
val packageNameRegister = (method.instruction(insertIndex) as FiveRegisterInstruction).registerD
|
||||||
|
|
||||||
val originalPackageName = "com.google.android.youtube"
|
val originalPackageName = "com.google.android.youtube"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("video-speed-patch-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lapp/revanced/integrations/patches/VideoSpeedPatch;", "<init>"
|
||||||
|
)
|
||||||
|
@CustomPlaybackSpeedCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object VideoSpeedPatchFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(Opcode.FILL_ARRAY_DATA),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("VideoSpeedPatch;") && methodDef.name == "<clinit>"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -6,21 +6,23 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.*
|
||||||
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.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
|
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
|
||||||
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.SpeedArrayGeneratorFingerprint
|
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.SpeedArrayGeneratorFingerprint
|
||||||
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.SpeedLimiterFingerprint
|
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.SpeedLimiterFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.VideoSpeedPatchFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import org.jf.dexlib2.builder.instruction.BuilderArrayPayload
|
||||||
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
import org.jf.dexlib2.iface.reference.FieldReference
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
import org.jf.dexlib2.iface.reference.MethodReference
|
||||||
|
import java.util.stream.DoubleStream
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("custom-playback-speed")
|
@Name("custom-playback-speed")
|
||||||
@@ -30,13 +32,17 @@ import org.jf.dexlib2.iface.reference.MethodReference
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class CustomPlaybackSpeedPatch : BytecodePatch(
|
class CustomPlaybackSpeedPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
SpeedArrayGeneratorFingerprint, SpeedLimiterFingerprint
|
SpeedArrayGeneratorFingerprint, SpeedLimiterFingerprint, VideoSpeedPatchFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
//TODO: include setting to skip remembering the new speed
|
//TODO: include setting to skip remembering the new speed
|
||||||
|
|
||||||
|
val speedLimitMin = minVideoSpeed!!.toFloat()
|
||||||
|
val speedLimitMax = maxVideoSpeed!!.toFloat().coerceAtLeast(speedLimitMin)
|
||||||
|
val speedsGranularity = videoSpeedsGranularity!!.toFloat()
|
||||||
|
|
||||||
val arrayGenMethod = SpeedArrayGeneratorFingerprint.result?.mutableMethod!!
|
val arrayGenMethod = SpeedArrayGeneratorFingerprint.result?.mutableMethod!!
|
||||||
val arrayGenMethodImpl = arrayGenMethod.implementation!!
|
val arrayGenMethodImpl = arrayGenMethod.implementation!!
|
||||||
|
|
||||||
@@ -82,12 +88,9 @@ class CustomPlaybackSpeedPatch : BytecodePatch(
|
|||||||
"sget-object v$originalArrayFetchDestination, $videoSpeedsArrayType"
|
"sget-object v$originalArrayFetchDestination, $videoSpeedsArrayType"
|
||||||
)
|
)
|
||||||
|
|
||||||
val limiterMethod = SpeedLimiterFingerprint.result?.mutableMethod!!;
|
val limiterMethod = SpeedLimiterFingerprint.result?.mutableMethod!!
|
||||||
val limiterMethodImpl = limiterMethod.implementation!!
|
val limiterMethodImpl = limiterMethod.implementation!!
|
||||||
|
|
||||||
val speedLimitMin = 0.25f
|
|
||||||
val speedLimitMax = 100f
|
|
||||||
|
|
||||||
val (limiterMinConstIndex, limiterMinConst) = limiterMethodImpl.instructions.withIndex()
|
val (limiterMinConstIndex, limiterMinConst) = limiterMethodImpl.instructions.withIndex()
|
||||||
.first { (it.value as? NarrowLiteralInstruction)?.narrowLiteral == 0.25f.toRawBits() }
|
.first { (it.value as? NarrowLiteralInstruction)?.narrowLiteral == 0.25f.toRawBits() }
|
||||||
val (limiterMaxConstIndex, limiterMaxConst) = limiterMethodImpl.instructions.withIndex()
|
val (limiterMaxConstIndex, limiterMaxConst) = limiterMethodImpl.instructions.withIndex()
|
||||||
@@ -107,6 +110,89 @@ class CustomPlaybackSpeedPatch : BytecodePatch(
|
|||||||
"const/high16 v$limiterMaxConstDestination, ${hexFloat(speedLimitMax)}"
|
"const/high16 v$limiterMaxConstDestination, ${hexFloat(speedLimitMax)}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val constructorResult = VideoSpeedPatchFingerprint.result!!
|
||||||
|
val constructor = constructorResult.mutableMethod
|
||||||
|
val implementation = constructor.implementation!!
|
||||||
|
|
||||||
|
val stepsGranularity = 8F
|
||||||
|
val step = speedLimitMax
|
||||||
|
.minus(speedLimitMin) // calculate the range of the speeds
|
||||||
|
.div(speedsGranularity)
|
||||||
|
.times(stepsGranularity)
|
||||||
|
.roundToInt()
|
||||||
|
.div(stepsGranularity)// round to nearest multiple of stepsGranularity
|
||||||
|
.coerceAtLeast(1 / stepsGranularity) // ensure steps are at least 1/8th of the step granularity
|
||||||
|
|
||||||
|
val videoSpeedsArray = buildList<Number> {
|
||||||
|
DoubleStream
|
||||||
|
.iterate(speedLimitMin.toDouble()) { it + step } // create a stream of speeds
|
||||||
|
.let { speedStream ->
|
||||||
|
for (speed in speedStream) {
|
||||||
|
if (speed > speedLimitMax) break
|
||||||
|
add(speed.toFloat().toRawBits())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// adjust the new array of speeds size
|
||||||
|
constructor.replaceInstruction(
|
||||||
|
0,
|
||||||
|
"const/16 v0, ${videoSpeedsArray.size}"
|
||||||
|
)
|
||||||
|
|
||||||
|
// create the payload with the new speeds
|
||||||
|
val arrayPayloadIndex = implementation.instructions.size - 1
|
||||||
|
implementation.replaceInstruction(
|
||||||
|
arrayPayloadIndex,
|
||||||
|
BuilderArrayPayload(
|
||||||
|
4,
|
||||||
|
videoSpeedsArray
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object : OptionsContainer() {
|
||||||
|
private fun String?.validate(max: Int? = null) = this?.toFloatOrNull() != null &&
|
||||||
|
toFloat().let { float ->
|
||||||
|
float > 0 && max?.let { max -> float <= max } ?: true
|
||||||
|
}
|
||||||
|
|
||||||
|
val videoSpeedsGranularity by option(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
"granularity",
|
||||||
|
"16",
|
||||||
|
"Video speed granularity",
|
||||||
|
"The granularity of the video speeds. The higher the value, the more speeds will be available.",
|
||||||
|
true
|
||||||
|
) {
|
||||||
|
it.validate()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
val minVideoSpeed by option(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
"min",
|
||||||
|
"0.25",
|
||||||
|
"Minimum video speed",
|
||||||
|
"The minimum video speed.",
|
||||||
|
true
|
||||||
|
) {
|
||||||
|
it.validate()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
val maxVideoSpeed by option(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
"max",
|
||||||
|
"5.0",
|
||||||
|
"Maximum video speed",
|
||||||
|
"The maximum video speed. Must be greater than the minimum video speed and smaller than 5.",
|
||||||
|
true
|
||||||
|
) {
|
||||||
|
it.validate(5)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.27.39", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.27.39", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
@@ -47,7 +47,7 @@ class PlayerControlsBytecodePatch : BytecodePatch(
|
|||||||
private var inflateFingerprintResult: MethodFingerprintResult? = null
|
private var inflateFingerprintResult: MethodFingerprintResult? = null
|
||||||
set(fingerprint) {
|
set(fingerprint) {
|
||||||
field = fingerprint!!.also {
|
field = fingerprint!!.also {
|
||||||
moveToRegisterInstructionIndex = it.patternScanResult!!.endIndex
|
moveToRegisterInstructionIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
viewRegister =
|
viewRegister =
|
||||||
(it.mutableMethod.implementation!!.instructions[moveToRegisterInstructionIndex] as OneRegisterInstruction).registerA
|
(it.mutableMethod.implementation!!.instructions[moveToRegisterInstructionIndex] as OneRegisterInstruction).registerA
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.22.36", "17.24.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.22.36", "17.24.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class SettingsPatch : BytecodePatch(
|
|||||||
// add instructions to set the theme of the settings activity
|
// add instructions to set the theme of the settings activity
|
||||||
themeSetterResult.mutableMethod.implementation!!.let {
|
themeSetterResult.mutableMethod.implementation!!.let {
|
||||||
it.addInstruction(
|
it.addInstruction(
|
||||||
themeSetterResult.patternScanResult!!.startIndex,
|
themeSetterResult.scanResult.patternScanResult!!.startIndex,
|
||||||
setThemeInstruction
|
setThemeInstruction
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,11 +5,14 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.InputType
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.InputType
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.PreferenceScreen
|
||||||
@@ -83,10 +86,9 @@ class CustomVideoBufferPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun execMaxBuffer() {
|
private fun execMaxBuffer() {
|
||||||
val result = MaxBufferFingerprint.result!!
|
val (method, result) = MaxBufferFingerprint.unwrap(true, -1)
|
||||||
val method = result.mutableMethod
|
val (index, register) = result
|
||||||
val index = result.patternScanResult!!.endIndex - 1
|
|
||||||
val register = (method.implementation!!.instructions[index] as OneRegisterInstruction).registerA
|
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
index + 1, """
|
index + 1, """
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/VideoBufferPatch;->getMaxBuffer()I
|
invoke-static {}, Lapp/revanced/integrations/patches/VideoBufferPatch;->getMaxBuffer()I
|
||||||
@@ -96,10 +98,9 @@ class CustomVideoBufferPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun execPlaybackBuffer() {
|
private fun execPlaybackBuffer() {
|
||||||
val result = PlaybackBufferFingerprint.result!!
|
val (method, result) = PlaybackBufferFingerprint.unwrap()
|
||||||
val method = result.mutableMethod
|
val (index, register) = result
|
||||||
val index = result.patternScanResult!!.startIndex
|
|
||||||
val register = (method.implementation!!.instructions[index] as OneRegisterInstruction).registerA
|
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
index + 1, """
|
index + 1, """
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/VideoBufferPatch;->getPlaybackBuffer()I
|
invoke-static {}, Lapp/revanced/integrations/patches/VideoBufferPatch;->getPlaybackBuffer()I
|
||||||
@@ -109,10 +110,9 @@ class CustomVideoBufferPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun execReBuffer() {
|
private fun execReBuffer() {
|
||||||
val result = ReBufferFingerprint.result!!
|
val (method, result) = ReBufferFingerprint.unwrap()
|
||||||
val method = result.mutableMethod
|
val (index, register) = result
|
||||||
val index = result.patternScanResult!!.startIndex
|
|
||||||
val register = (method.implementation!!.instructions.get(index) as OneRegisterInstruction).registerA
|
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
index + 1, """
|
index + 1, """
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/VideoBufferPatch;->getReBuffer()I
|
invoke-static {}, Lapp/revanced/integrations/patches/VideoBufferPatch;->getReBuffer()I
|
||||||
@@ -120,4 +120,18 @@ class CustomVideoBufferPatch : BytecodePatch(
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun MethodFingerprint.unwrap(
|
||||||
|
forEndIndex: Boolean = false,
|
||||||
|
offset: Int = 0
|
||||||
|
): Pair<MutableMethod, Pair<Int, Int>> {
|
||||||
|
val result = this.result!!
|
||||||
|
val method = result.mutableMethod
|
||||||
|
val scanResult = result.scanResult.patternScanResult!!
|
||||||
|
val index = (if (forEndIndex) scanResult.endIndex else scanResult.startIndex) + offset
|
||||||
|
|
||||||
|
val register = (method.instruction(index) as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
|
return method to (index to register)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class VideoIdPatch : BytecodePatch(
|
|||||||
|
|
||||||
insertMethod = result.mutableMethod
|
insertMethod = result.mutableMethod
|
||||||
videoIdRegister =
|
videoIdRegister =
|
||||||
(insertMethod.implementation!!.instructions[result.patternScanResult!!.endIndex + 1] as OneRegisterInstruction).registerA
|
(insertMethod.implementation!!.instructions[result.scanResult.patternScanResult!!.endIndex + 1] as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
injectCall("Lapp/revanced/integrations/videoplayer/VideoInformation;->setCurrentVideoId(Ljava/lang/String;)V")
|
injectCall("Lapp/revanced/integrations/videoplayer/VideoInformation;->setCurrentVideoId(Ljava/lang/String;)V")
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ class VideoIdPatch : BytecodePatch(
|
|||||||
methodDescriptor: String
|
methodDescriptor: String
|
||||||
) {
|
) {
|
||||||
insertMethod.addInstructions(
|
insertMethod.addInstructions(
|
||||||
result.patternScanResult!!.endIndex + offset, // move-result-object offset
|
result.scanResult.patternScanResult!!.endIndex + offset, // move-result-object offset
|
||||||
"invoke-static {v$videoIdRegister}, $methodDescriptor"
|
"invoke-static {v$videoIdRegister}, $methodDescriptor"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="downloader_not_installed_warning">is not installed</string>
|
<string name="downloader_not_installed_warning">is not installed. Please install it.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -33,11 +33,11 @@
|
|||||||
<string name="segments_endcards">Endcards/Credits</string>
|
<string name="segments_endcards">Endcards/Credits</string>
|
||||||
<string name="segments_endcards_sum">Credits or when the YouTube endcards appear. Not for spoken conclusions</string>
|
<string name="segments_endcards_sum">Credits or when the YouTube endcards appear. Not for spoken conclusions</string>
|
||||||
<string name="segments_subscribe">Interaction Reminder (Subscribe)</string>
|
<string name="segments_subscribe">Interaction Reminder (Subscribe)</string>
|
||||||
<string name="segments_subscribe_sum">When there is a short reminder to like, subscribe or follow them in the middle of content</string>
|
<string name="segments_subscribe_sum">When there is a short reminder to like, subscribe, follow or interact with them on any free or paid platform</string>
|
||||||
<string name="segments_selfpromo">Unpaid/Self Promotion</string>
|
<string name="segments_selfpromo">Unpaid/Self Promotion</string>
|
||||||
<string name="segments_selfpromo_sum">When there is unpaid or self promotion. This includes specific sections about merchandise, donations, or information about who they collaborated with</string>
|
<string name="segments_selfpromo_sum">When there is unpaid or self promotion. This includes specific sections about merchandise, donations, or information about who they collaborated with</string>
|
||||||
<string name="segments_nomusic">Music: Non-Music Section</string>
|
<string name="segments_nomusic">Music: Non-Music Section</string>
|
||||||
<string name="segments_nomusic_sum">Only for use in music videos. This includes introductions or outros in music videos</string>
|
<string name="segments_nomusic_sum">Only for use in music videos. Skips parts of the video not in official mixes</string>
|
||||||
<string name="segments_filler">Filler Tangent/Jokes</string>
|
<string name="segments_filler">Filler Tangent/Jokes</string>
|
||||||
<string name="segments_filler_sum">Tangential scenes added only for filler or humor that are not required to understand the main content of the video. This should not include context or background details</string>
|
<string name="segments_filler_sum">Tangential scenes added only for filler or humor that are not required to understand the main content of the video. This should not include context or background details</string>
|
||||||
<string name="skipped_segment">Skipped a sponsor segment</string>
|
<string name="skipped_segment">Skipped a sponsor segment</string>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<string name="general_browser_button">Enable SB Browser button</string>
|
<string name="general_browser_button">Enable SB Browser button</string>
|
||||||
<string name="general_browser_button_sum">Clicking this button under the player will open sb.ltn.fi where you can see all the segments on the video.</string>
|
<string name="general_browser_button_sum">Clicking this button under the player will open sb.ltn.fi where you can see all the segments on the video.</string>
|
||||||
<string name="segments_preview">Preview/Recap</string>
|
<string name="segments_preview">Preview/Recap</string>
|
||||||
<string name="segments_preview_sum">Recap of previous episodes, or a preview of what\'s coming up later in the current video or future videos in the same series. Intended for edited together clips that do not provide additional information.</string>
|
<string name="segments_preview_sum">Recap of previous episodes, or a preview of what\'s coming up later in the current video or future videos in the same series. Clips should not provide additional information.</string>
|
||||||
<string name="stats">Stats</string>
|
<string name="stats">Stats</string>
|
||||||
<string name="stats_loading">Loading..</string>
|
<string name="stats_loading">Loading..</string>
|
||||||
<string name="stats_sb_disabled">SponsorBlock is disabled</string>
|
<string name="stats_sb_disabled">SponsorBlock is disabled</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user