mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
Compare commits
126 Commits
v2.169.0-d
...
v2.174.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
529e90d232 | ||
|
|
c72fd1e2fc | ||
|
|
48965ace7e | ||
|
|
08f1702b18 | ||
|
|
45784eceee | ||
|
|
f891aa937c | ||
|
|
aa493c4f67 | ||
|
|
a83e0dc257 | ||
|
|
5ea4d3c2a6 | ||
|
|
f4ae7fd9d7 | ||
|
|
b6539922fe | ||
|
|
a697b16aa3 | ||
|
|
ab22794ef2 | ||
|
|
cd6988a688 | ||
|
|
74ad4fa5ea | ||
|
|
382c441de5 | ||
|
|
7953a1a07b | ||
|
|
ac0ed24ef2 | ||
|
|
489663c890 | ||
|
|
599e089c12 | ||
|
|
0d54b73958 | ||
|
|
943f6de55b | ||
|
|
7649e54c22 | ||
|
|
671c822fe9 | ||
|
|
56727bbe68 | ||
|
|
5ff5d804e2 | ||
|
|
9ca1f853e0 | ||
|
|
d229095087 | ||
|
|
bc38b9ebc2 | ||
|
|
3d79d5b7f0 | ||
|
|
b2de406844 | ||
|
|
35cd7780d0 | ||
|
|
6951e4a0e9 | ||
|
|
9bfcf99a22 | ||
|
|
56d3cf258c | ||
|
|
81a5d37bc3 | ||
|
|
c50f703551 | ||
|
|
85516401be | ||
|
|
311f5d80fc | ||
|
|
73c86c85c6 | ||
|
|
9727cfc169 | ||
|
|
751d74f5c0 | ||
|
|
fe72363c52 | ||
|
|
d763108110 | ||
|
|
0af514d76c | ||
|
|
6a1cc85439 | ||
|
|
6587acb2c5 | ||
|
|
00f63439ac | ||
|
|
a783834de7 | ||
|
|
a33d04fdac | ||
|
|
d281de13ee | ||
|
|
b006238fff | ||
|
|
a4d0cd6c87 | ||
|
|
f3bf532dc3 | ||
|
|
b680a4d1d3 | ||
|
|
3130c6ac72 | ||
|
|
f0c91102e1 | ||
|
|
eb93f149df | ||
|
|
24d2f11659 | ||
|
|
dc9575e52d | ||
|
|
a10ff13c74 | ||
|
|
f8d5fb8ac1 | ||
|
|
95edd987f1 | ||
|
|
a9759cc3ba | ||
|
|
4aedf37194 | ||
|
|
6c9fe251dd | ||
|
|
e0b09c4fb6 | ||
|
|
2c47c94536 | ||
|
|
a56ddec501 | ||
|
|
3e1ecd2ae2 | ||
|
|
ec541cd95b | ||
|
|
42d093cbc2 | ||
|
|
a4ca826b57 | ||
|
|
ae02b04900 | ||
|
|
36126bb81e | ||
|
|
8127aeeaf9 | ||
|
|
3f8d5f1b5f | ||
|
|
721644afa9 | ||
|
|
0b9f0c2554 | ||
|
|
69566acc0b | ||
|
|
85fc66eebd | ||
|
|
737bfde230 | ||
|
|
15ebe740ab | ||
|
|
6f7f968fbf | ||
|
|
dffefeb954 | ||
|
|
1f2def86ad | ||
|
|
211fa6d4e4 | ||
|
|
f46f6efb08 | ||
|
|
ba65f3a552 | ||
|
|
c686c1ae13 | ||
|
|
ddb7691b16 | ||
|
|
e1af446b4c | ||
|
|
e5c81de301 | ||
|
|
420f392dcf | ||
|
|
16f1998ba3 | ||
|
|
9fce0f4b44 | ||
|
|
1131b40b11 | ||
|
|
d5b5ae6fe1 | ||
|
|
47fc893942 | ||
|
|
2163fe3aab | ||
|
|
1000d92918 | ||
|
|
f7bbb0377b | ||
|
|
3d83fe4587 | ||
|
|
bef46d9b13 | ||
|
|
ccb8fac1f9 | ||
|
|
3368cc20d2 | ||
|
|
637f787ea1 | ||
|
|
2cc8cfb590 | ||
|
|
6f4345f805 | ||
|
|
60f9c08a2a | ||
|
|
6f798acb2c | ||
|
|
62b6316ddc | ||
|
|
605543ce39 | ||
|
|
b2b069ad97 | ||
|
|
419a92a4fd | ||
|
|
2bf9e84b5a | ||
|
|
c4fec4f0c2 | ||
|
|
8e69814561 | ||
|
|
bed2ed4d5e | ||
|
|
f25f92a836 | ||
|
|
a3cb1fb9e4 | ||
|
|
dacadc1aa7 | ||
|
|
3b8c13cc69 | ||
|
|
21389156c0 | ||
|
|
ac5acc2602 | ||
|
|
e87ee6c04f |
2
.github/config.yml
vendored
Normal file
2
.github/config.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
firstPRMergeComment: >
|
||||
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.
|
||||
@@ -7,7 +7,13 @@
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
[
|
||||
"@semantic-release/commit-analyzer", {
|
||||
"releaseRules": [
|
||||
{ "type": "build", "scope": "revanced-patcher", "release": "patch" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"gradle-semantic-release-plugin",
|
||||
|
||||
437
CHANGELOG.md
437
CHANGELOG.md
@@ -1,3 +1,440 @@
|
||||
# [2.174.0-dev.20](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.19...v2.174.0-dev.20) (2023-05-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** add `hide-filter-bar` patch ([6cc5f61](https://github.com/revanced/revanced-patches/commit/6cc5f61e0712fe25cd45b137773decaf4b9bb582))
|
||||
|
||||
# [2.174.0-dev.19](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.18...v2.174.0-dev.19) (2023-05-11)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/video-speed:** change custom video speeds inside app settings ([#2114](https://github.com/revanced/revanced-patches/issues/2114)) ([d97815a](https://github.com/revanced/revanced-patches/commit/d97815af18e645fd0fa087db0174bcc2a771ec72))
|
||||
|
||||
# [2.174.0-dev.18](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.17...v2.174.0-dev.18) (2023-05-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/theme:** apply custom seekbar color to video thumbnails ([#2085](https://github.com/revanced/revanced-patches/issues/2085)) ([d497027](https://github.com/revanced/revanced-patches/commit/d4970273ad10f62cd9455ef9b847c686147f7dca))
|
||||
|
||||
# [2.174.0-dev.17](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.16...v2.174.0-dev.17) (2023-05-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/remember-video-quality:** fix default video quality/speed being applied when resuming app. ([#2112](https://github.com/revanced/revanced-patches/issues/2112)) ([f68a41c](https://github.com/revanced/revanced-patches/commit/f68a41ce9f9a78818d3f28b069e70b8c66125f53))
|
||||
|
||||
# [2.174.0-dev.16](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.15...v2.174.0-dev.16) (2023-05-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* check for opcode type `CONST` ([e5bb63c](https://github.com/revanced/revanced-patches/commit/e5bb63c7ab4427b6116de4a999be306e0f3cf12e))
|
||||
|
||||
# [2.174.0-dev.15](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.14...v2.174.0-dev.15) (2023-05-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **messenger:** add `disable-switching-emoji-to-sticker-in-message-input-field` patch ([#2099](https://github.com/revanced/revanced-patches/issues/2099)) ([ac5532a](https://github.com/revanced/revanced-patches/commit/ac5532a65c353b1964d9b7d990341fc7362e510d))
|
||||
|
||||
# [2.174.0-dev.14](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.13...v2.174.0-dev.14) (2023-05-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/hide-player-overlay:** make it toggleable in settings ([#2044](https://github.com/revanced/revanced-patches/issues/2044)) ([f693d55](https://github.com/revanced/revanced-patches/commit/f693d55caf1e0b72bb1f4c39b1eeb59436191e02))
|
||||
|
||||
# [2.174.0-dev.13](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.12...v2.174.0-dev.13) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* account fo breaking changes from ReVanced Patcher ([#2103](https://github.com/revanced/revanced-patches/issues/2103)) ([5be25cd](https://github.com/revanced/revanced-patches/commit/5be25cde4b34d58ced35a7edbb499477b538b748))
|
||||
|
||||
# [2.174.0-dev.12](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.11...v2.174.0-dev.12) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **readme-generator:** attempt sorting versions with `FlexVer` ([#2059](https://github.com/revanced/revanced-patches/issues/2059)) ([a54c464](https://github.com/revanced/revanced-patches/commit/a54c464522fa2a6a2d2525c8cb0ec961c2cc771c))
|
||||
|
||||
# [2.174.0-dev.11](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.10...v2.174.0-dev.11) (2023-05-07)
|
||||
|
||||
# [2.174.0-dev.10](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.9...v2.174.0-dev.10) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* incorrect instruction offsets ([42a5a38](https://github.com/revanced/revanced-patches/commit/42a5a387da3c53c579234a44c124ab0ba26117cb))
|
||||
* incorrect smali syntax ([4e74a80](https://github.com/revanced/revanced-patches/commit/4e74a800c311d7acb2c2ddb492b43747db8a8def))
|
||||
|
||||
# [2.174.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.8...v2.174.0-dev.9) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* incorrect cast of instruction ([fb94a1c](https://github.com/revanced/revanced-patches/commit/fb94a1cb48e8952981e2f9146eb90ee92a517b2e))
|
||||
|
||||
# [2.174.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.7...v2.174.0-dev.8) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/integrations:** allow playback of embedded videos ([#2092](https://github.com/revanced/revanced-patches/issues/2092)) ([8a43d75](https://github.com/revanced/revanced-patches/commit/8a43d75e2db63c47bb9ad1b75027df0868c094e5))
|
||||
|
||||
# [2.174.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.6...v2.174.0-dev.7) (2023-05-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **syncforreddit:** add `disable-ads` patch ([#2066](https://github.com/revanced/revanced-patches/issues/2066)) ([c1de5d6](https://github.com/revanced/revanced-patches/commit/c1de5d6e433263b9a17305fa1c65807921594731))
|
||||
|
||||
# [2.174.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.5...v2.174.0-dev.6) (2023-05-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** `hide-load-more-button` patch ([#2078](https://github.com/revanced/revanced-patches/issues/2078)) ([7170802](https://github.com/revanced/revanced-patches/commit/71708022a06453f6f56c19d686fc505286523391))
|
||||
|
||||
# [2.174.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.4...v2.174.0-dev.5) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **spotify/disable-capture-restriction:** make compatible with latest versions ([#2095](https://github.com/revanced/revanced-patches/issues/2095)) ([e48f127](https://github.com/revanced/revanced-patches/commit/e48f1278da2a9d82e70be41fa2c4c480c574816b))
|
||||
|
||||
# [2.174.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.3...v2.174.0-dev.4) (2023-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/theme:** move options out of dependency patch ([a953448](https://github.com/revanced/revanced-patches/commit/a95344879c2ac2cd6da8ce0273dcb05e8a35d2ec))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* improve structure of `README` ([279b193](https://github.com/revanced/revanced-patches/commit/279b193b687ad9cba44ab9c2a88d2ce06be0bbf0))
|
||||
|
||||
# [2.174.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.2...v2.174.0-dev.3) (2023-05-06)
|
||||
|
||||
# [2.174.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.1...v2.174.0-dev.2) (2023-05-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **patch:** bump compatibility ([#2060](https://github.com/revanced/revanced-patches/issues/2060)) ([f86836d](https://github.com/revanced/revanced-patches/commit/f86836d6295db9eb8c59916deaa991b4d99e96be))
|
||||
|
||||
# [2.174.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.173.1-dev.1...v2.174.0-dev.1) (2023-05-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/settings:** add reset button to edit preference dialog ([#2047](https://github.com/revanced/revanced-patches/issues/2047)) ([ede765a](https://github.com/revanced/revanced-patches/commit/ede765ae3c506909ee8a99517b99b6f5f113f01a))
|
||||
|
||||
## [2.173.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.173.0...v2.173.1-dev.1) (2023-05-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/sponsorblock:** fix skip button in wrong location when full screen and comments visible ([#2051](https://github.com/revanced/revanced-patches/issues/2051)) ([30a954c](https://github.com/revanced/revanced-patches/commit/30a954cac83a66fbb25589edc487797ea5f19986))
|
||||
|
||||
# [2.173.0](https://github.com/revanced/revanced-patches/compare/v2.172.0...v2.173.0) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/create-button:** switch create with notifications button ([385ceda](https://github.com/revanced/revanced-patches/commit/385ceda61f586f24b11a284688f55758ef5b4e74))
|
||||
* **youtube/theme:** change seekbar color via preference ([9b465d9](https://github.com/revanced/revanced-patches/commit/9b465d95887863f6b42baa6b710ed98c97383a82))
|
||||
* **youtube/theme:** theme seekbar when clicked ([691a231](https://github.com/revanced/revanced-patches/commit/691a231d99b3b2fbe446fc7edb7a88c7a3127037))
|
||||
* **youtube:** `navigation-buttons` patch ([4bece31](https://github.com/revanced/revanced-patches/commit/4bece31f56eb340933ad26da3d1bfc902ea8569f))
|
||||
* **youtube:** bump compatibility to `18.16.37` ([fe3fdd5](https://github.com/revanced/revanced-patches/commit/fe3fdd5c6cb186bcebc2f86b1d5b597109b25cb6))
|
||||
* **youtube:** support version `18.16.37` ([8beb5ea](https://github.com/revanced/revanced-patches/commit/8beb5ea860284be915c0ef0c6039821a50c14fa8))
|
||||
|
||||
# [2.173.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.173.0-dev.4...v2.173.0-dev.5) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** `navigation-buttons` patch ([4bece31](https://github.com/revanced/revanced-patches/commit/4bece31f56eb340933ad26da3d1bfc902ea8569f))
|
||||
|
||||
# [2.173.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.173.0-dev.3...v2.173.0-dev.4) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/create-button:** switch create with notifications button ([385ceda](https://github.com/revanced/revanced-patches/commit/385ceda61f586f24b11a284688f55758ef5b4e74))
|
||||
|
||||
# [2.173.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.173.0-dev.2...v2.173.0-dev.3) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/theme:** theme seekbar when clicked ([691a231](https://github.com/revanced/revanced-patches/commit/691a231d99b3b2fbe446fc7edb7a88c7a3127037))
|
||||
|
||||
# [2.173.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.173.0-dev.1...v2.173.0-dev.2) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/theme:** change seekbar color via preference ([9b465d9](https://github.com/revanced/revanced-patches/commit/9b465d95887863f6b42baa6b710ed98c97383a82))
|
||||
|
||||
# [2.173.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.172.0...v2.173.0-dev.1) (2023-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** bump compatibility to `18.16.37` ([fe3fdd5](https://github.com/revanced/revanced-patches/commit/fe3fdd5c6cb186bcebc2f86b1d5b597109b25cb6))
|
||||
* **youtube:** support version `18.16.37` ([8beb5ea](https://github.com/revanced/revanced-patches/commit/8beb5ea860284be915c0ef0c6039821a50c14fa8))
|
||||
|
||||
# [2.172.0](https://github.com/revanced/revanced-patches/compare/v2.171.0...v2.172.0) (2023-05-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **change-package-name:** use `null` as default value for option `packageName` ([#1998](https://github.com/revanced/revanced-patches/issues/1998)) ([8128e6b](https://github.com/revanced/revanced-patches/commit/8128e6ba57ec4e4e01a0923a0d353cc934b93899))
|
||||
* **youtube/minimized-playback:** fix background play of kids videos ([#2016](https://github.com/revanced/revanced-patches/issues/2016)) ([89b1484](https://github.com/revanced/revanced-patches/commit/89b1484d1d8c1419ba8020d0571b25071d43e926))
|
||||
* **youtube/return-youtube-dislike:** support older UI layouts ([#2031](https://github.com/revanced/revanced-patches/issues/2031)) ([c82ccb5](https://github.com/revanced/revanced-patches/commit/c82ccb59955d7663a5be20338b4b5c9b7601195c))
|
||||
* **youtube/spoof-app-version:** adjust available app targets ([#2030](https://github.com/revanced/revanced-patches/issues/2030)) ([a16cb0d](https://github.com/revanced/revanced-patches/commit/a16cb0d32f40694f237cb1820b965cee26663fdd))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads:** hide multiple audio track button on video player overlay ([#2021](https://github.com/revanced/revanced-patches/issues/2021)) ([8d7f305](https://github.com/revanced/revanced-patches/commit/8d7f305aa2d8f86a9232a6a9577a87f58b53d51c))
|
||||
* **youtube/hide-get-premium:** hide get premium advertisements under video player ([#2020](https://github.com/revanced/revanced-patches/issues/2020)) ([05904a2](https://github.com/revanced/revanced-patches/commit/05904a2569cf9b82e3731692b93bc3a6bb005b03))
|
||||
* **youtube/hide-player-overlay:** exclude by default ([1c6fb94](https://github.com/revanced/revanced-patches/commit/1c6fb941f59599e2fe4a7d6f96babb6b0edac054))
|
||||
* **youtube/spoof-app-version:** user selectable version to spoof ([#2013](https://github.com/revanced/revanced-patches/issues/2013)) ([fd66417](https://github.com/revanced/revanced-patches/commit/fd6641747bd60bdd8b967db7cceaed454fb891a1))
|
||||
* **youtube/spoof-signature-verification:** list known spoofing side effects in revanced settings ([#2011](https://github.com/revanced/revanced-patches/issues/2011)) ([dc6e9b2](https://github.com/revanced/revanced-patches/commit/dc6e9b2268efe8a1bb72b80e5285d7002f448f4d))
|
||||
|
||||
# [2.172.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.8...v2.172.0-dev.9) (2023-05-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/general-ads:** hide multiple audio track button on video player overlay ([#2021](https://github.com/revanced/revanced-patches/issues/2021)) ([8d7f305](https://github.com/revanced/revanced-patches/commit/8d7f305aa2d8f86a9232a6a9577a87f58b53d51c))
|
||||
|
||||
# [2.172.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.7...v2.172.0-dev.8) (2023-05-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **change-package-name:** use `null` as default value for option `packageName` ([#1998](https://github.com/revanced/revanced-patches/issues/1998)) ([8128e6b](https://github.com/revanced/revanced-patches/commit/8128e6ba57ec4e4e01a0923a0d353cc934b93899))
|
||||
|
||||
# [2.172.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.6...v2.172.0-dev.7) (2023-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/return-youtube-dislike:** support older UI layouts ([#2031](https://github.com/revanced/revanced-patches/issues/2031)) ([c82ccb5](https://github.com/revanced/revanced-patches/commit/c82ccb59955d7663a5be20338b4b5c9b7601195c))
|
||||
|
||||
# [2.172.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.5...v2.172.0-dev.6) (2023-04-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/hide-get-premium:** hide get premium advertisements under video player ([#2020](https://github.com/revanced/revanced-patches/issues/2020)) ([05904a2](https://github.com/revanced/revanced-patches/commit/05904a2569cf9b82e3731692b93bc3a6bb005b03))
|
||||
|
||||
# [2.172.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.4...v2.172.0-dev.5) (2023-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/spoof-app-version:** adjust available app targets ([#2030](https://github.com/revanced/revanced-patches/issues/2030)) ([a16cb0d](https://github.com/revanced/revanced-patches/commit/a16cb0d32f40694f237cb1820b965cee26663fdd))
|
||||
|
||||
# [2.172.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.3...v2.172.0-dev.4) (2023-04-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/hide-player-overlay:** exclude by default ([1c6fb94](https://github.com/revanced/revanced-patches/commit/1c6fb941f59599e2fe4a7d6f96babb6b0edac054))
|
||||
|
||||
# [2.172.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.2...v2.172.0-dev.3) (2023-04-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/spoof-signature-verification:** list known spoofing side effects in revanced settings ([#2011](https://github.com/revanced/revanced-patches/issues/2011)) ([dc6e9b2](https://github.com/revanced/revanced-patches/commit/dc6e9b2268efe8a1bb72b80e5285d7002f448f4d))
|
||||
|
||||
# [2.172.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.172.0-dev.1...v2.172.0-dev.2) (2023-04-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/minimized-playback:** fix background play of kids videos ([#2016](https://github.com/revanced/revanced-patches/issues/2016)) ([89b1484](https://github.com/revanced/revanced-patches/commit/89b1484d1d8c1419ba8020d0571b25071d43e926))
|
||||
|
||||
# [2.172.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.171.0...v2.172.0-dev.1) (2023-04-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/spoof-app-version:** user selectable version to spoof ([#2013](https://github.com/revanced/revanced-patches/issues/2013)) ([fd66417](https://github.com/revanced/revanced-patches/commit/fd6641747bd60bdd8b967db7cceaed454fb891a1))
|
||||
|
||||
# [2.171.0](https://github.com/revanced/revanced-patches/compare/v2.170.0...v2.171.0) (2023-04-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **enable-android-debugging:** make option `debuggable` false by default ([e717e26](https://github.com/revanced/revanced-patches/commit/e717e260fd0449a97929c3c82da577362586c5e1))
|
||||
* **youtube/minimized-playback:** disable minimized playback for shorts ([#1990](https://github.com/revanced/revanced-patches/issues/1990)) ([b91d18d](https://github.com/revanced/revanced-patches/commit/b91d18d24f332a9aa8721dc053e395d352b5796d))
|
||||
* **youtube/spoof-signature-verification:** additional fixes for subtitle window positions ([#1975](https://github.com/revanced/revanced-patches/issues/1975)) ([08584e6](https://github.com/revanced/revanced-patches/commit/08584e680fc658f37e8730499fa5197a08370776))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **id-austria:** remove compatibility version constraint ([#1952](https://github.com/revanced/revanced-patches/issues/1952)) ([94ffd5a](https://github.com/revanced/revanced-patches/commit/94ffd5a26fe42f223a09ad6bd7f34f1fac0986ad))
|
||||
* **youtube/sponsorblock:** automatically hide skip button ([#1956](https://github.com/revanced/revanced-patches/issues/1956)) ([c3c8ae6](https://github.com/revanced/revanced-patches/commit/c3c8ae6b4377b12838971cedc32779e12c07363c))
|
||||
* **youtube:** `hide-player-overlay` patch ([#1965](https://github.com/revanced/revanced-patches/issues/1965)) ([d233d96](https://github.com/revanced/revanced-patches/commit/d233d96faf838b22f4c458ad445af048362e7421))
|
||||
|
||||
# [2.171.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.171.0-dev.4...v2.171.0-dev.5) (2023-04-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **enable-android-debugging:** make option `debuggable` false by default ([e717e26](https://github.com/revanced/revanced-patches/commit/e717e260fd0449a97929c3c82da577362586c5e1))
|
||||
|
||||
# [2.171.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.171.0-dev.3...v2.171.0-dev.4) (2023-04-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/minimized-playback:** disable minimized playback for shorts ([#1990](https://github.com/revanced/revanced-patches/issues/1990)) ([b91d18d](https://github.com/revanced/revanced-patches/commit/b91d18d24f332a9aa8721dc053e395d352b5796d))
|
||||
|
||||
# [2.171.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.171.0-dev.2...v2.171.0-dev.3) (2023-04-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/sponsorblock:** automatically hide skip button ([#1956](https://github.com/revanced/revanced-patches/issues/1956)) ([c3c8ae6](https://github.com/revanced/revanced-patches/commit/c3c8ae6b4377b12838971cedc32779e12c07363c))
|
||||
|
||||
# [2.171.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.171.0-dev.1...v2.171.0-dev.2) (2023-04-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** `hide-player-overlay` patch ([#1965](https://github.com/revanced/revanced-patches/issues/1965)) ([d233d96](https://github.com/revanced/revanced-patches/commit/d233d96faf838b22f4c458ad445af048362e7421))
|
||||
|
||||
# [2.171.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.170.1-dev.1...v2.171.0-dev.1) (2023-04-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **id-austria:** remove compatibility version constraint ([#1952](https://github.com/revanced/revanced-patches/issues/1952)) ([94ffd5a](https://github.com/revanced/revanced-patches/commit/94ffd5a26fe42f223a09ad6bd7f34f1fac0986ad))
|
||||
|
||||
## [2.170.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.170.0...v2.170.1-dev.1) (2023-04-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/spoof-signature-verification:** additional fixes for subtitle window positions ([#1975](https://github.com/revanced/revanced-patches/issues/1975)) ([08584e6](https://github.com/revanced/revanced-patches/commit/08584e680fc658f37e8730499fa5197a08370776))
|
||||
|
||||
# [2.170.0](https://github.com/revanced/revanced-patches/compare/v2.169.0...v2.170.0) (2023-04-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **enable-android-debugging:** don't include by default ([b2856f7](https://github.com/revanced/revanced-patches/commit/b2856f7f71640f78dfc11b3dff90a58add48d605))
|
||||
* **twitch/block-embedded-ads:** correct spelling mistake ([#1962](https://github.com/revanced/revanced-patches/issues/1962)) ([6138c2a](https://github.com/revanced/revanced-patches/commit/6138c2ac24f586137bc4ef974a6600d24ebdda3e))
|
||||
* **youtube/hide-video-action-buttons:** fix hide action buttons not working for some users ([#1959](https://github.com/revanced/revanced-patches/issues/1959)) ([3ab5842](https://github.com/revanced/revanced-patches/commit/3ab5842ebbee3381604efcaa454ea5c49d3a5363))
|
||||
* **youtube/sponsorblock:** correct spelling mistake ([#1941](https://github.com/revanced/revanced-patches/issues/1941)) ([d9d0fe7](https://github.com/revanced/revanced-patches/commit/d9d0fe7e236ccce348e8b3214454d29656a853c0))
|
||||
* **youtube/sponsorblock:** use lowercase letters for URL string ([#1942](https://github.com/revanced/revanced-patches/issues/1942)) ([b58842a](https://github.com/revanced/revanced-patches/commit/b58842a5f6f3fbcf06e87821bbc1ad3be7ca2fc0))
|
||||
* **youtube/tablet-mini-player:** throw if fingerprint fails to resolve ([642eef3](https://github.com/revanced/revanced-patches/commit/642eef39e8e8eeb1f95980f95b83e79faffe3a18))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/wide-searchbar:** rename patch ([bb5885e](https://github.com/revanced/revanced-patches/commit/bb5885eca4b750f15776de9099fb4dd83f6d70f5))
|
||||
* **youtube:** bump compatibility to `18.15.40` ([ad82fcd](https://github.com/revanced/revanced-patches/commit/ad82fcdb63c7cc77e7387b7f0da95b005c90ce31))
|
||||
* **youtube:** constrain patches to `18.15.40` ([c0c10de](https://github.com/revanced/revanced-patches/commit/c0c10dec3446d35e20b17c25510cddcbe07b494f))
|
||||
* **youtube:** remove non working patch `hide-my-mix` ([6ae0f0b](https://github.com/revanced/revanced-patches/commit/6ae0f0b466322c4d60feb20ed0e809783452b9d4))
|
||||
* **youtube:** support version `18.15.40` ([c3614ab](https://github.com/revanced/revanced-patches/commit/c3614ab1d10a70fdb0813d7249866d696b28088f))
|
||||
|
||||
# [2.170.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.169.1-dev.4...v2.170.0-dev.1) (2023-04-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/tablet-mini-player:** throw if fingerprint fails to resolve ([c78ab33](https://github.com/revanced/revanced-patches/commit/c78ab33a8d41694aaee60d0a3d99c51c95085489))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube/wide-searchbar:** rename patch ([ac9ad79](https://github.com/revanced/revanced-patches/commit/ac9ad79f2ff4fbe4fa73b80bae88d12a03a287d7))
|
||||
* **youtube:** bump compatibility to `18.15.40` ([72008da](https://github.com/revanced/revanced-patches/commit/72008da28637bb6b4bf6f0e0ae1b6bce584dd696))
|
||||
* **youtube:** bump compatibility to `18.15.40` ([#1964](https://github.com/revanced/revanced-patches/issues/1964)) ([c4c6653](https://github.com/revanced/revanced-patches/commit/c4c6653c37b9675ff0f7b0f29470342c99caba34))
|
||||
* **youtube:** constrain patches to `18.15.40` ([dfbf8ab](https://github.com/revanced/revanced-patches/commit/dfbf8ab206e779fe2624d5f62c5dab170d68fce5))
|
||||
* **youtube:** remove non working patch `hide-my-mix` ([f8ea2cf](https://github.com/revanced/revanced-patches/commit/f8ea2cf3bcec3ec4bfb424ed8e4a640b505387d7))
|
||||
* **youtube:** support version `18.15.40` ([b2916a3](https://github.com/revanced/revanced-patches/commit/b2916a379a631481c0750e312d04a4c9e82590d6))
|
||||
|
||||
## [2.169.1-dev.4](https://github.com/revanced/revanced-patches/compare/v2.169.1-dev.3...v2.169.1-dev.4) (2023-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **twitch/block-embedded-ads:** correct spelling mistake ([#1962](https://github.com/revanced/revanced-patches/issues/1962)) ([100d9dd](https://github.com/revanced/revanced-patches/commit/100d9dd7e0b9d83a96fb25c2ffda06fc018830e4))
|
||||
|
||||
## [2.169.1-dev.3](https://github.com/revanced/revanced-patches/compare/v2.169.1-dev.2...v2.169.1-dev.3) (2023-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/hide-video-action-buttons:** fix hide action buttons not working for some users ([#1959](https://github.com/revanced/revanced-patches/issues/1959)) ([3ff1489](https://github.com/revanced/revanced-patches/commit/3ff1489b32968e9bad3361f924b7079e7b6f29e2))
|
||||
|
||||
## [2.169.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.169.1-dev.1...v2.169.1-dev.2) (2023-04-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **"enable-android-debugging:** don't include by default ([14b2128](https://github.com/revanced/revanced-patches/commit/14b212844f308b95ad6ed02c455716cd84c0db01))
|
||||
|
||||
## [2.169.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.169.0...v2.169.1-dev.1) (2023-04-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/sponsorblock:** correct spelling mistake ([#1941](https://github.com/revanced/revanced-patches/issues/1941)) ([d9d0fe7](https://github.com/revanced/revanced-patches/commit/d9d0fe7e236ccce348e8b3214454d29656a853c0))
|
||||
* **youtube/sponsorblock:** use lowercase letters for URL string ([#1942](https://github.com/revanced/revanced-patches/issues/1942)) ([b58842a](https://github.com/revanced/revanced-patches/commit/b58842a5f6f3fbcf06e87821bbc1ad3be7ca2fc0))
|
||||
|
||||
# [2.169.0](https://github.com/revanced/revanced-patches/compare/v2.168.0...v2.169.0) (2023-04-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing annotation to patches ([#1882](https://github.com/revanced/revanced-patches/issues/1882)) ([d86b6a4](https://github.com/revanced/revanced-patches/commit/d86b6a4a659172c3f1db8eb883f28dfee4e83e4c))
|
||||
* **youtube/hide-video-action-buttons:** change 'Hide create, clip and thanks buttons' to default off ([#1923](https://github.com/revanced/revanced-patches/issues/1923)) ([fc89c86](https://github.com/revanced/revanced-patches/commit/fc89c865f94fffd748809eaf0504cc91f6389500))
|
||||
* **youtube/hide-video-action-buttons:** fix 'hide share button' ([#1924](https://github.com/revanced/revanced-patches/issues/1924)) ([bc05e44](https://github.com/revanced/revanced-patches/commit/bc05e4494d914f944a831bfb83a150ad93bb342f))
|
||||
* **youtube/microg-support:** remove incorrect patch dependency ([3e0c45c](https://github.com/revanced/revanced-patches/commit/3e0c45c2dff9f6336e42fdd3d1b5b5de5af1b1cb))
|
||||
* **youtube/microg-support:** rename patch correctly ([091a25d](https://github.com/revanced/revanced-patches/commit/091a25d46145b1c27791245fca0933e9c8a68e9a))
|
||||
* **youtube/return-youtube-dislike:** render dislikes when scrolling into the screen ([#1873](https://github.com/revanced/revanced-patches/issues/1873)) ([85675b8](https://github.com/revanced/revanced-patches/commit/85675b800070de9752b2a4bfea3182381d4cfba4))
|
||||
* **youtube/sponsorblock:** do not depend on `remember-playback-speed` patch ([b0834fa](https://github.com/revanced/revanced-patches/commit/b0834faa69755a94f70ae5075a10cf15e8a6b857))
|
||||
* **youtube/sponsorblock:** fix autorepeat button layout ([#1868](https://github.com/revanced/revanced-patches/issues/1868)) ([5e148d9](https://github.com/revanced/revanced-patches/commit/5e148d9384e8f9f1bc8f5daa7e68a05574810329))
|
||||
* **youtube/spoof-signature-verification:** depend on `client-spoof` patch ([0d47375](https://github.com/revanced/revanced-patches/commit/0d47375092639e3e5dad8d67991004fc2f103606))
|
||||
* **youtubevanced/hide-ads:** hide more types of ads ([#1781](https://github.com/revanced/revanced-patches/issues/1781)) ([47ff447](https://github.com/revanced/revanced-patches/commit/47ff447f8ec0e5bbc174f34bd7d61b3031276641))
|
||||
* **youtubevanced/hide-ads:** remove broken ad filter ([#1881](https://github.com/revanced/revanced-patches/issues/1881)) ([5b987e1](https://github.com/revanced/revanced-patches/commit/5b987e14e81a47691883a5b5196c7ffee03941d0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `change-package-name` patch ([#1864](https://github.com/revanced/revanced-patches/issues/1864)) ([f9a6672](https://github.com/revanced/revanced-patches/commit/f9a6672122eb28fe06c9f5e137906ad868a491d6))
|
||||
* `enable-android-debugging` patch ([#1876](https://github.com/revanced/revanced-patches/issues/1876)) ([bd224d9](https://github.com/revanced/revanced-patches/commit/bd224d90deb838ee3e7bd0c16860023ebf113e96))
|
||||
* **facebook:** `hide-inbox-ads` patch ([#1893](https://github.com/revanced/revanced-patches/issues/1893)) ([2cfc982](https://github.com/revanced/revanced-patches/commit/2cfc9829e119884ca566d6ad90fd0542317891d7))
|
||||
* **id-austria:** bump compatibility to `2.6.0` ([#1827](https://github.com/revanced/revanced-patches/issues/1827)) ([f48e794](https://github.com/revanced/revanced-patches/commit/f48e794eebf9ea44008c4c8a3967ad039d19180a))
|
||||
* **inshorts:** `hide-ads` patch ([#1828](https://github.com/revanced/revanced-patches/issues/1828)) ([04a2acc](https://github.com/revanced/revanced-patches/commit/04a2accfe9f9254af9074ad0a309d485cedb01cb))
|
||||
* **memegenerator:** `unlock-pro` patch ([#1902](https://github.com/revanced/revanced-patches/issues/1902)) ([7d30541](https://github.com/revanced/revanced-patches/commit/7d3054178187bed294d156d3858613fa63a626ef))
|
||||
* **photomath/unlock-plus:** bump compatibility to `8.21.1` ([#1926](https://github.com/revanced/revanced-patches/issues/1926)) ([beb8d9c](https://github.com/revanced/revanced-patches/commit/beb8d9cbf254b4a2b2207a307934be65507dcf80))
|
||||
* **photomath:** bump compatibility up to `8.21.0` ([#1886](https://github.com/revanced/revanced-patches/issues/1886)) ([43464fd](https://github.com/revanced/revanced-patches/commit/43464fd6ffe6f097c574156146aeb23f8f026840))
|
||||
* **reddit:** bump compatibility to `2023.12.0` ([#1825](https://github.com/revanced/revanced-patches/issues/1825)) ([e3666e6](https://github.com/revanced/revanced-patches/commit/e3666e68ed4816c85fbb110cb098f53fddf135f1))
|
||||
* use better patch description ([32fcd25](https://github.com/revanced/revanced-patches/commit/32fcd258c6b00315265c09380550a2e98b5ec9e7))
|
||||
* **youtube-music:** `bypass-certificate-checks` patch ([#1810](https://github.com/revanced/revanced-patches/issues/1810)) ([ef8f26f](https://github.com/revanced/revanced-patches/commit/ef8f26fb976c3044039f9bff0496088763ab66cd))
|
||||
* **youtube/settings:** disable preferences and add dialog messages to preferences ([#1801](https://github.com/revanced/revanced-patches/issues/1801)) ([05023ba](https://github.com/revanced/revanced-patches/commit/05023bab1d94e04553ac274468bdba7a19ad9180))
|
||||
* **youtube/sponsorblock:** skip to video highlight ([#1874](https://github.com/revanced/revanced-patches/issues/1874)) ([83747b7](https://github.com/revanced/revanced-patches/commit/83747b7aea33d8fe4b4b9514fdf7c9081c357410))
|
||||
* **youtube:** bump compatibility to `18.08.37` ([29561ec](https://github.com/revanced/revanced-patches/commit/29561eca10e18e11f2d4a7f9bab2f12303490b6f))
|
||||
* **youtube:** change default video speed and quality inside the settings menu ([#1880](https://github.com/revanced/revanced-patches/issues/1880)) ([fbb1763](https://github.com/revanced/revanced-patches/commit/fbb17636d8ab9f2a43ead896451804b04464527c))
|
||||
* **youtube:** constrain compatibility to `18.08.37` ([7403fc8](https://github.com/revanced/revanced-patches/commit/7403fc86ae7b7d756a2939fa0a507f237aaf6edf))
|
||||
* **youtube:** sponsorblock improvements ([#1557](https://github.com/revanced/revanced-patches/issues/1557)) ([b5d712a](https://github.com/revanced/revanced-patches/commit/b5d712a3326d1e8cdb8d8642aa7bd1bee6e30ac1))
|
||||
* **youtube:** support version `18.08.37` ([4f4ceab](https://github.com/revanced/revanced-patches/commit/4f4ceab2cc32a38dd3967fd4e81f690330c08f5c))
|
||||
|
||||
# [2.169.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.168.0...v2.169.0-dev.1) (2023-04-21)
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
## 🧩 Patches
|
||||
## 🧩 ReVanced Patches
|
||||
|
||||
The official Patch bundle provided by ReVanced and the community.
|
||||
The official ReVanced Patches.
|
||||
|
||||
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||
## 📋 List of patches in this repository
|
||||
|
||||
{{ table }}
|
||||
|
||||
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||
|
||||
## 📝 JSON Format
|
||||
|
||||
This section explains the JSON format for the [patches.json](patches.json) file.
|
||||
@@ -64,7 +66,6 @@ Example:
|
||||
"description": "Enables a custom theme.",
|
||||
"version": "0.0.1",
|
||||
"excluded": false,
|
||||
"deprecated": false,
|
||||
"options": [
|
||||
{
|
||||
"key": "theme",
|
||||
@@ -91,7 +92,6 @@ Example:
|
||||
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
|
||||
"version": "0.0.1",
|
||||
"excluded": false,
|
||||
"deprecated": false,
|
||||
"options": [
|
||||
{
|
||||
"key": "appName",
|
||||
|
||||
165
README.md
165
README.md
@@ -1,68 +1,65 @@
|
||||
## 🧩 Patches
|
||||
## 🧩 ReVanced Patches
|
||||
|
||||
The official Patch bundle provided by ReVanced and the community.
|
||||
The official ReVanced Patches.
|
||||
|
||||
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||
## 📋 List of patches in this repository
|
||||
|
||||
### [📦 `com.google.android.youtube`](https://play.google.com/store/apps/details?id=com.google.android.youtube)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `always-autorepeat` | Always repeats the playing video again. | 18.08.37 |
|
||||
| `client-spoof` | Spoofs a patched client to allow playback. | all |
|
||||
| `comments` | Hides components related to comments. | 18.08.37 |
|
||||
| `copy-video-url` | Adds buttons in player to copy video links. | 18.08.37 |
|
||||
| `always-autorepeat` | Always repeats the playing video again. | 18.16.37 |
|
||||
| `client-spoof` | Spoofs a patched client to allow playback. | 18.16.37 |
|
||||
| `comments` | Hides components related to comments. | 18.16.37 |
|
||||
| `copy-video-url` | Adds buttons in player to copy video links. | 18.16.37 |
|
||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.08.37 |
|
||||
| `custom-video-speed` | Adds more video speed options. | 18.08.37 |
|
||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.08.37 |
|
||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.08.37 |
|
||||
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.08.37 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.08.37 |
|
||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.16.37 |
|
||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.16.37 |
|
||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.16.37 |
|
||||
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.16.37 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.16.37 |
|
||||
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||
| `downloads` | Enables downloading music and videos from YouTube. | 18.08.37 |
|
||||
| `downloads` | Enables downloading music and videos from YouTube. | 18.16.37 |
|
||||
| `enable-debugging` | Adds debugging options. | all |
|
||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.08.37 |
|
||||
| `general-ads` | Removes general ads. | 18.08.37 |
|
||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.08.37 |
|
||||
| `hide-album-cards` | Hides the album cards below the artist description. | 18.08.37 |
|
||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 18.08.37 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.08.37 |
|
||||
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.08.37 |
|
||||
| `hide-captions-button` | Hides the captions button on video player. | 18.08.37 |
|
||||
| `general-ads` | Removes general ads. | 18.16.37 |
|
||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.16.37 |
|
||||
| `hide-album-cards` | Hides the album cards below the artist description. | 18.16.37 |
|
||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 18.16.37 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.16.37 |
|
||||
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.16.37 |
|
||||
| `hide-captions-button` | Hides the captions button on video player. | 18.16.37 |
|
||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||
| `hide-create-button` | Hides the create button in the navigation bar. | 18.08.37 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.08.37 |
|
||||
| `hide-email-address` | Hides the email address in the account switcher. | 18.08.37 |
|
||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.08.37 |
|
||||
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.08.37 |
|
||||
| `hide-info-cards` | Hides info cards in videos. | 18.08.37 |
|
||||
| `hide-my-mix` | Hides mix playlists. | 18.08.37 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.16.37 |
|
||||
| `hide-email-address` | Hides the email address in the account switcher. | 18.16.37 |
|
||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.16.37 |
|
||||
| `hide-filter-bar` | Hides the filter bar in video feeds. | 18.16.37 |
|
||||
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.16.37 |
|
||||
| `hide-get-premium` | Hides advertisement for YouTube Premium under the video player. | 18.16.37 |
|
||||
| `hide-info-cards` | Hides info cards in videos. | 18.16.37 |
|
||||
| `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | all |
|
||||
| `hide-seekbar` | Hides the seekbar. | 18.08.37 |
|
||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 18.08.37 |
|
||||
| `hide-timestamp` | Hides timestamp in video player. | 18.08.37 |
|
||||
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.08.37 |
|
||||
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.08.37 |
|
||||
| `hide-watermark` | Hides creator's watermarks on videos. | 18.08.37 |
|
||||
| `minimized-playback` | Enables minimized and background playback. | 18.08.37 |
|
||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.08.37 |
|
||||
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.08.37 |
|
||||
| `hide-player-overlay` | Hides the dark background overlay from the player when player controls are visible. | all |
|
||||
| `hide-seekbar` | Hides the seekbar. | 18.16.37 |
|
||||
| `hide-timestamp` | Hides timestamp in video player. | 18.16.37 |
|
||||
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.16.37 |
|
||||
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.16.37 |
|
||||
| `hide-watermark` | Hides creator's watermarks on videos. | 18.16.37 |
|
||||
| `minimized-playback` | Enables minimized and background playback. | 18.16.37 |
|
||||
| `navigation-buttons` | Adds options to hide or change navigation buttons. | 18.16.37 |
|
||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.16.37 |
|
||||
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.16.37 |
|
||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||
| `remember-playback-speed` | Adds the ability to remember the playback speed you chose in the video playback speed flyout. | 18.08.37 |
|
||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.08.37 |
|
||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 18.08.37 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.08.37 |
|
||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.08.37 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.08.37 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.08.37 |
|
||||
| `spoof-signature-verification` | Spoofs a patched client to prevent playback issues. | 18.08.37 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.08.37 |
|
||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.08.37 |
|
||||
| `theme` | Applies a custom theme. | all |
|
||||
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.08.37 |
|
||||
| `video-ads` | Removes ads in the video player. | 18.08.37 |
|
||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.16.37 |
|
||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 18.16.37 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.16.37 |
|
||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.16.37 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.16.37 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.16.37 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.16.37 |
|
||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.16.37 |
|
||||
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.16.37 |
|
||||
| `video-ads` | Removes ads in the video player. | 18.16.37 |
|
||||
| `wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.16.37 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||
@@ -121,7 +118,7 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 14.6.1 |
|
||||
| `block-embedded-ads` | Blocks embedded steam ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
|
||||
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
|
||||
| `block-video-ads` | Blocks video ads in streams and VODs. | 14.6.1 |
|
||||
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
|
||||
| `settings` | Adds settings menu to Twitch. | all |
|
||||
@@ -159,13 +156,13 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
|
||||
### [📦 `com.facebook.orca`](https://play.google.com/store/apps/details?id=com.facebook.orca)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `client-spoof` | Spoofs a patched client to allow playback. | all |
|
||||
| `hide-ads` | Removes general ads. | all |
|
||||
| `disable-switching-emoji-to-sticker-in-message-input-field` | Disables switching from emoji to sticker search mode in message input field | all |
|
||||
| `hide-inbox-ads` | Hides ads in inbox. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `at.gv.bmf.bmf2go`](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go)
|
||||
@@ -182,8 +179,16 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `remove-root-detection` | Removes the check for root permissions and unlocked bootloader. | 2.6.0 |
|
||||
| `spoof-signature` | Spoofs the signature of the app. | 2.6.0 |
|
||||
| `remove-root-detection` | Removes the check for root permissions and unlocked bootloader. | all |
|
||||
| `spoof-signature` | Spoofs the signature of the app. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.laurencedawson.reddit_sync`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `disable-ads` | Disables ads. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit)
|
||||
@@ -210,12 +215,12 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `hide-ads` | Removes ads from Inshorts. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.facebook.orca`](https://play.google.com/store/apps/details?id=com.facebook.orca)
|
||||
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `hide-inbox-ads` | Hides ads in inbox. | all |
|
||||
| `hide-ads` | Removes general ads. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.instagram.android`](https://play.google.com/store/apps/details?id=com.instagram.android)
|
||||
@@ -287,7 +292,7 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-plus` | Unlocks plus features. | 8.9.0 |
|
||||
| `unlock-plus` | Unlocks plus features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `io.yuka.android`](https://play.google.com/store/apps/details?id=io.yuka.android)
|
||||
@@ -306,6 +311,22 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
|
||||
<details>
|
||||
|
||||
@@ -322,12 +343,12 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
|
||||
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
| `unlock-pro` | Unlocks pro features. | 4.6377 |
|
||||
</details>
|
||||
|
||||
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
|
||||
@@ -338,22 +359,6 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | 4.6364 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
|
||||
<details>
|
||||
|
||||
@@ -372,6 +377,8 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
|
||||
|
||||
|
||||
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||
|
||||
## 📝 JSON Format
|
||||
|
||||
This section explains the JSON format for the [patches.json](patches.json) file.
|
||||
@@ -430,7 +437,6 @@ Example:
|
||||
"description": "Enables a custom theme.",
|
||||
"version": "0.0.1",
|
||||
"excluded": false,
|
||||
"deprecated": false,
|
||||
"options": [
|
||||
{
|
||||
"key": "theme",
|
||||
@@ -457,7 +463,6 @@ Example:
|
||||
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
|
||||
"version": "0.0.1",
|
||||
"excluded": false,
|
||||
"deprecated": false,
|
||||
"options": [
|
||||
{
|
||||
"key": "appName",
|
||||
|
||||
@@ -17,13 +17,26 @@ repositories {
|
||||
password = githubPassword
|
||||
}
|
||||
}
|
||||
// Required for FlexVer-Java
|
||||
maven {
|
||||
url = uri("https://repo.sleeping.town")
|
||||
content {
|
||||
includeGroup("com.unascribed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("app.revanced:revanced-patcher:7.0.0")
|
||||
implementation("app.revanced:revanced-patcher:7.1.1")
|
||||
implementation("app.revanced:multidexlib2:2.5.3-a3836654")
|
||||
// Required for meta
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
// Required for FlexVer-Java
|
||||
implementation("com.unascribed:flexver-java:1.0.2")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(11)
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.169.0-dev.1
|
||||
version = 2.174.0-dev.20
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
7
gradlew
vendored
7
gradlew
vendored
@@ -85,9 +85,6 @@ done
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
@@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
|
||||
870
package-lock.json
generated
870
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ import app.revanced.patcher.patch.Patch
|
||||
import app.revanced.patcher.util.patch.PatchBundle
|
||||
import java.io.File
|
||||
|
||||
typealias PatchBundlePatches = List<Class<out Patch<Context>>>
|
||||
internal typealias PatchBundlePatches = List<Class<out Patch<Context>>>
|
||||
|
||||
internal interface PatchesFileGenerator {
|
||||
fun generate(bundle: PatchBundlePatches)
|
||||
|
||||
@@ -5,6 +5,7 @@ import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import com.unascribed.flexver.FlexVerComparator
|
||||
import java.io.File
|
||||
|
||||
internal class ReadmeGenerator : PatchesFileGenerator {
|
||||
@@ -37,9 +38,8 @@ internal class ReadmeGenerator : PatchesFileGenerator {
|
||||
}
|
||||
}.let { commonMap ->
|
||||
commonMap.maxByOrNull { it.value }?.value?.let {
|
||||
// This is not foolproof, because for example v1.0.0-dev.0 will be returned instead of v1.0.0-release.
|
||||
// Unfortunately this can not be solved easily because versioning can be complex.
|
||||
commonMap.entries.filter { mostCommon -> mostCommon.value == it }.maxBy { it.key }.key
|
||||
commonMap.entries.filter { mostCommon -> mostCommon.value == it }
|
||||
.maxOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key)
|
||||
} ?: "all"
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@ import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.*
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
@Patch(false)
|
||||
@Name("enable-android-debugging")
|
||||
@Description("Enables Android debugging capabilities.")
|
||||
@Version("0.0.1")
|
||||
@@ -34,7 +33,7 @@ class EnableAndroidDebuggingPatch : ResourcePatch {
|
||||
var debuggable: Boolean? by option(
|
||||
PatchOption.BooleanOption(
|
||||
key = "debuggable",
|
||||
default = true,
|
||||
default = false,
|
||||
title = "App debugging",
|
||||
description = "Whether to make the app debuggable on Android.",
|
||||
)
|
||||
@@ -19,7 +19,7 @@ class ChangePackageNamePatch : ResourcePatch {
|
||||
if (!packageName.matches(packageNameRegex))
|
||||
return PatchResultError("Invalid package name")
|
||||
|
||||
var originalPackageName = ""
|
||||
var originalPackageName: String
|
||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
||||
originalPackageName = manifest.getAttribute("package")
|
||||
@@ -41,7 +41,7 @@ class ChangePackageNamePatch : ResourcePatch {
|
||||
var packageName: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "packageName",
|
||||
default = "",
|
||||
default = null,
|
||||
title = "Package name",
|
||||
description = "The name of the package to rename of the app.",
|
||||
)
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package app.revanced.patches.backdrops.misc.pro.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
|
||||
@@ -25,17 +24,20 @@ class ProUnlockPatch : BytecodePatch(
|
||||
listOf(ProUnlockFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = ProUnlockFingerprint.result ?: return PatchResultError("${ProUnlockFingerprint.name} not found")
|
||||
ProUnlockFingerprint.result?.let { result ->
|
||||
val registerIndex = result.scanResult.patternScanResult!!.endIndex - 1
|
||||
|
||||
val moveRegisterInstruction = result.mutableMethod.instruction(result.scanResult.patternScanResult!!.endIndex - 1)
|
||||
val register = (moveRegisterInstruction as OneRegisterInstruction).registerA
|
||||
result.mutableMethod.apply {
|
||||
val register = instruction<OneRegisterInstruction>(registerIndex).registerA
|
||||
addInstructions(
|
||||
result.scanResult.patternScanResult!!.endIndex,
|
||||
"""
|
||||
const/4 v$register, 0x1
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
result.mutableMethod.addInstructions(
|
||||
result.scanResult.patternScanResult!!.endIndex,
|
||||
"""
|
||||
const/4 v$register, 0x1
|
||||
"""
|
||||
)
|
||||
} ?: return ProUnlockFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ package app.revanced.patches.idaustria.detection.shared.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("at.gv.oe.app", arrayOf("2.5.2", "2.6.0"))])
|
||||
@Compatibility([Package("at.gv.oe.app")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class DetectionCompatibility
|
||||
@@ -55,8 +55,8 @@ class HideTimelineAdsPatch : BytecodePatch(
|
||||
val scanStart = scanResult.patternScanResult!!.startIndex
|
||||
val jumpIndex = scanStart - 1
|
||||
|
||||
val mediaInstanceRegister = (mutableMethod.instruction(scanStart) as FiveRegisterInstruction).registerC
|
||||
val freeRegister = (mutableMethod.instruction(jumpIndex) as OneRegisterInstruction).registerA
|
||||
val mediaInstanceRegister = mutableMethod.instruction<FiveRegisterInstruction>(scanStart).registerC
|
||||
val freeRegister = mutableMethod.instruction<OneRegisterInstruction>(jumpIndex).registerA
|
||||
|
||||
val returnFalseLabel = "an_ad"
|
||||
|
||||
|
||||
@@ -3,6 +3,15 @@ package app.revanced.patches.memegenerator.misc.pro.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.zombodroid.MemeGenerator", arrayOf("4.6364"))])
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.zombodroid.MemeGenerator", arrayOf(
|
||||
"4.6364",
|
||||
"4.6370",
|
||||
"4.6375",
|
||||
"4.6377",
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class UnlockProCompatibility
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package app.revanced.patches.messenger.inputfield.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf("L", "Z"),
|
||||
strings = listOf("afterTextChanged", "expression_search"),
|
||||
opcodes = listOf(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.GOTO,
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.GOTO
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,37 @@
|
||||
package app.revanced.patches.messenger.inputfield.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.*
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.messenger.inputfield.fingerprints.SwitchMessangeInputEmojiButtonFingerprint
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("disable-switching-emoji-to-sticker-in-message-input-field")
|
||||
@Description("Disables switching from emoji to sticker search mode in message input field")
|
||||
@Compatibility([Package("com.facebook.orca")])
|
||||
@Version("0.0.1")
|
||||
class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SwitchMessangeInputEmojiButtonFingerprint.result?.let {
|
||||
val setStringIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
||||
|
||||
it.mutableMethod.apply {
|
||||
val targetRegister = instruction<OneRegisterInstruction>(setStringIndex).registerA
|
||||
|
||||
replaceInstruction(
|
||||
setStringIndex,
|
||||
"const-string v$targetRegister, \"expression\""
|
||||
)
|
||||
}
|
||||
} ?: throw SwitchMessangeInputEmojiButtonFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package app.revanced.patches.photomath.misc.unlockplus.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.microblink.photomath", arrayOf(
|
||||
"8.6.0",
|
||||
"8.7.0",
|
||||
"8.8.0",
|
||||
"8.9.0",
|
||||
"8.10.0",
|
||||
"8.11.0",
|
||||
"8.12.0",
|
||||
"8.13.0",
|
||||
"8.14.0",
|
||||
"8.15.0",
|
||||
"8.16.0",
|
||||
"8.17.0",
|
||||
"8.18.0",
|
||||
"8.18.1",
|
||||
"8.19.0",
|
||||
"8.20.0",
|
||||
"8.21.0",
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class UnlockPlusCompatibilty
|
||||
@@ -1,8 +1,10 @@
|
||||
package app.revanced.patches.photomath.misc.unlockplus.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Package
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
@@ -12,14 +14,13 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.photomath.detection.signature.patch.SignatureDetectionPatch
|
||||
import app.revanced.patches.photomath.misc.unlockplus.annotations.UnlockPlusCompatibilty
|
||||
import app.revanced.patches.photomath.misc.unlockplus.fingerprints.IsPlusUnlockedFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("unlock-plus")
|
||||
@DependsOn([SignatureDetectionPatch::class])
|
||||
@Description("Unlocks plus features.")
|
||||
@UnlockPlusCompatibilty
|
||||
@Compatibility([Package("com.microblink.photomath")])
|
||||
@Version("0.0.1")
|
||||
class UnlockPlusPatch : BytecodePatch(
|
||||
listOf(
|
||||
@@ -40,4 +41,4 @@ class UnlockPlusPatch : BytecodePatch(
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.Method
|
||||
|
||||
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
||||
@@ -24,10 +25,21 @@ abstract class AbstractIntegrationsPatch(
|
||||
* @see MethodFingerprint
|
||||
*/
|
||||
abstract class IntegrationsFingerprint(
|
||||
returnType: String? = null,
|
||||
access: Int? = null,
|
||||
parameters: Iterable<String>? = null,
|
||||
opcodes: Iterable<Opcode?>? = null,
|
||||
strings: Iterable<String>? = null,
|
||||
customFingerprint: ((methodDef: Method) -> Boolean)? = null,
|
||||
private val contextRegisterResolver: (Method) -> Int = object : RegisterResolver {}
|
||||
) : MethodFingerprint(strings = strings, customFingerprint = customFingerprint) {
|
||||
) : MethodFingerprint(
|
||||
returnType,
|
||||
access,
|
||||
parameters,
|
||||
opcodes,
|
||||
strings,
|
||||
customFingerprint
|
||||
) {
|
||||
fun invoke(integrationsDescriptor: String): PatchResult {
|
||||
result?.mutableMethod?.let { method ->
|
||||
val contextRegister = contextRegisterResolver(method)
|
||||
|
||||
@@ -4,10 +4,21 @@ import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.google.android.youtube"),
|
||||
Package("com.vanced.android.youtube")
|
||||
]
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf(
|
||||
"17.49.37",
|
||||
"18.03.36",
|
||||
"18.03.42",
|
||||
"18.04.35",
|
||||
"18.04.41",
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ClientSpoofCompatibility
|
||||
|
||||
@@ -10,15 +10,18 @@ import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.misc.fix.spoof.annotations.ClientSpoofCompatibility
|
||||
import app.revanced.patches.shared.misc.fix.spoof.fingerprints.UserAgentHeaderBuilderFingerprint
|
||||
import app.revanced.patches.youtube.misc.fix.playback.patch.SpoofSignatureVerificationPatch
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("client-spoof")
|
||||
@Description("Spoofs a patched client to allow playback.")
|
||||
@ClientSpoofCompatibility
|
||||
@DependsOn([SpoofSignatureVerificationPatch::class])
|
||||
@Version("0.0.1")
|
||||
class ClientSpoofPatch : BytecodePatch(
|
||||
listOf(UserAgentHeaderBuilderFingerprint)
|
||||
@@ -27,7 +30,8 @@ class ClientSpoofPatch : BytecodePatch(
|
||||
UserAgentHeaderBuilderFingerprint.result?.let { result ->
|
||||
val insertIndex = result.scanResult.patternScanResult!!.endIndex
|
||||
result.mutableMethod.apply {
|
||||
val packageNameRegister = (instruction(insertIndex) as FiveRegisterInstruction).registerD
|
||||
val packageNameRegister = instruction<FiveRegisterInstruction>(insertIndex).registerD
|
||||
|
||||
addInstruction(insertIndex, "const-string v$packageNameRegister, \"$ORIGINAL_PACKAGE_NAME\"")
|
||||
}
|
||||
|
||||
|
||||
@@ -20,19 +20,18 @@ class VerticalScrollPatch : BytecodePatch(
|
||||
listOf(CanScrollVerticallyFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = CanScrollVerticallyFingerprint.result ?: return CanScrollVerticallyFingerprint.toErrorResult()
|
||||
CanScrollVerticallyFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val moveResultIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
val moveResultRegister = instruction<OneRegisterInstruction>(moveResultIndex).registerA
|
||||
|
||||
with(result) {
|
||||
val method = mutableMethod
|
||||
|
||||
val moveResultIndex = scanResult.patternScanResult!!.endIndex
|
||||
val moveResultRegister = (method.instruction(moveResultIndex) as OneRegisterInstruction).registerA
|
||||
|
||||
method.addInstruction(
|
||||
moveResultIndex + 1,
|
||||
"const/4 v$moveResultRegister, 0x0"
|
||||
)
|
||||
}
|
||||
val insertIndex = moveResultIndex + 1
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
"const/4 v$moveResultRegister, 0x0"
|
||||
)
|
||||
}
|
||||
} ?: return CanScrollVerticallyFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package app.revanced.patches.shared.settings.preference.impl
|
||||
|
||||
enum class InputType(val type: String) {
|
||||
STRING("text"),
|
||||
STRING("text"), // TODO: rename to "TEXT"
|
||||
TEXT_CAP_CHARACTERS("textCapCharacters"),
|
||||
TEXT_MULTI_LINE("textMultiLine"),
|
||||
NUMBER("number"),
|
||||
}
|
||||
@@ -23,7 +23,7 @@ internal class TextPreference(
|
||||
val default: String? = null,
|
||||
val summary: StringResource? = null
|
||||
) : BasePreference(key, title) {
|
||||
override val tag: String = "EditTextPreference"
|
||||
override val tag: String = "app.revanced.integrations.settingsmenu.ResettableEditTextPreference"
|
||||
|
||||
override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element {
|
||||
return super.serialize(ownerDocument, resourceCallback).apply {
|
||||
|
||||
@@ -8,18 +8,13 @@ import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.spotify.audio.annotation.DisableCaptureRestrictionCompatibility
|
||||
import app.revanced.patches.spotify.audio.fingerprints.DisableCaptureRestrictionAudioDriverFingerprint
|
||||
import app.revanced.patches.spotify.audio.resource.patch.DisableCaptureRestrictionResourcePatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch
|
||||
@Name("disable-capture-restriction")
|
||||
@@ -35,49 +30,16 @@ class DisableCaptureRestrictionBytecodePatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val method = DisableCaptureRestrictionAudioDriverFingerprint.result!!.mutableMethod
|
||||
|
||||
var invokePosition: Int? = null
|
||||
var invokeParamRegister: Int? = null
|
||||
|
||||
// Find INVOKE_VIRTUAL opcode with call to AudioAttributesBuilder.setAllowedCapturePolicy(I)
|
||||
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
|
||||
if(instruction.opcode != Opcode.INVOKE_VIRTUAL)
|
||||
continue
|
||||
|
||||
val methodName = ((instruction as ReferenceInstruction).reference as MethodReference).name
|
||||
if (methodName != "setAllowedCapturePolicy")
|
||||
continue
|
||||
|
||||
// Store register of the integer parameter for setAllowedCapturePolicy
|
||||
invokeParamRegister = (instruction as FiveRegisterInstruction).registerD
|
||||
invokePosition = index
|
||||
}
|
||||
|
||||
if(invokePosition == null || invokeParamRegister == null)
|
||||
return PatchResultError("Cannot find setAllowedCapturePolicy method call")
|
||||
|
||||
// Walk back to the const/4 instruction that sets the parameter register
|
||||
var matchFound = false
|
||||
for (index in invokePosition downTo 0) {
|
||||
val instruction = method.instruction(index)
|
||||
if(instruction.opcode != Opcode.CONST_4)
|
||||
continue
|
||||
|
||||
val register = (instruction as OneRegisterInstruction).registerA
|
||||
if(register != invokeParamRegister)
|
||||
continue
|
||||
|
||||
// Replace parameter value
|
||||
method.replaceInstruction(
|
||||
index, "const/4 v$register, $ALLOW_CAPTURE_BY_ALL"
|
||||
method.apply {
|
||||
// Replace constant
|
||||
val original = instruction(0) as OneRegisterInstruction
|
||||
replaceInstruction(
|
||||
0,
|
||||
"const/4 v${original.registerA}, $ALLOW_CAPTURE_BY_ALL"
|
||||
)
|
||||
matchFound = true
|
||||
break
|
||||
}
|
||||
|
||||
return if (matchFound)
|
||||
PatchResultSuccess()
|
||||
else
|
||||
PatchResultError("Const instruction not found")
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
||||
@@ -1,10 +1,27 @@
|
||||
package app.revanced.patches.spotify.audio.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.reference.MethodReference
|
||||
|
||||
object DisableCaptureRestrictionAudioDriverFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.SYNTHETIC or AccessFlags.BRIDGE,
|
||||
listOf("L"),
|
||||
listOf(
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.RETURN_OBJECT
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass == "Lcom/spotify/playback/playbacknative/AudioDriver;" && methodDef.name == "constructAudioAttributes"
|
||||
// Check for method call to AudioAttributes$Builder.setAllowedCapturePolicy Android API
|
||||
methodDef.implementation?.instructions?.any {
|
||||
((it as? ReferenceInstruction)?.reference as? MethodReference)?.name == "setAllowedCapturePolicy"
|
||||
} == true
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.syncforreddit.ads.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.laurencedawson.reddit_sync")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class DisableAdsCompatibility
|
||||
@@ -0,0 +1,11 @@
|
||||
package app.revanced.patches.syncforreddit.ads.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object IsAdsEnabledFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
strings = listOf("SyncIapHelper")
|
||||
)
|
||||
@@ -0,0 +1,39 @@
|
||||
package app.revanced.patches.syncforreddit.ads.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.syncforreddit.ads.annotations.DisableAdsCompatibility
|
||||
import app.revanced.patches.syncforreddit.ads.fingerprints.IsAdsEnabledFingerprint
|
||||
import app.revanced.patches.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
||||
|
||||
@Patch
|
||||
@Name("disable-ads")
|
||||
@DependsOn([DisablePiracyDetectionPatch::class])
|
||||
@Description("Disables ads.")
|
||||
@Version("0.0.1")
|
||||
@DisableAdsCompatibility
|
||||
class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
IsAdsEnabledFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x0
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
} ?: return IsAdsEnabledFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package app.revanced.patches.syncforreddit.detection.piracy.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.reference.TypeReference
|
||||
|
||||
object PiracyDetectionFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
access = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||
opcodes = listOf(
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL
|
||||
),
|
||||
customFingerprint = { method ->
|
||||
method.implementation?.instructions?.any {
|
||||
if (it.opcode != Opcode.NEW_INSTANCE) return@any false
|
||||
|
||||
val reference = (it as ReferenceInstruction).reference
|
||||
|
||||
reference.toString() == "Lcom/github/javiersantos/piracychecker/PiracyChecker;"
|
||||
} ?: false
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
package app.revanced.patches.syncforreddit.detection.piracy.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.syncforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint
|
||||
|
||||
@Description("Disables detection of modified versions.")
|
||||
@Version("0.0.1")
|
||||
class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
PiracyDetectionFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructions(
|
||||
0,
|
||||
"""
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
} ?: return PiracyDetectionFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class UnlockProPatch : BytecodePatch(
|
||||
)
|
||||
|
||||
val setThemeMethod = SetThemeFingerprint.result!!.mutableMethod
|
||||
setThemeMethod.removeInstructions(0, 9)
|
||||
setThemeMethod.removeInstructions(0, 10)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import org.jf.dexlib2.iface.reference.StringReference
|
||||
import org.jf.dexlib2.iface.reference.TypeReference
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@@ -96,7 +95,7 @@ class SettingsPatch : BytecodePatch(
|
||||
private fun patchOptionNameAndOnClickEvent(index: Int, context: BytecodeContext) {
|
||||
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
|
||||
// Patch option name
|
||||
val overrideRegister = (instruction(index - 4) as OneRegisterInstruction).registerA
|
||||
val overrideRegister = instruction<OneRegisterInstruction>(index - 4).registerA
|
||||
replaceInstruction(
|
||||
index - 4,
|
||||
"""
|
||||
@@ -105,16 +104,14 @@ class SettingsPatch : BytecodePatch(
|
||||
)
|
||||
|
||||
// Patch option OnClick Event
|
||||
with(((instruction(index) as ReferenceInstruction).reference as TypeReference).type) {
|
||||
context.findClass(this)!!.mutableClass.methods.first { it.name == "onClick" }
|
||||
.addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->startSettingsActivity()V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}
|
||||
val type = instruction<ReferenceInstruction>(index).reference.toString()
|
||||
context.findClass(type)!!.mutableClass.methods.first { type == "onClick" }.addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsMenu;->startSettingsActivity()V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,14 +97,14 @@ class SpoofSimPatch : BytecodePatch() {
|
||||
|
||||
// Patch Android API and return fake sim information
|
||||
private fun MutableMethod.replaceReference(index: Int, replacement: String) {
|
||||
val resultReg = (instruction(index + 1) as OneRegisterInstruction).registerA
|
||||
val resultReg = instruction<OneRegisterInstruction>(index + 1).registerA
|
||||
|
||||
addInstructions(
|
||||
index + 2,
|
||||
"""
|
||||
invoke-static {v$resultReg}, Lapp/revanced/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$resultReg
|
||||
"""
|
||||
"""
|
||||
invoke-static {v$resultReg}, Lapp/revanced/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$resultReg
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class UnlockPaidWidgetsPatch : BytecodePatch(
|
||||
fingerprint.result?.mutableMethod ?: return fingerprint.toErrorResult()
|
||||
}.forEach { method ->
|
||||
method.apply {
|
||||
removeInstructions(4, 2)
|
||||
removeInstructions(4, 3)
|
||||
addInstructions(
|
||||
implementation?.instructions?.size!!, """
|
||||
const/4 v1, 0x0
|
||||
|
||||
@@ -24,7 +24,7 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
|
||||
@Patch
|
||||
@DependsOn([VideoAdsPatch::class, IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("block-embedded-ads")
|
||||
@Description("Blocks embedded steam ads using services like TTV.lol or PurpleAdBlocker.")
|
||||
@Description("Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker.")
|
||||
@EmbeddedAdsCompatibility
|
||||
@Version("0.0.1")
|
||||
class EmbeddedAdsPatch : BytecodePatch(
|
||||
|
||||
@@ -4,8 +4,12 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.*
|
||||
import app.revanced.patcher.patch.*
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
@@ -13,7 +17,9 @@ import app.revanced.patches.shared.settings.preference.impl.ArrayResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.ListPreference
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.twitch.chat.antidelete.annotations.ShowDeletedMessagesCompatibility
|
||||
import app.revanced.patches.twitch.chat.antidelete.fingerprints.*
|
||||
import app.revanced.patches.twitch.chat.antidelete.fingerprints.ChatUtilCreateDeletedSpanFingerprint
|
||||
import app.revanced.patches.twitch.chat.antidelete.fingerprints.DeletedMessageClickableSpanCtorFingerprint
|
||||
import app.revanced.patches.twitch.chat.antidelete.fingerprints.SetHasModAccessFingerprint
|
||||
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.*
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
@@ -19,7 +21,10 @@ import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
|
||||
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.twitch.misc.settings.annotations.SettingsCompatibility
|
||||
import app.revanced.patches.twitch.misc.settings.components.CustomPreferenceCategory
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.*
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsOnClickFingerprint
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsUpdatedFingerprint
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsActivityOnCreateFingerprint
|
||||
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsMenuItemEnumFingerprint
|
||||
import app.revanced.patches.twitch.misc.settings.resource.patch.SettingsResourcePatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.immutable.ImmutableField
|
||||
|
||||
@@ -61,7 +61,7 @@ class HideViewsBytecodePatch : BytecodePatch(
|
||||
TweetStatsContainerConstructorFingerprint,
|
||||
returnFingerprint
|
||||
) { patternScanResult, method ->
|
||||
method.removeInstructions(patternScanResult.endIndex - 3, 2)
|
||||
method.removeInstructions(patternScanResult.endIndex - 3, 3)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,13 +80,13 @@ class HideViewsBytecodePatch : BytecodePatch(
|
||||
TweetStatsContainerWrapperConstructorFingerprint,
|
||||
wrapperReturnFingerprint
|
||||
) { patternScanResult, method ->
|
||||
method.removeInstructions(patternScanResult.startIndex - 4, 3)
|
||||
method.removeInstructions(patternScanResult.startIndex - 4, 4)
|
||||
}
|
||||
}
|
||||
|
||||
private fun removeViewDelegateBinderSubscription() {
|
||||
transformMethod(TweetStatsViewDelegateBinderFingerprint) { result, method ->
|
||||
method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 9)
|
||||
method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 10)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.revanced.patches.youtube.ad.general.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -9,16 +10,15 @@ import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.misc.fix.verticalscroll.patch.VerticalScrollPatch
|
||||
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
|
||||
import app.revanced.patches.youtube.ad.general.bytecode.fingerprints.ReelConstructorFingerprint
|
||||
import app.revanced.patches.youtube.ad.general.resource.patch.GeneralAdsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.fix.backtoexitgesture.patch.FixBackToExitGesturePatch
|
||||
import app.revanced.patches.shared.misc.fix.verticalscroll.patch.VerticalScrollPatch
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
@@ -71,20 +71,16 @@ class GeneralAdsPatch : BytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
with(
|
||||
ReelConstructorFingerprint.result
|
||||
?: return PatchResultError("Could not resolve fingerprint")
|
||||
) {
|
||||
ReelConstructorFingerprint.result?.let {
|
||||
// iput-object v$viewRegister, ...
|
||||
val insertIndex = this.scanResult.patternScanResult!!.startIndex + 2
|
||||
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
||||
|
||||
with(this.mutableMethod) {
|
||||
val viewRegister = (instruction(insertIndex) as TwoRegisterInstruction).registerA
|
||||
it.mutableMethod.apply {
|
||||
val viewRegister = instruction<TwoRegisterInstruction>(insertIndex).registerA
|
||||
|
||||
injectHideCall(insertIndex, viewRegister, "hideReelView")
|
||||
}
|
||||
|
||||
}
|
||||
} ?: return ReelConstructorFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -212,6 +212,13 @@ class GeneralAdsResourcePatch : ResourcePatch {
|
||||
true,
|
||||
StringResource("revanced_hide_image_shelf_summary_on", "Image shelf is hidden"),
|
||||
StringResource("revanced_hide_image_shelf_summary_off", "Image shelf is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_audio_track_button",
|
||||
StringResource("revanced_hide_audio_track_button_title", "Hide audio track button"),
|
||||
false,
|
||||
StringResource("revanced_hide_audio_track_button_on", "Audio track button is hidden"),
|
||||
StringResource("revanced_hide_audio_track_button_off", "Audio track button is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -51,12 +51,21 @@ class HideButtonsPatch : ResourcePatch {
|
||||
StringResource("revanced_hide_playlist_button_summary_on", "Playlist button is hidden"),
|
||||
StringResource("revanced_hide_playlist_button_summary_off", "Playlist button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_clip_button",
|
||||
StringResource("revanced_hide_clip_button_title", "Hide clip button"),
|
||||
false,
|
||||
StringResource("revanced_hide_clip_button_summary_on", "Clip button is hidden"),
|
||||
StringResource("revanced_hide_clip_button_summary_off", "Clip button is shown"),
|
||||
StringResource("revanced_hide_clip_button_user_dialog_message",
|
||||
"Hiding the clip button might not work reliably. In the case it does not work, it can only be hidden by enabling \\'Hide all other action buttons\\'")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_action_buttons",
|
||||
StringResource("revanced_hide_action_buttons_title", "Hide all other action buttons"),
|
||||
false,
|
||||
StringResource("revanced_hide_action_buttons_summary_on", "Share, remix, clip, thanks, shop, live chat buttons are hidden"),
|
||||
StringResource("revanced_hide_action_buttons_summary_off", "Share, remix, clip, thanks, shop, live chat buttons are shown")
|
||||
StringResource("revanced_hide_action_buttons_summary_on", "Share, remix, thanks, shop, live chat buttons are hidden"),
|
||||
StringResource("revanced_hide_action_buttons_summary_off", "Share, remix, thanks, shop, live chat buttons are shown")
|
||||
)
|
||||
),
|
||||
StringResource("revanced_hide_buttons_summary", "Hide or show buttons under videos")
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@ class HideAutoplayButtonPatch : BytecodePatch(
|
||||
val jumpInstruction = layoutGenMethodInstructions[insertIndex + branchIndex] as Instruction
|
||||
|
||||
// can be clobbered because this register is overwritten after the injected code
|
||||
val clobberRegister = (instruction(insertIndex) as OneRegisterInstruction).registerA
|
||||
val clobberRegister = instruction<OneRegisterInstruction>(insertIndex).registerA
|
||||
|
||||
addInstructions(
|
||||
insertIndex,
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.misc.fix.playback.annotation
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
@@ -14,9 +14,11 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ProtobufSpoofCompatibility
|
||||
internal annotation class NavigationButtonsCompatibility
|
||||
@@ -0,0 +1,12 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
internal const val ANDROID_AUTOMOTIVE_STRING = "Android Automotive"
|
||||
|
||||
object AddCreateButtonViewFingerprint : MethodFingerprint(
|
||||
strings = listOf(
|
||||
"Android Wear",
|
||||
ANDROID_AUTOMOTIVE_STRING,
|
||||
)
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.patch.ResolvePivotBarFingerprintsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object PivotBarShortsButtonViewFingerprint : MethodFingerprint(
|
||||
object PivotBarButtonsViewFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_VIRTUAL_RANGE,
|
||||
Opcode.MOVE_RESULT_OBJECT, // target reference
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.create.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
@@ -0,0 +1,196 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.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.layout.buttons.navigation.annotations.NavigationButtonsCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.*
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn(
|
||||
[
|
||||
IntegrationsPatch::class,
|
||||
SettingsPatch::class,
|
||||
ResolvePivotBarFingerprintsPatch::class,
|
||||
]
|
||||
)
|
||||
@Name("navigation-buttons")
|
||||
@Description("Adds options to hide or change navigation buttons.")
|
||||
@NavigationButtonsCompatibility
|
||||
@Version("0.0.1")
|
||||
class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_navigation_buttons",
|
||||
StringResource("revanced_navigation_buttons", "Navigation button settings"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_hide_home_button",
|
||||
StringResource("revanced_hide_home_button_title", "Hide home button"),
|
||||
false,
|
||||
StringResource("revanced_hide_home_button_summary_on", "Home button is hidden"),
|
||||
StringResource("revanced_hide_home_button_summary_off", "Home button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_shorts_button",
|
||||
StringResource("revanced_hide_shorts_button_title", "Hide shorts button"),
|
||||
true,
|
||||
StringResource("revanced_hide_shorts_button_summary_on", "Shorts button is hidden"),
|
||||
StringResource("revanced_hide_shorts_button_summary_off", "Shorts button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_subscriptions_button",
|
||||
StringResource("revanced_hide_subscriptions_button_title", "Hide subscriptions button"),
|
||||
false,
|
||||
StringResource(
|
||||
"revanced_hide_subscriptions_button_summary_on",
|
||||
"Home subscriptions is hidden"
|
||||
),
|
||||
StringResource("revanced_hide_subscriptions_button_summary_off", "Home subscriptions is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_create_button",
|
||||
StringResource("revanced_hide_create_button_title", "Hide create button"),
|
||||
true,
|
||||
StringResource("revanced_hide_create_button_summary_on", "Create button is hidden"),
|
||||
StringResource("revanced_hide_create_button_summary_off", "Create button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_switch_create_with_notifications_button",
|
||||
StringResource(
|
||||
"revanced_switch_create_with_notifications_button_title",
|
||||
"Switch create with notifications button"
|
||||
),
|
||||
true,
|
||||
StringResource(
|
||||
"revanced_switch_create_with_notifications_button_summary_on",
|
||||
"Create button is switched with notifications"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_switch_create_with_notifications_button_summary_off",
|
||||
"Create button is not switched with notifications"
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
/*
|
||||
* Resolve fingerprints
|
||||
*/
|
||||
|
||||
val initializeButtonsResult = InitializeButtonsFingerprint.result!!
|
||||
|
||||
val fingerprintResults =
|
||||
arrayOf(PivotBarEnumFingerprint, PivotBarButtonsViewFingerprint)
|
||||
.onEach {
|
||||
if (!it.resolve(
|
||||
context,
|
||||
initializeButtonsResult.mutableMethod,
|
||||
initializeButtonsResult.mutableClass
|
||||
)
|
||||
)
|
||||
return it.toErrorResult()
|
||||
}
|
||||
.map { it.result!!.scanResult.patternScanResult!! }
|
||||
|
||||
|
||||
val enumScanResult = fingerprintResults[0]
|
||||
val buttonViewResult = fingerprintResults[1]
|
||||
|
||||
val enumHookInsertIndex = enumScanResult.startIndex + 2
|
||||
val buttonHookInsertIndex = buttonViewResult.endIndex
|
||||
|
||||
/*
|
||||
* Inject hooks
|
||||
*/
|
||||
|
||||
val enumHook = "sput-object v$REGISTER_TEMPLATE_REPLACEMENT, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->lastNavigationButton:Ljava/lang/Enum;"
|
||||
val buttonHook = "invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideButton(Landroid/view/View;)V"
|
||||
|
||||
// Inject bottom to top to not mess up the indices
|
||||
mapOf(
|
||||
buttonHook to buttonHookInsertIndex,
|
||||
enumHook to enumHookInsertIndex
|
||||
).forEach { (hook, insertIndex) ->
|
||||
initializeButtonsResult.mutableMethod.injectHook(hook, insertIndex)
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide create or switch it with notifications buttons.
|
||||
*/
|
||||
|
||||
AddCreateButtonViewFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val stringIndex = it.scanResult.stringsScanResult!!.matches.find {
|
||||
match -> match.string == ANDROID_AUTOMOTIVE_STRING
|
||||
}!!.index
|
||||
|
||||
val conditionalCheckIndex = stringIndex - 1
|
||||
val conditionRegister = instruction<OneRegisterInstruction>(conditionalCheckIndex).registerA
|
||||
|
||||
addInstructions(
|
||||
conditionalCheckIndex,
|
||||
"""
|
||||
invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->switchCreateWithNotificationButton()Z
|
||||
move-result v$conditionRegister
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return AddCreateButtonViewFingerprint.toErrorResult()
|
||||
|
||||
/*
|
||||
* Resolve fingerprints
|
||||
*/
|
||||
|
||||
InitializeButtonsFingerprint.result!!.let {
|
||||
if (!PivotBarCreateButtonViewFingerprint.resolve(context, it.mutableMethod, it.mutableClass))
|
||||
return PivotBarCreateButtonViewFingerprint.toErrorResult()
|
||||
}
|
||||
|
||||
PivotBarCreateButtonViewFingerprint.result!!.apply {
|
||||
val insertIndex = mutableMethod.implementation!!.instructions.let {
|
||||
val scanStart = scanResult.patternScanResult!!.endIndex
|
||||
|
||||
scanStart + it.subList(scanStart, it.size - 1).indexOfFirst { instruction ->
|
||||
instruction.opcode == Opcode.INVOKE_STATIC
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Inject hooks
|
||||
*/
|
||||
val hook = "invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideCreateButton(Landroid/view/View;)V"
|
||||
|
||||
mutableMethod.injectHook(hook, insertIndex)
|
||||
}
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/NavigationButtonsPatch;"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
@@ -11,21 +11,15 @@ import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.PivotBarConstructorFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.PivotBarConstructorFingerprint
|
||||
|
||||
@DependsOn([ResourceMappingPatch::class])
|
||||
@PivotBarCompatibility
|
||||
@Description("Resolves necessary fingerprints.")
|
||||
@Version("0.0.1")
|
||||
class ResolvePivotBarFingerprintsPatch : BytecodePatch(
|
||||
listOf(PivotBarConstructorFingerprint)
|
||||
) {
|
||||
internal companion object {
|
||||
var imageOnlyTabResourceId: Long = -1
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// imageOnlyTabResourceId is used in InitializeButtonsFingerprint fingerprint
|
||||
ResourceMappingPatch.resourceMappings.find { it.type == "layout" && it.name == "image_only_tab" }
|
||||
@@ -42,4 +36,8 @@ class ResolvePivotBarFingerprintsPatch : BytecodePatch(
|
||||
} ?: return PivotBarConstructorFingerprint.toErrorResult()
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
var imageOnlyTabResourceId: Long = -1
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.utils
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.utils
|
||||
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
@@ -20,7 +20,7 @@ internal object InjectionUtils {
|
||||
|
||||
// Register to pass to the hook
|
||||
val registerIndex = insertIndex - 1 // MOVE_RESULT_OBJECT is always the previous instruction
|
||||
val register = (injectTarget.instruction(registerIndex) as OneRegisterInstruction).registerA
|
||||
val register = injectTarget.instruction<OneRegisterInstruction>(registerIndex).registerA
|
||||
|
||||
injectTarget.addInstruction(
|
||||
insertIndex,
|
||||
@@ -1,79 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.create.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.create.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, ResourceMappingPatch::class, SettingsPatch::class, ResolvePivotBarFingerprintsPatch::class])
|
||||
@Name("hide-create-button")
|
||||
@Description("Hides the create button in the navigation bar.")
|
||||
@PivotBarCompatibility
|
||||
@Version("0.0.1")
|
||||
class CreateButtonRemoverPatch : BytecodePatch() {
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/HideCreateButtonPatch;"
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_create_button",
|
||||
StringResource("revanced_hide_create_button_title", "Hide create button"),
|
||||
true,
|
||||
StringResource("revanced_hide_create_button_summary_on", "Create button is hidden"),
|
||||
StringResource("revanced_hide_create_button_summary_off", "Create button is shown")
|
||||
)
|
||||
)
|
||||
|
||||
/*
|
||||
* Resolve fingerprints
|
||||
*/
|
||||
|
||||
InitializeButtonsFingerprint.result!!.let {
|
||||
if (!PivotBarCreateButtonViewFingerprint.resolve(context, it.mutableMethod, it.mutableClass))
|
||||
return PivotBarCreateButtonViewFingerprint.toErrorResult()
|
||||
}
|
||||
|
||||
PivotBarCreateButtonViewFingerprint.result!!.apply {
|
||||
val insertIndex = mutableMethod.implementation!!.instructions.let {
|
||||
val scanStart = scanResult.patternScanResult!!.endIndex
|
||||
|
||||
scanStart + it.subList(scanStart, it.size - 1).indexOfFirst { instruction ->
|
||||
instruction.opcode == Opcode.INVOKE_STATIC
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Inject hooks
|
||||
*/
|
||||
val hook = "invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideCreateButton(Landroid/view/View;)V"
|
||||
|
||||
mutableMethod.injectHook(hook, insertIndex)
|
||||
}
|
||||
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.youtube", arrayOf(
|
||||
"17.49.37",
|
||||
"18.03.36",
|
||||
"18.03.42",
|
||||
"18.04.35",
|
||||
"18.04.41",
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class PivotBarCompatibility
|
||||
@@ -1,93 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.annotations.PivotBarCompatibility
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.fingerprints.InitializeButtonsFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shared.patch.ResolvePivotBarFingerprintsPatch
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints.PivotBarEnumFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.shorts.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.patches.youtube.layout.buttons.pivotbar.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class, ResolvePivotBarFingerprintsPatch::class])
|
||||
@Name("hide-shorts-button")
|
||||
@Description("Hides the shorts button on the navigation bar.")
|
||||
@PivotBarCompatibility
|
||||
@Version("0.0.1")
|
||||
class ShortsButtonRemoverPatch : BytecodePatch() {
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/HideShortsButtonPatch;"
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_shorts_button",
|
||||
StringResource("revanced_hide_shorts_button_title", "Hide shorts button"),
|
||||
true,
|
||||
StringResource("revanced_hide_shorts_button_summary_on", "Shorts button is hidden"),
|
||||
StringResource("revanced_hide_shorts_button_summary_off", "Shorts button is shown")
|
||||
)
|
||||
)
|
||||
|
||||
/*
|
||||
* Resolve fingerprints
|
||||
*/
|
||||
|
||||
val initializeButtonsResult = InitializeButtonsFingerprint.result!!
|
||||
|
||||
val fingerprintResults =
|
||||
arrayOf(PivotBarEnumFingerprint, PivotBarShortsButtonViewFingerprint)
|
||||
.onEach {
|
||||
if (!it.resolve(
|
||||
context,
|
||||
initializeButtonsResult.mutableMethod,
|
||||
initializeButtonsResult.mutableClass
|
||||
)
|
||||
)
|
||||
return it.toErrorResult()
|
||||
}
|
||||
.map { it.result!!.scanResult.patternScanResult!! }
|
||||
|
||||
|
||||
val enumScanResult = fingerprintResults[0]
|
||||
val buttonViewResult = fingerprintResults[1]
|
||||
|
||||
val enumHookInsertIndex = enumScanResult.startIndex + 2
|
||||
val buttonHookInsertIndex = buttonViewResult.endIndex
|
||||
|
||||
/*
|
||||
* Inject hooks
|
||||
*/
|
||||
|
||||
val enumHook = "sput-object v$REGISTER_TEMPLATE_REPLACEMENT, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->lastPivotTab:Ljava/lang/Enum;"
|
||||
val buttonHook = "invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideShortsButton(Landroid/view/View;)V"
|
||||
|
||||
// Inject bottom to top to not mess up the indices
|
||||
mapOf(
|
||||
buttonHook to buttonHookInsertIndex,
|
||||
enumHook to enumHookInsertIndex
|
||||
).forEach { (hook, insertIndex) ->
|
||||
initializeButtonsResult.mutableMethod.injectHook(hook, insertIndex)
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -12,16 +12,12 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.buttons.player.background.annotations.PlayerButtonBackgroundCompatibility
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
@Patch(false)
|
||||
@Name("remove-player-button-background")
|
||||
@Description("Removes the background from the video player buttons.")
|
||||
@PlayerButtonBackgroundCompatibility
|
||||
@Version("0.0.1")
|
||||
class PlayerButtonBackgroundPatch : ResourcePatch {
|
||||
private companion object {
|
||||
const val RESOURCE_FILE_PATH = "res/drawable/player_button_circle_background.xml"
|
||||
}
|
||||
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
context.xmlEditor[RESOURCE_FILE_PATH].use { editor ->
|
||||
editor.file.doRecursively node@{ node ->
|
||||
@@ -35,4 +31,8 @@ class PlayerButtonBackgroundPatch : ResourcePatch {
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val RESOURCE_FILE_PATH = "res/drawable/player_button_circle_background.xml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class HidePlayerButtonsPatch : BytecodePatch(
|
||||
|
||||
PlayerControlsVisibilityModelFingerprint.result?.apply {
|
||||
val callIndex = scanResult.patternScanResult!!.endIndex
|
||||
val callInstruction = mutableMethod.instruction(callIndex) as Instruction3rc
|
||||
val callInstruction = mutableMethod.instruction<Instruction3rc>(callIndex)
|
||||
|
||||
// overriding this parameter register hides the previous and next buttons
|
||||
val hasNextParameterRegister = callInstruction.startRegister + ParameterOffsets.HAS_NEXT
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -29,16 +30,22 @@ class AlbumCardsPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val albumCardsResult = AlbumCardsFingerprint.result!!
|
||||
val albumCardsMethod = albumCardsResult.mutableMethod
|
||||
AlbumCardsFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val checkCastAnchorIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
val insertIndex = checkCastAnchorIndex + 1
|
||||
|
||||
val checkCastAnchorIndex = albumCardsResult.scanResult.patternScanResult!!.endIndex
|
||||
val albumCardViewRegister = instruction<OneRegisterInstruction>(checkCastAnchorIndex).registerA
|
||||
|
||||
albumCardsMethod.addInstruction(
|
||||
checkCastAnchorIndex + 1, """
|
||||
invoke-static {v${(albumCardsMethod.instruction(checkCastAnchorIndex) as OneRegisterInstruction).registerA}}, Lapp/revanced/integrations/patches/HideAlbumCardsPatch;->hideAlbumCards(Landroid/view/View;)V
|
||||
"""
|
||||
)
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
"invoke-static {v$albumCardViewRegister}, " +
|
||||
"Lapp/revanced/integrations/patches/HideAlbumCardsPatch;" +
|
||||
"->" +
|
||||
"hideAlbumCards(Landroid/view/View;)V"
|
||||
)
|
||||
}
|
||||
} ?: return AlbumCardsFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -24,22 +25,29 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@BreakingNewsCompatibility
|
||||
@Version("0.0.1")
|
||||
class BreakingNewsPatch : BytecodePatch(
|
||||
listOf(
|
||||
BreakingNewsFingerprint,
|
||||
)
|
||||
listOf(BreakingNewsFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val breakingNewsResult = BreakingNewsFingerprint.result!!
|
||||
val breakingNewsMethod = breakingNewsResult.mutableMethod
|
||||
BreakingNewsFingerprint.result?.let {
|
||||
val insertIndex = it.scanResult.patternScanResult!!.endIndex - 1
|
||||
val moveResultIndex = insertIndex - 1
|
||||
|
||||
val moveResultObjectIndex =
|
||||
breakingNewsResult.scanResult.patternScanResult!!.endIndex - 2
|
||||
it.mutableMethod.apply {
|
||||
val breakingNewsViewRegister = instruction<OneRegisterInstruction>(moveResultIndex).registerA
|
||||
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static {v$breakingNewsViewRegister},
|
||||
Lapp/revanced/integrations/patches/HideBreakingNewsPatch;
|
||||
->
|
||||
hideBreakingNews(Landroid/view/View;)V
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
} ?: return BreakingNewsFingerprint.toErrorResult()
|
||||
|
||||
breakingNewsMethod.addInstruction(
|
||||
moveResultObjectIndex + 1, """
|
||||
invoke-static {v${(breakingNewsMethod.instruction(moveResultObjectIndex) as OneRegisterInstruction).registerA}}, Lapp/revanced/integrations/patches/HideBreakingNewsPatch;->hideBreakingNews(Landroid/view/View;)V
|
||||
"""
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.hide.comments.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -32,9 +33,6 @@ class CommentsPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val shortsCommentsButtonResult = ShortsCommentsButtonFingerprint.result!!
|
||||
val shortsCommentsButtonMethod = shortsCommentsButtonResult.mutableMethod
|
||||
|
||||
val checkCastAnchorFingerprint = object : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.CONST,
|
||||
@@ -47,15 +45,24 @@ class CommentsPatch : BytecodePatch(
|
||||
)
|
||||
) {}
|
||||
|
||||
val checkCastAnchorIndex = checkCastAnchorFingerprint.also {
|
||||
it.resolve(context, shortsCommentsButtonMethod, shortsCommentsButtonResult.classDef)
|
||||
}.result!!.scanResult.patternScanResult!!.endIndex
|
||||
ShortsCommentsButtonFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val checkCastAnchorIndex = checkCastAnchorFingerprint.also { result ->
|
||||
if (!result.resolve(context, this, it.classDef))
|
||||
throw checkCastAnchorFingerprint.toErrorResult()
|
||||
}.result!!.scanResult.patternScanResult!!.endIndex
|
||||
|
||||
shortsCommentsButtonMethod.addInstructions(
|
||||
checkCastAnchorIndex + 1, """
|
||||
invoke-static {v${(shortsCommentsButtonMethod.instruction(checkCastAnchorIndex) as OneRegisterInstruction).registerA}}, Lapp/revanced/integrations/patches/HideShortsCommentsButtonPatch;->hideShortsCommentsButton(Landroid/view/View;)V
|
||||
"""
|
||||
)
|
||||
val shortsCommentsButtonRegister = instruction<OneRegisterInstruction>(checkCastAnchorIndex).registerA
|
||||
val insertIndex = checkCastAnchorIndex + 1
|
||||
|
||||
addInstructions(
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static { v$shortsCommentsButtonRegister }, Lapp/revanced/integrations/patches/HideShortsCommentsButtonPatch;->hideShortsCommentsButton(Landroid/view/View;)V
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return ShortsCommentsButtonFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ class CrowdfundingBoxPatch : BytecodePatch(
|
||||
CrowdfundingBoxFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val insertIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
val objectRegister = (instruction(insertIndex) as TwoRegisterInstruction).registerA
|
||||
val objectRegister = instruction<TwoRegisterInstruction>(insertIndex).registerA
|
||||
|
||||
addInstruction(insertIndex, "invoke-static {v$objectRegister}, $INTEGRATIONS_METHOD_DESCRIPTOR")
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -35,19 +36,23 @@ class HideEndscreenCardsPatch : BytecodePatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
fun MethodFingerprint.injectHideCall() {
|
||||
val layoutResult = result!!
|
||||
val layoutMethod = layoutResult.mutableMethod
|
||||
val layoutResult = result ?: throw toErrorResult()
|
||||
layoutResult.mutableMethod.apply {
|
||||
val insertIndex = layoutResult.scanResult.patternScanResult!!.endIndex + 1
|
||||
val viewRegister = instruction<Instruction21c>(insertIndex - 1).registerA
|
||||
|
||||
val checkCastIndex = layoutResult.scanResult.patternScanResult!!.endIndex
|
||||
val viewRegister = (layoutMethod.instruction(checkCastIndex) as Instruction21c).registerA
|
||||
|
||||
layoutMethod.addInstruction(
|
||||
checkCastIndex + 1,
|
||||
"invoke-static { v$viewRegister }, Lapp/revanced/integrations/patches/HideEndscreenCardsPatch;->hideEndscreen(Landroid/view/View;)V"
|
||||
)
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
"invoke-static { v$viewRegister }, Lapp/revanced/integrations/patches/HideEndscreenCardsPatch;->hideEndscreen(Landroid/view/View;)V"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(LayoutCircleFingerprint, LayoutIconFingerprint, LayoutVideoFingerprint).forEach(MethodFingerprint::injectHideCall)
|
||||
|
||||
listOf(
|
||||
LayoutCircleFingerprint,
|
||||
LayoutIconFingerprint,
|
||||
LayoutVideoFingerprint
|
||||
).forEach(MethodFingerprint::injectHideCall)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class HideFilterBar
|
||||
@@ -0,0 +1,14 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
|
||||
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch.Companion.filterBarHeightId
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object FilterBarHeightFingerprint : LiteralOpcodesFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IPUT
|
||||
),
|
||||
filterBarHeightId
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
|
||||
abstract class LiteralOpcodesFingerprint(opcodes: List<Opcode>, literal: Long) : MethodFingerprint(
|
||||
opcodes = opcodes,
|
||||
customFingerprint = {
|
||||
it.implementation?.instructions?.any { instruction ->
|
||||
if (instruction.opcode != Opcode.CONST) return@any false
|
||||
|
||||
val wideLiteral = (instruction as WideLiteralInstruction).wideLiteral
|
||||
|
||||
literal == wideLiteral
|
||||
} ?: false
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
|
||||
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch.Companion.relatedChipCloudMarginId
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object RelatedChipCloudFingerprint : LiteralOpcodesFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
),
|
||||
relatedChipCloudMarginId
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
|
||||
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch.Companion.barContainerHeightId
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object SearchResultsChipBarFingerprint : LiteralOpcodesFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
),
|
||||
barContainerHeightId
|
||||
)
|
||||
@@ -0,0 +1,87 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.annotations.HideFilterBar
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.FilterBarHeightFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.RelatedChipCloudFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.SearchResultsChipBarFingerprint
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("hide-filter-bar")
|
||||
@Description("Hides the filter bar in video feeds.")
|
||||
@DependsOn([HideFilterBarResourcePatch::class])
|
||||
@HideFilterBar
|
||||
@Version("0.0.1")
|
||||
class HideFilterBarPatch : BytecodePatch(
|
||||
listOf(
|
||||
RelatedChipCloudFingerprint,
|
||||
SearchResultsChipBarFingerprint,
|
||||
FilterBarHeightFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
FilterBarHeightFingerprint.patch<TwoRegisterInstruction> { register ->
|
||||
"""
|
||||
invoke-static { v$register }, $INTEGRATIONS_CLASS_DESCRIPTOR->hideInFeed(I)I
|
||||
move-result v$register
|
||||
"""
|
||||
}
|
||||
|
||||
RelatedChipCloudFingerprint.patch<OneRegisterInstruction>(1) { register ->
|
||||
"invoke-static { v$register }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideInRelatedVideos(Landroid/view/View;)V"
|
||||
}
|
||||
|
||||
SearchResultsChipBarFingerprint.patch<OneRegisterInstruction>(-1, -2) { register ->
|
||||
"""
|
||||
invoke-static { v$register }, $INTEGRATIONS_CLASS_DESCRIPTOR->hideInSearch(I)I
|
||||
move-result v$register
|
||||
"""
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/HideFilterBarPatch;"
|
||||
|
||||
/**
|
||||
* Patch a [MethodFingerprint] with a given [instructions].
|
||||
*
|
||||
* @param RegisterInstruction The type of instruction to get the register from.
|
||||
* @param insertIndexOffset The offset to add to the end index of the [MethodFingerprint].
|
||||
* @param hookRegisterOffset The offset to add to the register of the hook.
|
||||
* @param instructions The instructions to add with the register as a parameter.
|
||||
*/
|
||||
private fun <RegisterInstruction: OneRegisterInstruction> MethodFingerprint.patch(
|
||||
insertIndexOffset: Int = 0,
|
||||
hookRegisterOffset: Int = 0,
|
||||
instructions: (Int) -> String
|
||||
) =
|
||||
result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val endIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
|
||||
val insertIndex = endIndex + insertIndexOffset
|
||||
val register = instruction<RegisterInstruction>(endIndex + hookRegisterOffset).registerA
|
||||
|
||||
addInstructions(insertIndex, instructions(register))
|
||||
}
|
||||
} ?: throw toErrorResult()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package app.revanced.patches.youtube.layout.hide.filterbar.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.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.bytecode.patch.SettingsPatch
|
||||
|
||||
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
|
||||
@Version("0.0.1")
|
||||
class HideFilterBarResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_hide_filter_bar_preference",
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_preference_title",
|
||||
"Hide filter bar"
|
||||
),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_hide_filter_bar_feed_in_feed",
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_feed_title",
|
||||
"Hide in feed"
|
||||
),
|
||||
false,
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_feed_summary_on",
|
||||
"Hidden in feed"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_feed_summary_off",
|
||||
"Shown in feed"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_filter_bar_feed_in_search",
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_search_title",
|
||||
"Hide in search"
|
||||
),
|
||||
false,
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_search_summary_on",
|
||||
"Hidden in search"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_search_summary_off",
|
||||
"Shown in search"
|
||||
)
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_filter_bar_feed_in_related_videos",
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_related_videos_title",
|
||||
"Hide in related videos"
|
||||
),
|
||||
false,
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_related_videos_summary_on",
|
||||
"Hidden in related videos"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_hide_filter_bar_feed_in_related_videos_summary_off",
|
||||
"Shown in related videos"
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
relatedChipCloudMarginId = "related_chip_cloud_reduced_margins".layoutResourceId("layout")
|
||||
filterBarHeightId = "filter_bar_height".layoutResourceId()
|
||||
barContainerHeightId = "bar_container_height".layoutResourceId()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
var filterBarHeightId = -1L
|
||||
var relatedChipCloudMarginId = -1L
|
||||
var barContainerHeightId = -1L
|
||||
|
||||
private fun String.layoutResourceId(type: String = "dimen") =
|
||||
ResourceMappingPatch.resourceMappings.single { it.type == type && it.name == this }.id
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ class HideFloatingMicrophoneButtonPatch : BytecodePatch(
|
||||
ShowFloatingMicrophoneButtonFingerprint.result?.let { result ->
|
||||
with(result.mutableMethod) {
|
||||
val insertIndex = result.scanResult.patternScanResult!!.startIndex + 1
|
||||
val showButtonRegister = (instruction(insertIndex - 1) as TwoRegisterInstruction).registerA
|
||||
val showButtonRegister = instruction<TwoRegisterInstruction>(insertIndex - 1).registerA
|
||||
|
||||
addInstructions(
|
||||
insertIndex,
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.youtube.layout.hide.getpremium.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40", "18.16.37"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class HideGetPremiumCompatibility
|
||||
@@ -0,0 +1,17 @@
|
||||
package app.revanced.patches.youtube.layout.hide.getpremium.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object GetPremiumViewFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.ADD_INT_2ADDR,
|
||||
Opcode.ADD_INT_2ADDR,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_VOID
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/red/presenter/CompactYpcOfferModuleView;"
|
||||
&& methodDef.name == "onMeasure"
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,78 @@
|
||||
package app.revanced.patches.youtube.layout.hide.getpremium.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.getpremium.annotations.HideGetPremiumCompatibility
|
||||
import app.revanced.patches.youtube.layout.hide.getpremium.bytecode.fingerprints.GetPremiumViewFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("hide-get-premium")
|
||||
@Description("Hides advertisement for YouTube Premium under the video player.")
|
||||
@HideGetPremiumCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideGetPremiumPatch : BytecodePatch(
|
||||
listOf(
|
||||
GetPremiumViewFingerprint,
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_get_premium",
|
||||
StringResource("revanced_hide_get_premium_title", "Hide YouTube Premium advertisement"),
|
||||
true,
|
||||
StringResource("revanced_hide_get_premium_summary_on", "YouTube Premium advertisement are hidden"),
|
||||
StringResource("revanced_hide_get_premium_summary_off", "YouTube Premium advertisement are shown")
|
||||
)
|
||||
)
|
||||
|
||||
GetPremiumViewFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val startIndex = it.scanResult.patternScanResult!!.startIndex
|
||||
val measuredWidthRegister = instruction<TwoRegisterInstruction>(startIndex).registerA
|
||||
val measuredHeightInstruction = instruction<TwoRegisterInstruction>(startIndex + 1)
|
||||
|
||||
val measuredHeightRegister = measuredHeightInstruction.registerA
|
||||
val tempRegister = measuredHeightInstruction.registerB
|
||||
|
||||
addInstructions(
|
||||
startIndex + 2,
|
||||
"""
|
||||
# Override the internal measurement of the layout with zero values.
|
||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->hideGetPremiumView()Z
|
||||
move-result v$tempRegister
|
||||
if-eqz v$tempRegister, :allow
|
||||
const/4 v$measuredWidthRegister, 0x0
|
||||
const/4 v$measuredHeightRegister, 0x0
|
||||
:allow
|
||||
nop
|
||||
# Layout width/height is then passed to a protected class method.
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return GetPremiumViewFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/HideGetPremiumPatch;"
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,9 @@ import app.revanced.patcher.annotation.Package
|
||||
"18.05.32",
|
||||
"18.05.35",
|
||||
"18.05.40",
|
||||
"18.08.37"
|
||||
"18.08.37",
|
||||
"18.15.40",
|
||||
"18.16.37"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -20,7 +20,8 @@ import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.Infocards
|
||||
import app.revanced.patches.youtube.layout.hide.infocards.resource.patch.HideInfocardsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, HideInfocardsResourcePatch::class])
|
||||
@@ -35,18 +36,17 @@ class HideInfoCardsPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
with(InfocardsIncognitoFingerprint.also {
|
||||
InfocardsIncognitoFingerprint.also {
|
||||
it.resolve(context, InfocardsIncognitoParentFingerprint.result!!.classDef)
|
||||
}.result!!.mutableMethod) {
|
||||
}.result!!.mutableMethod.apply {
|
||||
val invokeInstructionIndex = implementation!!.instructions.indexOfFirst {
|
||||
it.opcode.ordinal == Opcode.INVOKE_VIRTUAL.ordinal &&
|
||||
((it as? BuilderInstruction35c)?.reference.toString() ==
|
||||
"Landroid/view/View;->setVisibility(I)V")
|
||||
((it as ReferenceInstruction).reference.toString() == "Landroid/view/View;->setVisibility(I)V")
|
||||
}
|
||||
|
||||
addInstructions(
|
||||
invokeInstructionIndex,
|
||||
"invoke-static {v${(instruction(invokeInstructionIndex) as? BuilderInstruction35c)?.registerC}}," +
|
||||
"invoke-static {v${instruction<FiveRegisterInstruction>(invokeInstructionIndex).registerC}}," +
|
||||
" Lapp/revanced/integrations/patches/HideInfoCardsPatch;->hideInfoCardsIncognito(Landroid/view/View;)V"
|
||||
)
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user