mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-26 20:21:04 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f818396243 | ||
|
|
3d124af58c | ||
|
|
df18d4a15a | ||
|
|
f08a2b6a90 | ||
|
|
fce8df8284 | ||
|
|
6ec99045d7 | ||
|
|
757784b038 | ||
|
|
7e06f23e29 | ||
|
|
26a43b1753 | ||
|
|
c8023f0b66 | ||
|
|
25f65c7c02 | ||
|
|
07d39f2b81 | ||
|
|
01e226d0c9 | ||
|
|
c98e10adf7 | ||
|
|
858b8a6fa8 | ||
|
|
53a66f64ab | ||
|
|
e2b9baed25 | ||
|
|
6bc24755d5 | ||
|
|
e871d655d2 | ||
|
|
1fa0d5da0e | ||
|
|
461e4bef09 | ||
|
|
9b1df03087 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup JDK
|
- name: Setup JDK
|
||||||
|
|||||||
72
CHANGELOG.md
72
CHANGELOG.md
@@ -1,3 +1,75 @@
|
|||||||
|
## [2.100.2](https://github.com/revanced/revanced-patches/compare/v2.100.1...v2.100.2) (2022-10-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/theme-patch:** respect app specific theme ([#946](https://github.com/revanced/revanced-patches/issues/946)) ([fe8d6c7](https://github.com/revanced/revanced-patches/commit/fe8d6c7b2c10be5cca0717b6a03cfa1bef10e2c0))
|
||||||
|
|
||||||
|
## [2.100.1](https://github.com/revanced/revanced-patches/compare/v2.100.0...v2.100.1) (2022-10-31)
|
||||||
|
|
||||||
|
# [2.100.0](https://github.com/revanced/revanced-patches/compare/v2.99.0...v2.100.0) (2022-10-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `hide-watch-in-vr` patch ([#911](https://github.com/revanced/revanced-patches/issues/911)) ([8ea0b20](https://github.com/revanced/revanced-patches/commit/8ea0b20e96df53211039df0468b2d4a735a381f1))
|
||||||
|
|
||||||
|
# [2.99.0](https://github.com/revanced/revanced-patches/compare/v2.98.0...v2.99.0) (2022-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/sponsorblock:** skip segments once automatically ([#907](https://github.com/revanced/revanced-patches/issues/907)) ([afc7588](https://github.com/revanced/revanced-patches/commit/afc75882062a9316dbc28a9dc4f990cf88b52654))
|
||||||
|
|
||||||
|
# [2.98.0](https://github.com/revanced/revanced-patches/compare/v2.97.0...v2.98.0) (2022-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/comments:** hide shorts comments button ([#866](https://github.com/revanced/revanced-patches/issues/866)) ([c78a74e](https://github.com/revanced/revanced-patches/commit/c78a74e21b4521034f44e9bfd226c5a362c21e6c))
|
||||||
|
|
||||||
|
# [2.97.0](https://github.com/revanced/revanced-patches/compare/v2.96.0...v2.97.0) (2022-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/microg-support:** handle availability of Vanced MicroG ([bfd0d14](https://github.com/revanced/revanced-patches/commit/bfd0d1418fb68f1d37687ec2072d3b64a9c3c6ee))
|
||||||
|
|
||||||
|
# [2.96.0](https://github.com/revanced/revanced-patches/compare/v2.95.0...v2.96.0) (2022-10-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/return-youtube-dislike:** compatibility for old and new button layout ([6629bd7](https://github.com/revanced/revanced-patches/commit/6629bd71716a753be06617724e536b8ab4c3b69a))
|
||||||
|
|
||||||
|
# [2.95.0](https://github.com/revanced/revanced-patches/compare/v2.94.0...v2.95.0) (2022-10-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube:** bump patches compatibility to v17.41.37 ([#888](https://github.com/revanced/revanced-patches/issues/888)) ([11ed0c0](https://github.com/revanced/revanced-patches/commit/11ed0c0fb3236d87284806d2fa957699e908cc61))
|
||||||
|
|
||||||
|
# [2.94.0](https://github.com/revanced/revanced-patches/compare/v2.93.0...v2.94.0) (2022-10-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* remove compatibility for YouTube v17.41.37 ([#886](https://github.com/revanced/revanced-patches/issues/886)) ([0f4bc19](https://github.com/revanced/revanced-patches/commit/0f4bc197455574b84dd1cb1a43f03af90858bc39))
|
||||||
|
|
||||||
|
# [2.93.0](https://github.com/revanced/revanced-patches/compare/v2.92.3...v2.93.0) (2022-10-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* bump YouTube patches to v17.41.37 ([#878](https://github.com/revanced/revanced-patches/issues/878)) ([9072986](https://github.com/revanced/revanced-patches/commit/9072986f99e624386ff51c7eeb1d65158bd9249a))
|
||||||
|
|
||||||
|
## [2.92.3](https://github.com/revanced/revanced-patches/compare/v2.92.2...v2.92.3) (2022-10-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube:** resolve fingerprints on mutable methods ([10e4af3](https://github.com/revanced/revanced-patches/commit/10e4af386652d51c621519f7a67aac8c22ed8c18))
|
||||||
|
|
||||||
## [2.92.2](https://github.com/revanced/revanced-patches/compare/v2.92.1...v2.92.2) (2022-10-27)
|
## [2.92.2](https://github.com/revanced/revanced-patches/compare/v2.92.1...v2.92.2) (2022-10-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
71
README.md
71
README.md
@@ -65,48 +65,49 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.36.37 |
|
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.41.37 |
|
||||||
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.41.37 |
|
||||||
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.36.37 |
|
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.41.37 |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.41.37 |
|
||||||
| `hide-captions-button` | Hides the captions button on video player. | 17.36.37 |
|
| `hide-captions-button` | Hides the captions button on video player. | 17.41.37 |
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.41.37 |
|
||||||
| `hide-create-button` | Hides the create button in the navigation bar. | 17.36.37 |
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.41.37 |
|
||||||
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.36.37 |
|
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.41.37 |
|
||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
| `sponsorblock` | Integrate SponsorBlock. | 17.41.37 |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.41.37 |
|
||||||
| `hide-album-cards` | Hides the album cards below the artist description. | 17.36.37 |
|
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.41.37 |
|
||||||
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.36.37 |
|
| `hide-album-cards` | Hides the album cards below the artist description. | 17.41.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.41.37 |
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.41.37 |
|
||||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.36.37 |
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.41.37 |
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
|
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.41.37 |
|
||||||
| `comments` | Hides comments components below the video player. | 17.36.37 |
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.41.37 |
|
||||||
|
| `comments` | Hides components related to comments. | 17.41.37 |
|
||||||
| `theme` | Applies a custom theme. | all |
|
| `theme` | Applies a custom theme. | all |
|
||||||
| `hide-email-address` | Hides the email address in the account switcher. | 17.36.37 |
|
| `hide-email-address` | Hides the email address in the account switcher. | 17.41.37 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.41.37 |
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.41.37 |
|
||||||
| `hide-my-mix` | Hides mix playlists. | 17.40.41 |
|
| `hide-my-mix` | Hides mix playlists. | 17.41.37 |
|
||||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.41.37 |
|
||||||
| `general-ads` | Removes general ads. | 17.36.37 |
|
| `general-ads` | Removes general ads. | 17.41.37 |
|
||||||
| `video-ads` | Removes ads in the video player. | 17.36.37 |
|
| `video-ads` | Removes ads in the video player. | 17.41.37 |
|
||||||
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.36.37 |
|
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.41.37 |
|
||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.36.37 |
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.41.37 |
|
||||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.36.37 |
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.41.37 |
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.36.37 |
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.41.37 |
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.36.37 |
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.41.37 |
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.36.37 |
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.41.37 |
|
||||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.36.37 |
|
| `always-autorepeat` | Always repeats the playing video again. | 17.41.37 |
|
||||||
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
||||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.36.37 |
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.41.37 |
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
|
| `minimized-playback` | Enables minimized and background playback. | 17.41.37 |
|
||||||
| `custom-playback-speed` | Adds more video playback speed options. | 17.36.37 |
|
| `custom-playback-speed` | Adds more video playback speed options. | 17.41.37 |
|
||||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.36.37 |
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.41.37 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.vanced.android.youtube`
|
### 📦 `com.vanced.android.youtube`
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.92.2
|
version = 2.100.2
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object LoadVideoAdsFingerprint : MethodFingerprint(
|
object LoadVideoAdsFingerprint : MethodFingerprint(
|
||||||
strings = listOf(
|
strings = listOf(
|
||||||
"OnFulfillmentTriggersActivated has non registered slot",
|
"TriggerBundle doesn't have the required metadata specified by the trigger ",
|
||||||
"markFillRequested",
|
"Tried to enter slot with no assigned slotAdapter",
|
||||||
"Trying to enter a slot when a slot of same type and physical position is already active. Its status: ",
|
"Trying to enter a slot when a slot of same type and physical position is already active. Its status: ",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||||
import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility
|
import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility
|
||||||
import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.SwipeControlsHostActivityFingerprint
|
import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.SwipeControlsHostActivityFingerprint
|
||||||
import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.WatchWhileActivityFingerprint
|
import app.revanced.shared.fingerprints.WatchWhileActivityFingerprint
|
||||||
import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch
|
import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.comments.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.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.comments.annotations.CommentsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.comments.resource.patch.CommentsResourcePatch
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
|
@Name("shorts-comments-button-fingerprint")
|
||||||
|
@CommentsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object ShortsCommentsButtonFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("Z", "Z", "L"),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.implementation?.instructions?.any {
|
||||||
|
it.opcode.ordinal == Opcode.CONST.ordinal && (it as WideLiteralInstruction).wideLiteral == CommentsResourcePatch.shortsCommentsButtonId
|
||||||
|
} == true
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.comments.bytecode.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.youtube.ad.general.bytecode.patch.GeneralBytecodeAdsPatch
|
||||||
|
import app.revanced.patches.youtube.layout.comments.annotations.CommentsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.comments.bytecode.fingerprints.ShortsCommentsButtonFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.comments.resource.patch.CommentsResourcePatch
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.PreferenceScreen
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, CommentsResourcePatch::class])
|
||||||
|
@Name("comments")
|
||||||
|
@Description("Hides components related to comments.")
|
||||||
|
@CommentsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class CommentsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
ShortsCommentsButtonFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val shortsCommentsButtonResult = ShortsCommentsButtonFingerprint.result!!
|
||||||
|
val shortsCommentsButtonMethod = shortsCommentsButtonResult.mutableMethod
|
||||||
|
|
||||||
|
val checkCastAnchorFingerprint = object : MethodFingerprint(
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.CONST,
|
||||||
|
Opcode.CONST_HIGH16,
|
||||||
|
Opcode.IF_EQZ,
|
||||||
|
Opcode.CONST,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.CHECK_CAST,
|
||||||
|
)
|
||||||
|
) {}
|
||||||
|
|
||||||
|
val checkCastAnchorIndex = checkCastAnchorFingerprint.also {
|
||||||
|
it.resolve(context, shortsCommentsButtonMethod, shortsCommentsButtonResult.classDef)
|
||||||
|
}.result!!.scanResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
|
shortsCommentsButtonMethod.addInstructions(
|
||||||
|
checkCastAnchorIndex + 1, """
|
||||||
|
invoke-static {v${(shortsCommentsButtonMethod.instruction(checkCastAnchorIndex) as OneRegisterInstruction).registerA}}, Lapp/revanced/integrations/patches/HideShortsCommentsButtonPatch;->hideShortsCommentsButton(Landroid/view/View;)V
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.patches.youtube.layout.comments.patch
|
package app.revanced.patches.youtube.layout.comments.resource.patch
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
@@ -8,8 +7,6 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.youtube.ad.general.bytecode.patch.GeneralBytecodeAdsPatch
|
|
||||||
import app.revanced.patches.youtube.layout.comments.annotations.CommentsCompatibility
|
import app.revanced.patches.youtube.layout.comments.annotations.CommentsCompatibility
|
||||||
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
@@ -17,13 +14,15 @@ import app.revanced.patches.youtube.misc.settings.framework.components.impl.Pref
|
|||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
@Patch
|
@Name("comments-resource-patch")
|
||||||
@DependsOn([ResourceMappingResourcePatch::class, GeneralBytecodeAdsPatch::class])
|
|
||||||
@Name("comments")
|
|
||||||
@Description("Hides comments components below the video player.")
|
|
||||||
@CommentsCompatibility
|
@CommentsCompatibility
|
||||||
|
@DependsOn([SettingsPatch::class, ResourceMappingResourcePatch::class])
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class CommentsPatch : ResourcePatch {
|
class CommentsResourcePatch : ResourcePatch {
|
||||||
|
companion object {
|
||||||
|
internal var shortsCommentsButtonId: Long = -1
|
||||||
|
}
|
||||||
|
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
PreferenceScreen(
|
PreferenceScreen(
|
||||||
@@ -44,10 +43,22 @@ class CommentsPatch : ResourcePatch {
|
|||||||
StringResource("revanced_hide_preview_comment_on", "Preview comment is hidden"),
|
StringResource("revanced_hide_preview_comment_on", "Preview comment is hidden"),
|
||||||
StringResource("revanced_hide_preview_comment_off", "Preview comment is shown")
|
StringResource("revanced_hide_preview_comment_off", "Preview comment is shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_shorts_comments_button",
|
||||||
|
StringResource("revanced_hide_shorts_comments_button_title", "Hide shorts comments button"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_hide_shorts_comments_button_on", "Shorts comments button is hidden"),
|
||||||
|
StringResource("revanced_hide_shorts_comments_button_off", "Shorts comments button is shown")
|
||||||
|
),
|
||||||
),
|
),
|
||||||
StringResource("revanced_comments_summary", "Manage the visibility of comments section components")
|
StringResource("revanced_comments_summary", "Manage the visibility of comments section components")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
shortsCommentsButtonId = ResourceMappingResourcePatch.resourceMappings.single {
|
||||||
|
it.type == "drawable" && it.name == "ic_right_comment_32c"
|
||||||
|
}.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.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")
|
"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", "17.41.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.33.42", "17.34.35", "17.34.36", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37", "17.41.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.34.35", "17.34.36", "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", "17.41.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.33.42", "17.34.35", "17.34.36", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37", "17.41.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.32.39", "17.34.36", "17.36.37", "17.36.39", "17.37.35", "17.38.36", "17.39.35", "17.40.41")
|
"com.google.android.youtube", arrayOf("17.32.39", "17.34.36", "17.36.37", "17.36.39", "17.37.35", "17.38.36", "17.39.35", "17.40.41", "17.41.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.36.37", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class CreateButtonRemoverPatch : BytecodePatch(
|
|||||||
|
|
||||||
val pivotBarResult = PivotBarFingerprint.result ?: return PatchResultError("PivotBarFingerprint failed")
|
val pivotBarResult = PivotBarFingerprint.result ?: return PatchResultError("PivotBarFingerprint failed")
|
||||||
|
|
||||||
if (!PivotBarCreateButtonViewFingerprint.resolve(context, pivotBarResult.method, pivotBarResult.classDef))
|
if (!PivotBarCreateButtonViewFingerprint.resolve(context, pivotBarResult.mutableMethod, pivotBarResult.mutableClass))
|
||||||
return PatchResultError("${PivotBarCreateButtonViewFingerprint.name} failed")
|
return PatchResultError("${PivotBarCreateButtonViewFingerprint.name} failed")
|
||||||
|
|
||||||
val createButtonResult = PivotBarCreateButtonViewFingerprint.result!!
|
val createButtonResult = PivotBarCreateButtonViewFingerprint.result!!
|
||||||
|
|||||||
@@ -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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import org.jf.dexlib2.Opcode
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object PivotBarEnumFingerprint : MethodFingerprint(
|
object PivotBarEnumFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IF_NEZ,
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.IF_NEZ, // target reference
|
||||||
Opcode.SGET_OBJECT,
|
Opcode.SGET_OBJECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT,
|
Opcode.MOVE_RESULT,
|
||||||
Opcode.IGET,
|
|
||||||
Opcode.AND_INT_LIT8, // unique instruction anchor
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -11,8 +11,8 @@ import org.jf.dexlib2.Opcode
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object PivotBarShortsButtonViewFingerprint : MethodFingerprint(
|
object PivotBarShortsButtonViewFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL_RANGE, // unique instruction anchor
|
Opcode.INVOKE_VIRTUAL_RANGE,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT, // target reference
|
||||||
Opcode.GOTO,
|
Opcode.GOTO,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -52,8 +52,8 @@ class ShortsButtonRemoverPatch : BytecodePatch(
|
|||||||
.onEach {
|
.onEach {
|
||||||
val resolutionSucceeded = it.resolve(
|
val resolutionSucceeded = it.resolve(
|
||||||
context,
|
context,
|
||||||
pivotBarResult.method,
|
pivotBarResult.mutableMethod,
|
||||||
pivotBarResult.classDef
|
pivotBarResult.mutableClass
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!resolutionSucceeded) return PatchResultError("${it.name} failed")
|
if (!resolutionSucceeded) return PatchResultError("${it.name} failed")
|
||||||
@@ -63,7 +63,7 @@ class ShortsButtonRemoverPatch : BytecodePatch(
|
|||||||
val enumScanResult = fingerprintResults[0]
|
val enumScanResult = fingerprintResults[0]
|
||||||
val buttonViewResult = fingerprintResults[1]
|
val buttonViewResult = fingerprintResults[1]
|
||||||
|
|
||||||
val enumHookInsertIndex = enumScanResult.startIndex
|
val enumHookInsertIndex = enumScanResult.startIndex + 2
|
||||||
val buttonHookInsertIndex = buttonViewResult.endIndex
|
val buttonHookInsertIndex = buttonViewResult.endIndex
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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.36.37", "17.41.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.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")
|
"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", "17.41.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.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")
|
"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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility
|
||||||
|
|
||||||
|
@Name("text-component-spec-fingerprint")
|
||||||
|
@ReturnYouTubeDislikeCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object TextComponentFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf("com.google.android.apps.youtube.music")
|
||||||
|
)
|
||||||
@@ -4,7 +4,10 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
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.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
@@ -12,10 +15,7 @@ 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.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility
|
import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.DislikeFingerprint
|
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.*
|
||||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.LikeFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.RemoveLikeFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.TextComponentSpecParentFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch
|
import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
||||||
@@ -32,49 +32,53 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
LikeFingerprint.result!!.mutableMethod.addInstructions(
|
listOf(
|
||||||
0,
|
LikeFingerprint.toPatch(Vote.LIKE),
|
||||||
"""
|
DislikeFingerprint.toPatch(Vote.DISLIKE),
|
||||||
const/4 v0, 1
|
RemoveLikeFingerprint.toPatch(Vote.REMOVE_LIKE)
|
||||||
invoke-static {v0}, Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->sendVote(I)V
|
).forEach { (fingerprint, vote) ->
|
||||||
"""
|
with(fingerprint.result ?: return PatchResultError("Failed to find ${fingerprint.name} method.")) {
|
||||||
)
|
mutableMethod.addInstructions(
|
||||||
DislikeFingerprint.result!!.mutableMethod.addInstructions(
|
0,
|
||||||
0,
|
"""
|
||||||
"""
|
const/4 v0, ${vote.value}
|
||||||
const/4 v0, -1
|
invoke-static {v0}, Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->sendVote(I)V
|
||||||
invoke-static {v0}, Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->sendVote(I)V
|
"""
|
||||||
"""
|
)
|
||||||
)
|
}
|
||||||
RemoveLikeFingerprint.result!!.mutableMethod.addInstructions(
|
}
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0
|
|
||||||
invoke-static {v0}, Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->sendVote(I)V
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
|
|
||||||
VideoIdPatch.injectCall("Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->newVideoLoaded(Ljava/lang/String;)V")
|
VideoIdPatch.injectCall("Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->newVideoLoaded(Ljava/lang/String;)V")
|
||||||
|
|
||||||
val parentResult = TextComponentSpecParentFingerprint.result!!
|
with(TextComponentFingerprint
|
||||||
val createComponentMethod = parentResult.mutableClass.methods.find { method ->
|
.also { it.resolve(context, TextComponentSpecParentFingerprint.result!!.classDef) }
|
||||||
method.parameters.size >= 19 && method.parameterTypes.takeLast(4)
|
.result ?: return PatchResultError("Could not find createComponent method")
|
||||||
.all { param -> param == "Ljava/util/concurrent/atomic/AtomicReference;" }
|
) {
|
||||||
|
val createComponentMethod = mutableMethod
|
||||||
|
|
||||||
|
val conversionContextParam = 5
|
||||||
|
val textRefParam = createComponentMethod.parameters.size - 2
|
||||||
|
val insertIndex = scanResult.stringsScanResult!!.matches.first().index - 2
|
||||||
|
|
||||||
|
createComponentMethod.addInstructions(
|
||||||
|
insertIndex,
|
||||||
|
"""
|
||||||
|
move-object/from16 v7, p$conversionContextParam
|
||||||
|
move-object/from16 v8, p$textRefParam
|
||||||
|
invoke-static {v7, v8}, Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->onComponentCreated(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;)V
|
||||||
|
"""
|
||||||
|
)
|
||||||
}
|
}
|
||||||
?: return PatchResultError("TextComponentSpec.createComponent not found")
|
|
||||||
|
|
||||||
val conversionContextParam = 5
|
|
||||||
val textRefParam = createComponentMethod.parameters.size - 2
|
|
||||||
|
|
||||||
createComponentMethod.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
move-object/from16 v0, p$conversionContextParam
|
|
||||||
move-object/from16 v1, p$textRefParam
|
|
||||||
invoke-static {v0, v1}, Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->onComponentCreated(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;)V
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun MethodFingerprint.toPatch(voteKind: Vote) = VotePatch(this, voteKind)
|
||||||
|
|
||||||
|
private data class VotePatch(val fingerprint: MethodFingerprint, val voteKind: Vote)
|
||||||
|
|
||||||
|
private enum class Vote(val value: Int) {
|
||||||
|
LIKE(1),
|
||||||
|
DISLIKE(-1),
|
||||||
|
REMOVE_LIKE(0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.34.35", "17.34.36", "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", "17.41.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.33.42", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.33.42", "17.36.37", "17.41.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.26.35", "17.29.34", "17.32.35", "17.33.42", "17.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.watchinvr.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.36", "17.36.37", "17.41.37")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class WatchinVRCompatibility
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.watchinvr.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.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.watchinvr.annotations.WatchinVRCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
@Name("watch-in-vr-fingerprint")
|
||||||
|
@WatchinVRCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object WatchinVRFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"),
|
||||||
|
strings = listOf("menu_item_cardboard_vr")
|
||||||
|
)
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.watchinvr.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.youtube.layout.watchinvr.annotations.WatchinVRCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.watchinvr.fingerprints.WatchinVRFingerprint
|
||||||
|
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-watch-in-vr")
|
||||||
|
@Description("Hides the Watch in VR option from the player settings flyout panel.")
|
||||||
|
@WatchinVRCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class WatchinVRPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
WatchinVRFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_watch_in_vr",
|
||||||
|
StringResource("revanced_hide_watch_in_vr_title", "Hide Watch in VR option"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_hide_watch_in_vr_summary_on", "Watch in VR option is hidden"),
|
||||||
|
StringResource("revanced_hide_watch_in_vr_summary_off", "Watch in VR option is shown")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
WatchinVRFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
invoke-static {}, Lapp/revanced/integrations/patches/HideWatchinVRPatch;->hideWatchinVR()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :shown
|
||||||
|
return-void
|
||||||
|
:shown
|
||||||
|
nop
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.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")
|
"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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.33.42", "17.34.35", "17.34.36", "17.36.37")
|
"com.google.android.youtube", arrayOf("17.33.42", "17.34.35", "17.34.36", "17.36.37", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -4,10 +4,13 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
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.shared.fingerprints.WatchWhileActivityFingerprint
|
||||||
import app.revanced.patches.youtube.layout.castbutton.patch.HideCastButtonPatch
|
import app.revanced.patches.youtube.layout.castbutton.patch.HideCastButtonPatch
|
||||||
import app.revanced.patches.youtube.misc.clientspoof.patch.ClientSpoofPatch
|
import app.revanced.patches.youtube.misc.clientspoof.patch.ClientSpoofPatch
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
||||||
@@ -38,9 +41,10 @@ class MicroGBytecodePatch : BytecodePatch(
|
|||||||
CastDynamiteModuleV2Fingerprint,
|
CastDynamiteModuleV2Fingerprint,
|
||||||
CastContextFetchFingerprint,
|
CastContextFetchFingerprint,
|
||||||
PrimeFingerprint,
|
PrimeFingerprint,
|
||||||
|
WatchWhileActivityFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) =
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
// apply common microG patch
|
// apply common microG patch
|
||||||
MicroGBytecodeHelper.patchBytecode(
|
MicroGBytecodeHelper.patchBytecode(
|
||||||
context, arrayOf(
|
context, arrayOf(
|
||||||
@@ -62,5 +66,11 @@ class MicroGBytecodePatch : BytecodePatch(
|
|||||||
CastDynamiteModuleV2Fingerprint,
|
CastDynamiteModuleV2Fingerprint,
|
||||||
CastContextFetchFingerprint
|
CastContextFetchFingerprint
|
||||||
)
|
)
|
||||||
).let { PatchResultSuccess() }
|
)
|
||||||
|
|
||||||
|
// inject the notice for MicroG
|
||||||
|
MicroGBytecodeHelper.injectNotice(WatchWhileActivityFingerprint)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ class MicroGResourcePatch : ResourcePatch {
|
|||||||
SPOOFED_PACKAGE_NAME,
|
SPOOFED_PACKAGE_NAME,
|
||||||
SPOOFED_PACKAGE_SIGNATURE
|
SPOOFED_PACKAGE_SIGNATURE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// add strings
|
||||||
|
MicroGResourceHelper.addStrings(context)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
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.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")
|
"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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.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.34.35", "17.34.36", "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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ object ThemeSetterAppFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.SGET_OBJECT,
|
Opcode.SGET_OBJECT,
|
||||||
Opcode.IF_NE,
|
Opcode.IF_NE,
|
||||||
Opcode.CONST,
|
Opcode.CONST, //target reference
|
||||||
Opcode.GOTO,
|
Opcode.GOTO,
|
||||||
Opcode.CONST,
|
Opcode.CONST, //target reference
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.RETURN_OBJECT,
|
Opcode.RETURN_OBJECT,
|
||||||
Opcode.NEW_INSTANCE,
|
Opcode.NEW_INSTANCE,
|
||||||
@@ -34,6 +34,6 @@ object ThemeSetterAppFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.SGET_OBJECT,
|
Opcode.SGET_OBJECT,
|
||||||
Opcode.IF_NE,
|
Opcode.IF_NE,
|
||||||
Opcode.CONST,
|
Opcode.CONST, //target reference
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -75,7 +75,15 @@ class SettingsPatch : BytecodePatch(
|
|||||||
scanResult.patternScanResult!!.endIndex + 1,
|
scanResult.patternScanResult!!.endIndex + 1,
|
||||||
buildInstructionsString(1)
|
buildInstructionsString(1)
|
||||||
)
|
)
|
||||||
|
addInstructions(
|
||||||
|
scanResult.patternScanResult!!.endIndex - 7,
|
||||||
|
buildInstructionsString(0)
|
||||||
|
)
|
||||||
|
|
||||||
|
addInstructions(
|
||||||
|
scanResult.patternScanResult!!.endIndex - 9,
|
||||||
|
buildInstructionsString(1)
|
||||||
|
)
|
||||||
addInstructions(
|
addInstructions(
|
||||||
mutableMethod.implementation!!.instructions.size - 2,
|
mutableMethod.implementation!!.instructions.size - 2,
|
||||||
buildInstructionsString(0)
|
buildInstructionsString(0)
|
||||||
|
|||||||
@@ -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.34.35", "17.34.36", "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", "17.41.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.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")
|
"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", "17.41.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.interaction.swipecontrols.fingerprints
|
package app.revanced.shared.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package app.revanced.util.microg
|
package app.revanced.util.microg
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
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.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
@@ -20,6 +21,17 @@ import org.jf.dexlib2.immutable.reference.ImmutableStringReference
|
|||||||
* Helper class for applying bytecode patches needed for the microg-support patches.
|
* Helper class for applying bytecode patches needed for the microg-support patches.
|
||||||
*/
|
*/
|
||||||
internal object MicroGBytecodeHelper {
|
internal object MicroGBytecodeHelper {
|
||||||
|
/**
|
||||||
|
* Hook a method to check the availability of MicroG.
|
||||||
|
*
|
||||||
|
* @param fingerprint The fingerprint of the method to add the call for the notice in.
|
||||||
|
*/
|
||||||
|
fun injectNotice(fingerprint: MethodFingerprint) {
|
||||||
|
fingerprint.result!!.mutableMethod.addInstruction(
|
||||||
|
0,
|
||||||
|
"invoke-static {}, Lapp/revanced/integrations/patches/MicroGSupport;->checkAvailability()V"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform strings with package name out of [fromPackageName] and [toPackageName].
|
* Transform strings with package name out of [fromPackageName] and [toPackageName].
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
package app.revanced.util.microg
|
package app.revanced.util.microg
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for applying resource patches needed for the microg-support patches.
|
* Helper class for applying resource patches needed for the microg-support patches.
|
||||||
*/
|
*/
|
||||||
internal object MicroGResourceHelper {
|
internal object MicroGResourceHelper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add necessary strings to the strings.xml file.
|
||||||
|
*
|
||||||
|
* @param context The resource context.
|
||||||
|
* @param stringsHost The file which hosts the strings.
|
||||||
|
*/
|
||||||
|
fun addStrings(context: ResourceContext, stringsHost: String = "microg/host/values/strings.xml") = context.mergeStrings(stringsHost)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch the manifest to work with MicroG.
|
* Patch the manifest to work with MicroG.
|
||||||
*
|
*
|
||||||
* @param context Bytecode context.
|
* @param context The resource context.
|
||||||
* @param fromPackageName Original package name.
|
* @param fromPackageName The original package name.
|
||||||
* @param toPackageName The package name to accept.
|
* @param toPackageName The package name to accept.
|
||||||
* @param toName The new name of the app.
|
* @param toName The new name of the app.
|
||||||
*/
|
*/
|
||||||
|
|||||||
4
src/main/resources/microg/host/values/strings.xml
Normal file
4
src/main/resources/microg/host/values/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="microg_not_installed_warning">Vanced MicroG is not installed. Please install it.</string>
|
||||||
|
</resources>
|
||||||
@@ -51,6 +51,7 @@
|
|||||||
<string name="skipped_filler">Skipped filler</string>
|
<string name="skipped_filler">Skipped filler</string>
|
||||||
<string name="skipped_unsubmitted">Skipped unsubmitted segment</string>
|
<string name="skipped_unsubmitted">Skipped unsubmitted segment</string>
|
||||||
<string name="skip_automatically">Skip automatically</string>
|
<string name="skip_automatically">Skip automatically</string>
|
||||||
|
<string name="skip_automatically_once">Skip automatically once</string>
|
||||||
<string name="skip_showbutton">Show a skip button</string>
|
<string name="skip_showbutton">Show a skip button</string>
|
||||||
<string name="skip_ignore">Don\'t do anything</string>
|
<string name="skip_ignore">Don\'t do anything</string>
|
||||||
<string name="skip_sponsor">Skip segment</string>
|
<string name="skip_sponsor">Skip segment</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user