Compare commits

...

91 Commits

Author SHA1 Message Date
semantic-release-bot
30c6749f61 chore(release): 4.0.0-dev.9 [skip ci]
# [4.0.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.8...v4.0.0-dev.9) (2024-01-11)

### Bug Fixes

* **YouTube - Enable slide to seek:** Change patch default to excluded and add description disclaimer ([#2610](https://github.com/ReVanced/revanced-patches/issues/2610)) ([08c3079](08c30791ae))
2024-01-11 14:56:11 +00:00
LisoUseInAIKyrios
08c30791ae fix(YouTube - Enable slide to seek): Change patch default to excluded and add description disclaimer (#2610) 2024-01-11 15:54:10 +01:00
semantic-release-bot
002f11a854 chore(release): 4.0.0-dev.8 [skip ci]
# [4.0.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.7...v4.0.0-dev.8) (2024-01-10)

### Bug Fixes

* **YouTube:** Shorten setting titles to fit on screen ([#2579](https://github.com/ReVanced/revanced-patches/issues/2579)) ([861e9a3](861e9a399e))
2024-01-10 11:28:55 +00:00
KobeW50
861e9a399e fix(YouTube): Shorten setting titles to fit on screen (#2579) 2024-01-10 15:26:24 +04:00
oSumAtrIX
795aee13e4 build: Bump dependencies 2024-01-10 09:33:02 +01:00
semantic-release-bot
09f29e6119 chore(release): 4.0.0-dev.7 [skip ci]
# [4.0.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.6...v4.0.0-dev.7) (2024-01-10)

### Bug Fixes

* Use new integrations patch path ([784aa2f](784aa2f246))
2024-01-10 08:16:50 +00:00
oSumAtrIX
784aa2f246 fix: Use new integrations patch path 2024-01-10 09:14:12 +01:00
oSumAtrIX
4ddd5a0b8f chore: Update CI dependencies 2024-01-09 20:14:14 +01:00
semantic-release-bot
1482e7e1e8 chore(release): 4.0.0-dev.6 [skip ci]
# [4.0.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.5...v4.0.0-dev.6) (2024-01-09)

### Features

* **Tiktok - Playback speed:** Remember playback speed ([#2506](https://github.com/ReVanced/revanced-patches/issues/2506)) ([806e944](806e94481c))
2024-01-09 19:12:34 +00:00
d4rkk3y
806e94481c feat(Tiktok - Playback speed): Remember playback speed (#2506)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-01-09 20:10:29 +01:00
semantic-release-bot
edcb6eac6d chore(release): 4.0.0-dev.5 [skip ci]
# [4.0.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.4...v4.0.0-dev.5) (2024-01-09)

### Bug Fixes

* **YouTube - Change header:** Improve patch descriptions ([#2581](https://github.com/ReVanced/revanced-patches/issues/2581)) ([62c9085](62c9085096))
2024-01-09 19:09:58 +00:00
LisoUseInAIKyrios
4dced95d54 refactor(YouTube - Return YouTube Dislike): Make patch more robust by removing opcode patterns from fingerprints (#2602) 2024-01-09 23:08:01 +04:00
KobeW50
62c9085096 fix(YouTube - Change header): Improve patch descriptions (#2581) 2024-01-09 20:07:11 +01:00
semantic-release-bot
50a9f09703 chore(release): 4.0.0-dev.4 [skip ci]
# [4.0.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.3...v4.0.0-dev.4) (2024-01-09)

### Features

* **MyFitnessPal:** Add `Hide ads` patch ([#2594](https://github.com/ReVanced/revanced-patches/issues/2594)) ([9633b4e](9633b4eef0))
2024-01-09 17:28:21 +00:00
mrwedders
9633b4eef0 feat(MyFitnessPal): Add Hide ads patch (#2594)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-01-09 18:26:15 +01:00
semantic-release-bot
2a94ad681c chore(release): 4.0.0-dev.3 [skip ci]
# [4.0.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.2...v4.0.0-dev.3) (2024-01-09)

### Features

* **Change package name:** Mention caveat of the patch in the description ([9e79e9e](9e79e9e72c))
2024-01-09 15:41:21 +00:00
oSumAtrIX
9e79e9e72c feat(Change package name): Mention caveat of the patch in the description 2024-01-09 16:39:23 +01:00
LisoUseInAIKyrios
429badef1a fix:(YouTube - Spoof app version): Adjust spoof target description (#2578) 2024-01-03 19:14:32 +04:00
semantic-release-bot
138b2f8960 chore(release): 4.0.0-dev.2 [skip ci]
# [4.0.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.1...v4.0.0-dev.2) (2024-01-02)

### Features

* **YouTube - Change header:** Change to ReVanced borderless logo header by default ([#2512](https://github.com/ReVanced/revanced-patches/issues/2512)) ([60d70e5](60d70e5877))
2024-01-02 14:36:22 +00:00
oSumAtrIX
60d70e5877 feat(YouTube - Change header): Change to ReVanced borderless logo header by default (#2512)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2024-01-02 15:34:20 +01:00
semantic-release-bot
2debdc1056 chore(release): 4.0.0-dev.1 [skip ci]
# [4.0.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.3.0-dev.2...v4.0.0-dev.1) (2024-01-01)

### Code Refactoring

* Fix package and code structure ([#2541](https://github.com/ReVanced/revanced-patches/issues/2541)) ([ad1ea46](ad1ea4661f))

### BREAKING CHANGES

* Various public APIs have changed names and packages or were removed entirely
2024-01-01 15:35:13 +00:00
oSumAtrIX
ad1ea4661f refactor: Fix package and code structure (#2541)
BREAKING CHANGE: Various public APIs have changed names and packages or were removed entirely
2024-01-01 16:33:07 +01:00
semantic-release-bot
eac46ca216 chore(release): 3.3.0-dev.2 [skip ci]
# [3.3.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.3.0-dev.1...v3.3.0-dev.2) (2024-01-01)

### Features

* **YouTube:** Improve patch descriptions ([#2519](https://github.com/ReVanced/revanced-patches/issues/2519)) ([14e2c07](14e2c07329))
2024-01-01 15:31:56 +00:00
KobeW50
14e2c07329 feat(YouTube): Improve patch descriptions (#2519) 2024-01-01 16:30:04 +01:00
Caner Karaca
9175e50f5d ci: Target branch dev for Dependabot (#2564) 2023-12-29 19:29:54 +01:00
dependabot[bot]
2318c0811f build(deps): bump com.google.guava:guava from 32.1.3-jre to 33.0.0-jre (#2552)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-29 19:15:24 +01:00
dependabot[bot]
bc44eb710d build(deps): bump jvm from 1.9.21 to 1.9.22 (#2553)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-29 19:15:18 +01:00
oSumAtrIX
4bb86f9ec6 ci: Do not use any label for Dependabot 2023-12-28 22:52:17 +01:00
semantic-release-bot
387ceef6cd chore(release): 3.3.0-dev.1 [skip ci]
# [3.3.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.2.0...v3.3.0-dev.1) (2023-12-28)

### Features

* **ID Austria:** Remove constraint on any version ([#2526](https://github.com/ReVanced/revanced-patches/issues/2526)) ([5ba5926](5ba59261f2))
2023-12-28 21:40:18 +00:00
1fexd
5ba59261f2 feat(ID Austria): Remove constraint on any version (#2526) 2023-12-28 22:38:30 +01:00
semantic-release-bot
a89ab13949 chore(release): 3.2.0 [skip ci]
# [3.2.0](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0) (2023-12-28)

### Bug Fixes

* **Spoof SIM country:** Validate patch option value correctly ([4fd77b1](4fd77b130a))
* **Tiktok - Remember clear display:** Use correct name ([2c83b86](2c83b86297))
* **YouTube - Alternative thumbnails:** Clarify DeArrow support is for thumbnails ([#2531](https://github.com/ReVanced/revanced-patches/issues/2531)) ([47f2de4](47f2de4bc8))
* **YouTube - SponsorBlock:** Export local statistics with saved settings ([b9ee462](b9ee4625b6))
* **YouTube:** Fix grammer mistakes in patch descriptions ([#2543](https://github.com/ReVanced/revanced-patches/issues/2543)) ([9148bdf](9148bdfd1c))

### Features

* **Public API:** Deprecate `HideEmailAddressPatch` ([8ad9d7d](8ad9d7dedd))
* **Public API:** Make `BottomControlsResource#addControls` public ([#2514](https://github.com/ReVanced/revanced-patches/issues/2514)) ([26565fd](26565fdb91))
* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([fcacd0f](fcacd0f30d))
* **YouTube - Hide ads:** Hide fullscreen ads ([b12a14c](b12a14c4d0))
* **YouTube - Hide layout components:** Hide search result recommendations ([4408209](44082095ba))
* **YouTube - Theme:** Add classic dark color to presets ([#2542](https://github.com/ReVanced/revanced-patches/issues/2542)) ([1ecb6b2](1ecb6b2a6c))
* **YouTube:** Add `Remove viewer discretion dialog` patch ([21136d7](21136d76cd))
* **YouTube:** Remove `Hide email address` patch ([b81c999](b81c99920b))
2023-12-28 21:32:40 +00:00
oSumAtrIX
ef3932c8e6 chore: Merge branch dev to main 2023-12-28 22:30:37 +01:00
semantic-release-bot
9d3dd4d50a chore(release): 3.2.0-dev.9 [skip ci]
# [3.2.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.8...v3.2.0-dev.9) (2023-12-27)

### Features

* **YouTube - Theme:** Add classic dark color to presets ([#2542](https://github.com/ReVanced/revanced-patches/issues/2542)) ([1ecb6b2](1ecb6b2a6c))
* **YouTube:** Add `Remove viewer discretion dialog` patch ([21136d7](21136d76cd))
2023-12-27 04:43:49 +00:00
kitadai31
1ecb6b2a6c feat(YouTube - Theme): Add classic dark color to presets (#2542)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-12-27 05:41:52 +01:00
oSumAtrIX
21136d76cd feat(YouTube): Add Remove viewer discretion dialog patch 2023-12-27 05:39:27 +01:00
semantic-release-bot
c4b3d0fde0 chore(release): 3.2.0-dev.8 [skip ci]
# [3.2.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.7...v3.2.0-dev.8) (2023-12-26)

### Bug Fixes

* **YouTube:** Fix grammer mistakes in patch descriptions ([#2543](https://github.com/ReVanced/revanced-patches/issues/2543)) ([9148bdf](9148bdfd1c))
2023-12-26 23:10:12 +00:00
KobeW50
9148bdfd1c fix(YouTube): Fix grammer mistakes in patch descriptions (#2543) 2023-12-27 00:08:15 +01:00
semantic-release-bot
e2b2b7424b chore(release): 3.2.0-dev.7 [skip ci]
# [3.2.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.6...v3.2.0-dev.7) (2023-12-24)

### Features

* **YouTube - Hide ads:** Hide fullscreen ads ([b12a14c](b12a14c4d0))
* **YouTube - Hide layout components:** Hide search result recommendations ([4408209](44082095ba))
2023-12-24 17:40:36 +00:00
oSumAtrIX
b12a14c4d0 feat(YouTube - Hide ads): Hide fullscreen ads 2023-12-24 18:38:34 +01:00
oSumAtrIX
44082095ba feat(YouTube - Hide layout components): Hide search result recommendations 2023-12-24 18:07:01 +01:00
semantic-release-bot
987e4e7e91 chore(release): 3.2.0-dev.6 [skip ci]
# [3.2.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.5...v3.2.0-dev.6) (2023-12-24)

### Bug Fixes

* **Spoof SIM country:** Validate patch option value correctly ([4fd77b1](4fd77b130a))
2023-12-24 12:41:57 +00:00
oSumAtrIX
4fd77b130a fix(Spoof SIM country): Validate patch option value correctly 2023-12-24 13:39:59 +01:00
semantic-release-bot
47aa56a06e chore(release): 3.2.0-dev.5 [skip ci]
# [3.2.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.4...v3.2.0-dev.5) (2023-12-23)

### Bug Fixes

* **YouTube - Alternative thumbnails:** Clarify DeArrow support is for thumbnails ([#2531](https://github.com/ReVanced/revanced-patches/issues/2531)) ([47f2de4](47f2de4bc8))
2023-12-23 07:49:58 +00:00
Ajay Ramachandran
47f2de4bc8 fix(YouTube - Alternative thumbnails): Clarify DeArrow support is for thumbnails (#2531) 2023-12-23 11:48:06 +04:00
oSumAtrIX
36b929c3b3 refactor(Spoof SIM country): Use existing function to register patch option 2023-12-22 03:30:27 +01:00
oSumAtrIX
7109d8e088 refactor(Spoof SIM country): Reduce code duplication 2023-12-22 03:20:55 +01:00
semantic-release-bot
c91df0f29c chore(release): 3.2.0-dev.4 [skip ci]
# [3.2.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.3...v3.2.0-dev.4) (2023-12-21)

### Bug Fixes

* **Tiktok - Remember clear display:** Use correct name ([2c83b86](2c83b86297))
2023-12-21 14:34:43 +00:00
oSumAtrIX
2c83b86297 fix(Tiktok - Remember clear display): Use correct name 2023-12-21 15:32:18 +01:00
semantic-release-bot
5ceda29fce chore(release): 3.2.0-dev.3 [skip ci]
# [3.2.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.2...v3.2.0-dev.3) (2023-12-21)

### Features

* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([fcacd0f](fcacd0f30d))
2023-12-21 14:26:26 +00:00
d4rkk3y
fcacd0f30d feat(Tiktok): Add Remember clear mode patch (#2509)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-12-21 15:24:23 +01:00
semantic-release-bot
4f0c756b36 chore(release): 3.2.0-dev.2 [skip ci]
# [3.2.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.1...v3.2.0-dev.2) (2023-12-19)

### Features

* **Public API:** Deprecate `HideEmailAddressPatch` ([8ad9d7d](8ad9d7dedd))
* **YouTube:** Remove `Hide email address` patch ([b81c999](b81c99920b))
2023-12-19 17:51:13 +00:00
oSumAtrIX
8ad9d7dedd feat(Public API): Deprecate HideEmailAddressPatch 2023-12-19 18:48:58 +01:00
oSumAtrIX
b81c99920b feat(YouTube): Remove Hide email address patch 2023-12-19 18:48:26 +01:00
semantic-release-bot
cfb23652e1 chore(release): 3.2.0-dev.1 [skip ci]
# [3.2.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0-dev.1) (2023-12-18)

### Bug Fixes

* **YouTube - SponsorBlock:** Export local statistics with saved settings ([b9ee462](b9ee4625b6))

### Features

* **Public API:** Make `BottomControlsResource#addControls` public ([#2514](https://github.com/ReVanced/revanced-patches/issues/2514)) ([26565fd](26565fdb91))
2023-12-18 19:08:19 +00:00
Aunali321
26565fdb91 feat(Public API): Make BottomControlsResource#addControls public (#2514)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-12-18 20:06:20 +01:00
Caner Karaca
5a14b17338 build: Automate bumping dependencies (#2436)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-12-17 20:22:03 +01:00
LisoUseInAIKyrios
b9ee4625b6 fix(YouTube - SponsorBlock): Export local statistics with saved settings 2023-12-16 15:23:58 +04:00
oSumAtrIX
7a98270e4a chore: Fix grammar in task description 2023-12-14 01:14:49 +01:00
semantic-release-bot
5633048550 chore(release): 3.1.0 [skip ci]
# [3.1.0](https://github.com/ReVanced/revanced-patches/compare/v3.0.1...v3.1.0) (2023-12-12)

### Bug Fixes

* **Boost for Reddit - Spoof client:** Fix account login by removing user agent patch ([0f829ed](0f829ed747))
* Solve build errors by using correct syntax ([40684cd](40684cd1fe))
* **Sync for Reddit - Spoof client:** Fix account login by removing user agent patch ([c10956b](c10956ba14))

### Features

* **IconPackStudio - Unlock pro:** Constrain to last working version ([#3410](https://github.com/ReVanced/revanced-patches/issues/3410)) ([36fc818](36fc818f90))
2023-12-12 22:18:18 +00:00
oSumAtrIX
49c5e16c2e chore: Merge branch dev to main (#3407) 2023-12-12 23:16:25 +01:00
semantic-release-bot
a46f9ddd2d chore(release): 3.1.0-dev.1 [skip ci]
# [3.1.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.0.1...v3.1.0-dev.1) (2023-12-12)

### Bug Fixes

* **Boost for Reddit - Spoof client:** Fix account login by removing user agent patch ([0f829ed](0f829ed747))
* Solve build errors by using correct syntax ([40684cd](40684cd1fe))
* **Sync for Reddit - Spoof client:** Fix account login by removing user agent patch ([c10956b](c10956ba14))

### Features

* **IconPackStudio - Unlock pro:** Constrain to last working version ([#3410](https://github.com/ReVanced/revanced-patches/issues/3410)) ([36fc818](36fc818f90))
2023-12-12 22:02:36 +00:00
oSumAtrIX
40684cd1fe fix: Solve build errors by using correct syntax 2023-12-12 23:00:28 +01:00
oSumAtrIX
0f829ed747 fix(Boost for Reddit - Spoof client): Fix account login by removing user agent patch 2023-12-12 22:42:46 +01:00
oSumAtrIX
c10956ba14 fix(Sync for Reddit - Spoof client): Fix account login by removing user agent patch 2023-12-12 22:42:46 +01:00
Bceez
36fc818f90 feat(IconPackStudio - Unlock pro): Constrain to last working version (#3410) 2023-12-12 21:49:22 +01:00
LisoUseInAIKyrios
3ae2dbaad7 chore(YouTube): Fix settings UI typos 2023-12-12 20:51:26 +04:00
semantic-release-bot
9c843cbf6e chore(release): 3.0.1 [skip ci]
## [3.0.1](https://github.com/ReVanced/revanced-patches/compare/v3.0.0...v3.0.1) (2023-12-12)

### Bug Fixes

* **YouTube Music - GmsCore support:** Change from correct package name to prevent the patch from failing ([42ae7b3](42ae7b3f2a))
2023-12-12 00:55:15 +00:00
oSumAtrIX
7387323de5 chore: Merge branch dev to main (#3400) 2023-12-12 01:53:21 +01:00
semantic-release-bot
22f32865a2 chore(release): 3.0.1-dev.1 [skip ci]
## [3.0.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.0.0...v3.0.1-dev.1) (2023-12-12)

### Bug Fixes

* **YouTube Music - GmsCore support:** Change from correct package name to prevent the patch from failing ([42ae7b3](42ae7b3f2a))
2023-12-12 00:53:09 +00:00
oSumAtrIX
5f8b96466f refactor: Simplify implementation 2023-12-12 01:50:32 +01:00
oSumAtrIX
42ae7b3f2a fix(YouTube Music - GmsCore support): Change from correct package name to prevent the patch from failing 2023-12-12 01:50:18 +01:00
semantic-release-bot
7b56550a0a chore(release): 3.0.0 [skip ci]
# [3.0.0](https://github.com/ReVanced/revanced-patches/compare/v2.202.0...v3.0.0) (2023-12-12)

### Bug Fixes

* Use correct class loader to load resources ([17f44ca](17f44ca780))
* **YouTube - GmsCore support:** Check for availability earlier to prevent crashing without any notice ([a4a4822](a4a4822ed8))
* **YouTube - Minimized playback:** Fix PIP incorrectly shown for some Shorts playback ([#3364](https://github.com/ReVanced/revanced-patches/issues/3364)) ([e6a1573](e6a1573c59))
* **YouTube - Return YouTube Dislike:** Prevent the first Short opened from freezing the UI ([#3359](https://github.com/ReVanced/revanced-patches/issues/3359)) ([aaad913](aaad91333f))

### Features

* Allow choosing the vendor of GmsCore via patch options ([#3347](https://github.com/ReVanced/revanced-patches/issues/3347)) ([55bc7ec](55bc7ecbae))
* **Infinity for Reddit - Spoof client:** Support latest version ([0ceb163](0ceb163ffa))
* **Infinity for Reddit:** Add `Unlock subscription` patch ([080b357](080b357a79))
* **Photomath:** Constrain patches to last working version ([3bd6640](3bd66406cc))
* Publish as a library ([#3356](https://github.com/ReVanced/revanced-patches/issues/3356)) ([d3acdea](d3acdead51))
* **Tiktok:** Bump compatibility to `32.5.3` ([#3389](https://github.com/ReVanced/revanced-patches/issues/3389)) ([37c461f](37c461f5c7))
* **Twitch - Settings:** Support version `16.1.0` and `15.4.1` ([#3377](https://github.com/ReVanced/revanced-patches/issues/3377)) ([ba58edb](ba58edbd7f))
* **Twitter - Dynamic Color:** Remove blue icon and update app name ([#3384](https://github.com/ReVanced/revanced-patches/issues/3384)) ([6a03c1f](6a03c1f8c3))
* **YouTube - Alternative Thumbnails:** Add option to use DeArrow ([#3378](https://github.com/ReVanced/revanced-patches/issues/3378)) ([dbe123c](dbe123c93c))
* **YouTube:** Add `Change start page` patch ([f03e57b](f03e57b112))
* **YouTube:** Clarify patch descriptions ([#3350](https://github.com/ReVanced/revanced-patches/issues/3350)) ([4672118](4672118e88))

### BREAKING CHANGES

* **Tiktok:** This removes a patch but consolidates it into another.
* Various APIs have been moved to `GmsCoreSupportAbstractPatch`
2023-12-12 00:13:19 +00:00
oSumAtrIX
e6766c3a5f chore: Merge branch dev to main (#3358) 2023-12-12 01:11:25 +01:00
semantic-release-bot
e840d03d63 chore(release): 3.0.0-dev.11 [skip ci]
# [3.0.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.10...v3.0.0-dev.11) (2023-12-12)

### Features

* **Tiktok:** Bump compatibility to `32.5.3` ([#3389](https://github.com/ReVanced/revanced-patches/issues/3389)) ([37c461f](37c461f5c7))

### BREAKING CHANGES

* **Tiktok:** This removes a patch but consolidates it into another.
2023-12-12 00:09:27 +00:00
d4rkk3y
37c461f5c7 feat(Tiktok): Bump compatibility to 32.5.3 (#3389)
BREAKING CHANGE: This removes a patch but consolidates it into another.
2023-12-12 01:07:01 +01:00
semantic-release-bot
6202072061 chore(release): 3.0.0-dev.10 [skip ci]
# [3.0.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.9...v3.0.0-dev.10) (2023-12-11)

### Features

* **YouTube:** Add `Change start page` patch ([f03e57b](f03e57b112))
2023-12-11 23:43:52 +00:00
oSumAtrIX
f03e57b112 feat(YouTube): Add Change start page patch 2023-12-12 00:42:01 +01:00
semantic-release-bot
e2e0efd7ae chore(release): 3.0.0-dev.9 [skip ci]
# [3.0.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.8...v3.0.0-dev.9) (2023-12-11)

### Bug Fixes

* **YouTube - GmsCore support:** Check for availability earlier to prevent crashing without any notice ([a4a4822](a4a4822ed8))
2023-12-11 22:07:41 +00:00
oSumAtrIX
a4a4822ed8 fix(YouTube - GmsCore support): Check for availability earlier to prevent crashing without any notice 2023-12-11 23:05:39 +01:00
oSumAtrIX
6b35561394 build: Simplify enabling local build cache 2023-12-11 22:39:44 +01:00
semantic-release-bot
19f74bcdb1 chore(release): 3.0.0-dev.8 [skip ci]
# [3.0.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.7...v3.0.0-dev.8) (2023-12-11)

### Features

* **YouTube - Alternative Thumbnails:** Add option to use DeArrow ([#3378](https://github.com/ReVanced/revanced-patches/issues/3378)) ([dbe123c](dbe123c93c))
2023-12-11 01:09:24 +00:00
Chris
dbe123c93c feat(YouTube - Alternative Thumbnails): Add option to use DeArrow (#3378)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2023-12-11 05:07:09 +04:00
semantic-release-bot
693d8a0f56 chore(release): 3.0.0-dev.7 [skip ci]
# [3.0.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.6...v3.0.0-dev.7) (2023-12-07)

### Features

* **Twitter - Dynamic Color:** Remove blue icon and update app name ([#3384](https://github.com/ReVanced/revanced-patches/issues/3384)) ([6a03c1f](6a03c1f8c3))
2023-12-07 13:13:03 +00:00
Advyte
6a03c1f8c3 feat(Twitter - Dynamic Color): Remove blue icon and update app name (#3384) 2023-12-07 14:10:55 +01:00
semantic-release-bot
e820724111 chore(release): 3.0.0-dev.6 [skip ci]
# [3.0.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.5...v3.0.0-dev.6) (2023-12-05)

### Features

* **Twitch - Settings:** Support version `16.1.0` and `15.4.1` ([#3377](https://github.com/ReVanced/revanced-patches/issues/3377)) ([ba58edb](ba58edbd7f))
2023-12-05 15:43:34 +00:00
LizenzFass78851
ba58edbd7f feat(Twitch - Settings): Support version 16.1.0 and 15.4.1 (#3377) 2023-12-05 16:41:22 +01:00
semantic-release-bot
a6d7c633f5 chore(release): 3.0.0-dev.5 [skip ci]
# [3.0.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.4...v3.0.0-dev.5) (2023-12-04)

### Bug Fixes

* Use correct class loader to load resources ([17f44ca](17f44ca780))

### Features

* **Photomath:** Constrain patches to last working version ([3bd6640](3bd66406cc))
2023-12-04 23:57:16 +00:00
oSumAtrIX
17f44ca780 fix: Use correct class loader to load resources 2023-12-05 00:55:09 +01:00
oSumAtrIX
3bd66406cc feat(Photomath): Constrain patches to last working version 2023-12-05 00:55:09 +01:00
semantic-release-bot
536b354fd6 chore(release): 3.0.0-dev.4 [skip ci]
# [3.0.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.3...v3.0.0-dev.4) (2023-12-04)

### Bug Fixes

* **YouTube - Minimized playback:** Fix PIP incorrectly shown for some Shorts playback ([#3364](https://github.com/ReVanced/revanced-patches/issues/3364)) ([e6a1573](e6a1573c59))
2023-12-04 23:49:54 +00:00
LisoUseInAIKyrios
e6a1573c59 fix(YouTube - Minimized playback): Fix PIP incorrectly shown for some Shorts playback (#3364) 2023-12-05 03:47:46 +04:00
221 changed files with 2399 additions and 1492 deletions

22
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: github-actions
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
- package-ecosystem: npm
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
- package-ecosystem: gradle
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly

View File

@@ -0,0 +1,18 @@
name: Update Gradle wrapper
on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
with:
target-branch: dev

View File

@@ -1,3 +1,318 @@
# [4.0.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.8...v4.0.0-dev.9) (2024-01-11)
### Bug Fixes
* **YouTube - Enable slide to seek:** Change patch default to excluded and add description disclaimer ([#2610](https://github.com/ReVanced/revanced-patches/issues/2610)) ([2fdc4c2](https://github.com/ReVanced/revanced-patches/commit/2fdc4c23b5f39153ad71071359274c39129d691f))
# [4.0.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.7...v4.0.0-dev.8) (2024-01-10)
### Bug Fixes
* **YouTube:** Shorten setting titles to fit on screen ([#2579](https://github.com/ReVanced/revanced-patches/issues/2579)) ([b2a5dd3](https://github.com/ReVanced/revanced-patches/commit/b2a5dd3efc39ae8a42159858b9c00b5b2f8655a4))
# [4.0.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.6...v4.0.0-dev.7) (2024-01-10)
### Bug Fixes
* Use new integrations patch path ([51e2f3b](https://github.com/ReVanced/revanced-patches/commit/51e2f3b476b49460e2f3fc2b5f302a3a72d7963f))
# [4.0.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.5...v4.0.0-dev.6) (2024-01-09)
### Features
* **Tiktok - Playback speed:** Remember playback speed ([#2506](https://github.com/ReVanced/revanced-patches/issues/2506)) ([d2970e5](https://github.com/ReVanced/revanced-patches/commit/d2970e54fbbd7e4b1ae1d354ae2d5c4bbe9336b0))
# [4.0.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.4...v4.0.0-dev.5) (2024-01-09)
### Bug Fixes
* **YouTube - Change header:** Improve patch descriptions ([#2581](https://github.com/ReVanced/revanced-patches/issues/2581)) ([43a5677](https://github.com/ReVanced/revanced-patches/commit/43a5677397380f14a049ae95532fd5096b94c938))
# [4.0.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.3...v4.0.0-dev.4) (2024-01-09)
### Features
* **MyFitnessPal:** Add `Hide ads` patch ([#2594](https://github.com/ReVanced/revanced-patches/issues/2594)) ([fd4b3c7](https://github.com/ReVanced/revanced-patches/commit/fd4b3c79a83f8de6256611629263d3e29e66f2c2))
# [4.0.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.2...v4.0.0-dev.3) (2024-01-09)
### Features
* **Change package name:** Mention caveat of the patch in the description ([427b81a](https://github.com/ReVanced/revanced-patches/commit/427b81a79a5a1de79f14d2261059fb098b22227f))
# [4.0.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v4.0.0-dev.1...v4.0.0-dev.2) (2024-01-02)
### Features
* **YouTube - Change header:** Change to ReVanced borderless logo header by default ([#2512](https://github.com/ReVanced/revanced-patches/issues/2512)) ([75f785d](https://github.com/ReVanced/revanced-patches/commit/75f785d1ef6026cbbdf7073c10aace1b28d93a30))
# [4.0.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.3.0-dev.2...v4.0.0-dev.1) (2024-01-01)
### Code Refactoring
* Fix package and code structure ([#2541](https://github.com/ReVanced/revanced-patches/issues/2541)) ([a08457e](https://github.com/ReVanced/revanced-patches/commit/a08457e406f4b2e37458a4835c11d370a02d2ce6))
### BREAKING CHANGES
* Various public APIs have changed names and packages or were removed entirely
# [3.3.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.3.0-dev.1...v3.3.0-dev.2) (2024-01-01)
### Features
* **YouTube:** Improve patch descriptions ([#2519](https://github.com/ReVanced/revanced-patches/issues/2519)) ([e8d1389](https://github.com/ReVanced/revanced-patches/commit/e8d1389d3367b2fb688f0b85c136c512981b4fdc))
# [3.3.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.2.0...v3.3.0-dev.1) (2023-12-28)
### Features
* **ID Austria:** Remove constraint on any version ([#2526](https://github.com/ReVanced/revanced-patches/issues/2526)) ([de2cb88](https://github.com/ReVanced/revanced-patches/commit/de2cb886169b3963b9ed70154bde0b7c6baaae40))
# [3.2.0](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0) (2023-12-28)
### Bug Fixes
* **Spoof SIM country:** Validate patch option value correctly ([8105463](https://github.com/ReVanced/revanced-patches/commit/81054637915a5399d15f546b2290b5d939e15732))
* **Tiktok - Remember clear display:** Use correct name ([d7e44cb](https://github.com/ReVanced/revanced-patches/commit/d7e44cb887396bba27ee81c70c006f0cc247c56d))
* **YouTube - Alternative thumbnails:** Clarify DeArrow support is for thumbnails ([#2531](https://github.com/ReVanced/revanced-patches/issues/2531)) ([828abb0](https://github.com/ReVanced/revanced-patches/commit/828abb0558926cd6557c79abcf1a04bfe2c719e6))
* **YouTube - SponsorBlock:** Export local statistics with saved settings ([f8365b4](https://github.com/ReVanced/revanced-patches/commit/f8365b4e3585328506887022ac6168045ac110b9))
* **YouTube:** Fix grammer mistakes in patch descriptions ([#2543](https://github.com/ReVanced/revanced-patches/issues/2543)) ([ebf5993](https://github.com/ReVanced/revanced-patches/commit/ebf599349c508067a28526267d82030b679df045))
### Features
* **Public API:** Deprecate `HideEmailAddressPatch` ([866bceb](https://github.com/ReVanced/revanced-patches/commit/866bcebdd990b964d3dfd5aea792e7fffaedbf44))
* **Public API:** Make `BottomControlsResource#addControls` public ([#2514](https://github.com/ReVanced/revanced-patches/issues/2514)) ([f4e2257](https://github.com/ReVanced/revanced-patches/commit/f4e2257072ca02003f7c272d6c0c8ef1aa6032ae))
* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([048bf59](https://github.com/ReVanced/revanced-patches/commit/048bf592ef93ee5138aa1886be1644501f88964a))
* **YouTube - Hide ads:** Hide fullscreen ads ([bdc9a12](https://github.com/ReVanced/revanced-patches/commit/bdc9a129eff3a5051b8b37665b3243a8b61cbbac))
* **YouTube - Hide layout components:** Hide search result recommendations ([55cc7f1](https://github.com/ReVanced/revanced-patches/commit/55cc7f1c7722f56af6d33ea2bd09a1b99d635209))
* **YouTube - Theme:** Add classic dark color to presets ([#2542](https://github.com/ReVanced/revanced-patches/issues/2542)) ([4e1dc00](https://github.com/ReVanced/revanced-patches/commit/4e1dc0041d6693fba08e78514787407f933a6e41))
* **YouTube:** Add `Remove viewer discretion dialog` patch ([a07f83f](https://github.com/ReVanced/revanced-patches/commit/a07f83fe89ce577fc8bd904eacad5383a639b09b))
* **YouTube:** Remove `Hide email address` patch ([3b84305](https://github.com/ReVanced/revanced-patches/commit/3b84305a6b97800cb147f86c642f19689548aca5))
# [3.2.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.8...v3.2.0-dev.9) (2023-12-27)
### Features
* **YouTube - Theme:** Add classic dark color to presets ([#2542](https://github.com/ReVanced/revanced-patches/issues/2542)) ([4e1dc00](https://github.com/ReVanced/revanced-patches/commit/4e1dc0041d6693fba08e78514787407f933a6e41))
* **YouTube:** Add `Remove viewer discretion dialog` patch ([a07f83f](https://github.com/ReVanced/revanced-patches/commit/a07f83fe89ce577fc8bd904eacad5383a639b09b))
# [3.2.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.7...v3.2.0-dev.8) (2023-12-26)
### Bug Fixes
* **YouTube:** Fix grammer mistakes in patch descriptions ([#2543](https://github.com/ReVanced/revanced-patches/issues/2543)) ([ebf5993](https://github.com/ReVanced/revanced-patches/commit/ebf599349c508067a28526267d82030b679df045))
# [3.2.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.6...v3.2.0-dev.7) (2023-12-24)
### Features
* **YouTube - Hide ads:** Hide fullscreen ads ([bdc9a12](https://github.com/ReVanced/revanced-patches/commit/bdc9a129eff3a5051b8b37665b3243a8b61cbbac))
* **YouTube - Hide layout components:** Hide search result recommendations ([55cc7f1](https://github.com/ReVanced/revanced-patches/commit/55cc7f1c7722f56af6d33ea2bd09a1b99d635209))
# [3.2.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.5...v3.2.0-dev.6) (2023-12-24)
### Bug Fixes
* **Spoof SIM country:** Validate patch option value correctly ([8105463](https://github.com/ReVanced/revanced-patches/commit/81054637915a5399d15f546b2290b5d939e15732))
# [3.2.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.4...v3.2.0-dev.5) (2023-12-23)
### Bug Fixes
* **YouTube - Alternative thumbnails:** Clarify DeArrow support is for thumbnails ([#2531](https://github.com/ReVanced/revanced-patches/issues/2531)) ([828abb0](https://github.com/ReVanced/revanced-patches/commit/828abb0558926cd6557c79abcf1a04bfe2c719e6))
# [3.2.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.3...v3.2.0-dev.4) (2023-12-21)
### Bug Fixes
* **Tiktok - Remember clear display:** Use correct name ([d7e44cb](https://github.com/ReVanced/revanced-patches/commit/d7e44cb887396bba27ee81c70c006f0cc247c56d))
# [3.2.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.2...v3.2.0-dev.3) (2023-12-21)
### Features
* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([048bf59](https://github.com/ReVanced/revanced-patches/commit/048bf592ef93ee5138aa1886be1644501f88964a))
# [3.2.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.1...v3.2.0-dev.2) (2023-12-19)
### Features
* **Public API:** Deprecate `HideEmailAddressPatch` ([866bceb](https://github.com/ReVanced/revanced-patches/commit/866bcebdd990b964d3dfd5aea792e7fffaedbf44))
* **YouTube:** Remove `Hide email address` patch ([3b84305](https://github.com/ReVanced/revanced-patches/commit/3b84305a6b97800cb147f86c642f19689548aca5))
# [3.2.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0-dev.1) (2023-12-18)
### Bug Fixes
* **YouTube - SponsorBlock:** Export local statistics with saved settings ([f8365b4](https://github.com/ReVanced/revanced-patches/commit/f8365b4e3585328506887022ac6168045ac110b9))
### Features
* **Public API:** Make `BottomControlsResource#addControls` public ([#2514](https://github.com/ReVanced/revanced-patches/issues/2514)) ([f4e2257](https://github.com/ReVanced/revanced-patches/commit/f4e2257072ca02003f7c272d6c0c8ef1aa6032ae))
# [3.1.0](https://github.com/ReVanced/revanced-patches/compare/v3.0.1...v3.1.0) (2023-12-12)
### Bug Fixes
* **Boost for Reddit - Spoof client:** Fix account login by removing user agent patch ([42a5de9](https://github.com/ReVanced/revanced-patches/commit/42a5de98becee7fc027c3e7143e071a3447f7077))
* Solve build errors by using correct syntax ([3f5a5bf](https://github.com/ReVanced/revanced-patches/commit/3f5a5bf2ab061e7be2f430dc3f5fd64d5c842677))
* **Sync for Reddit - Spoof client:** Fix account login by removing user agent patch ([d90786e](https://github.com/ReVanced/revanced-patches/commit/d90786e26d9c0e581284aab0d9d6d5097da2bfda))
### Features
* **IconPackStudio - Unlock pro:** Constrain to last working version ([#3410](https://github.com/ReVanced/revanced-patches/issues/3410)) ([fb6ee8a](https://github.com/ReVanced/revanced-patches/commit/fb6ee8a8976b64477171f70229e161188c39efcd))
# [3.1.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.0.1...v3.1.0-dev.1) (2023-12-12)
### Bug Fixes
* **Boost for Reddit - Spoof client:** Fix account login by removing user agent patch ([42a5de9](https://github.com/ReVanced/revanced-patches/commit/42a5de98becee7fc027c3e7143e071a3447f7077))
* Solve build errors by using correct syntax ([3f5a5bf](https://github.com/ReVanced/revanced-patches/commit/3f5a5bf2ab061e7be2f430dc3f5fd64d5c842677))
* **Sync for Reddit - Spoof client:** Fix account login by removing user agent patch ([d90786e](https://github.com/ReVanced/revanced-patches/commit/d90786e26d9c0e581284aab0d9d6d5097da2bfda))
### Features
* **IconPackStudio - Unlock pro:** Constrain to last working version ([#3410](https://github.com/ReVanced/revanced-patches/issues/3410)) ([fb6ee8a](https://github.com/ReVanced/revanced-patches/commit/fb6ee8a8976b64477171f70229e161188c39efcd))
## [3.0.1](https://github.com/ReVanced/revanced-patches/compare/v3.0.0...v3.0.1) (2023-12-12)
### Bug Fixes
* **YouTube Music - GmsCore support:** Change from correct package name to prevent the patch from failing ([284a7f0](https://github.com/ReVanced/revanced-patches/commit/284a7f0b1a7b46e36b5f3dd132bb36d6d3fef584))
## [3.0.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.0.0...v3.0.1-dev.1) (2023-12-12)
### Bug Fixes
* **YouTube Music - GmsCore support:** Change from correct package name to prevent the patch from failing ([284a7f0](https://github.com/ReVanced/revanced-patches/commit/284a7f0b1a7b46e36b5f3dd132bb36d6d3fef584))
# [3.0.0](https://github.com/ReVanced/revanced-patches/compare/v2.202.0...v3.0.0) (2023-12-12)
### Bug Fixes
* Use correct class loader to load resources ([1d5f1f8](https://github.com/ReVanced/revanced-patches/commit/1d5f1f83be1f4eb78381887cd59f1649f1ed6d71))
* **YouTube - GmsCore support:** Check for availability earlier to prevent crashing without any notice ([dab8900](https://github.com/ReVanced/revanced-patches/commit/dab8900e22498a86c7a1c2fd8f1bcc29dec1272c))
* **YouTube - Minimized playback:** Fix PIP incorrectly shown for some Shorts playback ([#3364](https://github.com/ReVanced/revanced-patches/issues/3364)) ([84607ff](https://github.com/ReVanced/revanced-patches/commit/84607ff5f4bd30d328cdc4e1d46070a86d6c56bf))
* **YouTube - Return YouTube Dislike:** Prevent the first Short opened from freezing the UI ([#3359](https://github.com/ReVanced/revanced-patches/issues/3359)) ([e024409](https://github.com/ReVanced/revanced-patches/commit/e024409219bfbccc32c337d95da24b7146b6c7b7))
### Features
* Allow choosing the vendor of GmsCore via patch options ([#3347](https://github.com/ReVanced/revanced-patches/issues/3347)) ([161261c](https://github.com/ReVanced/revanced-patches/commit/161261cfeab4616764d20efe46fcfd483299741c))
* **Infinity for Reddit - Spoof client:** Support latest version ([ca42fd9](https://github.com/ReVanced/revanced-patches/commit/ca42fd93656eae6a5f5f0086e3cf574fb6f4f11e))
* **Infinity for Reddit:** Add `Unlock subscription` patch ([840b29e](https://github.com/ReVanced/revanced-patches/commit/840b29e9891243a4ccabb6ade5ad6ac92984efc2))
* **Photomath:** Constrain patches to last working version ([f9a5dc6](https://github.com/ReVanced/revanced-patches/commit/f9a5dc6c91f37e9d7018e631739ca61511940d29))
* Publish as a library ([#3356](https://github.com/ReVanced/revanced-patches/issues/3356)) ([4b878ee](https://github.com/ReVanced/revanced-patches/commit/4b878eeeda7d8b97ddd0911077b701c36dec5e43))
* **Tiktok:** Bump compatibility to `32.5.3` ([#3389](https://github.com/ReVanced/revanced-patches/issues/3389)) ([96cdc10](https://github.com/ReVanced/revanced-patches/commit/96cdc102dd64e3134ec0ac5cc22c956b80c95e0b))
* **Twitch - Settings:** Support version `16.1.0` and `15.4.1` ([#3377](https://github.com/ReVanced/revanced-patches/issues/3377)) ([062310d](https://github.com/ReVanced/revanced-patches/commit/062310dcc3923568c96171420c7fb9c0c2144233))
* **Twitter - Dynamic Color:** Remove blue icon and update app name ([#3384](https://github.com/ReVanced/revanced-patches/issues/3384)) ([3db6615](https://github.com/ReVanced/revanced-patches/commit/3db6615568e399aa13dac093868df3d0e1ebc4c3))
* **YouTube - Alternative Thumbnails:** Add option to use DeArrow ([#3378](https://github.com/ReVanced/revanced-patches/issues/3378)) ([41217f6](https://github.com/ReVanced/revanced-patches/commit/41217f61e600e47dd6812864bff22ee054521d3c))
* **YouTube:** Add `Change start page` patch ([ad9ba37](https://github.com/ReVanced/revanced-patches/commit/ad9ba37c0568bd303d807b3ddf1a22daa8f8ec59))
* **YouTube:** Clarify patch descriptions ([#3350](https://github.com/ReVanced/revanced-patches/issues/3350)) ([f2b9df4](https://github.com/ReVanced/revanced-patches/commit/f2b9df4e22a1c537cbd383087a3d724c3cdc1784))
### BREAKING CHANGES
* **Tiktok:** This removes a patch but consolidates it into another.
* Various APIs have been moved to `GmsCoreSupportAbstractPatch`
# [3.0.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.10...v3.0.0-dev.11) (2023-12-12)
### Features
* **Tiktok:** Bump compatibility to `32.5.3` ([#3389](https://github.com/ReVanced/revanced-patches/issues/3389)) ([96cdc10](https://github.com/ReVanced/revanced-patches/commit/96cdc102dd64e3134ec0ac5cc22c956b80c95e0b))
### BREAKING CHANGES
* **Tiktok:** This removes a patch but consolidates it into another.
# [3.0.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.9...v3.0.0-dev.10) (2023-12-11)
### Features
* **YouTube:** Add `Change start page` patch ([ad9ba37](https://github.com/ReVanced/revanced-patches/commit/ad9ba37c0568bd303d807b3ddf1a22daa8f8ec59))
# [3.0.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.8...v3.0.0-dev.9) (2023-12-11)
### Bug Fixes
* **YouTube - GmsCore support:** Check for availability earlier to prevent crashing without any notice ([dab8900](https://github.com/ReVanced/revanced-patches/commit/dab8900e22498a86c7a1c2fd8f1bcc29dec1272c))
# [3.0.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.7...v3.0.0-dev.8) (2023-12-11)
### Features
* **YouTube - Alternative Thumbnails:** Add option to use DeArrow ([#3378](https://github.com/ReVanced/revanced-patches/issues/3378)) ([41217f6](https://github.com/ReVanced/revanced-patches/commit/41217f61e600e47dd6812864bff22ee054521d3c))
# [3.0.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.6...v3.0.0-dev.7) (2023-12-07)
### Features
* **Twitter - Dynamic Color:** Remove blue icon and update app name ([#3384](https://github.com/ReVanced/revanced-patches/issues/3384)) ([3db6615](https://github.com/ReVanced/revanced-patches/commit/3db6615568e399aa13dac093868df3d0e1ebc4c3))
# [3.0.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.5...v3.0.0-dev.6) (2023-12-05)
### Features
* **Twitch - Settings:** Support version `16.1.0` and `15.4.1` ([#3377](https://github.com/ReVanced/revanced-patches/issues/3377)) ([062310d](https://github.com/ReVanced/revanced-patches/commit/062310dcc3923568c96171420c7fb9c0c2144233))
# [3.0.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.4...v3.0.0-dev.5) (2023-12-04)
### Bug Fixes
* Use correct class loader to load resources ([1d5f1f8](https://github.com/ReVanced/revanced-patches/commit/1d5f1f83be1f4eb78381887cd59f1649f1ed6d71))
### Features
* **Photomath:** Constrain patches to last working version ([f9a5dc6](https://github.com/ReVanced/revanced-patches/commit/f9a5dc6c91f37e9d7018e631739ca61511940d29))
# [3.0.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.3...v3.0.0-dev.4) (2023-12-04)
### Bug Fixes
* **YouTube - Minimized playback:** Fix PIP incorrectly shown for some Shorts playback ([#3364](https://github.com/ReVanced/revanced-patches/issues/3364)) ([84607ff](https://github.com/ReVanced/revanced-patches/commit/84607ff5f4bd30d328cdc4e1d46070a86d6c56bf))
# [3.0.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.2...v3.0.0-dev.3) (2023-12-04)

View File

@@ -333,6 +333,20 @@ public final class app/revanced/patches/myexpenses/misc/pro/UnlockProPatch : app
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/myfitnesspal/ads/HideAdsPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/myfitnesspal/ads/HideAdsPatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/myfitnesspal/ads/fingerprints/IsPremiumUseCaseImplFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint {
public static final field INSTANCE Lapp/revanced/patches/myfitnesspal/ads/fingerprints/IsPremiumUseCaseImplFingerprint;
}
public final class app/revanced/patches/myfitnesspal/ads/fingerprints/MainActivityNavigateToNativePremiumUpsellFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint {
public static final field INSTANCE Lapp/revanced/patches/myfitnesspal/ads/fingerprints/MainActivityNavigateToNativePremiumUpsellFingerprint;
}
public final class app/revanced/patches/netguard/broadcasts/removerestriction/RemoveBroadcastsRestrictionPatch : app/revanced/patcher/patch/ResourcePatch {
public static final field INSTANCE Lapp/revanced/patches/netguard/broadcasts/removerestriction/RemoveBroadcastsRestrictionPatch;
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
@@ -418,7 +432,6 @@ public final class app/revanced/patches/reddit/customclients/baconreader/api/Spo
public final class app/revanced/patches/reddit/customclients/boostforreddit/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch {
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/boostforreddit/api/SpoofClientPatch;
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
}
public final class app/revanced/patches/reddit/customclients/infinityforreddit/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch {
@@ -482,7 +495,6 @@ public final class app/revanced/patches/reddit/customclients/syncforreddit/api/S
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/api/SpoofClientPatch;
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
public fun patchMiscellaneous (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
}
public final class app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/DisablePiracyDetectionPatch : app/revanced/patcher/patch/BytecodePatch {
@@ -521,8 +533,13 @@ public final class app/revanced/patches/serviceportalbund/detection/root/RootDet
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/shared/fingerprints/HomeActivityFingerprint : app/revanced/patches/shared/integrations/AbstractIntegrationsPatch$IntegrationsFingerprint {
public static final field INSTANCE Lapp/revanced/patches/shared/fingerprints/HomeActivityFingerprint;
}
public abstract class app/revanced/patches/shared/integrations/AbstractIntegrationsPatch : app/revanced/patcher/patch/BytecodePatch {
public fun <init> (Ljava/lang/String;Ljava/util/Set;)V
public fun <init> (Ljava/util/Set;)V
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
@@ -614,13 +631,6 @@ public abstract class app/revanced/patches/shared/settings/preference/BaseResour
public static synthetic fun serialize$default (Lapp/revanced/patches/shared/settings/preference/BaseResource;Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/w3c/dom/Element;
}
public abstract class app/revanced/patches/shared/settings/preference/DefaultBasePreference : app/revanced/patches/shared/settings/preference/BasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;Ljava/lang/Object;)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getDefault ()Ljava/lang/Object;
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
}
public final class app/revanced/patches/shared/settings/preference/SummaryType : java/lang/Enum {
public static final field DEFAULT Lapp/revanced/patches/shared/settings/preference/SummaryType;
public static final field OFF Lapp/revanced/patches/shared/settings/preference/SummaryType;
@@ -648,16 +658,16 @@ public final class app/revanced/patches/shared/settings/preference/impl/InputTyp
public static fun values ()[Lapp/revanced/patches/shared/settings/preference/impl/InputType;
}
public final class app/revanced/patches/shared/settings/preference/impl/ListPreference : app/revanced/patches/shared/settings/preference/DefaultBasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getEntries ()Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;
public final fun getEntryValues ()Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;
public final class app/revanced/patches/shared/settings/preference/impl/ListPreference : app/revanced/patches/shared/settings/preference/BasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
}
public final class app/revanced/patches/shared/settings/preference/impl/NonInteractivePreference : app/revanced/patches/shared/settings/preference/BasePreference {
public fun <init> (Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;)V
public fun <init> (Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;Z)V
public synthetic fun <init> (Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getSelectable ()Z
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
}
@@ -696,18 +706,18 @@ public final class app/revanced/patches/shared/settings/preference/impl/StringRe
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
}
public final class app/revanced/patches/shared/settings/preference/impl/SwitchPreference : app/revanced/patches/shared/settings/preference/DefaultBasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Z)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final class app/revanced/patches/shared/settings/preference/impl/SwitchPreference : app/revanced/patches/shared/settings/preference/BasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getSummaryOff ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
public final fun getSummaryOn ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
public final fun getUserDialogMessage ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
}
public final class app/revanced/patches/shared/settings/preference/impl/TextPreference : app/revanced/patches/shared/settings/preference/DefaultBasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final class app/revanced/patches/shared/settings/preference/impl/TextPreference : app/revanced/patches/shared/settings/preference/BasePreference {
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getInputType ()Lapp/revanced/patches/shared/settings/preference/impl/InputType;
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
}
@@ -808,14 +818,14 @@ public final class app/revanced/patches/ticktick/misc/themeunlock/UnlockProPatch
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/tiktok/ad/HideAdsPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/tiktok/ad/HideAdsPatch;
public final class app/revanced/patches/tiktok/feedfilter/FeedFilterPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/tiktok/feedfilter/FeedFilterPatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/tiktok/feedfilter/FeedFilterPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/tiktok/feedfilter/FeedFilterPatch;
public final class app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
@@ -1084,6 +1094,12 @@ public final class app/revanced/patches/youtube/interaction/copyvideourl/CopyVid
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -1126,6 +1142,12 @@ public final class app/revanced/patches/youtube/layout/branding/CustomBrandingPa
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
}
public final class app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch : app/revanced/patcher/patch/ResourcePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch;
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
}
public final class app/revanced/patches/youtube/layout/branding/header/PremiumHeadingPatch : app/revanced/patcher/patch/ResourcePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/branding/header/PremiumHeadingPatch;
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
@@ -1336,6 +1358,16 @@ public final class app/revanced/patches/youtube/layout/spoofappversion/SpoofAppV
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/youtube/layout/startpage/ChangeStartPagePatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/startpage/ChangeStartPagePatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
public final class app/revanced/patches/youtube/layout/startpage/fingerprints/StartActivityFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint {
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/startpage/fingerprints/StartActivityFingerprint;
}
public final class app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -1363,7 +1395,6 @@ public final class app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch
public final class app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch;
public final fun addImageUrlErrorCallbackHook (Ljava/lang/String;)V
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}
@@ -1457,6 +1488,7 @@ public final class app/revanced/patches/youtube/misc/minimizedplayback/Minimized
public final class app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch : app/revanced/patcher/patch/ResourcePatch, java/io/Closeable {
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch;
public final fun addControls (Ljava/lang/String;)V
public fun close ()V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V

View File

@@ -1,7 +1,7 @@
import org.gradle.kotlin.dsl.support.listFilesOrdered
plugins {
kotlin("jvm") version "1.9.10"
kotlin("jvm") version "1.9.22"
alias(libs.plugins.binary.compatibility.validator)
`maven-publish`
}
@@ -49,7 +49,7 @@ tasks.withType(Jar::class) {
tasks {
register<DefaultTask>("generateBundle") {
description = "Generate dex files from build and bundle them in the jar file"
description = "Generate DEX files and add them in the JAR file"
dependsOn(build)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 3.0.0-dev.3
version = 4.0.0-dev.9

View File

@@ -1,7 +1,7 @@
[versions]
revanced-patcher = "19.1.0"
revanced-patcher = "19.2.0"
smali = "3.0.3"
guava = "32.1.2-jre"
guava = "33.0.0-jre"
gson = "2.10.1"
binary-compatibility-validator = "0.13.2"

Binary file not shown.

View File

@@ -1,6 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dist
zipStorePath=wrapper/dists

17
gradlew vendored
View File

@@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -201,11 +202,11 @@ 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
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \

764
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
{
"devDependencies": {
"@saithodev/semantic-release-backmerge": "^3.2.1",
"@saithodev/semantic-release-backmerge": "^4.0.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"gradle-semantic-release-plugin": "^1.8.0",
"semantic-release": "^22.0.8"
"gradle-semantic-release-plugin": "^1.9.0",
"semantic-release": "^22.0.12"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -4,6 +4,6 @@ rootProject.name = "revanced-patches"
buildCache {
local {
isEnabled = !System.getenv().containsKey("CI")
isEnabled = "CI" !in System.getenv()
}
}

View File

@@ -18,7 +18,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
)
@Suppress("unused")
object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/integrations/all/connectivity/wifi/spoof/SpoofWifiPatch"
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
override fun filterMap(

View File

@@ -10,7 +10,7 @@ import java.io.Closeable
@Patch(
name = "Change package name",
description = "Appends \".revanced\" to the package name by default.",
description = "Appends \".revanced\" to the package name by default. Changing the package name of the app can lead to unexpected issues.",
use = false
)
@Suppress("unused")
@@ -59,4 +59,4 @@ object ChangePackageNamePatch : ResourcePatch(), Closeable {
manifest.setAttribute("package", replacementPackageName)
}
}
}

View File

@@ -10,7 +10,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
@Suppress("MemberVisibilityCanBePrivate")
abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
abstract fun filterMap(
classDef: ClassDef,
method: Method,

View File

@@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
@Suppress("unused")
object RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
"Lapp/revanced/integrations/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
// Information about method calls we want to replace
enum class MethodCall(

View File

@@ -24,7 +24,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
@Suppress("unused")
object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
"Lapp/revanced/integrations/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
override fun execute(context: BytecodeContext) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.all.telephony.sim.spoof
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.patch.options.PatchOption
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
@@ -25,26 +24,29 @@ import java.util.*
)
@Suppress("unused")
object SpoofSimCountryPatch : AbstractTransformInstructionsPatch<Pair<Int, String>>() {
private val isoValidator: PatchOption<String>.(String?) -> Boolean =
{ it: String? -> it?.uppercase() in Locale.getISOCountries() || it == null }
private val countries = Locale.getISOCountries().associateBy { Locale("", it).displayCountry }
private val networkCountryIso by stringPatchOption(
private val networkCountryIso by isoCountryPatchOption(
"networkCountryIso",
null,
null,
"Network ISO Country Code",
"ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) " +
"of the current registered operator or the cell nearby.",
validator = isoValidator
)
private val simCountryIso by stringPatchOption(
private val simCountryIso by isoCountryPatchOption(
"simCountryIso",
null,
null,
"Sim ISO Country Code",
)
private fun isoCountryPatchOption(
key: String,
title: String,
) = stringPatchOption(
key,
null,
countries,
title,
"ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code.",
validator = isoValidator
false,
validator = { it: String? -> it == null || it.uppercase() in countries.values }
)
override fun filterMap(

View File

@@ -9,7 +9,7 @@ import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerp
@Patch(
name = "Unlock pro",
compatiblePackages = [CompatiblePackage("ginlemon.iconpackstudio")]
compatiblePackages = [CompatiblePackage("ginlemon.iconpackstudio", ["2.2 build 016"])]
)
@Suppress("unused")
object UnlockProPatch : BytecodePatch(

View File

@@ -12,7 +12,7 @@ import app.revanced.util.returnEarly
@Patch(
name = "Remove root detection",
description = "Removes the check for root permissions and unlocked bootloader.",
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
)
@Suppress("unused")
object RootDetectionPatch : BytecodePatch(

View File

@@ -10,7 +10,7 @@ import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSign
@Patch(
name = "Spoof signature",
description = "Spoofs the signature of the app.",
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
)
@Suppress("unused")
object SpoofSignaturePatch : BytecodePatch(

View File

@@ -9,8 +9,8 @@ import app.revanced.patches.youtube.misc.gms.fingerprints.CastContextFetchFinger
@Suppress("unused")
object GmsCoreSupportPatch : AbstractGmsCoreSupportPatch(
fromPackageName = REVANCED_MUSIC_PACKAGE_NAME,
toPackageName = MUSIC_PACKAGE_NAME,
fromPackageName = MUSIC_PACKAGE_NAME,
toPackageName = REVANCED_MUSIC_PACKAGE_NAME,
primeMethodFingerprint = PrimeMethodFingerprint,
earlyReturnFingerprints = setOf(
ServiceCheckFingerprint,

View File

@@ -0,0 +1,38 @@
package app.revanced.patches.myfitnesspal.ads
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.myfitnesspal.ads.fingerprints.IsPremiumUseCaseImplFingerprint
import app.revanced.patches.myfitnesspal.ads.fingerprints.MainActivityNavigateToNativePremiumUpsellFingerprint
import app.revanced.util.exception
@Patch(
name = "Hide ads",
description = "Hides most of the ads across the app.",
compatiblePackages = [CompatiblePackage("com.myfitnesspal.android")]
)
@Suppress("unused")
object HideAdsPatch : BytecodePatch(
setOf(IsPremiumUseCaseImplFingerprint, MainActivityNavigateToNativePremiumUpsellFingerprint)
) {
override fun execute(context: BytecodeContext) {
// Overwrite the premium status specifically for ads.
IsPremiumUseCaseImplFingerprint.result?.mutableMethod?.replaceInstructions(
0,
"""
sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
return-object v0
"""
) ?: throw IsPremiumUseCaseImplFingerprint.exception
// Prevent the premium upsell dialog from showing when the main activity is launched.
// In other places that are premium-only the dialog will still show.
MainActivityNavigateToNativePremiumUpsellFingerprint.result?.mutableMethod?.replaceInstructions(
0,
"return-void"
) ?: throw MainActivityNavigateToNativePremiumUpsellFingerprint.exception
}
}

View File

@@ -0,0 +1,11 @@
package app.revanced.patches.myfitnesspal.ads.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
object IsPremiumUseCaseImplFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, classDef ->
classDef.type.endsWith("IsPremiumUseCaseImpl;") && methodDef.name == "doWork"
}
)

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.myfitnesspal.ads.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
object MainActivityNavigateToNativePremiumUpsellFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
customFingerprint = { methodDef, classDef ->
classDef.type.endsWith("MainActivity;") && methodDef.name == "navigateToNativePremiumUpsell"
}
)

View File

@@ -14,7 +14,7 @@ import kotlin.random.Random
name = "Spoof device ID",
description = "Spoofs device ID to mitigate manual bans by developers.",
dependencies = [SignatureDetectionPatch::class],
compatiblePackages = [CompatiblePackage("com.microblink.photomath")]
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
)
@Suppress("unused")
object SpoofDeviceIdPatch : BytecodePatch(

View File

@@ -13,7 +13,7 @@ import app.revanced.patches.photomath.misc.unlockplus.fingerprints.IsPlusUnlocke
@Patch(
name = "Unlock plus",
dependencies = [SignatureDetectionPatch::class, EnableBookpointPatch::class],
compatiblePackages = [CompatiblePackage("com.microblink.photomath")]
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
)
@Suppress("unused")
object UnlockPlusPatch : BytecodePatch(

View File

@@ -26,7 +26,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Suppress("unused")
object HideAdsPatch : BytecodePatch(setOf(AdPostFingerprint, NewAdPostFingerprint)) {
private const val FILTER_METHOD_DESCRIPTOR =
"Lapp/revanced/reddit/patches/FilterPromotedLinksPatch;" +
"Lapp/revanced/integrations/reddit/patches/FilterPromotedLinksPatch;" +
"->filterChildren(Ljava/lang/Iterable;)Ljava/util/List;"
override fun execute(context: BytecodeContext) {

View File

@@ -4,7 +4,6 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.MethodFingerprintResult
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
@@ -25,20 +24,4 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
"""
)
}
override fun Set<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
first().let { result ->
result.mutableMethod.apply {
val insertIndex = result.scanResult.patternScanResult!!.endIndex
addInstructions(
insertIndex,
"""
const-string v7, "$OAUTH_USER_AGENT"
invoke-virtual {v4, v7}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V
"""
)
}
}
}
}

View File

@@ -1,18 +1,17 @@
package app.revanced.patches.reddit.customclients.syncforreddit.api
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.fingerprint.MethodFingerprintResult
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.ImgurImageAPIFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.LoadBrowserURLFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.DisablePiracyDetectionPatch
import app.revanced.util.exception
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.reference.StringReference
@@ -76,18 +75,4 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
"const-string v1, \"https://api.imgur.com/3/image\""
)
}
override fun Set<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
first().let { result ->
val insertIndex = result.scanResult.patternScanResult!!.startIndex
result.mutableMethod.addInstructions(
insertIndex,
"""
const-string v0, "$OAUTH_USER_AGENT"
invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V
"""
)
}
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.shared.fingerprints
import app.revanced.patches.shared.integrations.AbstractIntegrationsPatch.IntegrationsFingerprint
object HomeActivityFingerprint : IntegrationsFingerprint(
customFingerprint = { methodDef, classDef ->
methodDef.name == "onCreate" && classDef.type.endsWith("Shell_HomeActivity;")
},
)

View File

@@ -11,9 +11,27 @@ import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method
abstract class AbstractIntegrationsPatch(
private val integrationsDescriptor: String,
private val hooks: Set<IntegrationsFingerprint>
) : BytecodePatch(hooks) {
@Deprecated(
"Use the constructor without the integrationsDescriptor parameter",
ReplaceWith("AbstractIntegrationsPatch(hooks)")
)
@Suppress("UNUSED_PARAMETER")
constructor(
integrationsDescriptor: String,
hooks: Set<IntegrationsFingerprint>
) : this(hooks)
override fun execute(context: BytecodeContext) {
if (context.findClass(INTEGRATIONS_CLASS_DESCRIPTOR) == null) throw PatchException(
"Integrations have not been merged yet. This patch can not succeed without merging the integrations."
)
for (hook in hooks) hook.invoke(INTEGRATIONS_CLASS_DESCRIPTOR)
}
/**
* [MethodFingerprint] for integrations.
*
@@ -53,11 +71,7 @@ abstract class AbstractIntegrationsPatch(
}
}
override fun execute(context: BytecodeContext) {
if (context.findClass(integrationsDescriptor) == null) throw PatchException(
"Integrations have not been merged yet. This patch can not succeed without merging the integrations."
)
for (hook in hooks) hook.invoke(integrationsDescriptor)
private companion object {
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/shared/Utils;"
}
}

View File

@@ -13,16 +13,18 @@ import app.revanced.patches.shared.misc.gms.AbstractGmsCoreSupportPatch.Constant
import app.revanced.patches.shared.misc.gms.fingerprints.GmsCoreSupportFingerprint
import app.revanced.patches.shared.misc.gms.fingerprints.GmsCoreSupportFingerprint.GET_GMS_CORE_VENDOR_METHOD_NAME
import app.revanced.util.exception
import app.revanced.util.getReference
import app.revanced.util.returnEarly
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction21c
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
import com.android.tools.smali.dexlib2.iface.reference.StringReference
import com.android.tools.smali.dexlib2.immutable.reference.ImmutableStringReference
import com.android.tools.smali.dexlib2.util.MethodUtil
/**
* A patch that allows Google apps to run without root and under a different package name
* A patch that allows patched Google apps to run without root and under a different package name
* by using GmsCore instead of Google Play Services.
*
* @param fromPackageName The package name of the original app.
@@ -45,7 +47,7 @@ abstract class AbstractGmsCoreSupportPatch(
fingerprints: Set<MethodFingerprint> = emptySet(),
) : BytecodePatch(
name = "GmsCore support",
description = "Allows Google apps to run without root and under a different package name " +
description = "Allows patched Google apps to run without root and under a different package name " +
"by using GmsCore instead of Google Play Services.",
dependencies = setOf(ChangePackageNamePatch::class, abstractGmsCoreSupportResourcePatch::class) + dependencies,
compatiblePackages = compatiblePackages,
@@ -169,23 +171,20 @@ abstract class AbstractGmsCoreSupportPatch(
}
}
private fun transformPrimeMethod(packageName: String) = primeMethodFingerprint.result?.mutableMethod?.apply {
var register = 2
val index = getInstructions().indexOfFirst {
if (it.opcode != Opcode.CONST_STRING) return@indexOfFirst false
private fun transformPrimeMethod(packageName: String) {
primeMethodFingerprint.result?.mutableMethod?.apply {
var register = 2
val instructionString = ((it as Instruction21c).reference as StringReference).string
if (instructionString != fromPackageName) return@indexOfFirst false
val index = getInstructions().indexOfFirst {
if (it.getReference<StringReference>()?.string != fromPackageName) return@indexOfFirst false
register = it.registerA
return@indexOfFirst true
}
register = (it as OneRegisterInstruction).registerA
return@indexOfFirst true
}
replaceInstruction(
index, "const-string v$register, \"$packageName\""
)
replaceInstruction(index, "const-string v$register, \"$packageName\"")
} ?: throw primeMethodFingerprint.exception
}
?: throw primeMethodFingerprint.exception
/**
* A collection of permissions, intents and content provider authorities

View File

@@ -11,6 +11,7 @@ import app.revanced.patches.shared.settings.preference.impl.ArrayResource
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.util.ResourceGroup
import app.revanced.util.copyResources
import app.revanced.util.mergeStrings
import org.w3c.dom.Node
import java.io.Closeable
@@ -37,6 +38,8 @@ abstract class AbstractSettingsResourcePatch(
stringsEditor = context.xmlEditor["res/values/strings.xml"]
arraysEditor = context.xmlEditor["res/values/arrays.xml"]
revancedPreferencesEditor = context.xmlEditor["res/xml/$preferenceFileName.xml"]
context.mergeStrings("settings/host/values/strings.xml")
}
internal companion object {

View File

@@ -9,7 +9,7 @@ import org.w3c.dom.Element
*
* @param key The key of the preference.
* @param title The title of the preference.
* @param tag The tag of the preference.
* @param tag The full class name for the preference.
* @param summary The summary of the preference.
*/
abstract class BasePreference(

View File

@@ -1,32 +0,0 @@
package app.revanced.patches.shared.settings.preference
import app.revanced.patches.shared.settings.preference.impl.StringResource
import org.w3c.dom.Document
/**
* Base preference class that also has a default value.
*
* @param key The key of the preference.
* @param title The title of the preference.
* @param tag The tag of the preference.
* @param summary The summary of the preference.
* @param default The default value of the preference.
*/
abstract class DefaultBasePreference<T>(
key: String?,
title: StringResource,
summary: StringResource? = null,
tag: String,
val default: T? = null,
) : BasePreference(key, title, summary, tag) {
/**
* Serialize preference element to XML.
* Overriding methods should invoke super and operate on its return value.
* @param ownerDocument Target document to create elements from.
* @param resourceCallback Called when a resource has been processed.
* @return The serialized element.
*/
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
super.serialize(ownerDocument, resourceCallback).apply { addDefault(default) }
}

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.BaseResource
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
import app.revanced.patches.shared.settings.preference.addSummary
import org.w3c.dom.Document
@@ -13,16 +13,14 @@ import org.w3c.dom.Document
* @param entries The human-readable entries of the list preference.
* @param entryValues The entry values of the list preference.
* @param summary The summary of the list preference.
* @param default The default entry value of the list preference.
*/
class ListPreference(
key: String,
title: StringResource,
val entries: ArrayResource,
val entryValues: ArrayResource,
summary: StringResource? = null,
default: String? = null,
) : DefaultBasePreference<String>(key, title, summary, "ListPreference", default) {
private val entries: ArrayResource,
private val entryValues: ArrayResource,
summary: StringResource? = null
) : BasePreference(key, title, summary, "ListPreference") {
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
super.serialize(ownerDocument, resourceCallback).apply {
setAttribute("android:entries", "@array/${entries.also { resourceCallback.invoke(it) }.name}")

View File

@@ -14,15 +14,21 @@ import org.w3c.dom.Element
*
* @param title The title of the preference.
* @param summary The summary of the text preference.
* @param selectable If this preference responds to tapping.
* Setting to 'true' restores the horizontal dividers on the top and bottom,
* but tapping will still do nothing since this Preference has no key.
*/
class NonInteractivePreference(
title: StringResource,
summary: StringResource,
) : BasePreference(null, title, summary, "Preference") {
summary: StringResource?,
tag: String = "Preference",
// If androidx.preference is later used, this can be changed to the show top/bottom dividers feature.
val selectable: Boolean = false
) : BasePreference(null, title, summary, tag) {
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit): Element {
return super.serialize(ownerDocument, resourceCallback).apply {
addSummary(summary?.also { resourceCallback.invoke(it)
setAttribute("android:selectable", false.toString())
setAttribute("android:selectable", selectable.toString())
})
}
}

View File

@@ -1,10 +1,10 @@
package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.AbstractSettingsResourcePatch.Companion.include
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.BaseResource
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
import app.revanced.patches.shared.settings.preference.SummaryType
import app.revanced.patches.shared.settings.preference.addSummary
import app.revanced.patches.shared.settings.AbstractSettingsResourcePatch.Companion.include
import org.w3c.dom.Document
import org.w3c.dom.Element
@@ -16,15 +16,13 @@ import org.w3c.dom.Element
* @param summaryOn The summary to show when the preference is enabled.
* @param summaryOff The summary to show when the preference is disabled.
* @param userDialogMessage The message to show in a dialog when the user toggles the preference.
* @param default The default value of the switch.
*/
class SwitchPreference(
key: String, title: StringResource,
val summaryOn: StringResource,
val summaryOff: StringResource,
val userDialogMessage: StringResource? = null,
default: Boolean = false,
) : DefaultBasePreference<Boolean>( key, title, null, "SwitchPreference", default) {
) : BasePreference(key, title, null, "SwitchPreference") {
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit): Element {
userDialogMessage?.include()

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.BaseResource
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
import org.w3c.dom.Document
/**
@@ -11,16 +11,14 @@ import org.w3c.dom.Document
* @param title The title of the text preference.
* @param inputType The input type of the text preference.
* @param summary The summary of the text preference.
* @param default The default value of the text preference.
*/
class TextPreference(
key: String?,
title: StringResource,
summary: StringResource?,
val inputType: InputType = InputType.TEXT,
default: String? = null,
tag: String = "app.revanced.integrations.settingsmenu.ResettableEditTextPreference"
) : DefaultBasePreference<String>(key, title, summary, tag, default) {
tag: String = "app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference"
) : BasePreference(key, title, summary, tag) {
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
super.serialize(ownerDocument, resourceCallback).apply {

View File

@@ -1,51 +0,0 @@
package app.revanced.patches.tiktok.ad
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint
import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
@Patch(
name = "Hide ads",
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill", ["30.8.4"]),
CompatiblePackage("com.zhiliaoapp.musically", ["30.8.4"])
]
)
@Suppress("unused")
object HideAdsPatch : BytecodePatch(
setOf(FeedItemListCloneFingerprint, ConvertHelpFeedItemListFingerprint)
) {
override fun execute(context: BytecodeContext) {
listOf(
FeedItemListCloneFingerprint,
ConvertHelpFeedItemListFingerprint
).forEach { fingerprint ->
val method = fingerprint.result!!.mutableMethod
// iterate all instructions in the clone method
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
// conditions for the instruction we need
if (instruction.opcode.ordinal != Opcode.IPUT_OBJECT.ordinal) continue
val preloadAdsFieldInstruction = (instruction as? ReferenceInstruction)
if ((preloadAdsFieldInstruction?.reference as? FieldReference)?.name != "preloadAds") continue
// set null instead of the field "preloadAds"
val overrideRegister = (preloadAdsFieldInstruction as TwoRegisterInstruction).registerA
method.addInstruction(
index,
"const/4 v$overrideRegister, 0x0"
)
return@forEach
}
throw PatchException("Can not find required instruction.")
}
}
}

View File

@@ -1,10 +0,0 @@
package app.revanced.patches.tiktok.ad.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
internal object ConvertHelpFeedItemListFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/ConvertHelp;") &&
methodDef.name.endsWith("${'$'}FeedItemList")
}
)

View File

@@ -1,9 +0,0 @@
package app.revanced.patches.tiktok.ad.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
internal object FeedItemListCloneFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
}
)

View File

@@ -1,8 +1,8 @@
package app.revanced.patches.tiktok.feedfilter
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
@@ -10,35 +10,39 @@ import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFing
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.util.exception
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
name = "Feed filter",
description = "Filters tiktok videos: removing ads, removing livestreams.",
description = "Removes ads, livestreams, stories, image videos " +
"and videos with a specific amount of views or likes from the feed.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill"),
CompatiblePackage("com.zhiliaoapp.musically")
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
]
)
@Suppress("unused")
object FeedFilterPatch : BytecodePatch(setOf(FeedApiServiceLIZFingerprint, SettingsStatusLoadFingerprint)) {
object FeedFilterPatch : BytecodePatch(
setOf(FeedApiServiceLIZFingerprint, SettingsStatusLoadFingerprint)
) {
override fun execute(context: BytecodeContext) {
val method = FeedApiServiceLIZFingerprint.result!!.mutableMethod
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
if (instruction.opcode != Opcode.RETURN_OBJECT) continue
val feedItemsRegister = (instruction as OneRegisterInstruction).registerA
method.addInstruction(
index,
"invoke-static {v$feedItemsRegister}, Lapp/revanced/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V"
FeedApiServiceLIZFingerprint.result?.mutableMethod?.apply {
val returnFeedItemInstruction = getInstructions().first { it.opcode == Opcode.RETURN_OBJECT }
val feedItemsRegister = (returnFeedItemInstruction as OneRegisterInstruction).registerA
addInstruction(
returnFeedItemInstruction.location.index,
"invoke-static { v$feedItemsRegister }, " +
"Lapp/revanced/integrations/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V"
)
break
}
} ?: throw FeedApiServiceLIZFingerprint.exception
SettingsStatusLoadFingerprint.result?.mutableMethod?.addInstruction(
0,
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableFeedFilter()V"
"invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableFeedFilter()V"
) ?: throw SettingsStatusLoadFingerprint.exception
}
}

View File

@@ -1,12 +1,9 @@
package app.revanced.patches.tiktok.feedfilter.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
internal object FeedApiServiceLIZFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.SYNTHETIC,
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/FeedApiService;") && methodDef.name == "LIZ"
methodDef.definingClass.endsWith("/FeedApiService;") && methodDef.name == "fetchFeedList"
}
)

View File

@@ -0,0 +1,79 @@
package app.revanced.patches.tiktok.interaction.cleardisplay
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints.OnClearDisplayEventFingerprint
import app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints.OnRenderFirstFrameFingerprint
import app.revanced.util.exception
import app.revanced.util.indexOfFirstInstruction
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
@Patch(
name = "Remember clear display",
description = "Remembers the clear display configurations in between videos.",
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
]
)
@Suppress("unused")
object RememberClearDisplayPatch : BytecodePatch(
setOf(
OnClearDisplayEventFingerprint,
OnRenderFirstFrameFingerprint
)
) {
override fun execute(context: BytecodeContext) {
OnClearDisplayEventFingerprint.result?.mutableMethod?.let {
// region Hook the "Clear display" configuration save event to remember the state of clear display.
val isEnabledIndex = it.indexOfFirstInstruction { opcode == Opcode.IGET_BOOLEAN } + 1
val isEnabledRegister = it.getInstruction<Instruction22c>(isEnabledIndex - 1).registerA
it.addInstructions(
isEnabledIndex,
"invoke-static { v$isEnabledRegister }, " +
"Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->rememberClearDisplayState(Z)V"
)
// endregion
// region Override the "Clear display" configuration load event to load the state of clear display.
val clearDisplayEventClass = it.parameters[0].type
OnRenderFirstFrameFingerprint.result?.mutableMethod?.apply {
addInstructionsWithLabels(
0,
"""
# Create a new clearDisplayEvent and post it to the EventBus (https://github.com/greenrobot/EventBus)
# The state of clear display.
invoke-static { }, Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->getClearDisplayState()Z
move-result v3
if-eqz v3, :clear_display_disabled
# Clear display type such as 0 = LONG_PRESS, 1 = SCREEN_RECORD etc.
const/4 v1, 0x0
# Name of the clear display type which is equivalent to the clear display type.
const-string v2, "long_press"
new-instance v0, $clearDisplayEventClass
invoke-direct { v0, v1, v2, v3 }, $clearDisplayEventClass-><init>(ILjava/lang/String;Z)V
invoke-virtual { v0 }, $clearDisplayEventClass->post()Lcom/ss/android/ugc/governance/eventbus/IEvent;
""",
ExternalLabel("clear_display_disabled", getInstruction(0))
)
} ?: throw OnRenderFirstFrameFingerprint.exception
// endregion
} ?: throw OnClearDisplayEventFingerprint.exception
}
}

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
internal object OnClearDisplayEventFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
// Internally the feature is called "Clear mode".
methodDef.definingClass.endsWith("/ClearModePanelComponent;") && methodDef.name == "onClearModeEvent"
}
)

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
internal object OnRenderFirstFrameFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onRenderFirstFrame"
}
)

View File

@@ -4,10 +4,9 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.fingerprint.MethodFingerprint
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
@@ -18,18 +17,19 @@ import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPa
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.util.exception
import app.revanced.util.indexOfFirstInstruction
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.reference.StringReference
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Patch(
name = "Downloads",
description = "Removes download restrictions and changes the default path to download to.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill", ["30.8.4"]),
CompatiblePackage("com.zhiliaoapp.musically", ["30.8.4"])
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
]
)
@Suppress("unused")
@@ -43,86 +43,83 @@ object DownloadsPatch : BytecodePatch(
)
) {
override fun execute(context: BytecodeContext) {
val method1 = ACLCommonShareFingerprint.result!!.mutableMethod
method1.replaceInstructions(
0,
"""
const/4 v0, 0x0
return v0
"""
)
val method2 = ACLCommonShareFingerprint2.result!!.mutableMethod
method2.replaceInstructions(
0,
"""
const/4 v0, 0x2
return v0
"""
)
//Download videos without watermark.
val method3 = ACLCommonShareFingerprint3.result!!.mutableMethod
method3.addInstructionsWithLabels(
0,
"""
invoke-static {}, Lapp/revanced/tiktok/download/DownloadsPatch;->shouldRemoveWatermark()Z
move-result v0
if-eqz v0, :noremovewatermark
const/4 v0, 0x1
return v0
:noremovewatermark
nop
"""
)
//Change the download path patch
val method4 = DownloadPathParentFingerprint.result!!.mutableMethod
val implementation4 = method4.implementation
val instructions = implementation4!!.instructions
var targetOffset = -1
//Search for the target method called instruction offset.
for ((index, instruction) in instructions.withIndex()) {
if (instruction.opcode != Opcode.CONST_STRING) continue
val reference = (instruction as ReferenceInstruction).reference as StringReference
if (reference.string != "video/mp4") continue
val targetInstruction = instructions[index + 1]
if (targetInstruction.opcode != Opcode.INVOKE_STATIC) continue
targetOffset = index + 1
break
}
if (targetOffset == -1) throw PatchException("Can not find download path uri method.")
//Change videos' download path.
val downloadUriMethod = context
.toMethodWalker(DownloadPathParentFingerprint.result!!.method)
.nextMethod(targetOffset, true)
.getMethod() as MutableMethod
downloadUriMethod.implementation!!.instructions.forEachIndexed { index, instruction ->
if (instruction.opcode == Opcode.SGET_OBJECT) {
val overrideRegister = (instruction as OneRegisterInstruction).registerA
downloadUriMethod.addInstructions(
index + 1,
fun MethodFingerprint.getMethod() = result?.mutableMethod ?: throw exception
mapOf<MethodFingerprint, MutableMethod.() -> Unit>(
ACLCommonShareFingerprint to {
replaceInstructions(
0,
"""
invoke-static {}, Lapp/revanced/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
move-result-object v$overrideRegister
const/4 v0, 0x0
return v0
"""
)
}
if (instruction.opcode == Opcode.CONST_STRING) {
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
if (string.contains("/Camera")) {
val overrideRegister = (instruction as OneRegisterInstruction).registerA
val overrideString = string.replace("/Camera", "")
downloadUriMethod.replaceInstruction(
index,
"""
const-string v$overrideRegister, "$overrideString"
"""
},
ACLCommonShareFingerprint2 to {
replaceInstructions(
0,
"""
const/4 v0, 0x2
return v0
"""
)
},
// Download videos without watermark.
ACLCommonShareFingerprint3 to {
addInstructionsWithLabels(
0,
"""
invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->shouldRemoveWatermark()Z
move-result v0
if-eqz v0, :noremovewatermark
const/4 v0, 0x1
return v0
:noremovewatermark
nop
"""
)
},
// Change the download path patch.
DownloadPathParentFingerprint to {
val targetIndex = indexOfFirstInstruction { opcode == Opcode.INVOKE_STATIC }
val downloadUriMethod = context
.toMethodWalker(this)
.nextMethod(targetIndex, true)
.getMethod() as MutableMethod
val firstIndex = downloadUriMethod.indexOfFirstInstruction {
opcode == Opcode.INVOKE_DIRECT && ((this as Instruction35c).reference as MethodReference).name == "<init>"
}
val secondIndex = downloadUriMethod.indexOfFirstInstruction {
opcode == Opcode.INVOKE_STATIC && ((this as Instruction35c).reference as MethodReference).returnType.contains(
"Uri"
)
}
downloadUriMethod.addInstructions(
secondIndex,
"""
invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
move-result-object v0
"""
)
downloadUriMethod.addInstructions(
firstIndex,
"""
invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
move-result-object v0
"""
)
},
SettingsStatusLoadFingerprint to {
addInstruction(
0,
"invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableDownload()V"
)
}
).forEach { (fingerprint, patch) ->
fingerprint.getMethod().patch()
}
val method5 = SettingsStatusLoadFingerprint.result!!.mutableMethod
method5.addInstruction(
0,
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableDownload()V"
)
}
}
}

View File

@@ -3,13 +3,22 @@ package app.revanced.patches.tiktok.interaction.downloads.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal object DownloadPathParentFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
"L",
AccessFlags.PUBLIC or AccessFlags.STATIC,
strings = listOf(
"code",
"reason",
"params insufficient"
"video/mp4"
),
parameters = listOf(
"L",
"L"
),
opcodes = listOf(
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.RETURN_OBJECT
)
)

View File

@@ -1,41 +1,82 @@
package app.revanced.patches.tiktok.interaction.speed
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint
import com.android.tools.smali.dexlib2.Opcode
import app.revanced.patches.tiktok.interaction.speed.fingerprints.GetSpeedFingerprint
import app.revanced.patches.tiktok.interaction.speed.fingerprints.OnRenderFirstFrameFingerprint
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SetSpeedFingerprint
import app.revanced.util.exception
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction11x
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Patch(
name = "Playback speed",
description = "Enables the playback speed option for all videos.",
description = "Enables the playback speed option for all videos and " +
"retains the speed configurations in between videos.",
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill"),
CompatiblePackage("com.zhiliaoapp.musically")
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
]
)
@Suppress("unused")
object PlaybackSpeedPatch : BytecodePatch(setOf(SpeedControlParentFingerprint)) {
object PlaybackSpeedPatch : BytecodePatch(
setOf(
GetSpeedFingerprint,
OnRenderFirstFrameFingerprint,
SetSpeedFingerprint
)
) {
override fun execute(context: BytecodeContext) {
val parentMethod = SpeedControlParentFingerprint.result!!.mutableMethod
val parentMethodInstructions = parentMethod.implementation!!.instructions
for ((index, instruction) in parentMethodInstructions.withIndex()) {
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) continue
val isSpeedEnableMethod = context
.toMethodWalker(parentMethod)
.nextMethod(index, true)
.getMethod() as MutableMethod
isSpeedEnableMethod.addInstructions(
SetSpeedFingerprint.result?.let { onVideoSwiped ->
// Remember the playback speed of the current video.
GetSpeedFingerprint.result?.mutableMethod?.apply {
val injectIndex = indexOfFirstInstruction { getReference<MethodReference>()?.returnType == "F" } + 2
val register = getInstruction<Instruction11x>(injectIndex - 1).registerA
addInstruction(
injectIndex,
"invoke-static { v$register }," +
" Lapp/revanced/integrations/tiktok/speed/PlaybackSpeedPatch;->rememberPlaybackSpeed(F)V"
)
} ?: throw GetSpeedFingerprint.exception
// By default, the playback speed will reset to 1.0 at the start of each video.
// Instead, override it with the desired playback speed.
OnRenderFirstFrameFingerprint.result?.mutableMethod?.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
# Video playback location (e.g. home page, following page or search result page) retrieved using getEnterFrom method.
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/ss/android/ugc/aweme/feed/panel/BaseListFragmentPanel;->getEnterFrom(Z)Ljava/lang/String;
move-result-object v0
# Model of current video retrieved using getCurrentAweme method.
invoke-virtual {p0}, Lcom/ss/android/ugc/aweme/feed/panel/BaseListFragmentPanel;->getCurrentAweme()Lcom/ss/android/ugc/aweme/feed/model/Aweme;
move-result-object v1
# Desired playback speed retrieved using getPlaybackSpeed method.
invoke-static {}, Lapp/revanced/integrations/tiktok/speed/PlaybackSpeedPatch;->getPlaybackSpeed()F
move-result-object v2
invoke-static { v0, v1, v2 }, ${onVideoSwiped.method}
"""
) ?: throw OnRenderFirstFrameFingerprint.exception
// Force enable the playback speed option for all videos.
onVideoSwiped.mutableClass.methods.find { method -> method.returnType == "Z" }?.addInstructions(
0,
"""
)
break
}
const/4 v0, 0x1
return v0
"""
) ?: throw PatchException("Failed to force enable the playback speed option.")
} ?: throw SetSpeedFingerprint.exception
}
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.tiktok.interaction.speed.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
internal object GetSpeedFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onFeedSpeedSelectedEvent"
}
)

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.tiktok.interaction.speed.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
internal object OnRenderFirstFrameFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onRenderFirstFrame"
}
)

View File

@@ -0,0 +1,16 @@
package app.revanced.patches.tiktok.interaction.speed.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
internal object SetSpeedFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf(
"Ljava/lang/String;",
"Lcom/ss/android/ugc/aweme/feed/model/Aweme;",
"F"
),
strings = listOf("enterFrom")
)

View File

@@ -1,16 +0,0 @@
package app.revanced.patches.tiktok.interaction.speed.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
internal object SpeedControlParentFingerprint : MethodFingerprint(
returnType = "L",
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
parameters = listOf(
"L"
),
strings = listOf(
"playback_speed"
)
)

View File

@@ -6,6 +6,5 @@ import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprin
@Patch(requiresIntegrations = true)
object IntegrationsPatch : AbstractIntegrationsPatch(
"Lapp/revanced/tiktok/utils/ReVancedUtils;",
setOf(InitFingerprint)
)

View File

@@ -1,6 +1,5 @@
package app.revanced.patches.tiktok.misc.settings
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -14,17 +13,19 @@ import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationA
import app.revanced.patches.tiktok.misc.settings.fingerprints.AddSettingsEntryFingerprint
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsEntryFingerprint
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsEntryInfoFingerprint
import app.revanced.util.exception
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
@Patch(
name = "Settings",
description = "Adds ReVanced settings to TikTok.",
dependencies = [IntegrationsPatch::class],
compatiblePackages = [
CompatiblePackage("com.ss.android.ugc.trill", ["30.8.4"]),
CompatiblePackage("com.zhiliaoapp.musically", ["30.8.4"])
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
]
)
object SettingsPatch : BytecodePatch(
@@ -36,10 +37,10 @@ object SettingsPatch : BytecodePatch(
)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/tiktok/settingsmenu/SettingsMenu;"
"Lapp/revanced/integrations/tiktok/settings/AdPersonalizationActivityHook;"
private const val INITIALIZE_SETTINGS_METHOD_DESCRIPTOR =
"$INTEGRATIONS_CLASS_DESCRIPTOR->initializeSettings(" +
"$INTEGRATIONS_CLASS_DESCRIPTOR->initialize(" +
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;" +
")Z"
@@ -57,31 +58,31 @@ object SettingsPatch : BytecodePatch(
?: throw SettingsEntryInfoFingerprint.exception
// Create a settings entry for 'revanced settings' and add it to settings fragment
AddSettingsEntryFingerprint.result?.apply {
scanResult.patternScanResult?.startIndex?.let {
val settingsEntries = mutableMethod.getInstruction(it + 3)
val addEntry = mutableMethod.getInstruction<BuilderInstruction35c>(it + 5)
val register1 = addEntry.registerC
val register2 = addEntry.registerD
// Add the settings entry created to the settings fragment
mutableMethod.addInstructions(
it + 6,
listOf(
settingsEntries,
addEntry
)
)
// These instructions call a method that create a settings entry use reflection base on the class name of classes that construct settings entry
mutableMethod.addInstructions(
it + 6,
"""
const-string v$register1, "$settingsButtonClass"
const-string v$register2, "$settingsButtonInfoClass"
invoke-static {v$register1, v$register2}, $CREATE_SETTINGS_ENTRY_METHOD_DESCRIPTOR
move-result-object v$register2
"""
)
AddSettingsEntryFingerprint.result?.mutableMethod?.apply {
val markIndex = implementation!!.instructions.indexOfFirst {
it.opcode == Opcode.IGET_OBJECT && ((it as Instruction22c).reference as FieldReference).name == "headerUnit"
}
val getUnitManager = getInstruction(markIndex + 2)
val addEntry = getInstruction(markIndex + 1)
addInstructions(
markIndex + 2,
listOf(
getUnitManager,
addEntry
)
)
addInstructions(
markIndex + 2,
"""
const-string v0, "$settingsButtonClass"
const-string v1, "$settingsButtonInfoClass"
invoke-static {v0, v1}, $CREATE_SETTINGS_ENTRY_METHOD_DESCRIPTOR
move-result-object v0
"""
)
} ?: throw AddSettingsEntryFingerprint.exception
// Initialize the settings menu once the replaced setting entry is clicked.
@@ -98,10 +99,10 @@ object SettingsPatch : BytecodePatch(
"""
invoke-static {v$thisRegister}, $INITIALIZE_SETTINGS_METHOD_DESCRIPTOR
move-result v$usableRegister
if-eqz v$usableRegister, :notrevanced
if-eqz v$usableRegister, :do_not_open
return-void
""",
ExternalLabel("notrevanced", getInstruction(initializeSettingsIndex))
ExternalLabel("do_not_open", getInstruction(initializeSettingsIndex))
)
} ?: throw AdPersonalizationActivityOnCreateFingerprint.exception
}

View File

@@ -1,22 +1,10 @@
package app.revanced.patches.tiktok.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
internal object AddSettingsEntryFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.CONST_CLASS,
Opcode.APUT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
),
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
methodDef.name == "onViewCreated"
methodDef.name == "initUnitManger"
}
)

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
internal object SettingsStatusLoadFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
methodDef.definingClass.endsWith("Lapp/revanced/integrations/tiktok/settings/SettingsStatus;") &&
methodDef.name == "load"
}
)

View File

@@ -1,6 +1,5 @@
package app.revanced.patches.tiktok.misc.spoof.sim
import app.revanced.util.findMutableMethodOf
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -10,8 +9,9 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.util.findMutableMethodOf
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
@@ -39,7 +39,7 @@ object SpoofSimPatch : BytecodePatch() {
)
override fun execute(context: BytecodeContext) {
// Find all api call to check sim information
// Find all api call to check sim information.
buildMap {
context.classes.forEach { classDef ->
classDef.methods.let { methods ->
@@ -81,23 +81,23 @@ object SpoofSimPatch : BytecodePatch() {
}
}
// Enable patch in settings
// Enable patch in settings.
with(SettingsStatusLoadFingerprint.result!!.mutableMethod) {
addInstruction(
0,
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableSimSpoof()V"
"invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableSimSpoof()V"
)
}
}
// Patch Android API and return fake sim information
// Patch Android API and return fake sim information.
private fun MutableMethod.replaceReference(index: Int, replacement: String) {
val resultReg = getInstruction<OneRegisterInstruction>(index + 1).registerA
addInstructions(
index + 2,
"""
invoke-static {v$resultReg}, Lapp/revanced/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
invoke-static {v$resultReg}, Lapp/revanced/integrations/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
move-result-object v$resultReg
"""
)

View File

@@ -25,7 +25,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
object ShowOnLockscreenPatch : BytecodePatch(
setOf(BrightnessFingerprint)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/tudortmund/lockscreen/ShowOnLockscreenPatch;"
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/tudortmund/lockscreen/ShowOnLockscreenPatch;"
override fun execute(context: BytecodeContext) {
BrightnessFingerprint.result?.mutableMethod?.apply {

View File

@@ -60,7 +60,7 @@ object TimelineFilterPatch : BytecodePatch(
fingerprint.result?.mutableMethod?.addInstructions(
0,
"invoke-static {p$timelineObjectsRegister}, " +
"Lapp/revanced/tumblr/patches/TimelineFilterPatch;->" +
"Lapp/revanced/integrations/tumblr/patches/TimelineFilterPatch;->" +
"filterTimeline(Ljava/util/List;)V"
) ?: throw fingerprint.exception
}

View File

@@ -29,7 +29,7 @@ object AudioAdsPatch : BytecodePatch(
mutableMethod.addInstructionsWithLabels(
0,
"""
invoke-static { }, Lapp/revanced/twitch/patches/AudioAdsPatch;->shouldBlockAudioAds()Z
invoke-static { }, Lapp/revanced/integrations/twitch/patches/AudioAdsPatch;->shouldBlockAudioAds()Z
move-result v0
if-eqz v0, :show_audio_ads
return-void
@@ -52,8 +52,7 @@ object AudioAdsPatch : BytecodePatch(
StringResource(
"revanced_block_audio_ads_off",
"Audio ads are unblocked"
),
default = true,
)
)
)
}

View File

@@ -31,7 +31,7 @@ object EmbeddedAdsPatch : BytecodePatch(
result.mutableMethod.addInstructions(
3,
"""
invoke-static {}, Lapp/revanced/twitch/patches/EmbeddedAdsPatch;->createRequestInterceptor()Lapp/revanced/twitch/api/RequestInterceptor;
invoke-static {}, Lapp/revanced/integrations/twitch/patches/EmbeddedAdsPatch;->createRequestInterceptor()Lapp/revanced/integrations/twitch/api/RequestInterceptor;
move-result-object v2
invoke-virtual {v0, v2}, Lokhttp3/OkHttpClient${"$"}Builder;->addInterceptor(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient${"$"}Builder;
"""
@@ -59,8 +59,7 @@ object EmbeddedAdsPatch : BytecodePatch(
StringResource("key_revanced_proxy_luminous", "luminous"),
StringResource("key_revanced_proxy_purpleadblock", "purpleadblock")
)
),
default = "luminous"
)
)
)

View File

@@ -24,7 +24,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
)
object VideoAdsPatch : AbstractAdPatch(
"Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",
"Lapp/revanced/integrations/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",
"show_video_ads",
setOf(
ContentConfigShowAdsFingerprint,
@@ -135,8 +135,7 @@ object VideoAdsPatch : AbstractAdPatch(
StringResource(
"revanced_block_video_ads_off",
"Video ads are unblocked"
),
default = true
)
)
)
}

View File

@@ -33,7 +33,7 @@ object ShowDeletedMessagesPatch : BytecodePatch(
)
) {
private fun createSpoilerConditionInstructions(register: String = "v0") = """
invoke-static {}, Lapp/revanced/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
invoke-static {}, Lapp/revanced/integrations/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
move-result $register
if-eqz $register, :no_spoiler
"""
@@ -61,7 +61,7 @@ object ShowDeletedMessagesPatch : BytecodePatch(
addInstructionsWithLabels(
0,
"""
invoke-static {p2}, Lapp/revanced/twitch/patches/ShowDeletedMessagesPatch;->reformatDeletedMessage(Landroid/text/Spanned;)Landroid/text/Spanned;
invoke-static {p2}, Lapp/revanced/integrations/twitch/patches/ShowDeletedMessagesPatch;->reformatDeletedMessage(Landroid/text/Spanned;)Landroid/text/Spanned;
move-result-object v0
if-eqz v0, :no_reformat
return-object v0
@@ -92,8 +92,7 @@ object ShowDeletedMessagesPatch : BytecodePatch(
StringResource("key_revanced_deleted_messages_spoiler", "spoiler"),
StringResource("key_revanced_deleted_messages_cross_out", "cross-out")
)
),
default = "cross-out"
)
)
)

View File

@@ -38,8 +38,7 @@ object AutoClaimChannelPointPatch : BytecodePatch(
StringResource(
"revanced_auto_claim_channel_points_off",
"Channel Points are not claimed automatically"
),
default = true
)
)
)
@@ -48,7 +47,7 @@ object AutoClaimChannelPointPatch : BytecodePatch(
addInstructionsWithLabels(
lastIndex, // place in front of return-void
"""
invoke-static {}, Lapp/revanced/twitch/patches/AutoClaimChannelPointsPatch;->shouldAutoClaim()Z
invoke-static {}, Lapp/revanced/integrations/twitch/patches/AutoClaimChannelPointsPatch;->shouldAutoClaim()Z
move-result v0
if-eqz v0, :auto_claim

View File

@@ -39,7 +39,7 @@ object DebugModePatch : BytecodePatch(
addInstructions(
0,
"""
invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
invoke-static {}, Lapp/revanced/integrations/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
move-result v0
return v0
"""
@@ -49,20 +49,19 @@ object DebugModePatch : BytecodePatch(
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
SwitchPreference(
"revanced_debug_mode",
"revanced_twitch_debug_mode",
StringResource(
"revanced_debug_mode_enable",
"Enable debug mode"
"revanced_twitch_debug_mode_title",
"Enable Twitch debug mode"
),
StringResource(
"revanced_debug_mode_on",
"Debug mode is enabled (not recommended)"
"revanced_twitch_debug_mode_summary_on",
"Twitch debug mode is enabled (not recommended)"
),
StringResource(
"revanced_debug_mode_off",
"Debug mode is disabled"
),
default = false,
"revanced_twitch_debug_mode_summary_off",
"Twitch debug mode is disabled"
)
)
)
}

View File

@@ -6,6 +6,5 @@ import app.revanced.patches.twitch.misc.integrations.fingerprints.InitFingerprin
@Patch(requiresIntegrations = true)
object IntegrationsPatch : AbstractIntegrationsPatch(
"Lapp/revanced/twitch/utils/ReVancedUtils;",
setOf(InitFingerprint)
)
)

View File

@@ -1,6 +1,5 @@
package app.revanced.patches.twitch.misc.settings
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -14,12 +13,14 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMut
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
import app.revanced.patches.twitch.misc.integrations.IntegrationsPatch
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.util.exception
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.immutable.ImmutableField
import java.io.Closeable
@@ -30,7 +31,7 @@ import java.io.Closeable
description = "Adds settings menu to Twitch.",
dependencies = [IntegrationsPatch::class, SettingsResourcePatch::class],
compatiblePackages = [
CompatiblePackage("tv.twitch.android.app", ["16.9.1"])
CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])
]
)
object SettingsPatch : BytecodePatch(
@@ -46,12 +47,12 @@ object SettingsPatch : BytecodePatch(
private const val REVANCED_SETTINGS_MENU_ITEM_TITLE_RES = "revanced_settings"
private const val REVANCED_SETTINGS_MENU_ITEM_ICON_RES = "ic_settings"
private const val MENU_ITEM_ENUM_CLASS = "Ltv/twitch/android/feature/settings/menu/SettingsMenuItem;"
private const val MENU_DISMISS_EVENT_CLASS = "Ltv/twitch/android/feature/settings/menu/SettingsMenuViewDelegate\$Event\$OnDismissClicked;"
private const val MENU_ITEM_ENUM_CLASS_DESCRIPTOR = "Ltv/twitch/android/feature/settings/menu/SettingsMenuItem;"
private const val MENU_DISMISS_EVENT_CLASS_DESCRIPTOR = "Ltv/twitch/android/feature/settings/menu/SettingsMenuViewDelegate\$Event\$OnDismissClicked;"
private const val INTEGRATIONS_PACKAGE = "app/revanced/twitch"
private const val SETTINGS_HOOKS_CLASS = "L$INTEGRATIONS_PACKAGE/settingsmenu/SettingsHooks;"
private const val REVANCED_UTILS_CLASS = "L$INTEGRATIONS_PACKAGE/utils/ReVancedUtils;"
private const val INTEGRATIONS_PACKAGE = "app/revanced/integrations/twitch"
private const val ACTIVITY_HOOKS_CLASS_DESCRIPTOR = "L$INTEGRATIONS_PACKAGE/settings/AppCompatActivityHook;"
private const val UTILS_CLASS_DESCRIPTOR = "L$INTEGRATIONS_PACKAGE/Utils;"
override fun execute(context: BytecodeContext) {
// Hook onCreate to handle fragment creation
@@ -60,7 +61,7 @@ object SettingsPatch : BytecodePatch(
mutableMethod.addInstructionsWithLabels(
insertIndex,
"""
invoke-static {p0}, $SETTINGS_HOOKS_CLASS->handleSettingsCreation(Landroidx/appcompat/app/AppCompatActivity;)Z
invoke-static {p0}, $ACTIVITY_HOOKS_CLASS_DESCRIPTOR->handleSettingsCreation(Landroidx/appcompat/app/AppCompatActivity;)Z
move-result v0
if-eqz v0, :no_rv_settings_init
return-void
@@ -84,8 +85,8 @@ object SettingsPatch : BytecodePatch(
mutableMethod.addInstructions(
0,
"""
sget-object v0, $MENU_ITEM_ENUM_CLASS->$REVANCED_SETTINGS_MENU_ITEM_NAME:$MENU_ITEM_ENUM_CLASS
invoke-static {p1, v0}, $SETTINGS_HOOKS_CLASS->handleSettingMenuCreation(Ljava/util/List;Ljava/lang/Object;)Ljava/util/List;
sget-object v0, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR->$REVANCED_SETTINGS_MENU_ITEM_NAME:$MENU_ITEM_ENUM_CLASS_DESCRIPTOR
invoke-static {p1, v0}, $ACTIVITY_HOOKS_CLASS_DESCRIPTOR->handleSettingMenuCreation(Ljava/util/List;Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
"""
)
@@ -97,10 +98,10 @@ object SettingsPatch : BytecodePatch(
mutableMethod.addInstructionsWithLabels(
insertIndex,
"""
invoke-static {p1}, $SETTINGS_HOOKS_CLASS->handleSettingMenuOnClick(Ljava/lang/Enum;)Z
invoke-static {p1}, $ACTIVITY_HOOKS_CLASS_DESCRIPTOR->handleSettingMenuOnClick(Ljava/lang/Enum;)Z
move-result p2
if-eqz p2, :no_rv_settings_onclick
sget-object p1, $MENU_DISMISS_EVENT_CLASS->INSTANCE:$MENU_DISMISS_EVENT_CLASS
sget-object p1, $MENU_DISMISS_EVENT_CLASS_DESCRIPTOR->INSTANCE:$MENU_DISMISS_EVENT_CLASS_DESCRIPTOR
invoke-virtual {p0, p1}, Ltv/twitch/android/core/mvp/viewdelegate/RxViewDelegate;->pushEvent(Ltv/twitch/android/core/mvp/viewdelegate/ViewDelegateEvent;)V
return-void
""",
@@ -109,8 +110,15 @@ object SettingsPatch : BytecodePatch(
} ?: throw MenuGroupsOnClickFingerprint.exception
addString("revanced_settings", "ReVanced Settings", false)
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
addString("revanced_reboot", "Restart", false)
PreferenceScreen.MISC.OTHER.addPreferences(
SwitchPreference(
"revanced_debug",
StringResource("revanced_debug_title", "Debug logging"),
StringResource("revanced_debug_summary_on", "Debug logs are enabled"),
StringResource("revanced_debug_summary_off", "Debug logs are disabled")
),
)
}
fun addString(identifier: String, value: String, formatted: Boolean = true) =
@@ -130,7 +138,7 @@ object SettingsPatch : BytecodePatch(
ImmutableField(
mutableMethod.definingClass,
name,
MENU_ITEM_ENUM_CLASS,
MENU_ITEM_ENUM_CLASS_DESCRIPTOR,
AccessFlags.PUBLIC or AccessFlags.FINAL or AccessFlags.ENUM or AccessFlags.STATIC,
null,
null,
@@ -142,17 +150,17 @@ object SettingsPatch : BytecodePatch(
mutableMethod.addInstructions(
mutableMethod.implementation!!.instructions.size - 4,
"""
new-instance v0, $MENU_ITEM_ENUM_CLASS
new-instance v0, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR
const-string v1, "$titleResourceName"
invoke-static {v1}, $REVANCED_UTILS_CLASS->getStringId(Ljava/lang/String;)I
invoke-static {v1}, $UTILS_CLASS_DESCRIPTOR->getStringId(Ljava/lang/String;)I
move-result v1
const-string v3, "$iconResourceName"
invoke-static {v3}, $REVANCED_UTILS_CLASS->getDrawableId(Ljava/lang/String;)I
invoke-static {v3}, $UTILS_CLASS_DESCRIPTOR->getDrawableId(Ljava/lang/String;)I
move-result v3
const-string v4, "$name"
const/4 v5, $value
invoke-direct {v0, v4, v5, v1, v3}, $MENU_ITEM_ENUM_CLASS-><init>(Ljava/lang/String;III)V
sput-object v0, $MENU_ITEM_ENUM_CLASS->$name:$MENU_ITEM_ENUM_CLASS
invoke-direct {v0, v4, v5, v1, v3}, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR-><init>(Ljava/lang/String;III)V
sput-object v0, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR->$name:$MENU_ITEM_ENUM_CLASS_DESCRIPTOR
"""
)
}
@@ -179,7 +187,7 @@ object SettingsPatch : BytecodePatch(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value },
"app.revanced.twitch.settingsmenu.preference.CustomPreferenceCategory"
"app.revanced.integrations.twitch.settings.preference.CustomPreferenceCategory"
)
}
}

View File

@@ -10,7 +10,7 @@ import java.nio.file.Files
@Patch(
name = "Dynamic color",
description = "Replaces the default Twitter Blue with the user's Material You palette.",
description = "Replaces the default X (Formerly Twitter) Blue with the user's Material You palette.",
compatiblePackages = [CompatiblePackage("com.twitter.android")]
)
@Suppress("unused")
@@ -46,8 +46,7 @@ object DynamicColorPatch : ResourcePatch() {
"twitter_blue_opacity_30" to "@android:color/system_accent1_100",
"twitter_blue_opacity_50" to "@android:color/system_accent1_200",
"twitter_blue_opacity_58" to "@android:color/system_accent1_300",
"deep_transparent_twitter_blue" to "@android:color/system_accent1_200",
"ic_launcher_background" to "#1DA1F2"
"deep_transparent_twitter_blue" to "@android:color/system_accent1_200"
).forEach { (k, v) ->
val colorElement = document.createElement("color")

View File

@@ -20,7 +20,7 @@ import java.io.InvalidClassException
object JsonHookPatch : BytecodePatch(
setOf(LoganSquareFingerprint)
), Closeable {
private const val JSON_HOOK_CLASS_NAMESPACE = "app/revanced/twitter/patches/hook/json"
private const val JSON_HOOK_CLASS_NAMESPACE = "app/revanced/integrations/twitter/patches/hook/json"
private const val JSON_HOOK_PATCH_CLASS_DESCRIPTOR = "L$JSON_HOOK_CLASS_NAMESPACE/JsonHookPatch;"
private const val BASE_PATCH_CLASS_NAME = "BaseJsonHook"
private const val JSON_HOOK_CLASS_DESCRIPTOR = "L$JSON_HOOK_CLASS_NAMESPACE/$BASE_PATCH_CLASS_NAME;"

View File

@@ -12,4 +12,4 @@ import app.revanced.patches.twitter.misc.hook.patch.BaseHookPatchPatch
compatiblePackages = [CompatiblePackage("com.twitter.android")]
)
@Suppress("unused")
object HideAdsPatch : BaseHookPatchPatch("Lapp/revanced/twitter/patches/hook/patch/ads/AdsHook;")
object HideAdsPatch : BaseHookPatchPatch("Lapp/revanced/integrations/twitter/patches/hook/patch/ads/AdsHook;")

View File

@@ -12,5 +12,5 @@ import app.revanced.patches.twitter.misc.hook.patch.BaseHookPatchPatch
)
@Suppress("unused")
object HideRecommendedUsersPatch : BaseHookPatchPatch(
"Lapp/revanced/twitter/patches/hook/patch/recommendation/RecommendedUsersHook;"
"Lapp/revanced/integrations/twitter/patches/hook/patch/recommendation/RecommendedUsersHook;"
)

View File

@@ -15,7 +15,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
@Patch(
name = "Hide ads",
description = "Removes general ads.",
description = "Adds options to remove general ads.",
dependencies = [
HideGetPremiumPatch::class,
HideAdsResourcePatch::class,
@@ -65,7 +65,7 @@ object HideAdsPatch : BytecodePatch() {
.injectHideViewCall(
insertIndex,
viewRegister,
"Lapp/revanced/integrations/patches/components/AdsFilter;",
"Lapp/revanced/integrations/youtube/patches/components/AdsFilter;",
"hideAdAttributionView"
)
}

View File

@@ -19,7 +19,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
)
object HideAdsResourcePatch : ResourcePatch() {
private const val FILTER_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/components/AdsFilter;"
"Lapp/revanced/integrations/youtube/patches/components/AdsFilter;"
internal var adAttributionId: Long = -1
@@ -31,6 +31,12 @@ object HideAdsResourcePatch : ResourcePatch() {
StringResource("revanced_hide_general_ads_summary_on", "General ads are hidden"),
StringResource("revanced_hide_general_ads_summary_off", "General ads are shown")
),
SwitchPreference(
"revanced_hide_fullscreen_ads",
StringResource("revanced_hide_fullscreen_ads_title", "Hide fullscreen ads"),
StringResource("revanced_hide_fullscreen_ads_summary_on", "Fullscreen ads are hidden"),
StringResource("revanced_hide_fullscreen_ads_summary_off", "Fullscreen ads are shown")
),
SwitchPreference(
"revanced_hide_buttoned_ads",
StringResource("revanced_hide_buttoned_ads_title", "Hide buttoned ad"),

View File

@@ -33,7 +33,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
)
object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/HideGetPremiumPatch;"
"Lapp/revanced/integrations/youtube/patches/HideGetPremiumPatch;"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
@@ -45,11 +45,11 @@ object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
),
StringResource(
"revanced_hide_get_premium_summary_on",
"YouTube Premium promotions under video player is hidden"
"YouTube Premium promotions under video player are hidden"
),
StringResource(
"revanced_hide_get_premium_summary_off",
"YouTube Premium promotions under video player is shown"
"YouTube Premium promotions under video player are shown"
)
)
)

View File

@@ -15,7 +15,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Video ads",
description = "Removes ads in the video player.",
description = "Adds an option to remove ads in the video player.",
dependencies = [
IntegrationsPatch::class,
SettingsPatch::class
@@ -53,7 +53,7 @@ object VideoAdsPatch : BytecodePatch(
loadVideoAdsFingerprintMethod.addInstructionsWithLabels(
0, """
invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z
invoke-static { }, Lapp/revanced/integrations/youtube/patches/VideoAdsPatch;->shouldShowAds()Z
move-result v0
if-nez v0, :show_video_ads
return-void

View File

@@ -8,8 +8,8 @@ import app.revanced.patches.youtube.misc.playercontrols.PlayerControlsBytecodePa
import app.revanced.patches.youtube.video.information.VideoInformationPatch
@Patch(
name = "Copy video url",
description = "Adds buttons in player to copy video links.",
name = "Copy video URL",
description = "Adds options to display buttons in the video player to copy video URLs.",
dependencies = [
CopyVideoUrlResourcePatch::class,
PlayerControlsBytecodePatch::class,
@@ -32,7 +32,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
)
@Suppress("unused")
object CopyVideoUrlBytecodePatch : BytecodePatch() {
private const val INTEGRATIONS_PLAYER_PACKAGE = "Lapp/revanced/integrations/videoplayer"
private const val INTEGRATIONS_PLAYER_PACKAGE = "Lapp/revanced/integrations/youtube/videoplayer"
private val BUTTONS_DESCRIPTORS = listOf(
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlButton;",
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlTimestampButton;"

View File

@@ -28,30 +28,39 @@ internal object CopyVideoUrlResourcePatch : ResourcePatch() {
SwitchPreference(
"revanced_copy_video_url",
StringResource("revanced_copy_video_url_title", "Show copy video URL button"),
StringResource("revanced_copy_video_url_summary_on", "Button is shown. Tap to copy video URL. Tap and hold to copy video URL with timestamp"),
StringResource(
"revanced_copy_video_url_summary_on",
"Button is shown. Tap to copy video URL. Tap and hold to copy video URL with timestamp"
),
StringResource("revanced_copy_video_url_summary_off", "Button is not shown")
),
SwitchPreference(
"revanced_copy_video_url_timestamp",
StringResource("revanced_copy_video_url_timestamp_title", "Show copy timestamp URL button"),
StringResource("revanced_copy_video_url_timestamp_summary_on", "Button is shown. Tap to copy video URL with timestamp. Tap and hold to copy video without timestamp"),
StringResource(
"revanced_copy_video_url_timestamp_summary_on",
"Button is shown. Tap to copy video URL with timestamp. Tap and hold to copy video without timestamp"
),
StringResource("revanced_copy_video_url_timestamp_summary_off", "Button is not shown")
)
),
StringResource("revanced_copy_video_url_preference_screen_summary", "Settings related to copy URL buttons in video player")
StringResource(
"revanced_copy_video_url_preference_screen_summary",
"Settings related to copy URL buttons in video player"
)
)
)
context.copyResources("copyvideourl", ResourceGroup(
resourceDirectoryName = "drawable",
"revanced_yt_copy.xml",
"revanced_yt_copy_timestamp.xml"
)
context.copyResources(
"copyvideourl", ResourceGroup(
resourceDirectoryName = "drawable",
"revanced_yt_copy.xml",
"revanced_yt_copy_timestamp.xml"
)
)
// merge strings
context.mergeStrings("copyvideourl/host/values/strings.xml")
BottomControlsResourcePatch.addControls("copyvideourl/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
BottomControlsResourcePatch.addControls("copyvideourl")
}
}

View File

@@ -0,0 +1,69 @@
package app.revanced.patches.youtube.interaction.dialog
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.interaction.dialog.fingerprints.CreateDialogFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
import app.revanced.util.exception
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch(
name = "Remove viewer discretion dialog",
description = "Adds an option to remove the dialog that appears when opening a video that has been age-restricted " +
"by accepting it automatically. This does not bypass the age restriction.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube"
)
]
)
@Suppress("unused")
object RemoveViewerDiscretionDialogPatch : BytecodePatch(
setOf(CreateDialogFingerprint)
) {
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
"Lapp/revanced/integrations/youtube/patches/RemoveViewerDiscretionDialogPatch;->" +
"confirmDialog(Landroid/app/AlertDialog;)V"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
SwitchPreference(
"revanced_remove_viewer_discretion_dialog",
StringResource(
"revanced_remove_viewer_discretion_dialog_title",
"Remove viewer discretion dialog"
),
StringResource(
"revanced_remove_viewer_discretion_dialog_summary_on",
"Dialog will be removed"
),
StringResource(
"revanced_remove_viewer_discretion_dialog_summary_off",
"Dialog will be shown"
),
StringResource(
"revanced_remove_viewer_discretion_dialog_user_dialog_message",
"This does not bypass the age restriction. It just accepts it automatically."
)
)
)
CreateDialogFingerprint.result?.mutableMethod?.apply {
val showDialogIndex = implementation!!.instructions.lastIndex - 2
val dialogRegister = getInstruction<FiveRegisterInstruction>(showDialogIndex).registerC
replaceInstructions(
showDialogIndex,
"invoke-static { v$dialogRegister }, $INTEGRATIONS_METHOD_DESCRIPTOR",
)
} ?: throw CreateDialogFingerprint.exception
}
}

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.youtube.interaction.dialog.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal object CreateDialogFingerprint : MethodFingerprint(
"V",
AccessFlags.PROTECTED.value,
listOf("L", "L", "Ljava/lang/String;"),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL // dialog.show()
)
)

View File

@@ -9,7 +9,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
@Patch(
name = "External downloads",
description = "Adds support to download and save YouTube videos using an external app.",
description = "Adds support to download and save YouTube videos using an external downloader app.",
dependencies = [
ExternalDownloadsResourcePatch::class,
PlayerControlsBytecodePatch::class,
@@ -32,7 +32,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
)
@Suppress("unused")
object ExternalDownloadsBytecodePatch : BytecodePatch() {
private const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;"
private const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/youtube/videoplayer/ExternalDownloadButton;"
override fun execute(context: BytecodeContext) {
/*

View File

@@ -28,27 +28,35 @@ internal object ExternalDownloadsResourcePatch : ResourcePatch() {
"revanced_external_downloader",
StringResource("revanced_external_downloader_title", "Show external download button"),
StringResource("revanced_external_downloader_summary_on", "Download button shown in player"),
StringResource("revanced_external_downloader_summary_off", "Download button not shown in player")
StringResource(
"revanced_external_downloader_summary_off",
"Download button not shown in player"
)
),
TextPreference(
"revanced_external_downloader_name",
StringResource("revanced_external_downloader_name_title", "Downloader package name"),
StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or Seal"),
StringResource(
"revanced_external_downloader_name_summary",
"Package name of your installed external downloader app, such as NewPipe or Seal"
),
InputType.TEXT
)
),
StringResource("revanced_external_downloader_preference_screen_summary", "Settings for using an external downloader")
StringResource(
"revanced_external_downloader_preference_screen_summary",
"Settings for using an external downloader"
)
)
)
// Copy strings
context.mergeStrings("downloads/host/values/strings.xml")
// Copy resources
context.copyResources("downloads", ResourceGroup("drawable", "revanced_yt_download_button.xml"))
context.copyResources(
"downloads",
ResourceGroup("drawable", "revanced_yt_download_button.xml")
)
// Add download button node
BottomControlsResourcePatch.addControls("downloads/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
BottomControlsResourcePatch.addControls("downloads")
}
}

View File

@@ -16,7 +16,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch(
name = "Disable precise seeking gesture",
description = "Disables the gesture that is used to seek precisely when swiping up on the seekbar.",
description = "Adds an option to disable precise seeking when swiping up on the seekbar.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
@@ -38,7 +38,7 @@ object DisablePreciseSeekingGesturePatch : BytecodePatch(
setOf(IsSwipingUpFingerprint)
) {
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
"Lapp/revanced/integrations/patches/DisablePreciseSeekingGesturePatch;->" +
"Lapp/revanced/integrations/youtube/patches/DisablePreciseSeekingGesturePatch;->" +
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
override fun execute(context: BytecodeContext) {

View File

@@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Patch(
name = "Seekbar tapping",
description = "Enables tap-to-seek on the seekbar of the video player.",
description = "Adds an option to enable tap-to-seek on the seekbar of the video player.",
dependencies = [
IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
@@ -85,7 +85,7 @@ object EnableSeekbarTappingPatch : BytecodePatch(
addInstructionsWithLabels(
insertIndex,
"""
invoke-static { }, Lapp/revanced/integrations/patches/SeekbarTappingPatch;->seekbarTappingEnabled()Z
invoke-static { }, Lapp/revanced/integrations/youtube/patches/SeekbarTappingPatch;->seekbarTappingEnabled()Z
move-result v$freeRegister
if-eqz v$freeRegister, :disabled
${oMethod.toInvokeInstructionString()}

View File

@@ -17,7 +17,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
name = "Enable slide to seek",
description = "Enable slide to seek instead of playing at 2x speed when pressing and holding in the video player.",
description = "Adds an option to enable slide to seek instead of playing at 2x speed when pressing and holding in the video player. Including this patch may cause issues with tapping or double tapping the video player overlay.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43"
]
)
]
],
use = false
)
@Suppress("unused")
object EnableSlideToSeekPatch : BytecodePatch(
@@ -38,7 +39,7 @@ object EnableSlideToSeekPatch : BytecodePatch(
DoubleSpeedSeekNoticeFingerprint
)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/SlideToSeekPatch;"
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/SlideToSeekPatch;"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(

View File

@@ -16,7 +16,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
@Patch(
name = "Swipe controls",
description = "Adds volume and brightness swipe controls.",
description = "Adds options to enable and configure volume and brightness swipe controls.",
dependencies = [
IntegrationsPatch::class,
PlayerTypeHookPatch::class,

View File

@@ -8,6 +8,6 @@ internal object SwipeControlsHostActivityFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
parameters = listOf(),
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;"
methodDef.definingClass == "Lapp/revanced/integrations/youtube/swipecontrols/SwipeControlsHostActivity;"
}
)

View File

@@ -18,7 +18,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Disable auto captions",
description = "Disable forced captions from being automatically enabled.",
description = "Adds an option to disable captions from being automatically enabled.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
@@ -57,7 +57,7 @@ object AutoCaptionsPatch : BytecodePatch(
0,
"""
const/4 v0, 0x$enabled
sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
sput-boolean v0, Lapp/revanced/integrations/youtube/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
"""
) ?: throw fingerprint.exception
}
@@ -65,10 +65,10 @@ object AutoCaptionsPatch : BytecodePatch(
SubtitleTrackFingerprint.result?.mutableMethod?.addInstructionsWithLabels(
0,
"""
invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
invoke-static {}, Lapp/revanced/integrations/youtube/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
move-result v0
if-eqz v0, :auto_captions_enabled
sget-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
sget-boolean v0, Lapp/revanced/integrations/youtube/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
if-nez v0, :auto_captions_enabled
const/4 v0, 0x1
return v0

View File

@@ -12,7 +12,7 @@ import java.nio.file.Files
@Patch(
name = "Custom branding",
description = "Changes the app name and icon to your choice (defaults to \"YouTube ReVanced\" and the ReVanced logo).",
description = "Applies a custom app name and icon. Defaults to \"YouTube ReVanced\" and the ReVanced logo.",
compatiblePackages = [
CompatiblePackage("com.google.android.youtube")
],
@@ -93,7 +93,7 @@ object CustomBrandingPatch : ResourcePatch() {
)
}
}
} else resourceGroups.forEach { context.copyResources("branding", it) }
} else resourceGroups.forEach { context.copyResources("custom-branding", it) }
}
}

View File

@@ -0,0 +1,137 @@
package app.revanced.patches.youtube.layout.branding.header
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
import app.revanced.util.ResourceGroup
import app.revanced.util.copyResources
import java.io.File
@Patch(
name = "Change header",
description = "Applies a custom header in the top left corner within the app. Defaults to the ReVanced header.",
compatiblePackages = [
CompatiblePackage("com.google.android.youtube")
],
use = false
)
@Suppress("unused")
object ChangeHeaderPatch : ResourcePatch() {
private const val HEADER_NAME = "yt_wordmark_header"
private const val PREMIUM_HEADER_NAME = "yt_premium_wordmark_header"
private const val REVANCED_HEADER_NAME = "ReVanced"
private const val REVANCED_BORDERLESS_HEADER_NAME = "ReVanced (borderless logo)"
private val targetResourceDirectoryNames = arrayOf(
"xxxhdpi",
"xxhdpi",
"xhdpi",
"mdpi",
"hdpi",
).map { dpi ->
"drawable-$dpi"
}
private val variants = arrayOf("light", "dark")
private val header by stringPatchOption(
key = "header",
default = REVANCED_BORDERLESS_HEADER_NAME,
values = mapOf(
"YouTube" to HEADER_NAME,
"YouTube Premium" to PREMIUM_HEADER_NAME,
"ReVanced" to REVANCED_HEADER_NAME,
"ReVanced (borderless logo)" to REVANCED_BORDERLESS_HEADER_NAME,
),
title = "Header",
description = """
Either a header name or a path to a custom header folder to use in the top bar.
The path to a folder must contain one or more of the following folders matching the DPI of your device:
${targetResourceDirectoryNames.joinToString("\n") { "- $it" }}
These folders must contain the following files:
${variants.joinToString("\n") { variant -> "- ${HEADER_NAME}_$variant.png" }}
""".trimIndent(),
required = true,
)
override fun execute(context: ResourceContext) {
// The directories to copy the header to.
val targetResourceDirectories = targetResourceDirectoryNames.mapNotNull {
context["res"].resolve(it).takeIf(File::exists)
}
// The files to replace in the target directories.
val targetResourceFiles = targetResourceDirectoryNames.map { directoryName ->
ResourceGroup(
directoryName,
*variants.map { variant -> "${HEADER_NAME}_$variant.png" }.toTypedArray()
)
}
/**
* A function that overwrites both header variants from [from] to [to] in the target resource directories.
*/
val overwriteFromTo: (String, String) -> Unit = { from: String, to: String ->
targetResourceDirectories.forEach { directory ->
variants.forEach { variant ->
val fromPath = directory.resolve("${from}_$variant.png")
val toPath = directory.resolve("${to}_$variant.png")
fromPath.copyTo(toPath, true)
}
}
}
// Functions to overwrite the header to the different variants.
val toPremium = { overwriteFromTo(PREMIUM_HEADER_NAME, HEADER_NAME) }
val toHeader = { overwriteFromTo(HEADER_NAME, PREMIUM_HEADER_NAME) }
val toReVanced = {
// Copy the ReVanced header to the resource directories.
targetResourceFiles.forEach { context.copyResources("change-header/revanced", it) }
// Overwrite the premium with the custom header as well.
toHeader()
}
val toReVancedBorderless = {
// Copy the ReVanced borderless header to the resource directories.
targetResourceFiles.forEach { context.copyResources("change-header/revanced-borderless", it) }
// Overwrite the premium with the custom header as well.
toHeader()
}
val toCustom = {
var copiedReplacementImages = false
// For all the resource groups in the custom header folder, copy them to the resource directories.
File(header!!).listFiles { file -> file.isDirectory }?.forEach { folder ->
val targetDirectory = context["res"].resolve(folder.name)
// Skip if the target directory (DPI) doesn't exist.
if (!targetDirectory.exists()) return@forEach
folder.listFiles { file -> file.isFile }?.forEach {
val targetResourceFile = targetDirectory.resolve(it.name)
it.copyTo(targetResourceFile, true)
copiedReplacementImages = true
}
}
if (!copiedReplacementImages) throw PatchException("Could not find any custom images resources in directory: $header")
// Overwrite the premium with the custom header as well.
toHeader()
}
when (header) {
HEADER_NAME -> toHeader
PREMIUM_HEADER_NAME -> toPremium
REVANCED_HEADER_NAME -> toReVanced
REVANCED_BORDERLESS_HEADER_NAME -> toReVancedBorderless
else -> toCustom
}()
}
}

View File

@@ -1,62 +1,9 @@
package app.revanced.patches.youtube.layout.branding.header
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.booleanPatchOption
import kotlin.io.path.copyTo
@Patch(
name = "Premium heading",
description = "Show or hide the premium heading.",
compatiblePackages = [
CompatiblePackage("com.google.android.youtube")
]
)
@Suppress("unused")
@Deprecated("Use PremiumHeadingPatch instead.")
object PremiumHeadingPatch : ResourcePatch() {
private const val DEFAULT_HEADING_RES = "yt_wordmark_header"
private const val PREMIUM_HEADING_RES = "yt_premium_wordmark_header"
private val usePremiumHeading by booleanPatchOption(
key = "usePremiumHeading",
default = true,
title = "Use premium heading",
description = "Whether to use the premium heading.",
required = true,
)
override fun execute(context: ResourceContext) {
val resDirectory = context["res"]
val (original, replacement) = if (usePremiumHeading!!)
PREMIUM_HEADING_RES to DEFAULT_HEADING_RES
else
DEFAULT_HEADING_RES to PREMIUM_HEADING_RES
val variants = arrayOf("light", "dark")
arrayOf(
"xxxhdpi",
"xxhdpi",
"xhdpi",
"hdpi",
"mdpi"
).mapNotNull { dpi ->
resDirectory.resolve("drawable-$dpi").takeIf { it.exists() }?.toPath()
}.also {
if (it.isEmpty())
throw PatchException("The drawable folder can not be found. Therefore, the patch can not be applied.")
}.forEach { path ->
variants.forEach { mode ->
val fromPath = path.resolve("${original}_$mode.png")
val toPath = path.resolve("${replacement}_$mode.png")
fromPath.copyTo(toPath, true)
}
}
}
override fun execute(context: ResourceContext) = ChangeHeaderPatch.execute(context)
}

View File

@@ -13,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Hide video action buttons",
description = "Adds options to hide action buttons under a video.",
description = "Adds options to hide action buttons (such as the Download button) under videos.",
dependencies = [
ResourceMappingPatch::class,
LithoFilterPatch::class
@@ -36,7 +36,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Suppress("unused")
object HideButtonsPatch : ResourcePatch() {
private const val FILTER_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/components/ButtonsFilter;"
"Lapp/revanced/integrations/youtube/patches/components/ButtonsFilter;"
override fun execute(context: ResourceContext) {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(

View File

@@ -22,7 +22,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Patch(
name = "Hide autoplay button",
description = "Hides the autoplay button in the video player.",
description = "Adds an option to hide the autoplay button in the video player.",
dependencies = [
IntegrationsPatch::class,
SettingsPatch::class,
@@ -78,7 +78,7 @@ object HideAutoplayButtonPatch : BytecodePatch(
addInstructionsWithLabels(
insertIndex,
"""
invoke-static {}, Lapp/revanced/integrations/patches/HideAutoplayButtonPatch;->isButtonShown()Z
invoke-static {}, Lapp/revanced/integrations/youtube/patches/HideAutoplayButtonPatch;->isButtonShown()Z
move-result v$clobberRegister
if-eqz v$clobberRegister, :hidden
""",

View File

@@ -14,7 +14,7 @@ import com.android.tools.smali.dexlib2.Opcode
@Patch(
name = "Hide captions button",
description = "Hides the captions button in the video player.",
description = "Adds an option to hide the captions button in the video player.",
dependencies = [
IntegrationsPatch::class,
SettingsPatch::class
@@ -58,7 +58,7 @@ object HideCaptionsButtonPatch : BytecodePatch(
subtitleButtonControllerMethod.addInstruction(
insertIndex,
"""
invoke-static {v0}, Lapp/revanced/integrations/patches/HideCaptionsButtonPatch;->hideCaptionsButton(Landroid/widget/ImageView;)V
invoke-static {v0}, Lapp/revanced/integrations/youtube/patches/HideCaptionsButtonPatch;->hideCaptionsButton(Landroid/widget/ImageView;)V
"""
)
}

View File

@@ -13,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Hide cast button",
description = "Hides the cast button in the video player.",
description = "Adds an option to hide the cast button in the video player.",
dependencies = [
IntegrationsPatch::class,
SettingsPatch::class
@@ -40,7 +40,7 @@ object HideCastButtonPatch : BytecodePatch() {
addInstructions(
0,
"""
invoke-static {p1}, Lapp/revanced/integrations/patches/HideCastButtonPatch;->getCastButtonOverrideV2(I)I
invoke-static {p1}, Lapp/revanced/integrations/youtube/patches/HideCastButtonPatch;->getCastButtonOverrideV2(I)I
move-result p1
"""
)

View File

@@ -19,7 +19,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
name = "Navigation buttons",
description = "Adds options to hide or change navigation buttons.",
description = "Adds options to hide and change navigation buttons (such as the Shorts button).",
dependencies = [
IntegrationsPatch::class,
SettingsPatch::class,
@@ -45,7 +45,7 @@ object NavigationButtonsPatch : BytecodePatch(
setOf(AddCreateButtonViewFingerprint)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/NavigationButtonsPatch;"
"Lapp/revanced/integrations/youtube/patches/NavigationButtonsPatch;"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(

Some files were not shown because too many files have changed in this diff Show More