mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-08 10:23:55 +01:00
Compare commits
74 Commits
v2.191.0-d
...
v2.191.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7cf7e6d70 | ||
|
|
23dec85068 | ||
|
|
936c98c709 | ||
|
|
ba92f2e5d9 | ||
|
|
1f5c1d48a2 | ||
|
|
7d9ddc9203 | ||
|
|
0e0ea5d064 | ||
|
|
4ba1ddde8f | ||
|
|
5b09ef79a8 | ||
|
|
cd544669b2 | ||
|
|
7d50a7b178 | ||
|
|
e153e97ed2 | ||
|
|
224142ba19 | ||
|
|
8c5239d6b5 | ||
|
|
43533f6c09 | ||
|
|
f77d743a92 | ||
|
|
27a346d74b | ||
|
|
5138197358 | ||
|
|
2e7ab38a3d | ||
|
|
47e1bcbafa | ||
|
|
d83ef1ed59 | ||
|
|
3f397dabf7 | ||
|
|
1d23dcb3ea | ||
|
|
be335adeb9 | ||
|
|
7422617dc5 | ||
|
|
b07887800b | ||
|
|
0c5d846192 | ||
|
|
ff6daf55e0 | ||
|
|
2d33ba68b3 | ||
|
|
f703c9ab81 | ||
|
|
9546d12218 | ||
|
|
b2b5594f6a | ||
|
|
bf628dc0ea | ||
|
|
5f2536814d | ||
|
|
99bc87909e | ||
|
|
928df2428d | ||
|
|
3e9e1e2577 | ||
|
|
5ebec9b424 | ||
|
|
0204ff67a9 | ||
|
|
7d2a707030 | ||
|
|
26e0e4cd1d | ||
|
|
40f0a8cd0d | ||
|
|
47c858ef4e | ||
|
|
b17cd14d7d | ||
|
|
c7383bdf67 | ||
|
|
01e36428a0 | ||
|
|
187c1eb14a | ||
|
|
acadac3049 | ||
|
|
bf5c197eb8 | ||
|
|
73e8b3f81b | ||
|
|
1c2f499b1c | ||
|
|
32599ab13d | ||
|
|
19519d1d06 | ||
|
|
2ff70e8b8f | ||
|
|
1e21b0b572 | ||
|
|
18180745bc | ||
|
|
aa89b8d20c | ||
|
|
287648cf1e | ||
|
|
c4554b3564 | ||
|
|
1532d899b4 | ||
|
|
8ac18e6e23 | ||
|
|
54aa358b9f | ||
|
|
147d0eef34 | ||
|
|
fb60603782 | ||
|
|
18a2a4ceb4 | ||
|
|
7d822ddbec | ||
|
|
e74e65364a | ||
|
|
ef241671bd | ||
|
|
096fc12123 | ||
|
|
f166bd7ea7 | ||
|
|
df43cea4f8 | ||
|
|
444b196f41 | ||
|
|
884bf29804 | ||
|
|
144fabe571 |
2
.github/workflows/pull_request.yml
vendored
2
.github/workflows/pull_request.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Open pull request
|
- name: Open pull request
|
||||||
uses: repo-sync/pull-request@v2
|
uses: repo-sync/pull-request@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Make sure the release step uses its own credentials:
|
# Make sure the release step uses its own credentials:
|
||||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||||
|
|||||||
271
CHANGELOG.md
271
CHANGELOG.md
@@ -1,3 +1,274 @@
|
|||||||
|
## [2.191.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.191.0...v2.191.1-dev.1) (2023-10-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Remove `dependencies` from generated JSON file ([79bb3e1](https://github.com/ReVanced/revanced-patches/commit/79bb3e164f84094c639ac9e567dc0a5ce70300bd))
|
||||||
|
|
||||||
|
# [2.191.0](https://github.com/ReVanced/revanced-patches/compare/v2.190.0...v2.191.0) (2023-10-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add hooks to existing hook set ([5655067](https://github.com/ReVanced/revanced-patches/commit/5655067f28d010f3a7a6d91b09ac984eee162031))
|
||||||
|
* **Duolingo - Unlock Super:** Get correct instruction offset ([#3023](https://github.com/ReVanced/revanced-patches/issues/3023)) ([5146de8](https://github.com/ReVanced/revanced-patches/commit/5146de872acb17d7c21019ac7ed531f27361038f))
|
||||||
|
* **Google Recorder - Remove device restrictions:** Clarify limitation ([094f57b](https://github.com/ReVanced/revanced-patches/commit/094f57b601d746079c43fd5c8834e3e6be07f946))
|
||||||
|
* **Infinity for Reddit - Spoof client:** Constrain patch to last working versions ([#2944](https://github.com/ReVanced/revanced-patches/issues/2944)) ([ee975de](https://github.com/ReVanced/revanced-patches/commit/ee975dea846c77af0efe608e647075f4055af320))
|
||||||
|
* **Relay - Spoof client:** Restore OAuth login ([96e01f7](https://github.com/ReVanced/revanced-patches/commit/96e01f7a7b87f468776fbde48e114a3f51630a46))
|
||||||
|
* **Slide - Spoof client:** Use correct patch name ([f355dbf](https://github.com/ReVanced/revanced-patches/commit/f355dbf1d2af3075c6a3f13d8bf5f8dca22e6005))
|
||||||
|
* **Sync for Reddit:** Do not throw an error when not necessary ([ef644e4](https://github.com/ReVanced/revanced-patches/commit/ef644e48018a90429108779b7419299c4f43e4ff))
|
||||||
|
* **TikTok - Hide ads:** Constrain to last working version ([56e45a6](https://github.com/ReVanced/revanced-patches/commit/56e45a60a405b5382e1ef6f7bcd5de570c7c52ef))
|
||||||
|
* **Twitch - Audio ads:** Support missing version `16.1.0` ([#2928](https://github.com/ReVanced/revanced-patches/issues/2928)) ([688d8fa](https://github.com/ReVanced/revanced-patches/commit/688d8fa7e86862e03d8336af5f6cb207c4b72593))
|
||||||
|
* Use consistent toggle description ([#2983](https://github.com/ReVanced/revanced-patches/issues/2983)) ([ceaa512](https://github.com/ReVanced/revanced-patches/commit/ceaa512f317fdd95dca37e425b389494a9b2e226))
|
||||||
|
* Use correct instruction ([246cf2c](https://github.com/ReVanced/revanced-patches/commit/246cf2cc92624e43bc7405cb32be9b560bb648c5))
|
||||||
|
* **YouTube - Client spoof:** adjust settings text ([#3035](https://github.com/ReVanced/revanced-patches/issues/3035)) ([59a2e96](https://github.com/ReVanced/revanced-patches/commit/59a2e9617fc4f898e87cefeb3d2c6996b925fa90))
|
||||||
|
* **YouTube - Client spoof:** Display seekbar thumbnails in high quality ([5e8a2d3](https://github.com/ReVanced/revanced-patches/commit/5e8a2d3fe77a4a08ea32e7dc22f2c8e4048b7a6b))
|
||||||
|
* **YouTube - Client spoof:** Do not record feed videos to history by default ([#3017](https://github.com/ReVanced/revanced-patches/issues/3017)) ([5ccbf1b](https://github.com/ReVanced/revanced-patches/commit/5ccbf1bf8ed92cde61689a2b1e3a3c1e915959a7))
|
||||||
|
* **YouTube - Client spoof:** Removed unused code ([#3030](https://github.com/ReVanced/revanced-patches/issues/3030)) ([15e27bf](https://github.com/ReVanced/revanced-patches/commit/15e27bf93e6366ba8a59091409c4271c8230edb6))
|
||||||
|
* **YouTube - Client spoof:** Restore seekbar thumbnails ([bf4a115](https://github.com/ReVanced/revanced-patches/commit/bf4a1159ff745f8f91e11f30db4651d85769227b))
|
||||||
|
* **YouTube - Client spoof:** Show seekbar thumbnail for age restricted and paid videos ([1a79300](https://github.com/ReVanced/revanced-patches/commit/1a793007c919753a8c31ab2382d86c0546eefe20))
|
||||||
|
* **YouTube - Custom filter:** Use new lines between components instead of commas ([#2952](https://github.com/ReVanced/revanced-patches/issues/2952)) ([ecb2e32](https://github.com/ReVanced/revanced-patches/commit/ecb2e32b1e296590d150bdd3f8bea2665b19a84d))
|
||||||
|
* **YouTube - Hide "Load more" button:** Use correct names ([569c3cd](https://github.com/ReVanced/revanced-patches/commit/569c3cde9875b807c9116322ca324f69b5fa0218))
|
||||||
|
* **YouTube - Hide info cards:** Fix info cards not hiding for some users ([#3039](https://github.com/ReVanced/revanced-patches/issues/3039)) ([cb38637](https://github.com/ReVanced/revanced-patches/commit/cb38637e6be968d54561a1e0466b9259dbf0b4ee))
|
||||||
|
* **YouTube - Hide layout components:** Always hide redundant 'player audio track' button ([#2951](https://github.com/ReVanced/revanced-patches/issues/2951)) ([ca632bd](https://github.com/ReVanced/revanced-patches/commit/ca632bd2cc74f0ce5ccb948e902445de3ab893cf))
|
||||||
|
* **YouTube - Hide shorts components:** Fix hiding navigation bar ([2de51e6](https://github.com/ReVanced/revanced-patches/commit/2de51e65f05be8a6364dfdfe9cd36e8fed5737f6))
|
||||||
|
* **YouTube - Premium heading:** Correct inverted logic ([#3042](https://github.com/ReVanced/revanced-patches/issues/3042)) ([b33ed75](https://github.com/ReVanced/revanced-patches/commit/b33ed757370653b8eb0002b0977eedfbc73dbe5e))
|
||||||
|
* **YouTube - ReturnYouTubeDislike:** Revert support for 18.37.36 ([#3041](https://github.com/ReVanced/revanced-patches/issues/3041)) ([3761073](https://github.com/ReVanced/revanced-patches/commit/37610732da87549c22a430bb62d10793dfa2e696))
|
||||||
|
* **YouTube - SponsorBlock:** Adjust import/export UI text ([#3063](https://github.com/ReVanced/revanced-patches/issues/3063)) ([4e5513e](https://github.com/ReVanced/revanced-patches/commit/4e5513e973f5de7c9f6330dfe7a0744e91f305b4))
|
||||||
|
* **YouTube - Video Id:** Fix video id not showing the currently playing video ([#3038](https://github.com/ReVanced/revanced-patches/issues/3038)) ([f6f226b](https://github.com/ReVanced/revanced-patches/commit/f6f226ba281823cb5d2d468c32f6e48551971726))
|
||||||
|
* **YouTube:** Restore functionality of `Old video quality menu` and `Custom speeds` on tablets ([#2999](https://github.com/ReVanced/revanced-patches/issues/2999)) ([238bed1](https://github.com/ReVanced/revanced-patches/commit/238bed12519ec61a53b1ee72da467830ef252154))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add notice for thumbnails for age restricted or paid videos ([f7cf70b](https://github.com/ReVanced/revanced-patches/commit/f7cf70b5d3f415411fa767931a33e84df9df6c16))
|
||||||
|
* **Duolingo:** Remove `Unlock Duolingo Super` patch ([b4b9746](https://github.com/ReVanced/revanced-patches/commit/b4b9746361b5435b9d9429ad065e53364c51904a))
|
||||||
|
* **SPB Serviceportal Bund:** Add `Remove root detection` patch ([#3049](https://github.com/ReVanced/revanced-patches/issues/3049)) ([481bf58](https://github.com/ReVanced/revanced-patches/commit/481bf583afbf954bef1c4e5349a62ea1c623115a))
|
||||||
|
* **Strava:** Add `Disable subscription suggestions` patch ([#2997](https://github.com/ReVanced/revanced-patches/issues/2997)) ([af02175](https://github.com/ReVanced/revanced-patches/commit/af0217594d9c7526f550fc7e6f09f8a9232e72cf))
|
||||||
|
* **Sync for Reddit - Client spoof:** Restore upload functionality ([9344c8a](https://github.com/ReVanced/revanced-patches/commit/9344c8a067127b0fb4ee8599c5dcfcb206b4ee07))
|
||||||
|
* **TikTok - Hide ads:** Constrain to last working version ([516e8a1](https://github.com/ReVanced/revanced-patches/commit/516e8a14c0e113f9f4c0dda9be223cf3e929eb3a))
|
||||||
|
* **TU Dortmund:** Add `Show on lockscreen` patch ([#2947](https://github.com/ReVanced/revanced-patches/issues/2947)) ([9a18326](https://github.com/ReVanced/revanced-patches/commit/9a18326aeb68d7518594d0eab326ca845b9bdbdd))
|
||||||
|
* **Tumblr:** Add `Disable blog notification reminder` patch ([29f19b9](https://github.com/ReVanced/revanced-patches/commit/29f19b9378c7e167137f38fa4517ae19382ca4f6))
|
||||||
|
* **Tumblr:** Add `Disable dashboard ads` patch ([#2979](https://github.com/ReVanced/revanced-patches/issues/2979)) ([07c267a](https://github.com/ReVanced/revanced-patches/commit/07c267ad20afa1415d2dba31f0830d2dd5a34654))
|
||||||
|
* **Tumblr:** Add `Disable gift message popup` patch ([a4d6b4e](https://github.com/ReVanced/revanced-patches/commit/a4d6b4e5ce6065d932f3895b4996e7dc1e5f7c67))
|
||||||
|
* **Tumblr:** Add `Disable in-app update` patch ([#3058](https://github.com/ReVanced/revanced-patches/issues/3058)) ([5e8076b](https://github.com/ReVanced/revanced-patches/commit/5e8076b330cabe57130233adacdf84b56f010217))
|
||||||
|
* **Tumblr:** Add `Disable Tumblr Live` patch ([#2987](https://github.com/ReVanced/revanced-patches/issues/2987)) ([bf1f9dc](https://github.com/ReVanced/revanced-patches/commit/bf1f9dc799705679d17973e689165ab1bff327cd))
|
||||||
|
* **Twitch - Block embedded ads:** Switch from `ttv.lol` to `luminous.dev` ([0fe115e](https://github.com/ReVanced/revanced-patches/commit/0fe115e8f98ccdc86d318090fc92fe77cece1dd8))
|
||||||
|
* Use properties file for `Client spoof` patches ([e5d548c](https://github.com/ReVanced/revanced-patches/commit/e5d548c6427fb54968f26d706ff16274e72f700a))
|
||||||
|
* **YouTube - Hide layout components:** Hide "Join" button ([1b71f89](https://github.com/ReVanced/revanced-patches/commit/1b71f893bb9fd8511833b8895031c8d8122a6efb))
|
||||||
|
* **YouTube - Hide layout components:** Hide "Notify me" button ([3027c15](https://github.com/ReVanced/revanced-patches/commit/3027c1575717588f43f4b95be6ba97dac2b94069))
|
||||||
|
* **YouTube - Hide layout components:** Hide search result shelf header ([f4eda8c](https://github.com/ReVanced/revanced-patches/commit/f4eda8c8d111cc856d5878a32ddca3f7c2e0df31))
|
||||||
|
* **YouTube - Hide layout components:** Hide timed reactions ([d0a775d](https://github.com/ReVanced/revanced-patches/commit/d0a775d685b1e0564804d564d1cbcbb8d0a04b03))
|
||||||
|
* **YouTube - Premium heading:** Allow using default heading ([#3029](https://github.com/ReVanced/revanced-patches/issues/3029)) ([d5ab35a](https://github.com/ReVanced/revanced-patches/commit/d5ab35a444523baa0586fcb9513d6ae4f2518946))
|
||||||
|
* **YouTube - Spoof app version:** add version 18.20.39 ([#3001](https://github.com/ReVanced/revanced-patches/issues/3001)) ([f14c5e7](https://github.com/ReVanced/revanced-patches/commit/f14c5e79792f62fb060dd0eebbd3dd7157a08a98))
|
||||||
|
* **YouTube:** Add `Bypass URL redirects` patch ([125cac5](https://github.com/ReVanced/revanced-patches/commit/125cac5928c9b71d35253f1fd7651f4a30e15529))
|
||||||
|
* **YouTube:** Bump compatibility to `18.37.36` ([#3028](https://github.com/ReVanced/revanced-patches/issues/3028)) ([eda28e5](https://github.com/ReVanced/revanced-patches/commit/eda28e507e7fb5171eeb15a5a0532929ee611211))
|
||||||
|
|
||||||
|
# [2.191.0-dev.33](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.32...v2.191.0-dev.33) (2023-10-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **TikTok - Hide ads:** Constrain to last working version ([56e45a6](https://github.com/ReVanced/revanced-patches/commit/56e45a60a405b5382e1ef6f7bcd5de570c7c52ef))
|
||||||
|
|
||||||
|
# [2.191.0-dev.32](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.31...v2.191.0-dev.32) (2023-10-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Sync for Reddit:** Do not throw an error when not necessary ([ef644e4](https://github.com/ReVanced/revanced-patches/commit/ef644e48018a90429108779b7419299c4f43e4ff))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Sync for Reddit - Client spoof:** Restore upload functionality ([9344c8a](https://github.com/ReVanced/revanced-patches/commit/9344c8a067127b0fb4ee8599c5dcfcb206b4ee07))
|
||||||
|
* Use properties file for `Client spoof` patches ([e5d548c](https://github.com/ReVanced/revanced-patches/commit/e5d548c6427fb54968f26d706ff16274e72f700a))
|
||||||
|
|
||||||
|
# [2.191.0-dev.31](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.30...v2.191.0-dev.31) (2023-10-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - SponsorBlock:** Adjust import/export UI text ([#3063](https://github.com/ReVanced/revanced-patches/issues/3063)) ([4e5513e](https://github.com/ReVanced/revanced-patches/commit/4e5513e973f5de7c9f6330dfe7a0744e91f305b4))
|
||||||
|
|
||||||
|
# [2.191.0-dev.30](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.29...v2.191.0-dev.30) (2023-10-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add hooks to existing hook set ([5655067](https://github.com/ReVanced/revanced-patches/commit/5655067f28d010f3a7a6d91b09ac984eee162031))
|
||||||
|
* **Google Recorder - Remove device restrictions:** Clarify limitation ([094f57b](https://github.com/ReVanced/revanced-patches/commit/094f57b601d746079c43fd5c8834e3e6be07f946))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Hide layout components:** Hide search result shelf header ([f4eda8c](https://github.com/ReVanced/revanced-patches/commit/f4eda8c8d111cc856d5878a32ddca3f7c2e0df31))
|
||||||
|
|
||||||
|
# [2.191.0-dev.29](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.28...v2.191.0-dev.29) (2023-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **TikTok - Hide ads:** Constrain to last working version ([516e8a1](https://github.com/ReVanced/revanced-patches/commit/516e8a14c0e113f9f4c0dda9be223cf3e929eb3a))
|
||||||
|
|
||||||
|
# [2.191.0-dev.28](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.27...v2.191.0-dev.28) (2023-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide "Load more" button:** Use correct names ([569c3cd](https://github.com/ReVanced/revanced-patches/commit/569c3cde9875b807c9116322ca324f69b5fa0218))
|
||||||
|
* **YouTube - Hide shorts components:** Fix hiding navigation bar ([2de51e6](https://github.com/ReVanced/revanced-patches/commit/2de51e65f05be8a6364dfdfe9cd36e8fed5737f6))
|
||||||
|
|
||||||
|
# [2.191.0-dev.27](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.26...v2.191.0-dev.27) (2023-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Tumblr:** Add `Disable in-app update` patch ([#3058](https://github.com/ReVanced/revanced-patches/issues/3058)) ([5e8076b](https://github.com/ReVanced/revanced-patches/commit/5e8076b330cabe57130233adacdf84b56f010217))
|
||||||
|
|
||||||
|
# [2.191.0-dev.26](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.25...v2.191.0-dev.26) (2023-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Use correct instruction ([246cf2c](https://github.com/ReVanced/revanced-patches/commit/246cf2cc92624e43bc7405cb32be9b560bb648c5))
|
||||||
|
|
||||||
|
# [2.191.0-dev.25](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.24...v2.191.0-dev.25) (2023-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Hide layout components:** Hide "Join" button ([1b71f89](https://github.com/ReVanced/revanced-patches/commit/1b71f893bb9fd8511833b8895031c8d8122a6efb))
|
||||||
|
* **YouTube - Hide layout components:** Hide "Notify me" button ([3027c15](https://github.com/ReVanced/revanced-patches/commit/3027c1575717588f43f4b95be6ba97dac2b94069))
|
||||||
|
* **YouTube - Hide layout components:** Hide timed reactions ([d0a775d](https://github.com/ReVanced/revanced-patches/commit/d0a775d685b1e0564804d564d1cbcbb8d0a04b03))
|
||||||
|
|
||||||
|
# [2.191.0-dev.24](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.23...v2.191.0-dev.24) (2023-09-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Duolingo:** Remove `Unlock Duolingo Super` patch ([b4b9746](https://github.com/ReVanced/revanced-patches/commit/b4b9746361b5435b9d9429ad065e53364c51904a))
|
||||||
|
|
||||||
|
# [2.191.0-dev.23](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.22...v2.191.0-dev.23) (2023-09-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **SPB Serviceportal Bund:** Add `Remove root detection` patch ([#3049](https://github.com/ReVanced/revanced-patches/issues/3049)) ([481bf58](https://github.com/ReVanced/revanced-patches/commit/481bf583afbf954bef1c4e5349a62ea1c623115a))
|
||||||
|
|
||||||
|
# [2.191.0-dev.22](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.21...v2.191.0-dev.22) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Premium heading:** Correct inverted logic ([#3042](https://github.com/ReVanced/revanced-patches/issues/3042)) ([b33ed75](https://github.com/ReVanced/revanced-patches/commit/b33ed757370653b8eb0002b0977eedfbc73dbe5e))
|
||||||
|
|
||||||
|
# [2.191.0-dev.21](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.20...v2.191.0-dev.21) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - ReturnYouTubeDislike:** Revert support for 18.37.36 ([#3041](https://github.com/ReVanced/revanced-patches/issues/3041)) ([3761073](https://github.com/ReVanced/revanced-patches/commit/37610732da87549c22a430bb62d10793dfa2e696))
|
||||||
|
|
||||||
|
# [2.191.0-dev.20](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.19...v2.191.0-dev.20) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Video Id:** Fix video id not showing the currently playing video ([#3038](https://github.com/ReVanced/revanced-patches/issues/3038)) ([f6f226b](https://github.com/ReVanced/revanced-patches/commit/f6f226ba281823cb5d2d468c32f6e48551971726))
|
||||||
|
|
||||||
|
# [2.191.0-dev.19](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.18...v2.191.0-dev.19) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Add `Bypass URL redirects` patch ([125cac5](https://github.com/ReVanced/revanced-patches/commit/125cac5928c9b71d35253f1fd7651f4a30e15529))
|
||||||
|
|
||||||
|
# [2.191.0-dev.18](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.17...v2.191.0-dev.18) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Premium heading:** Allow using default heading ([#3029](https://github.com/ReVanced/revanced-patches/issues/3029)) ([d5ab35a](https://github.com/ReVanced/revanced-patches/commit/d5ab35a444523baa0586fcb9513d6ae4f2518946))
|
||||||
|
|
||||||
|
# [2.191.0-dev.17](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.16...v2.191.0-dev.17) (2023-09-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Bump compatibility to `18.37.36` ([#3028](https://github.com/ReVanced/revanced-patches/issues/3028)) ([eda28e5](https://github.com/ReVanced/revanced-patches/commit/eda28e507e7fb5171eeb15a5a0532929ee611211))
|
||||||
|
|
||||||
|
# [2.191.0-dev.16](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.15...v2.191.0-dev.16) (2023-09-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide info cards:** Fix info cards not hiding for some users ([#3039](https://github.com/ReVanced/revanced-patches/issues/3039)) ([cb38637](https://github.com/ReVanced/revanced-patches/commit/cb38637e6be968d54561a1e0466b9259dbf0b4ee))
|
||||||
|
|
||||||
|
# [2.191.0-dev.15](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.14...v2.191.0-dev.15) (2023-09-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** adjust settings text ([#3035](https://github.com/ReVanced/revanced-patches/issues/3035)) ([59a2e96](https://github.com/ReVanced/revanced-patches/commit/59a2e9617fc4f898e87cefeb3d2c6996b925fa90))
|
||||||
|
|
||||||
|
# [2.191.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.13...v2.191.0-dev.14) (2023-09-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** Show seekbar thumbnail for age restricted and paid videos ([1a79300](https://github.com/ReVanced/revanced-patches/commit/1a793007c919753a8c31ab2382d86c0546eefe20))
|
||||||
|
|
||||||
|
# [2.191.0-dev.13](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.12...v2.191.0-dev.13) (2023-09-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** Removed unused code ([#3030](https://github.com/ReVanced/revanced-patches/issues/3030)) ([15e27bf](https://github.com/ReVanced/revanced-patches/commit/15e27bf93e6366ba8a59091409c4271c8230edb6))
|
||||||
|
|
||||||
|
# [2.191.0-dev.12](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.11...v2.191.0-dev.12) (2023-09-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** Display seekbar thumbnails in high quality ([5e8a2d3](https://github.com/ReVanced/revanced-patches/commit/5e8a2d3fe77a4a08ea32e7dc22f2c8e4048b7a6b))
|
||||||
|
|
||||||
|
# [2.191.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.10...v2.191.0-dev.11) (2023-09-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add notice for thumbnails for age restricted or paid videos ([f7cf70b](https://github.com/ReVanced/revanced-patches/commit/f7cf70b5d3f415411fa767931a33e84df9df6c16))
|
||||||
|
|
||||||
|
# [2.191.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.9...v2.191.0-dev.10) (2023-09-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** Restore seekbar thumbnails ([bf4a115](https://github.com/ReVanced/revanced-patches/commit/bf4a1159ff745f8f91e11f30db4651d85769227b))
|
||||||
|
|
||||||
|
# [2.191.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.8...v2.191.0-dev.9) (2023-09-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Strava:** Add `Disable subscription suggestions` patch ([#2997](https://github.com/ReVanced/revanced-patches/issues/2997)) ([af02175](https://github.com/ReVanced/revanced-patches/commit/af0217594d9c7526f550fc7e6f09f8a9232e72cf))
|
||||||
|
|
||||||
|
# [2.191.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.7...v2.191.0-dev.8) (2023-09-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Relay - Spoof client:** Restore OAuth login ([96e01f7](https://github.com/ReVanced/revanced-patches/commit/96e01f7a7b87f468776fbde48e114a3f51630a46))
|
||||||
|
* **Slide - Spoof client:** Use correct patch name ([f355dbf](https://github.com/ReVanced/revanced-patches/commit/f355dbf1d2af3075c6a3f13d8bf5f8dca22e6005))
|
||||||
|
|
||||||
|
# [2.191.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.6...v2.191.0-dev.7) (2023-09-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Duolingo - Unlock Super:** Get correct instruction offset ([#3023](https://github.com/ReVanced/revanced-patches/issues/3023)) ([5146de8](https://github.com/ReVanced/revanced-patches/commit/5146de872acb17d7c21019ac7ed531f27361038f))
|
||||||
|
|
||||||
# [2.191.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.5...v2.191.0-dev.6) (2023-09-23)
|
# [2.191.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.5...v2.191.0-dev.6) (2023-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.191.0-dev.6
|
version = 2.191.1-dev.1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
revanced-patcher = "15.0.1"
|
revanced-patcher = "16.0.0"
|
||||||
revanced-patch-annotation-processor = "15.0.1"
|
revanced-patch-annotation-processor = "16.0.0"
|
||||||
ksp = "1.9.0-1.0.11"
|
ksp = "1.9.0-1.0.11"
|
||||||
smali = "3.0.3"
|
smali = "3.0.3"
|
||||||
guava = "32.1.2-jre"
|
guava = "32.1.2-jre"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -11,7 +11,6 @@ internal class JsonGenerator : PatchesFileGenerator {
|
|||||||
it.name!!,
|
it.name!!,
|
||||||
it.description,
|
it.description,
|
||||||
it.compatiblePackages,
|
it.compatiblePackages,
|
||||||
it.dependencies?.map { dependency -> dependency::class.java.name }?.toSet(),
|
|
||||||
it.use,
|
it.use,
|
||||||
it.requiresIntegrations,
|
it.requiresIntegrations,
|
||||||
it.options.values.map { option ->
|
it.options.values.map { option ->
|
||||||
@@ -27,7 +26,6 @@ internal class JsonGenerator : PatchesFileGenerator {
|
|||||||
val name: String? = null,
|
val name: String? = null,
|
||||||
val description: String? = null,
|
val description: String? = null,
|
||||||
val compatiblePackages: Set<Patch.CompatiblePackage>? = null,
|
val compatiblePackages: Set<Patch.CompatiblePackage>? = null,
|
||||||
val dependencies: Set<String>? = null,
|
|
||||||
val use: Boolean = true,
|
val use: Boolean = true,
|
||||||
val requiresIntegrations: Boolean = false,
|
val requiresIntegrations: Boolean = false,
|
||||||
val options: List<Option>
|
val options: List<Option>
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchException
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.duolingo.unlocksuper.fingerprints.IsUserSuperMethodFingerprint
|
|
||||||
import app.revanced.patches.duolingo.unlocksuper.fingerprints.UserSerializationMethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Unlock Duolingo Super",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.duolingo")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object UnlockDuolingoSuperPatch : BytecodePatch(
|
|
||||||
setOf(
|
|
||||||
UserSerializationMethodFingerprint,
|
|
||||||
IsUserSuperMethodFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
/* First find the reference to the isUserSuper field, then patch the instruction that assigns it to false.
|
|
||||||
* This strategy is used because the method that sets the isUserSuper field is difficult to fingerprint reliably.
|
|
||||||
*/
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
// Find the reference to the isUserSuper field.
|
|
||||||
val isUserSuperReference = IsUserSuperMethodFingerprint
|
|
||||||
.result
|
|
||||||
?.mutableMethod
|
|
||||||
?.getInstructions()
|
|
||||||
?.filterIsInstance<BuilderInstruction22c>()
|
|
||||||
?.firstOrNull { it.opcode == Opcode.IGET_BOOLEAN }
|
|
||||||
?.reference
|
|
||||||
?: throw IsUserSuperMethodFingerprint.exception
|
|
||||||
|
|
||||||
// Patch the instruction that assigns isUserSuper to true.
|
|
||||||
UserSerializationMethodFingerprint
|
|
||||||
.result
|
|
||||||
?.mutableMethod
|
|
||||||
?.apply {
|
|
||||||
replaceInstructions(
|
|
||||||
indexOfReference(isUserSuperReference) - 1,
|
|
||||||
"const/4 v2, 0x1"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
?: throw UserSerializationMethodFingerprint.exception
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun MutableMethod.indexOfReference(reference: Reference) = getInstructions()
|
|
||||||
.filterIsInstance<BuilderInstruction22c>()
|
|
||||||
.filter { it.opcode == Opcode.IPUT_BOOLEAN }.indexOfFirst { it.reference == reference }.let {
|
|
||||||
if (it == -1) throw PatchException("Could not find index of instruction with supplied reference.")
|
|
||||||
else it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object UserSerializationMethodFingerprint : MethodFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
|
||||||
strings = listOf(
|
|
||||||
"betaStatus",
|
|
||||||
"coachOutfit",
|
|
||||||
"globalAmbassadorStatus",
|
|
||||||
),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.MOVE_FROM16,
|
|
||||||
Opcode.IPUT_BOOLEAN,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Remove device restrictions",
|
name = "Remove device restrictions",
|
||||||
description = "Removes restrictions from using the app on any device.",
|
description = "Removes restrictions from using the app on any device. Requires mounting patched app over original.",
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.apps.recorder")]
|
compatiblePackages = [CompatiblePackage("com.google.android.apps.recorder")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import app.revanced.util.microg.MicroGBytecodeHelper
|
|||||||
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "MicroG support",
|
name = "Vanced MicroG support",
|
||||||
description = "Allows YouTube Music ReVanced to run without root and under a different package name.",
|
description = "Allows YouTube Music to run without root and under a different package name.",
|
||||||
dependencies = [MicroGResourcePatch::class],
|
dependencies = [MicroGResourcePatch::class],
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")]
|
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,47 +7,84 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
|
import app.revanced.patcher.patch.options.PatchOptionException
|
||||||
import app.revanced.patcher.patch.options.types.StringPatchOption.Companion.stringPatchOption
|
import app.revanced.patcher.patch.options.types.StringPatchOption.Companion.stringPatchOption
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
abstract class AbstractSpoofClientPatch(
|
abstract class AbstractSpoofClientPatch(
|
||||||
private val redirectUri: String,
|
private val redirectUri: String,
|
||||||
private val clientIdFingerprints: List<MethodFingerprint>,
|
private val clientIdFingerprints: List<MethodFingerprint>,
|
||||||
private val userAgentFingerprints: List<MethodFingerprint>? = null,
|
private val userAgentFingerprints: List<MethodFingerprint>? = null,
|
||||||
|
private val miscellaneousFingerprints: List<MethodFingerprint>? = null
|
||||||
) : BytecodePatch(buildSet {
|
) : BytecodePatch(buildSet {
|
||||||
addAll(clientIdFingerprints)
|
addAll(clientIdFingerprints)
|
||||||
userAgentFingerprints?.let(::addAll)
|
userAgentFingerprints?.let(::addAll)
|
||||||
|
miscellaneousFingerprints?.let(::addAll)
|
||||||
}) {
|
}) {
|
||||||
var clientId by stringPatchOption(
|
var clientId by stringPatchOption(
|
||||||
"client-id",
|
"client-id",
|
||||||
null,
|
null,
|
||||||
"OAuth client ID",
|
"OAuth client ID",
|
||||||
"The Reddit OAuth client ID."
|
"The Reddit OAuth client ID. " +
|
||||||
|
"You can get your client ID from https://www.reddit.com/prefs/apps. " +
|
||||||
|
"The application type has to be \"Installed app\" " +
|
||||||
|
"and the redirect URI has to be set to \"$redirectUri\".",
|
||||||
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
if (clientId == null) {
|
val requiredOptions = options.values.filter { it.required }
|
||||||
// Ensure device runs Android.
|
|
||||||
try {
|
val isAndroidButRequiredOptionsUnset = try {
|
||||||
Class.forName("android.os.Environment")
|
Class.forName("android.os.Environment")
|
||||||
} catch (e: ClassNotFoundException) {
|
|
||||||
throw PatchException("No client ID provided")
|
requiredOptions.any { it.value == null }
|
||||||
|
} catch (_: ClassNotFoundException) {
|
||||||
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
File(Environment.getExternalStorageDirectory(), "reddit_client_id_revanced.txt").also {
|
if (isAndroidButRequiredOptionsUnset) {
|
||||||
if (it.exists()) return@also
|
val properties = Properties()
|
||||||
|
|
||||||
|
val propertiesFile = File(
|
||||||
|
Environment.getExternalStorageDirectory(),
|
||||||
|
"revanced_client_spoof_${redirectUri.hashCode()}.properties"
|
||||||
|
)
|
||||||
|
if (propertiesFile.exists()) {
|
||||||
|
properties.load(propertiesFile.inputStream())
|
||||||
|
|
||||||
|
// Set options from properties file.
|
||||||
|
properties.forEach { (name, value) ->
|
||||||
|
try {
|
||||||
|
options[name.toString()] = value.toString().trim()
|
||||||
|
} catch (_: PatchOptionException.PatchOptionNotFoundException) {
|
||||||
|
// Ignore unknown options.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
options.keys.forEach { properties.setProperty(it, "") }
|
||||||
|
|
||||||
|
properties.store(
|
||||||
|
propertiesFile.outputStream(),
|
||||||
|
"Options for the ReVanced \"Client Spoof\" patch. Required options: " +
|
||||||
|
requiredOptions.joinToString { it.key }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
requiredOptions.filter { it.value == null }.let { requiredUnsetOptions ->
|
||||||
|
if (requiredUnsetOptions.isEmpty()) return@let
|
||||||
|
|
||||||
val error = """
|
val error = """
|
||||||
In order to use this patch, you need to provide a client ID.
|
In order to use this patch, you need to provide the following options:
|
||||||
You can do that by creating a file at ${it.absolutePath} with the client ID as its content.
|
${requiredUnsetOptions.joinToString("\n") { "${it.key}: ${it.description}" }}
|
||||||
Alternatively, you can provide the client ID using patch options.
|
|
||||||
|
|
||||||
You can get your client ID from https://www.reddit.com/prefs/apps.
|
A properties file has been created at ${propertiesFile.absolutePath}.
|
||||||
The application type has to be "Installed app" and the redirect URI has to be set to "$redirectUri".
|
Please fill in the required options before using this patch.
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
throw PatchException(error)
|
throw PatchException(error)
|
||||||
}.let { clientId = it.readText().trim() }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun List<MethodFingerprint>?.executePatch(
|
fun List<MethodFingerprint>?.executePatch(
|
||||||
@@ -56,10 +93,12 @@ abstract class AbstractSpoofClientPatch(
|
|||||||
|
|
||||||
clientIdFingerprints.executePatch { patchClientId(context) }
|
clientIdFingerprints.executePatch { patchClientId(context) }
|
||||||
userAgentFingerprints.executePatch { patchUserAgent(context) }
|
userAgentFingerprints.executePatch { patchUserAgent(context) }
|
||||||
|
miscellaneousFingerprints.executePatch { patchMiscellaneous(context) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch the client ID. The fingerprints are guaranteed to be in the same order as in [clientIdFingerprints].
|
* Patch the client ID.
|
||||||
|
* The fingerprints are guaranteed to be in the same order as in [clientIdFingerprints].
|
||||||
*
|
*
|
||||||
* @param context The current [BytecodeContext].
|
* @param context The current [BytecodeContext].
|
||||||
*
|
*
|
||||||
@@ -67,10 +106,20 @@ abstract class AbstractSpoofClientPatch(
|
|||||||
abstract fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext)
|
abstract fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch the user agent. The fingerprints are guaranteed to be in the same order as in [userAgentFingerprints].
|
* Patch the user agent.
|
||||||
|
* The fingerprints are guaranteed to be in the same order as in [userAgentFingerprints].
|
||||||
*
|
*
|
||||||
* @param context The current [BytecodeContext].
|
* @param context The current [BytecodeContext].
|
||||||
*/
|
*/
|
||||||
// Not every client needs to patch the user agent.
|
// Not every client needs to patch the user agent.
|
||||||
open fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {}
|
open fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch miscellaneous things such as protection measures.
|
||||||
|
* The fingerprints are guaranteed to be in the same order as in [miscellaneousFingerprints].
|
||||||
|
*
|
||||||
|
* @param context The current [BytecodeContext].
|
||||||
|
*/
|
||||||
|
// Not every client needs to patch miscellaneous things.
|
||||||
|
open fun List<MethodFingerprintResult>.patchMiscellaneous(context: BytecodeContext) {}
|
||||||
}
|
}
|
||||||
@@ -14,9 +14,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"http://baconreader.com/auth\".",
|
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.onelouder.baconreader"),
|
CompatiblePackage("com.onelouder.baconreader"),
|
||||||
CompatiblePackage("com.onelouder.baconreader.premium")
|
CompatiblePackage("com.onelouder.baconreader.premium")
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"http://rubenmayayo.com\".",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.rubenmayayo.reddit")]
|
compatiblePackages = [CompatiblePackage("com.rubenmayayo.reddit")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"infinity://localhost\".",
|
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
"ml.docilealligator.infinityforreddit", [
|
"ml.docilealligator.infinityforreddit", [
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"https://127.0.0.1:65023/authorize_callback\".",
|
|
||||||
dependencies = [DisablePiracyDetectionPatch::class],
|
dependencies = [DisablePiracyDetectionPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("o.o.joey"),
|
CompatiblePackage("o.o.joey"),
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"redditisfun://auth\".",
|
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.andrewshu.android.reddit"),
|
CompatiblePackage("com.andrewshu.android.reddit"),
|
||||||
CompatiblePackage("com.andrewshu.android.redditdonation")
|
CompatiblePackage("com.andrewshu.android.redditdonation")
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
package app.revanced.patches.reddit.customclients.relayforreddit.api
|
package app.revanced.patches.reddit.customclients.relayforreddit.api
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedInBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.*
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint
|
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint
|
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"dbrady://relay\".",
|
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("free.reddit.news"),
|
CompatiblePackage("free.reddit.news"),
|
||||||
CompatiblePackage("reddit.news")
|
CompatiblePackage("reddit.news")
|
||||||
@@ -31,7 +27,8 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
|
|||||||
GetLoggedInBearerTokenFingerprint,
|
GetLoggedInBearerTokenFingerprint,
|
||||||
GetLoggedOutBearerTokenFingerprint,
|
GetLoggedOutBearerTokenFingerprint,
|
||||||
GetRefreshTokenFingerprint
|
GetRefreshTokenFingerprint
|
||||||
)
|
),
|
||||||
|
miscellaneousFingerprints = listOf(SetRemoteConfigFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
|
||||||
forEach {
|
forEach {
|
||||||
@@ -46,4 +43,8 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun List<MethodFingerprintResult>.patchMiscellaneous(context: BytecodeContext) =
|
||||||
|
// Do not load remote config which disables OAuth login remotely
|
||||||
|
first().mutableMethod.addInstructions(0, "return-void")
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object SetRemoteConfigFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf("reddit_oauth_url"),
|
||||||
|
parameters = listOf("Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;")
|
||||||
|
)
|
||||||
@@ -9,10 +9,8 @@ import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
|||||||
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
|
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Slide client spoof",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"http://www.ccrama.me\".",
|
|
||||||
compatiblePackages = [CompatiblePackage("me.ccrama.redditslide")]
|
compatiblePackages = [CompatiblePackage("me.ccrama.redditslide")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import app.revanced.patcher.patch.annotation.Patch
|
|||||||
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.ImgurImageAPIFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.DisablePiracyDetectionPatch
|
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.DisablePiracyDetectionPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
@@ -20,9 +21,7 @@ import java.util.*
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof client",
|
name = "Spoof client",
|
||||||
description = "Spoofs the client in order to allow logging in. " +
|
description = "Restores functionality of the app by using custom client ID's.",
|
||||||
"The OAuth application type has to be \"Installed app\" " +
|
|
||||||
"and the redirect URI has to be set to \"http://redditsync/auth\".",
|
|
||||||
dependencies = [DisablePiracyDetectionPatch::class],
|
dependencies = [DisablePiracyDetectionPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.laurencedawson.reddit_sync"),
|
CompatiblePackage("com.laurencedawson.reddit_sync"),
|
||||||
@@ -32,7 +31,9 @@ import java.util.*
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofClientPatch : AbstractSpoofClientPatch(
|
object SpoofClientPatch : AbstractSpoofClientPatch(
|
||||||
"http://redditsync/auth", listOf(GetAuthorizationStringFingerprint)
|
"http://redditsync/auth",
|
||||||
|
clientIdFingerprints = listOf(GetAuthorizationStringFingerprint),
|
||||||
|
miscellaneousFingerprints = listOf(ImgurImageAPIFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
|
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
|
||||||
forEach { fingerprintResult ->
|
forEach { fingerprintResult ->
|
||||||
@@ -68,4 +69,14 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use the non-commercial Imgur API endpoint.
|
||||||
|
override fun List<MethodFingerprintResult>.patchMiscellaneous(context: BytecodeContext) = first().let {
|
||||||
|
val apiUrlIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
||||||
|
|
||||||
|
it.mutableMethod.replaceInstruction(
|
||||||
|
apiUrlIndex,
|
||||||
|
"const-string v1, \"https://api.imgur.com/3/image\""
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object ImgurImageAPIFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf(
|
||||||
|
"https://imgur-apiv3.p.rapidapi.com/3/image",
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy
|
package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
@@ -10,7 +9,7 @@ import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.
|
|||||||
@Patch(description = "Disables detection of modified versions.",)
|
@Patch(description = "Disables detection of modified versions.",)
|
||||||
object DisablePiracyDetectionPatch : BytecodePatch(setOf(PiracyDetectionFingerprint)) {
|
object DisablePiracyDetectionPatch : BytecodePatch(setOf(PiracyDetectionFingerprint)) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// Do not return an error if the fingerprint is not resolved.
|
// Do not throw an error if the fingerprint is not resolved.
|
||||||
// This is fine because new versions of the target app do not need this patch.
|
// This is fine because new versions of the target app do not need this patch.
|
||||||
PiracyDetectionFingerprint.result?.mutableMethod?.apply {
|
PiracyDetectionFingerprint.result?.mutableMethod?.apply {
|
||||||
addInstruction(
|
addInstruction(
|
||||||
@@ -19,6 +18,6 @@ object DisablePiracyDetectionPatch : BytecodePatch(setOf(PiracyDetectionFingerpr
|
|||||||
return-void
|
return-void
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: throw PiracyDetectionFingerprint.exception
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package app.revanced.patches.serviceportalbund.detection.root
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.serviceportalbund.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove root detection",
|
||||||
|
description = "Removes the check for root permissions and unlocked bootloader.",
|
||||||
|
compatiblePackages = [CompatiblePackage("at.gv.bka.serviceportal")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RootDetectionPatch : BytecodePatch(
|
||||||
|
setOf(RootDetectionFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) =
|
||||||
|
RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.serviceportalbund.detection.root.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -10,7 +10,7 @@ import app.revanced.patches.strava.subscription.fingerprints.GetSubscribedFinger
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Unlock subscription features",
|
name = "Unlock subscription features",
|
||||||
description = "Unlocks \"Matched Runs\" and \"Segment Efforts\".",
|
description = "Unlocks \"Routes\", \"Matched Runs\" and \"Segment Efforts\".",
|
||||||
compatiblePackages = [CompatiblePackage("com.strava", ["320.12"])]
|
compatiblePackages = [CompatiblePackage("com.strava", ["320.12"])]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
object GetSubscribedFingerprint : MethodFingerprint(
|
object GetSubscribedFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
||||||
customFingerprint = { methodDef, classDef ->
|
customFingerprint = { methodDef, classDef ->
|
||||||
classDef.type.endsWith("SubscriptionDetailResponse;") && methodDef.name == "getSubscribed"
|
classDef.type.endsWith("/SubscriptionDetailResponse;") && methodDef.name == "getSubscribed"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package app.revanced.patches.strava.upselling
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||||
|
import app.revanced.patches.strava.upselling.fingerprints.GetModulesFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
||||||
|
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Disable subscription suggestions",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.strava", ["320.12"])]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object DisableSubscriptionSuggestionsPatch : BytecodePatch(
|
||||||
|
setOf(GetModulesFingerprint)
|
||||||
|
) {
|
||||||
|
private const val HELPER_METHOD_NAME = "getModulesIfNotUpselling"
|
||||||
|
private const val PAGE_SUFFIX = "_upsell"
|
||||||
|
private const val LABEL = "original"
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) = GetModulesFingerprint.result?.let { result ->
|
||||||
|
val className = result.classDef.type
|
||||||
|
val originalMethod = result.mutableMethod
|
||||||
|
val returnType = originalMethod.returnType
|
||||||
|
|
||||||
|
result.mutableClass.methods.add(ImmutableMethod(
|
||||||
|
className,
|
||||||
|
HELPER_METHOD_NAME,
|
||||||
|
emptyList(),
|
||||||
|
returnType,
|
||||||
|
AccessFlags.PRIVATE.value,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
MutableMethodImplementation(3)
|
||||||
|
).toMutable().apply {
|
||||||
|
addInstructions(
|
||||||
|
"""
|
||||||
|
iget-object v0, p0, $className->page:Ljava/lang/String;
|
||||||
|
const-string v1, "$PAGE_SUFFIX"
|
||||||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :$LABEL
|
||||||
|
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
|
||||||
|
move-result-object v0
|
||||||
|
return-object v0
|
||||||
|
:$LABEL
|
||||||
|
iget-object v0, p0, $className->modules:Ljava/util/List;
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
val getModulesIndex = result.scanResult.patternScanResult!!.startIndex
|
||||||
|
with(originalMethod) {
|
||||||
|
removeInstruction(getModulesIndex)
|
||||||
|
addInstructions(
|
||||||
|
getModulesIndex,
|
||||||
|
"""
|
||||||
|
invoke-direct {p0}, $className->$HELPER_METHOD_NAME()$returnType
|
||||||
|
move-result-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: throw GetModulesFingerprint.exception
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package app.revanced.patches.strava.upselling.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object GetModulesFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(Opcode.IGET_OBJECT),
|
||||||
|
customFingerprint = { methodDef, classDef ->
|
||||||
|
classDef.type.endsWith("/GenericLayoutEntry;") && methodDef.name == "getModules"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -16,8 +16,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
|||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide ads",
|
name = "Hide ads",
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
CompatiblePackage("com.ss.android.ugc.trill", ["30.8.4"]),
|
||||||
CompatiblePackage("com.zhiliaoapp.musically")
|
CompatiblePackage("com.zhiliaoapp.musically", ["30.8.4"])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
|
|||||||
@@ -1,33 +1,37 @@
|
|||||||
package app.revanced.patches.tumblr.ads
|
package app.revanced.patches.tumblr.ads
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.tumblr.ads.fingerprints.AdWaterfallFingerprint
|
import app.revanced.patches.tumblr.timelinefilter.TimelineFilterPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable dashboard ads",
|
name = "Disable dashboard ads",
|
||||||
description = "Disables ads in the dashboard.",
|
description = "Disables ads in the dashboard.",
|
||||||
compatiblePackages = [CompatiblePackage("com.tumblr")]
|
compatiblePackages = [CompatiblePackage("com.tumblr")],
|
||||||
|
dependencies = [TimelineFilterPatch::class]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object DisableDashboardAds : BytecodePatch(
|
object DisableDashboardAds : BytecodePatch() {
|
||||||
setOf(AdWaterfallFingerprint)
|
override fun execute(context: BytecodeContext) {
|
||||||
) {
|
// The timeline object types are filtered by their name in the TimelineObjectType enum.
|
||||||
override fun execute(context: BytecodeContext) = AdWaterfallFingerprint.result?.let {
|
// This is often different from the "object_type" returned in the api (noted in comments here)
|
||||||
it.scanResult.stringsScanResult!!.matches.forEach { match ->
|
arrayOf(
|
||||||
// We just replace all occurrences of "client_side_ad_waterfall" with anything else
|
"CLIENT_SIDE_MEDIATION", // "client_side_ad_waterfall"
|
||||||
// so the app fails to handle ads in the timeline elements array and just skips them.
|
"GEMINI_AD", // "backfill_ad"
|
||||||
// See AdWaterfallFingerprint for more info.
|
|
||||||
val stringRegister = it.mutableMethod.getInstruction<OneRegisterInstruction>(match.index).registerA
|
// The object types below weren't actually spotted in the wild in testing, but they are valid Object types
|
||||||
it.mutableMethod.replaceInstruction(
|
// and their names clearly indicate that they are ads, so we just block them anyway,
|
||||||
match.index, "const-string v$stringRegister, \"dummy\""
|
// just in case they will be used in the future.
|
||||||
)
|
"NIMBUS_AD", // "nimbus_ad"
|
||||||
|
"CLIENT_SIDE_AD", // "client_side_ad"
|
||||||
|
"DISPLAY_IO_INTERSCROLLER_AD", // "display_io_interscroller"
|
||||||
|
"DISPLAY_IO_HEADLINE_VIDEO_AD", // "display_io_headline_video"
|
||||||
|
"FACEBOOK_BIDDAABLE", // "facebook_biddable_sdk_ad"
|
||||||
|
"GOOGLE_NATIVE" // "google_native_ad"
|
||||||
|
).forEach {
|
||||||
|
TimelineFilterPatch.addObjectTypeFilter(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} ?: throw AdWaterfallFingerprint.exception
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package app.revanced.patches.tumblr.ads.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
// The Tumblr app sends a request to /v2/timeline/dashboard which replies with an array of elements
|
|
||||||
// to show in the user dashboard. These element have different type ids (post, title, carousel, etc.)
|
|
||||||
// The standard dashboard Ad has the id client_side_ad_waterfall, and this string has to be in the code
|
|
||||||
// to handle ads and provide their appearance.
|
|
||||||
// If we just replace this string in the tumblr code with anything else, it will fail to recognize the
|
|
||||||
// dashboard object type and just skip it. This is a bit weird, but it shouldn't break
|
|
||||||
// unless they change the api (unlikely) or explicitly Change the tumblr code to prevent this.
|
|
||||||
object AdWaterfallFingerprint : MethodFingerprint(strings = listOf("client_side_ad_waterfall"))
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.tumblr.annoyances.inappupdate
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.tumblr.featureflags.OverrideFeatureFlagsPatch
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Disable in-app update",
|
||||||
|
description = "Disables the in-app update check and update prompt.",
|
||||||
|
dependencies = [OverrideFeatureFlagsPatch::class],
|
||||||
|
compatiblePackages = [CompatiblePackage("com.tumblr")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object DisableInAppUpdatePatch : BytecodePatch() {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
// Before checking for updates using Google Play core AppUpdateManager, the value of this feature flag is checked.
|
||||||
|
// If this flag is false or the last update check was today and no update check is performed.
|
||||||
|
OverrideFeatureFlagsPatch.addOverride("inAppUpdate", "false")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,37 +1,26 @@
|
|||||||
package app.revanced.patches.tumblr.live
|
package app.revanced.patches.tumblr.live
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.tumblr.featureflags.OverrideFeatureFlagsPatch
|
import app.revanced.patches.tumblr.featureflags.OverrideFeatureFlagsPatch
|
||||||
import app.revanced.patches.tumblr.live.fingerprints.LiveMarqueeFingerprint
|
import app.revanced.patches.tumblr.timelinefilter.TimelineFilterPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable Tumblr Live",
|
name = "Disable Tumblr Live",
|
||||||
description = "Disable the Tumblr Live tab button and dashboard carousel.",
|
description = "Disable the Tumblr Live tab button and dashboard carousel.",
|
||||||
dependencies = [OverrideFeatureFlagsPatch::class],
|
dependencies = [OverrideFeatureFlagsPatch::class, TimelineFilterPatch::class],
|
||||||
compatiblePackages = [CompatiblePackage("com.tumblr")]
|
compatiblePackages = [CompatiblePackage("com.tumblr")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object DisableTumblrLivePatch : BytecodePatch(
|
object DisableTumblrLivePatch : BytecodePatch() {
|
||||||
setOf(LiveMarqueeFingerprint)
|
override fun execute(context: BytecodeContext) {
|
||||||
) {
|
// Hide the LIVE_MARQUEE timeline element that appears in the feed
|
||||||
override fun execute(context: BytecodeContext) = LiveMarqueeFingerprint.result?.let {
|
// Called "live_marquee" in api response
|
||||||
it.scanResult.stringsScanResult!!.matches.forEach { match ->
|
TimelineFilterPatch.addObjectTypeFilter("LIVE_MARQUEE")
|
||||||
// Replace the string constant "live_marquee"
|
|
||||||
// with a dummy so the app doesn't recognize this type of element in the Dashboard and skips it
|
|
||||||
it.mutableMethod.apply {
|
|
||||||
val stringRegister = getInstruction<OneRegisterInstruction>(match.index).registerA
|
|
||||||
replaceInstruction(match.index, "const-string v$stringRegister, \"dummy2\"")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We hide the Tab button for Tumblr Live by forcing the feature flag to false
|
// Hide the Tab button for Tumblr Live by forcing the feature flag to false
|
||||||
OverrideFeatureFlagsPatch.addOverride("liveStreaming", "false")
|
OverrideFeatureFlagsPatch.addOverride("liveStreaming", "false")
|
||||||
} ?: throw LiveMarqueeFingerprint.exception
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package app.revanced.patches.tumblr.live.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
// This works identically to the Tumblr AdWaterfallFingerprint, see comments there
|
|
||||||
object LiveMarqueeFingerprint : MethodFingerprint(strings = listOf("live_marquee"))
|
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package app.revanced.patches.tumblr.timelinefilter
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.tumblr.timelinefilter.fingerprints.PostsResponseConstructorFingerprint
|
||||||
|
import app.revanced.patches.tumblr.timelinefilter.fingerprints.TimelineConstructorFingerprint
|
||||||
|
import app.revanced.patches.tumblr.timelinefilter.fingerprints.TimelineFilterIntegrationFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c
|
||||||
|
|
||||||
|
@Patch(description = "Filter timeline objects.", requiresIntegrations = true)
|
||||||
|
object TimelineFilterPatch : BytecodePatch(
|
||||||
|
setOf(TimelineConstructorFingerprint, TimelineFilterIntegrationFingerprint, PostsResponseConstructorFingerprint)
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* Add a filter to hide the given timeline object type.
|
||||||
|
* The list of all Timeline object types is found in the TimelineObjectType class,
|
||||||
|
* where they are mapped from their api name (returned by tumblr via the HTTP API) to the enum value name.
|
||||||
|
*
|
||||||
|
* @param typeName The enum name of the timeline object type to hide.
|
||||||
|
*/
|
||||||
|
@Suppress("KDocUnresolvedReference")
|
||||||
|
internal lateinit var addObjectTypeFilter: (typeName: String) -> Unit private set
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
TimelineFilterIntegrationFingerprint.result?.let { integration ->
|
||||||
|
val filterInsertIndex = integration.scanResult.patternScanResult!!.startIndex
|
||||||
|
|
||||||
|
integration.mutableMethod.apply {
|
||||||
|
val addInstruction = getInstruction<BuilderInstruction35c>(filterInsertIndex + 1)
|
||||||
|
if (addInstruction.registerCount != 2) throw TimelineFilterIntegrationFingerprint.exception
|
||||||
|
|
||||||
|
val filterListRegister = addInstruction.registerC
|
||||||
|
val stringRegister = addInstruction.registerD
|
||||||
|
|
||||||
|
// Remove "BLOCKED_OBJECT_DUMMY"
|
||||||
|
removeInstructions(filterInsertIndex, 2)
|
||||||
|
|
||||||
|
addObjectTypeFilter = { typeName ->
|
||||||
|
// blockedObjectTypes.add({typeName})
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
filterInsertIndex, """
|
||||||
|
const-string v$stringRegister, "$typeName"
|
||||||
|
invoke-virtual { v$filterListRegister, v$stringRegister }, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ?: throw TimelineFilterIntegrationFingerprint.exception
|
||||||
|
|
||||||
|
mapOf(
|
||||||
|
TimelineConstructorFingerprint to 1,
|
||||||
|
PostsResponseConstructorFingerprint to 2
|
||||||
|
).forEach { (fingerprint, timelineObjectsRegister) ->
|
||||||
|
fingerprint.result?.mutableMethod?.addInstructions(
|
||||||
|
0,
|
||||||
|
"invoke-static {p$timelineObjectsRegister}, " +
|
||||||
|
"Lapp/revanced/tumblr/patches/TimelineFilterPatch;->" +
|
||||||
|
"filterTimeline(Ljava/util/List;)V"
|
||||||
|
) ?: throw fingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.tumblr.timelinefilter.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
// This is the constructor of the PostsResponse class.
|
||||||
|
// The same applies here as with the TimelineConstructorFingerprint.
|
||||||
|
object PostsResponseConstructorFingerprint : MethodFingerprint(
|
||||||
|
accessFlags = AccessFlags.CONSTRUCTOR or AccessFlags.PUBLIC,
|
||||||
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/PostsResponse;") && methodDef.parameters.size == 4 },
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.tumblr.timelinefilter.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
// This is the constructor of the Timeline class.
|
||||||
|
// It receives the List<TimelineObject> as an argument with a @Json annotation, so this should be the first time
|
||||||
|
// that the List<TimelineObject> is exposed in non-library code.
|
||||||
|
object TimelineConstructorFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("/Timeline;") && methodDef.parameters[0].type == "Ljava/util/List;"
|
||||||
|
}, strings = listOf("timelineObjectsList")
|
||||||
|
)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package app.revanced.patches.tumblr.timelinefilter.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
// This fingerprints the Integration TimelineFilterPatch.filterTimeline method.
|
||||||
|
// The opcode fingerprint is searching for
|
||||||
|
// if ("BLOCKED_OBJECT_DUMMY".equals(elementType)) iterator.remove();
|
||||||
|
object TimelineFilterIntegrationFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/TimelineFilterPatch;") },
|
||||||
|
strings = listOf("BLOCKED_OBJECT_DUMMY"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.CONST_STRING, // "BLOCKED_OBJECT_DUMMY"
|
||||||
|
Opcode.INVOKE_VIRTUAL // HashSet.add(^)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -18,7 +18,17 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
name = "Hide get premium",
|
name = "Hide get premium",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.google.android.youtube", ["18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"])
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube", [
|
||||||
|
"18.16.37",
|
||||||
|
"18.19.35",
|
||||||
|
"18.20.39",
|
||||||
|
"18.23.35",
|
||||||
|
"18.29.38",
|
||||||
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
|
object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
|
||||||
@@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
dependencies = [
|
dependencies = [
|
||||||
BottomControlsResourcePatch::class,
|
SettingsPatch::class,
|
||||||
SettingsPatch::class
|
BottomControlsResourcePatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
object CopyVideoUrlResourcePatch : ResourcePatch() {
|
object CopyVideoUrlResourcePatch : ResourcePatch() {
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.revanced.patches.youtube.layout.autocaptions
|
package app.revanced.patches.youtube.layout.autocaptions
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
@@ -28,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -47,28 +49,22 @@ object AutoCaptionsPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val startVideoInformerMethod = StartVideoInformerFingerprint.result!!.mutableMethod
|
mapOf(
|
||||||
|
StartVideoInformerFingerprint to 0,
|
||||||
startVideoInformerMethod.addInstructions(
|
SubtitleButtonControllerFingerprint to 1
|
||||||
0, """
|
).forEach { (fingerprint, enabled) ->
|
||||||
const/4 v0, 0x0
|
fingerprint.result?.mutableMethod?.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x$enabled
|
||||||
sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
||||||
"""
|
"""
|
||||||
)
|
) ?: throw fingerprint.exception
|
||||||
|
}
|
||||||
|
|
||||||
val subtitleButtonControllerMethod = SubtitleButtonControllerFingerprint.result!!.mutableMethod
|
SubtitleTrackFingerprint.result?.mutableMethod?.addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
subtitleButtonControllerMethod.addInstructions(
|
|
||||||
0, """
|
|
||||||
const/4 v0, 0x1
|
|
||||||
sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
|
||||||
"""
|
"""
|
||||||
)
|
|
||||||
|
|
||||||
val subtitleTrackMethod = SubtitleTrackFingerprint.result!!.mutableMethod
|
|
||||||
|
|
||||||
subtitleTrackMethod.addInstructionsWithLabels(
|
|
||||||
0, """
|
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
|
invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :auto_captions_enabled
|
if-eqz v0, :auto_captions_enabled
|
||||||
|
|||||||
@@ -6,25 +6,11 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object StartVideoInformerFingerprint : MethodFingerprint(
|
object StartVideoInformerFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L", "L", "L"), listOf(
|
returnType = "V",
|
||||||
Opcode.INVOKE_STATIC,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
Opcode.IGET_OBJECT,
|
opcodes = listOf(
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.NEW_INSTANCE,
|
|
||||||
Opcode.INVOKE_DIRECT,
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
Opcode.INVOKE_INTERFACE,
|
||||||
Opcode.IF_EQZ,
|
Opcode.RETURN_VOID
|
||||||
Opcode.CONST_STRING,
|
),
|
||||||
Opcode.INVOKE_INTERFACE,
|
strings = listOf("pc")
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.IF_EQZ,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.IF_EQ,
|
|
||||||
Opcode.GOTO,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
@@ -5,39 +5,57 @@ import app.revanced.patcher.patch.PatchException
|
|||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import java.nio.file.Files
|
import app.revanced.patcher.patch.options.types.BooleanPatchOption.Companion.booleanPatchOption
|
||||||
import java.nio.file.StandardCopyOption
|
import kotlin.io.path.copyTo
|
||||||
import kotlin.io.path.exists
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Premium heading",
|
name = "Premium heading",
|
||||||
description = "Shows premium branding on the home screen.",
|
description = "Show or hide the premium heading.",
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.google.android.youtube")
|
CompatiblePackage("com.google.android.youtube")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object PremiumHeadingPatch : ResourcePatch() {
|
object PremiumHeadingPatch : ResourcePatch() {
|
||||||
|
private const val DEFAULT_HEADING_RES = "yt_wordmark_header"
|
||||||
|
private const val PREMIUM_HEADING_RES = "yt_premium_wordmark_header"
|
||||||
|
|
||||||
|
private val usePremiumHeading by booleanPatchOption(
|
||||||
|
key = "usePremiumHeading",
|
||||||
|
default = true,
|
||||||
|
title = "Use premium heading",
|
||||||
|
description = "Whether to use the premium heading.",
|
||||||
|
required = true,
|
||||||
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
val resDirectory = context["res"]
|
val resDirectory = context["res"]
|
||||||
if (!resDirectory.isDirectory) throw PatchException("The res folder can not be found.")
|
|
||||||
|
|
||||||
val (original, replacement) = "yt_premium_wordmark_header" to "yt_wordmark_header"
|
val (original, replacement) = if (usePremiumHeading!!)
|
||||||
val modes = arrayOf("light", "dark")
|
PREMIUM_HEADING_RES to DEFAULT_HEADING_RES
|
||||||
|
else
|
||||||
|
DEFAULT_HEADING_RES to PREMIUM_HEADING_RES
|
||||||
|
|
||||||
arrayOf("xxxhdpi", "xxhdpi", "xhdpi", "hdpi", "mdpi").forEach { size ->
|
val variants = arrayOf("light", "dark")
|
||||||
val headingDirectory = resDirectory.resolve("drawable-$size")
|
|
||||||
modes.forEach { mode ->
|
|
||||||
val fromPath = headingDirectory.resolve("${original}_$mode.png").toPath()
|
|
||||||
val toPath = headingDirectory.resolve("${replacement}_$mode.png").toPath()
|
|
||||||
|
|
||||||
if (!fromPath.exists())
|
arrayOf(
|
||||||
throw PatchException("The file $fromPath does not exist in the resources. Therefore, this patch can not succeed.")
|
"xxxhdpi",
|
||||||
Files.copy(
|
"xxhdpi",
|
||||||
fromPath,
|
"xhdpi",
|
||||||
toPath,
|
"hdpi",
|
||||||
StandardCopyOption.REPLACE_EXISTING
|
"mdpi"
|
||||||
)
|
).mapNotNull { dpi ->
|
||||||
|
resDirectory.resolve("drawable-$dpi").takeIf { it.exists() }?.toPath()
|
||||||
|
}.also {
|
||||||
|
if (it.isEmpty())
|
||||||
|
throw PatchException("The drawable folder can not be found. Therefore, the patch can not be applied.")
|
||||||
|
}.forEach { path ->
|
||||||
|
|
||||||
|
variants.forEach { mode ->
|
||||||
|
val fromPath = path.resolve("${original}_$mode.png")
|
||||||
|
val toPath = path.resolve("${replacement}_$mode.png")
|
||||||
|
|
||||||
|
fromPath.copyTo(toPath, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
object LayoutIconFingerprint : LiteralValueFingerprint(
|
object LayoutIconFingerprint : LiteralValueFingerprint(
|
||||||
returnType = "Landroid/view/View;",
|
returnType = "Landroid/view/View;",
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.CONST,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -27,7 +27,14 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
],
|
],
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.youtube", ["18.32.39"])]
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube", [
|
||||||
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HideLayoutComponentsPatch : BytecodePatch(
|
object HideLayoutComponentsPatch : BytecodePatch(
|
||||||
@@ -44,6 +51,40 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
StringResource("revanced_hide_gray_separator_summary_on", "Gray separators are hidden"),
|
StringResource("revanced_hide_gray_separator_summary_on", "Gray separators are hidden"),
|
||||||
StringResource("revanced_hide_gray_separator_summary_off", "Gray separators are shown")
|
StringResource("revanced_hide_gray_separator_summary_off", "Gray separators are shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_join_membership_button",
|
||||||
|
StringResource("revanced_hide_join_membership_button_title", "Hide \"Join\" button"),
|
||||||
|
StringResource("revanced_hide_join_membership_button_summary_on", "Button is hidden"),
|
||||||
|
StringResource("revanced_hide_join_membership_button_summary_off", "Button is shown")
|
||||||
|
),
|
||||||
|
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_notify_me_button",
|
||||||
|
StringResource("revanced_hide_notify_me_button_title", "Hide \"Notify me\" button"),
|
||||||
|
StringResource("revanced_hide_notify_me_button_summary_on", "Button is hidden"),
|
||||||
|
StringResource("revanced_hide_notify_me_button_summary_off", "Button is shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_timed_reactions",
|
||||||
|
StringResource("revanced_hide_timed_reactions_title", "Hide timed reactions"),
|
||||||
|
StringResource("revanced_hide_timed_reactions_summary_on", "Timed reactions are hidden"),
|
||||||
|
StringResource("revanced_hide_timed_reactions_summary_off", "Timed reactions are shown")
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_search_result_shelf_header",
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_search_result_shelf_header_title",
|
||||||
|
"Hide search result shelf header"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_search_result_shelf_header_summary_on",
|
||||||
|
"Shelf header is hidden"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_search_result_shelf_header_summary_off",
|
||||||
|
"Shelf header is shown"
|
||||||
|
)
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_channel_guidelines",
|
"revanced_hide_channel_guidelines",
|
||||||
StringResource("revanced_hide_channel_guidelines_title", "Hide channel guidelines"),
|
StringResource("revanced_hide_channel_guidelines_title", "Hide channel guidelines"),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.Infocards
|
|||||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsIncognitoParentFingerprint
|
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsIncognitoParentFingerprint
|
||||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsMethodCallFingerprint
|
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsMethodCallFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
@@ -22,6 +23,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
description = "Hides info cards in videos.",
|
description = "Hides info cards in videos.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
|
LithoFilterPatch::class,
|
||||||
HideInfocardsResourcePatch::class
|
HideInfocardsResourcePatch::class
|
||||||
],
|
],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
@@ -33,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
@@ -45,6 +48,9 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
InfocardsMethodCallFingerprint,
|
InfocardsMethodCallFingerprint,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
|
"Lapp/revanced/integrations/patches/components/HideInfoCardsFilterPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
InfocardsIncognitoFingerprint.also {
|
InfocardsIncognitoFingerprint.also {
|
||||||
it.resolve(context, InfocardsIncognitoParentFingerprint.result!!.classDef)
|
it.resolve(context, InfocardsIncognitoParentFingerprint.result!!.classDef)
|
||||||
@@ -79,5 +85,8 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Info cards can also appear as litho components.
|
||||||
|
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ import app.revanced.patches.youtube.layout.hide.loadmorebutton.fingerprints.Hide
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide load more button",
|
name = "Hide \"Load more\" button",
|
||||||
description = "Hides the button under videos that loads similar videos.",
|
description = "Hides the button under videos that loads similar videos.",
|
||||||
dependencies = [HideLoadMoreButtonResourcePatch::class],
|
dependencies = [HideLoadMoreButtonResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
@@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ object HideLoadMoreButtonResourcePatch : ResourcePatch() {
|
|||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_load_more_button",
|
"revanced_hide_load_more_button",
|
||||||
StringResource("revanced_hide_load_more_button_title", "Hide Load More button"),
|
StringResource("revanced_hide_load_more_button_title", "Hide \"Load More\" button"),
|
||||||
StringResource("revanced_hide_load_more_button_summary_on", "Load More button is hidden"),
|
StringResource("revanced_hide_load_more_button_summary_on", "Button is hidden"),
|
||||||
StringResource("revanced_hide_load_more_button_summary_off", "Load More button is shown")
|
StringResource("revanced_hide_load_more_button_summary_off", "Button is shown")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
@@ -54,8 +55,6 @@ object HideShortsComponentsPatch : BytecodePatch(
|
|||||||
private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/components/ShortsFilter;"
|
private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/components/ShortsFilter;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
|
||||||
|
|
||||||
// region Hide the Shorts shelf.
|
// region Hide the Shorts shelf.
|
||||||
|
|
||||||
ReelConstructorFingerprint.result?.let {
|
ReelConstructorFingerprint.result?.let {
|
||||||
@@ -74,13 +73,20 @@ object HideShortsComponentsPatch : BytecodePatch(
|
|||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region Hide the Shorts buttons.
|
// region Hide the Shorts buttons in older versions of YouTube.
|
||||||
|
|
||||||
// Some Shorts buttons are views, hide them by setting their visibility to GONE.
|
// Some Shorts buttons are views, hide them by setting their visibility to GONE.
|
||||||
CreateShortsButtonsFingerprint.result?.let {
|
CreateShortsButtonsFingerprint.result?.let {
|
||||||
ShortsButtons.values().forEach { button -> button.injectHideCall(it.mutableMethod) }
|
ShortsButtons.entries.forEach { button -> button.injectHideCall(it.mutableMethod) }
|
||||||
} ?: throw CreateShortsButtonsFingerprint.exception
|
} ?: throw CreateShortsButtonsFingerprint.exception
|
||||||
|
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
|
||||||
|
// region Hide the Shorts buttons in newer versions of YouTube.
|
||||||
|
|
||||||
|
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region Hide the navigation bar.
|
// region Hide the navigation bar.
|
||||||
@@ -92,10 +98,10 @@ object HideShortsComponentsPatch : BytecodePatch(
|
|||||||
|
|
||||||
SetPivotBarVisibilityFingerprint.result!!.let { result ->
|
SetPivotBarVisibilityFingerprint.result!!.let { result ->
|
||||||
result.mutableMethod.apply {
|
result.mutableMethod.apply {
|
||||||
val checkCastIndex = result.scanResult.patternScanResult!!.endIndex
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
val viewRegister = getInstruction<OneRegisterInstruction>(checkCastIndex).registerA
|
val viewRegister = getInstruction<OneRegisterInstruction>(insertIndex - 1).registerA
|
||||||
addInstruction(
|
addInstruction(
|
||||||
checkCastIndex + 1,
|
insertIndex,
|
||||||
"sput-object v$viewRegister, $FILTER_CLASS_DESCRIPTOR->pivotBar:" +
|
"sput-object v$viewRegister, $FILTER_CLASS_DESCRIPTOR->pivotBar:" +
|
||||||
"Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;"
|
"Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
|
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object SetPivotBarVisibilityFingerprint : MethodFingerprint(
|
object SetPivotBarVisibilityFingerprint : MethodFingerprint(
|
||||||
|
returnType = "V",
|
||||||
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
parameters = listOf("Z"),
|
parameters = listOf("Z"),
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.IF_EQZ,
|
|
||||||
Opcode.RETURN_VOID,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
|
Opcode.IF_EQZ
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ import org.w3c.dom.Element
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
|
|||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// region Inject newVideoLoaded event handler to update dislikes when a new video is loaded.
|
// region Inject newVideoLoaded event handler to update dislikes when a new video is loaded.
|
||||||
|
|
||||||
VideoIdPatch.injectCall("$INTEGRATIONS_CLASS_DESCRIPTOR->newVideoLoaded(Ljava/lang/String;)V")
|
VideoIdPatch.hookVideoId("$INTEGRATIONS_CLASS_DESCRIPTOR->newVideoLoaded(Ljava/lang/String;)V")
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints
|
package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ShortsTextViewFingerprint : MethodFingerprint(
|
object ShortsTextViewFingerprint : MethodFingerprint(
|
||||||
// 18.29.38 method is public final visibility, but in 18.23.35 and older it's protected final.
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
// If 18.23.35 is dropped then accessFlags should be specified here.
|
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
parameters = listOf("L", "L"),
|
parameters = listOf("L", "L"),
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -94,9 +95,9 @@ object SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set current video id
|
* Set current video id.
|
||||||
*/
|
*/
|
||||||
VideoIdPatch.injectCallBackgroundPlay("$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->setCurrentVideoId(Ljava/lang/String;)V")
|
VideoIdPatch.hookBackgroundPlayVideoId("$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->setCurrentVideoId(Ljava/lang/String;)V")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Seekbar drawing
|
* Seekbar drawing
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
@@ -37,7 +38,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
object SpoofAppVersionPatch : BytecodePatch(
|
object SpoofAppVersionPatch : BytecodePatch(
|
||||||
setOf(SpoofAppVersionFingerprint)
|
setOf(SpoofAppVersionFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/SpoofAppVersionPatch"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/spoof/SpoofAppVersionPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
@@ -86,7 +87,7 @@ object SpoofAppVersionPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {v$buildOverrideNameRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR;->getYouTubeVersionOverride(Ljava/lang/String;)Ljava/lang/String;
|
invoke-static {v$buildOverrideNameRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->getYouTubeVersionOverride(Ljava/lang/String;)Ljava/lang/String;
|
||||||
move-result-object v$buildOverrideNameRegister
|
move-result-object v$buildOverrideNameRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,79 +3,117 @@ package app.revanced.patches.youtube.misc.fix.playback
|
|||||||
import app.revanced.extensions.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
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.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint
|
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ScrubbedPreviewLayoutFingerprint
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.StoryboardThumbnailFingerprint
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.StoryboardThumbnailParentFingerprint
|
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.video.playerresponse.PlayerResponseMethodHookPatch
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
description = "Spoofs the signature to prevent playback issues.",
|
description = "Spoofs the signature to prevent playback issues.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
SpoofSignatureResourcePatch::class,
|
SettingsPatch::class,
|
||||||
IntegrationsPatch::class,
|
PlayerTypeHookPatch::class,
|
||||||
PlayerTypeHookPatch::class
|
PlayerResponseMethodHookPatch::class,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
object SpoofSignaturePatch : BytecodePatch(
|
object SpoofSignaturePatch : BytecodePatch(
|
||||||
setOf(
|
setOf(
|
||||||
ProtobufParameterBuilderFingerprint,
|
PlayerResponseModelImplFingerprint,
|
||||||
StoryboardThumbnailParentFingerprint,
|
StoryboardThumbnailParentFingerprint,
|
||||||
ScrubbedPreviewLayoutFingerprint
|
StoryboardRendererSpecFingerprint,
|
||||||
|
StoryboardRendererInitFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/SpoofSignaturePatch;"
|
"Lapp/revanced/integrations/patches/spoof/SpoofSignaturePatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// hook parameter
|
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||||
ProtobufParameterBuilderFingerprint.result?.let {
|
PreferenceScreen(
|
||||||
val setParamMethod = context
|
key = "revanced_spoof_signature_verification",
|
||||||
.toMethodWalker(it.method)
|
title = StringResource(
|
||||||
.nextMethod(it.scanResult.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
"revanced_spoof_signature_verification_title",
|
||||||
|
"Spoof app signature"
|
||||||
setParamMethod.apply {
|
),
|
||||||
val protobufParameterRegister = 3
|
preferences = listOf(
|
||||||
|
SwitchPreference(
|
||||||
addInstructions(
|
"revanced_spoof_signature_verification_enabled",
|
||||||
0,
|
StringResource("revanced_spoof_signature_verification_enabled_title", "Spoof app signature"),
|
||||||
"""
|
StringResource(
|
||||||
invoke-static {p$protobufParameterRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;)Ljava/lang/String;
|
"revanced_spoof_signature_verification_enabled_summary_on",
|
||||||
move-result-object p$protobufParameterRegister
|
"App signature spoofed\\n\\n"
|
||||||
"""
|
+ "Side effects include:\\n"
|
||||||
|
+ "• Enhanced bitrate is not available\\n"
|
||||||
|
+ "• Videos cannot be downloaded\\n"
|
||||||
|
+ "• No seekbar thumbnails for paid videos"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_spoof_signature_verification_enabled_summary_off",
|
||||||
|
"App signature not spoofed\\n\\nVideo playback may not work"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_spoof_signature_verification_enabled_user_dialog_message",
|
||||||
|
"Turning off this setting will cause video playback issues."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_spoof_signature_in_feed_enabled",
|
||||||
|
StringResource("revanced_spoof_signature_in_feed_enabled_title", "Spoof app signature in feed"),
|
||||||
|
StringResource(
|
||||||
|
"revanced_spoof_signature_in_feed_enabled_summary_on",
|
||||||
|
"App signature spoofed\\n\\n"
|
||||||
|
+ "Side effects include:\\n"
|
||||||
|
+ "• Feed videos are missing subtitles\\n"
|
||||||
|
+ "• Automatically played feed videos will show up in your watch history"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_spoof_signature_in_feed_enabled_summary_off",
|
||||||
|
"App signature not spoofed for feed videos\\n\\n"
|
||||||
|
+ "Feed videos will play for less than 1 minute before encountering playback issues"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
|
||||||
} ?: throw ProtobufParameterBuilderFingerprint.exception
|
|
||||||
|
|
||||||
|
// Hook the player parameters.
|
||||||
|
PlayerResponseMethodHookPatch += PlayerResponseMethodHookPatch.Hook.ProtoBufferParameter(
|
||||||
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;)Ljava/lang/String;"
|
||||||
|
)
|
||||||
|
|
||||||
// When signature spoofing is enabled, the seekbar when tapped does not show
|
// Force the seekbar time and chapters to always show up.
|
||||||
// the video time, chapter names, or the video thumbnail.
|
// This is used only if the storyboard spec fetch fails, or when viewing paid videos.
|
||||||
// Changing the value returned of this method forces all of these to show up,
|
StoryboardThumbnailParentFingerprint.result?.classDef?.let { classDef ->
|
||||||
// except the thumbnails are blank, which is handled with the patch below.
|
StoryboardThumbnailFingerprint.also {
|
||||||
StoryboardThumbnailParentFingerprint.result ?: throw StoryboardThumbnailParentFingerprint.exception
|
it.resolve(
|
||||||
StoryboardThumbnailFingerprint.resolve(context, StoryboardThumbnailParentFingerprint.result!!.classDef)
|
context,
|
||||||
StoryboardThumbnailFingerprint.result?.apply {
|
classDef
|
||||||
val endIndex = scanResult.patternScanResult!!.endIndex
|
)
|
||||||
|
}.result?.let {
|
||||||
|
val endIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
// Replace existing instruction to preserve control flow label.
|
// Replace existing instruction to preserve control flow label.
|
||||||
// The replaced return instruction always returns false
|
// The replaced return instruction always returns false
|
||||||
// (it is the 'no thumbnails found' control path),
|
// (it is the 'no thumbnails found' control path),
|
||||||
// so there is no need to pass the existing return value to integrations.
|
// so there is no need to pass the existing return value to integrations.
|
||||||
mutableMethod.replaceInstruction(
|
it.mutableMethod.replaceInstruction(
|
||||||
endIndex,
|
endIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->getSeekbarThumbnailOverrideValue()Z
|
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->getSeekbarThumbnailOverrideValue()Z
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
// Since this is end of the method must replace one line then add the rest.
|
// Since this is end of the method must replace one line then add the rest.
|
||||||
mutableMethod.addInstructions(
|
it.mutableMethod.addInstructions(
|
||||||
endIndex + 1,
|
endIndex + 1,
|
||||||
"""
|
"""
|
||||||
move-result v0
|
move-result v0
|
||||||
@@ -83,23 +121,58 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: throw StoryboardThumbnailFingerprint.exception
|
} ?: throw StoryboardThumbnailFingerprint.exception
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook StoryBoard renderer url
|
||||||
|
*/
|
||||||
|
PlayerResponseModelImplFingerprint.result?.let {
|
||||||
|
it.mutableMethod.apply {
|
||||||
|
val getStoryBoardIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
|
val getStoryBoardRegister = getInstruction<OneRegisterInstruction>(getStoryBoardIndex).registerA
|
||||||
|
|
||||||
// Seekbar thumbnail now show up but are always a blank image.
|
|
||||||
// Additional changes are needed to force the client to generate the thumbnails (assuming it's possible),
|
|
||||||
// but for now hide the empty thumbnail.
|
|
||||||
ScrubbedPreviewLayoutFingerprint.result?.apply {
|
|
||||||
val endIndex = scanResult.patternScanResult!!.endIndex
|
|
||||||
mutableMethod.apply {
|
|
||||||
val imageViewFieldName = getInstruction<ReferenceInstruction>(endIndex).reference
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
implementation!!.instructions.lastIndex,
|
getStoryBoardIndex,
|
||||||
"""
|
"""
|
||||||
iget-object v0, p0, $imageViewFieldName # copy imageview field to a register
|
invoke-static { v$getStoryBoardRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getStoryboardRendererSpec(Ljava/lang/String;)Ljava/lang/String;
|
||||||
invoke-static {v0}, $INTEGRATIONS_CLASS_DESCRIPTOR->seekbarImageViewCreated(Landroid/widget/ImageView;)V
|
move-result-object v$getStoryBoardRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: throw ScrubbedPreviewLayoutFingerprint.exception
|
} ?: throw PlayerResponseModelImplFingerprint.exception
|
||||||
|
|
||||||
|
StoryboardRendererSpecFingerprint.result?.let {
|
||||||
|
it.mutableMethod.apply {
|
||||||
|
val storyBoardUrlParams = 0
|
||||||
|
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
if-nez p$storyBoardUrlParams, :ignore
|
||||||
|
invoke-static { p$storyBoardUrlParams }, $INTEGRATIONS_CLASS_DESCRIPTOR->getStoryboardRendererSpec(Ljava/lang/String;)Ljava/lang/String;
|
||||||
|
move-result-object p$storyBoardUrlParams
|
||||||
|
""",
|
||||||
|
ExternalLabel("ignore", getInstruction(0))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: throw StoryboardRendererSpecFingerprint.exception
|
||||||
|
|
||||||
|
// Hook recommended value
|
||||||
|
StoryboardRendererInitFingerprint.result?.let {
|
||||||
|
val moveOriginalRecommendedValueIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
|
val originalValueRegister = it.mutableMethod
|
||||||
|
.getInstruction<OneRegisterInstruction>(moveOriginalRecommendedValueIndex).registerA
|
||||||
|
|
||||||
|
it.mutableMethod.apply {
|
||||||
|
addInstructions(
|
||||||
|
moveOriginalRecommendedValueIndex + 1,
|
||||||
|
"""
|
||||||
|
invoke-static { v$originalValueRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getRecommendedLevel(I)I
|
||||||
|
move-result v$originalValueRegister
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: throw StoryboardRendererInitFingerprint.exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
|
|
||||||
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
|
||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
|
||||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|
||||||
|
|
||||||
@Patch(dependencies = [SettingsPatch::class, ResourceMappingPatch::class])
|
|
||||||
object SpoofSignatureResourcePatch : ResourcePatch() {
|
|
||||||
internal var scrubbedPreviewThumbnailResourceId: Long = -1
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
|
||||||
PreferenceScreen(
|
|
||||||
key = "revanced_spoof_signature_verification",
|
|
||||||
title = StringResource(
|
|
||||||
"revanced_spoof_signature_verification_title",
|
|
||||||
"Spoof app signature"
|
|
||||||
),
|
|
||||||
preferences = listOf(
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_spoof_signature_verification_enabled",
|
|
||||||
StringResource("revanced_spoof_signature_verification_enabled_title", "Spoof app signature"),
|
|
||||||
StringResource(
|
|
||||||
"revanced_spoof_signature_verification_enabled_summary_on",
|
|
||||||
"App signature spoofed\\n\\n"
|
|
||||||
+ "Side effects include:\\n"
|
|
||||||
+ "• No ambient mode\\n"
|
|
||||||
+ "• Videos can't be downloaded\\n"
|
|
||||||
+ "• Seekbar thumbnails are hidden"
|
|
||||||
),
|
|
||||||
StringResource(
|
|
||||||
"revanced_spoof_signature_verification_enabled_summary_off",
|
|
||||||
"App signature not spoofed\\n\\nVideo playback may not work"
|
|
||||||
),
|
|
||||||
StringResource(
|
|
||||||
"revanced_spoof_signature_verification_enabled_user_dialog_message",
|
|
||||||
"Turning off this setting will cause video playback issues."
|
|
||||||
)
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_spoof_signature_in_feed_enabled",
|
|
||||||
StringResource("revanced_spoof_signature_in_feed_enabled_title", "Spoof app signature in feed"),
|
|
||||||
StringResource(
|
|
||||||
"revanced_spoof_signature_in_feed_enabled_summary_on",
|
|
||||||
"App signature spoofed\\n\\n"
|
|
||||||
+ "Side effects include:\\n"
|
|
||||||
+ "• Feed videos are missing subtitles\\n"
|
|
||||||
+ "• Automatically played feed videos will show up in your watch history"
|
|
||||||
),
|
|
||||||
StringResource(
|
|
||||||
"revanced_spoof_signature_in_feed_enabled_summary_off",
|
|
||||||
"App signature not spoofed for feed videos\n\n"
|
|
||||||
+ "Feed videos will play for less than 1 minute before encountering playback issues"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
scrubbedPreviewThumbnailResourceId = ResourceMappingPatch.resourceMappings.single {
|
|
||||||
it.type == "id" && it.name == "thumbnail"
|
|
||||||
}.id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.extensions.containsConstantInstructionValue
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object PlayerResponseModelImplFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Ljava/lang/String;",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
parameters = emptyList(),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.RETURN_OBJECT,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.RETURN_OBJECT
|
||||||
|
),
|
||||||
|
customFingerprint = handler@{ methodDef, _ ->
|
||||||
|
if (!methodDef.definingClass.endsWith("/PlayerResponseModelImpl;")) return@handler false
|
||||||
|
|
||||||
|
methodDef.containsConstantInstructionValue(55735497)
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.SpoofSignatureResourcePatch
|
|
||||||
import app.revanced.util.patch.LiteralValueFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object ScrubbedPreviewLayoutFingerprint : LiteralValueFingerprint(
|
|
||||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
|
||||||
returnType = "V",
|
|
||||||
parameters = listOf("Landroid/content/Context;", "Landroid/util/AttributeSet;", "I", "I"),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.CONST,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CHECK_CAST,
|
|
||||||
Opcode.IPUT_OBJECT, // preview imageview
|
|
||||||
),
|
|
||||||
// This resource is used in ~ 40 different locations, but this method has a distinct list of parameters to match to.
|
|
||||||
literalSupplier = { SpoofSignatureResourcePatch.scrubbedPreviewThumbnailResourceId }
|
|
||||||
)
|
|
||||||
@@ -3,11 +3,13 @@ package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ProtobufParameterBuilderFingerprint : MethodFingerprint(
|
object StoryboardRendererInitFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf("#-1#"),
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL_RANGE,
|
Opcode.INVOKE_INTERFACE,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.IPUT_OBJECT
|
Opcode.IPUT_OBJECT,
|
||||||
),
|
Opcode.INVOKE_INTERFACE,
|
||||||
strings = listOf("Unexpected empty videoId.", "Prefetch request are disabled.")
|
Opcode.MOVE_RESULT
|
||||||
|
)
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object StoryboardRendererSpecFingerprint : MethodFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
returnType = "L",
|
||||||
|
parameters = listOf("Ljava/lang/String;", "J"),
|
||||||
|
strings = listOf("\\|"),
|
||||||
|
)
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.links
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.links.fingerprints.OpenLinksDirectlyPrimaryFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.links.fingerprints.OpenLinksDirectlySecondaryFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Bypass URL redirects",
|
||||||
|
description = "Bypass URL redirects and open the original URL directly.",
|
||||||
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube",
|
||||||
|
[
|
||||||
|
"18.16.37",
|
||||||
|
"18.19.35",
|
||||||
|
"18.20.39",
|
||||||
|
"18.23.35",
|
||||||
|
"18.29.38",
|
||||||
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
object BypassURLRedirectsPatch : BytecodePatch(
|
||||||
|
setOf(OpenLinksDirectlyPrimaryFingerprint, OpenLinksDirectlySecondaryFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_bypass_url_redirects",
|
||||||
|
StringResource("revanced_bypass_url_redirects_title", "Bypass URL redirects"),
|
||||||
|
StringResource("revanced_bypass_url_redirects_summary_on", "URL redirects are bypassed"),
|
||||||
|
StringResource("revanced_bypass_url_redirects_summary_off", "URL redirects are not bypassed"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
arrayOf(
|
||||||
|
OpenLinksDirectlyPrimaryFingerprint,
|
||||||
|
OpenLinksDirectlySecondaryFingerprint
|
||||||
|
).map {
|
||||||
|
it.result ?: throw it.exception
|
||||||
|
}.forEach { result ->
|
||||||
|
result.mutableMethod.apply {
|
||||||
|
val insertIndex = result.scanResult.patternScanResult!!.startIndex
|
||||||
|
val uriStringRegister = getInstruction<FiveRegisterInstruction>(insertIndex).registerC
|
||||||
|
|
||||||
|
replaceInstruction(
|
||||||
|
insertIndex,
|
||||||
|
"invoke-static {v$uriStringRegister}," +
|
||||||
|
"Lapp/revanced/integrations/patches/BypassURLRedirectsPatch;" +
|
||||||
|
"->" +
|
||||||
|
"parseRedirectUri(Ljava/lang/String;)Landroid/net/Uri;"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,7 +19,20 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
|||||||
@Patch(
|
@Patch(
|
||||||
name = "Open links externally",
|
name = "Open links externally",
|
||||||
description = "Open links outside of the app directly in your browser.",
|
description = "Open links outside of the app directly in your browser.",
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.youtube", ["18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"])]
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube",
|
||||||
|
[
|
||||||
|
"18.16.37",
|
||||||
|
"18.19.35",
|
||||||
|
"18.20.39",
|
||||||
|
"18.23.35",
|
||||||
|
"18.29.38",
|
||||||
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object OpenLinksExternallyPatch : AbstractTransformInstructionsPatch<Pair<Int, Int>>(
|
object OpenLinksExternallyPatch : AbstractTransformInstructionsPatch<Pair<Int, Int>>(
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.fingerprints
|
package app.revanced.patches.youtube.misc.links.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object IsUserSuperMethodFingerprint : MethodFingerprint(
|
object OpenLinksDirectlyPrimaryFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/Object",
|
returnType = "Ljava/lang/Object",
|
||||||
parameters = listOf("Ljava/lang/Object"),
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
strings = listOf("user"),
|
parameters = listOf("Ljava/lang/Object"),
|
||||||
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.RETURN_OBJECT,
|
||||||
|
Opcode.CHECK_CAST,
|
||||||
|
Opcode.SGET,
|
||||||
|
Opcode.SGET_OBJECT
|
||||||
|
)
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.links.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object OpenLinksDirectlySecondaryFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Landroid/net/Uri",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
parameters = listOf("Ljava/lang/String"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT
|
||||||
|
),
|
||||||
|
strings = listOf("://")
|
||||||
|
)
|
||||||
@@ -103,7 +103,7 @@ object LithoFilterPatch : BytecodePatch(
|
|||||||
val emptyComponentFieldIndex = builderMethodIndex + 2
|
val emptyComponentFieldIndex = builderMethodIndex + 2
|
||||||
|
|
||||||
bytesToComponentContextMethod.mutableMethod.apply {
|
bytesToComponentContextMethod.mutableMethod.apply {
|
||||||
val insertHookIndex = bytesToComponentContextMethod.scanResult.patternScanResult!!.endIndex
|
val insertHookIndex = bytesToComponentContextMethod.scanResult.patternScanResult!!.endIndex + 1
|
||||||
|
|
||||||
// region Get free registers that this patch uses.
|
// region Get free registers that this patch uses.
|
||||||
// Registers are overwritten right after they are used in this patch, therefore free to clobber.
|
// Registers are overwritten right after they are used in this patch, therefore free to clobber.
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
object ComponentContextParserFingerprint : MethodFingerprint(
|
object ComponentContextParserFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.IPUT_OBJECT,
|
Opcode.IPUT_OBJECT,
|
||||||
Opcode.NEW_INSTANCE
|
|
||||||
),
|
),
|
||||||
strings = listOf("Component was not found %s because it was removed due to duplicate converter bindings.")
|
strings = listOf("Component was not found %s because it was removed due to duplicate converter bindings.")
|
||||||
)
|
)
|
||||||
@@ -14,7 +14,7 @@ import app.revanced.util.microg.MicroGBytecodeHelper
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Vanced MicroG support",
|
name = "Vanced MicroG support",
|
||||||
description = "Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.",
|
description = "Allows YouTube to run without root and under a different package name with Vanced MicroG.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
MicroGResourcePatch::class,
|
MicroGResourcePatch::class,
|
||||||
HideCastButtonPatch::class,
|
HideCastButtonPatch::class,
|
||||||
@@ -28,7 +28,8 @@ import app.revanced.util.microg.MicroGBytecodeHelper
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
"18.20.39",
|
"18.20.39",
|
||||||
"18.23.35",
|
"18.23.35",
|
||||||
"18.29.38",
|
"18.29.38",
|
||||||
"18.32.39"
|
"18.32.39",
|
||||||
|
"18.37.36"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user