Compare commits

...

78 Commits

Author SHA1 Message Date
semantic-release-bot
efe7cbc78c chore(release): 2.187.0-dev.10 [skip ci]
# [2.187.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.9...v2.187.0-dev.10) (2023-08-02)

### Features

* **Reddit is Fun - Spoof client:** Spoof the user agent ([9ac0ed4](9ac0ed477a))
2023-08-02 23:00:51 +00:00
oSumAtrIX
9ac0ed477a feat(Reddit is Fun - Spoof client): Spoof the user agent 2023-08-03 00:58:11 +02:00
semantic-release-bot
9426b28dcc chore(release): 2.187.0-dev.9 [skip ci]
# [2.187.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.8...v2.187.0-dev.9) (2023-07-30)

### Bug Fixes

* Use clearer descriptions ([146b213](146b213b4a))
2023-07-30 17:05:55 +00:00
oSumAtrIX
146b213b4a fix: Use clearer descriptions 2023-07-30 19:03:12 +02:00
semantic-release-bot
557a9f7418 chore(release): 2.187.0-dev.8 [skip ci]
# [2.187.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.7...v2.187.0-dev.8) (2023-07-30)

### Bug Fixes

* **Sync for Reddit - Change OAuth client id:** Disable piracy detection ([d442aca](d442acaac8))

### Features

* **Joey for Reddit:** Add `Change OAuth client id` patch ([a00eab6](a00eab6744))
* **Joey for Reddit:** Add `Disable ads` patch ([e7b2bfb](e7b2bfbde3))
2023-07-30 17:02:08 +00:00
oSumAtrIX
e7b2bfbde3 feat(Joey for Reddit): Add Disable ads patch 2023-07-30 18:59:40 +02:00
oSumAtrIX
d442acaac8 fix(Sync for Reddit - Change OAuth client id): Disable piracy detection 2023-07-30 18:59:40 +02:00
Barncastle
a00eab6744 feat(Joey for Reddit): Add Change OAuth client id patch 2023-07-30 18:59:40 +02:00
LisoUseInAIKyrios
87f2f90fc5 chore: remove deprecated version annotation 2023-07-30 14:23:40 +04:00
semantic-release-bot
04c8c48df7 chore(release): 2.187.0-dev.7 [skip ci]
# [2.187.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.6...v2.187.0-dev.7) (2023-07-30)

### Features

* **YouTube:** add `Player Flyout Menu` patch ([#2295](https://github.com/ReVanced/revanced-patches/issues/2295)) ([bb90012](bb9001283a))
2023-07-30 09:54:23 +00:00
johnconner122
bb9001283a feat(YouTube): add Player Flyout Menu patch (#2295)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
2023-07-30 13:51:50 +04:00
semantic-release-bot
b7f0c13443 chore(release): 2.187.0-dev.6 [skip ci]
# [2.187.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.5...v2.187.0-dev.6) (2023-07-30)
2023-07-30 00:53:14 +00:00
oSumAtrIX
942fe7f870 build(Needs bump): Bump dependencies 2023-07-30 02:50:17 +02:00
oSumAtrIX
c224c16f50 ci: Change bumping commit scope 2023-07-30 02:49:19 +02:00
semantic-release-bot
45c2751f70 chore(release): 2.187.0-dev.5 [skip ci]
# [2.187.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.4...v2.187.0-dev.5) (2023-07-28)

### Bug Fixes

* **YouTube - Spoof app version:** Fix grammar in description ([#2711](https://github.com/ReVanced/revanced-patches/issues/2711)) ([7cf79ab](7cf79ab856))
2023-07-28 22:25:04 +00:00
Benjamin
7cf79ab856 fix(YouTube - Spoof app version): Fix grammar in description (#2711) 2023-07-29 00:21:45 +02:00
semantic-release-bot
9696775cc2 chore(release): 2.187.0-dev.4 [skip ci]
# [2.187.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.3...v2.187.0-dev.4) (2023-07-28)

### Bug Fixes

* Remove version numbers from individual patches ([#2709](https://github.com/ReVanced/revanced-patches/issues/2709)) ([d97f399](d97f3990c9))
2023-07-28 18:13:54 +00:00
LisoUseInAIKyrios
d97f3990c9 fix: Remove version numbers from individual patches (#2709) 2023-07-28 22:11:23 +04:00
LisoUseInAIKyrios
d1ccf093cc chore(YouTube - Spoof App Version): Adjust target version 2023-07-27 09:20:05 +04:00
semantic-release-bot
148900f47d chore(release): 2.187.0-dev.3 [skip ci]
# [2.187.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.2...v2.187.0-dev.3) (2023-07-26)

### Bug Fixes

* **YouTube - Spoof App Version:** Remove 17.30.35 target (version no longer works correctly) ([#2703](https://github.com/ReVanced/revanced-patches/issues/2703)) ([936ac47](936ac475d2))
2023-07-26 21:19:08 +00:00
LisoUseInAIKyrios
936ac475d2 fix(YouTube - Spoof App Version): Remove 17.30.35 target (version no longer works correctly) (#2703) 2023-07-27 01:15:58 +04:00
semantic-release-bot
df57b1acdd chore(release): 2.187.0-dev.2 [skip ci]
# [2.187.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.1...v2.187.0-dev.2) (2023-07-26)

### Features

* **YouTube - Hide layout components:** Hide `chips shelf` ([#2699](https://github.com/ReVanced/revanced-patches/issues/2699)) ([44107c2](44107c2b07))
2023-07-26 13:50:42 +00:00
johnconner122
44107c2b07 feat(YouTube - Hide layout components): Hide chips shelf (#2699) 2023-07-26 15:48:04 +02:00
semantic-release-bot
4680f1dc61 chore(release): 2.187.0-dev.1 [skip ci]
# [2.187.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.186.1-dev.1...v2.187.0-dev.1) (2023-07-24)

### Features

* **Sync for Reddit:** add `Disable Sync for Lemmy bottom sheet` patch ([70da6d8](70da6d8971))
2023-07-24 23:41:28 +00:00
oSumAtrIX
70da6d8971 feat(Sync for Reddit): add Disable Sync for Lemmy bottom sheet patch 2023-07-25 01:36:28 +02:00
semantic-release-bot
1df7df2841 chore(release): 2.186.1-dev.1 [skip ci]
## [2.186.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.186.0...v2.186.1-dev.1) (2023-07-21)

### Bug Fixes

* **YouTube - Theme:** only set splash screen color if background colors are set ([c14a7fb](c14a7fb66f))
2023-07-21 22:11:35 +00:00
oSumAtrIX
c14a7fb66f fix(YouTube - Theme): only set splash screen color if background colors are set 2023-07-22 00:08:25 +02:00
oSumAtrIX
6af4e47947 ci: clean after building 2023-07-21 19:17:06 +02:00
semantic-release-bot
ef704fcf7a chore(release): 2.186.0 [skip ci]
# [2.186.0](https://github.com/ReVanced/revanced-patches/compare/v2.185.0...v2.186.0) (2023-07-21)

### Bug Fixes

* **Tiktok - Settings:** get instruction registers dynamically ([#2676](https://github.com/ReVanced/revanced-patches/issues/2676)) ([b3ff7ef](b3ff7efdb2))
* **YouTube - Spoof app version:** update target app version description ([#2666](https://github.com/ReVanced/revanced-patches/issues/2666)) ([ae990ea](ae990eac6a))
* **YouTube - Theme:** allow setting no background color ([82e3ebe](82e3ebeeff))
* **YouTube - Theme:** apply custom seekbar color to shorts ([#2670](https://github.com/ReVanced/revanced-patches/issues/2670)) ([a19fa4e](a19fa4e087))

### Features

* **Twitter:** remove `Hide view stats` patch ([4e1c9b9](4e1c9b9ec2))
* **Youtube - Theme:** add a switch to enable/disable custom seekbar color ([#2663](https://github.com/ReVanced/revanced-patches/issues/2663)) ([dd7c663](dd7c663df6))
2023-07-21 15:08:14 +00:00
oSumAtrIX
eefa677b1a chore: merge branch dev to main (#2674) 2023-07-21 17:04:32 +02:00
oSumAtrIX
2bf6d693ec ci: do not cache build directory 2023-07-21 16:57:20 +02:00
semantic-release-bot
acc55fff89 chore(release): 2.186.0-dev.5 [skip ci]
# [2.186.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.4...v2.186.0-dev.5) (2023-07-20)

### Bug Fixes

* **YouTube - Theme:** allow setting no background color ([82e3ebe](82e3ebeeff))
2023-07-20 22:13:30 +00:00
oSumAtrIX
82e3ebeeff fix(YouTube - Theme): allow setting no background color 2023-07-21 00:10:48 +02:00
semantic-release-bot
47d096399a chore(release): 2.186.0-dev.4 [skip ci]
# [2.186.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.3...v2.186.0-dev.4) (2023-07-20)

### Bug Fixes

* **YouTube - Spoof app version:** update target app version description ([#2666](https://github.com/ReVanced/revanced-patches/issues/2666)) ([ae990ea](ae990eac6a))
2023-07-20 20:37:36 +00:00
LisoUseInAIKyrios
ae990eac6a fix(YouTube - Spoof app version): update target app version description (#2666) 2023-07-21 00:34:17 +04:00
LisoUseInAIKyrios
b7f40c3955 chore: delete empty file 2023-07-20 23:09:44 +04:00
semantic-release-bot
807a7b01d3 chore(release): 2.186.0-dev.3 [skip ci]
# [2.186.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.2...v2.186.0-dev.3) (2023-07-20)

### Bug Fixes

* **Tiktok - Settings:** get instruction registers dynamically ([#2676](https://github.com/ReVanced/revanced-patches/issues/2676)) ([b3ff7ef](b3ff7efdb2))
2023-07-20 17:39:14 +00:00
Vu Hoan Huy
b3ff7efdb2 fix(Tiktok - Settings): get instruction registers dynamically (#2676) 2023-07-20 19:36:41 +02:00
semantic-release-bot
098162173f chore(release): 2.186.0-dev.2 [skip ci]
# [2.186.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.1...v2.186.0-dev.2) (2023-07-20)

### Bug Fixes

* **YouTube - Theme:** apply custom seekbar color to shorts ([#2670](https://github.com/ReVanced/revanced-patches/issues/2670)) ([a19fa4e](a19fa4e087))

### Features

* **Youtube - Theme:** add a switch to enable/disable custom seekbar color ([#2663](https://github.com/ReVanced/revanced-patches/issues/2663)) ([dd7c663](dd7c663df6))
2023-07-20 17:31:06 +00:00
LisoUseInAIKyrios
a19fa4e087 fix(YouTube - Theme): apply custom seekbar color to shorts (#2670) 2023-07-20 21:28:22 +04:00
LisoUseInAIKyrios
dd7c663df6 feat(Youtube - Theme): add a switch to enable/disable custom seekbar color (#2663) 2023-07-20 21:27:44 +04:00
semantic-release-bot
9bd7773af2 chore(release): 2.186.0-dev.1 [skip ci]
# [2.186.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.185.0...v2.186.0-dev.1) (2023-07-20)

### Features

* **Twitter:** remove `Hide view stats` patch ([4e1c9b9](4e1c9b9ec2))
2023-07-20 16:47:25 +00:00
oSumAtrIX
4e1c9b9ec2 feat(Twitter): remove Hide view stats patch
The patch is constrained on a version that is not working properly anymore.
2023-07-20 18:44:08 +02:00
semantic-release-bot
96a6f3f93e chore(release): 2.185.0 [skip ci]
# [2.185.0](https://github.com/ReVanced/revanced-patches/compare/v2.184.0...v2.185.0) (2023-07-20)

### Bug Fixes

* allocate for more than eight `LithoFilter` array items ([#2643](https://github.com/ReVanced/revanced-patches/issues/2643)) ([5de8ee5](5de8ee51c1))
* **Sync for Reddit - Disable ads:** fix compatibility with latest version ([6b2f786](6b2f7862d1))
* **Tiktok - Settings:** bump compatibility ([#2656](https://github.com/ReVanced/revanced-patches/issues/2656)) ([90e32ea](90e32eac54))
* **TikTok - Show seekbar:** fix seekbar not always showing ([#2660](https://github.com/ReVanced/revanced-patches/issues/2660)) ([e4adaeb](e4adaebad4))
* **Trakt - Unlock pro:** constraint to last known working version ([#2662](https://github.com/ReVanced/revanced-patches/issues/2662)) ([9da2bc3](9da2bc32a1))
* **YouTube - Spoof client:** show video time and chapters while using seekbar ([#2607](https://github.com/ReVanced/revanced-patches/issues/2607)) ([7fdc0d2](7fdc0d2a70))
* **youtube/sponsorblock:** fix some segments skipping slightly too late ([#2634](https://github.com/ReVanced/revanced-patches/issues/2634)) ([180c777](180c7775e6))

### Features

* **youtube:** rename `video-speed` to `playback-speed` ([#2642](https://github.com/ReVanced/revanced-patches/issues/2642)) ([75fd96f](75fd96f4c3))
2023-07-20 00:04:46 +00:00
oSumAtrIX
b74611a6ae chore: merge branch dev to main (#2641) 2023-07-20 02:02:15 +02:00
semantic-release-bot
ae40d87bb3 chore(release): 2.185.0-dev.7 [skip ci]
# [2.185.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.6...v2.185.0-dev.7) (2023-07-19)

### Bug Fixes

* **YouTube - Spoof client:** show video time and chapters while using seekbar ([#2607](https://github.com/ReVanced/revanced-patches/issues/2607)) ([7fdc0d2](7fdc0d2a70))
2023-07-19 23:20:29 +00:00
LisoUseInAIKyrios
7fdc0d2a70 fix(YouTube - Spoof client): show video time and chapters while using seekbar (#2607) 2023-07-20 01:17:47 +02:00
semantic-release-bot
1fade09694 chore(release): 2.185.0-dev.6 [skip ci]
# [2.185.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.5...v2.185.0-dev.6) (2023-07-19)

### Bug Fixes

* **Tiktok - Settings:** bump compatibility ([#2656](https://github.com/ReVanced/revanced-patches/issues/2656)) ([90e32ea](90e32eac54))
2023-07-19 23:16:57 +00:00
Vu Hoan Huy
90e32eac54 fix(Tiktok - Settings): bump compatibility (#2656) 2023-07-20 01:13:33 +02:00
semantic-release-bot
a0632c8a92 chore(release): 2.185.0-dev.5 [skip ci]
# [2.185.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.4...v2.185.0-dev.5) (2023-07-19)

### Bug Fixes

* **Trakt - Unlock pro:** constraint to last known working version ([#2662](https://github.com/ReVanced/revanced-patches/issues/2662)) ([9da2bc3](9da2bc32a1))
2023-07-19 22:52:54 +00:00
johnconner122
9da2bc32a1 fix(Trakt - Unlock pro): constraint to last known working version (#2662) 2023-07-20 00:50:16 +02:00
semantic-release-bot
89fed3874f chore(release): 2.185.0-dev.4 [skip ci]
# [2.185.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.3...v2.185.0-dev.4) (2023-07-19)

### Bug Fixes

* **TikTok - Show seekbar:** fix seekbar not always showing ([#2660](https://github.com/ReVanced/revanced-patches/issues/2660)) ([e4adaeb](e4adaebad4))
2023-07-19 12:58:39 +00:00
Vu Hoan Huy
e4adaebad4 fix(TikTok - Show seekbar): fix seekbar not always showing (#2660) 2023-07-19 14:55:17 +02:00
semantic-release-bot
0b78e8377b chore(release): 2.185.0-dev.3 [skip ci]
# [2.185.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.2...v2.185.0-dev.3) (2023-07-17)

### Bug Fixes

* **Sync for Reddit - Disable ads:** fix compatibility with latest version ([6b2f786](6b2f7862d1))
2023-07-17 22:39:26 +00:00
oSumAtrIX
6b2f7862d1 fix(Sync for Reddit - Disable ads): fix compatibility with latest version 2023-07-18 00:36:37 +02:00
Aaronjamt
4668861d65 chore: fix typos (fingereprints -> fingerprints) (#2650) 2023-07-17 15:21:07 +04:00
semantic-release-bot
c5c63537ff chore(release): 2.185.0-dev.2 [skip ci]
# [2.185.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.1...v2.185.0-dev.2) (2023-07-15)

### Bug Fixes

* allocate for more than eight `LithoFilter` array items ([#2643](https://github.com/ReVanced/revanced-patches/issues/2643)) ([5de8ee5](5de8ee51c1))
2023-07-15 21:27:19 +00:00
johnconner122
5de8ee51c1 fix: allocate for more than eight LithoFilter array items (#2643) 2023-07-15 23:24:34 +02:00
semantic-release-bot
65087833b0 chore(release): 2.185.0-dev.1 [skip ci]
# [2.185.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.184.1-dev.1...v2.185.0-dev.1) (2023-07-15)

### Features

* **youtube:** rename `video-speed` to `playback-speed` ([#2642](https://github.com/revanced/revanced-patches/issues/2642)) ([75fd96f](75fd96f4c3))
2023-07-15 12:36:34 +00:00
KAZI MMT
75fd96f4c3 feat(youtube): rename video-speed to playback-speed (#2642) 2023-07-15 16:32:39 +04:00
semantic-release-bot
2cac5b1b74 chore(release): 2.184.1-dev.1 [skip ci]
## [2.184.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.184.0...v2.184.1-dev.1) (2023-07-14)

### Bug Fixes

* **youtube/sponsorblock:** fix some segments skipping slightly too late ([#2634](https://github.com/revanced/revanced-patches/issues/2634)) ([180c777](180c7775e6))
2023-07-14 08:39:40 +00:00
LisoUseInAIKyrios
180c7775e6 fix(youtube/sponsorblock): fix some segments skipping slightly too late (#2634) 2023-07-14 12:35:49 +04:00
semantic-release-bot
d0440c17f6 chore(release): 2.184.0 [skip ci]
# [2.184.0](https://github.com/revanced/revanced-patches/compare/v2.183.1...v2.184.0) (2023-07-11)

### Features

* **youtube/custom-branding:** update logo ([801584b](801584b78c))
2023-07-11 00:56:29 +00:00
oSumAtrIX
c6f4497031 chore: merge branch dev to main (#2615) 2023-07-11 02:54:05 +02:00
semantic-release-bot
20f24513d5 chore(release): 2.184.0-dev.1 [skip ci]
# [2.184.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.183.1...v2.184.0-dev.1) (2023-07-11)

### Features

* **youtube/custom-branding:** update logo ([801584b](801584b78c))
2023-07-11 00:48:58 +00:00
oSumAtrIX
db2fd097f6 refactor: remove unnecessary annotations 2023-07-11 02:45:56 +02:00
oSumAtrIX
801584b78c feat(youtube/custom-branding): update logo 2023-07-11 02:45:15 +02:00
semantic-release-bot
8c23fddcca chore(release): 2.183.1 [skip ci]
## [2.183.1](https://github.com/revanced/revanced-patches/compare/v2.183.0...v2.183.1) (2023-07-10)

### Bug Fixes

* find resource by correct name ([3113bb6](3113bb6599))
* use correct patch naming convention ([668d1fd](668d1fda49))
2023-07-10 18:38:38 +00:00
oSumAtrIX
eeca09ac78 chore: merge branch dev to main (#2613) 2023-07-10 20:36:12 +02:00
semantic-release-bot
8f22663a7c chore(release): 2.183.1-dev.1 [skip ci]
## [2.183.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.183.0...v2.183.1-dev.1) (2023-07-10)

### Bug Fixes

* find resource by correct name ([3113bb6](3113bb6599))
* use correct patch naming convention ([668d1fd](668d1fda49))
2023-07-10 18:34:54 +00:00
oSumAtrIX
3113bb6599 fix: find resource by correct name 2023-07-10 20:31:36 +02:00
oSumAtrIX
668d1fda49 fix: use correct patch naming convention 2023-07-10 20:28:50 +02:00
semantic-release-bot
6d474fb083 chore(release): 2.183.0 [skip ci]
# [2.183.0](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.183.0) (2023-07-10)

### Bug Fixes

* **youtube/custom-video-buffer:** remove non functional deprecated patch ([e5abe4f](e5abe4f0e5))
* **youtube/custom-video-speed:** don not implicitly depend on `old-video-quality-menu` patch ([9b2d89c](9b2d89cda5))

### Features

* change patches naming convention ([#2612](https://github.com/revanced/revanced-patches/issues/2612)) ([5e4c054](5e4c054834))
2023-07-10 18:17:02 +00:00
oSumAtrIX
1d6baa1228 chore: merge branch dev to main (#2598) 2023-07-10 20:14:36 +02:00
semantic-release-bot
d763ffda55 chore(release): 2.183.0-dev.1 [skip ci]
# [2.183.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.1-dev.2...v2.183.0-dev.1) (2023-07-10)

### Features

* change patches naming convention ([#2612](https://github.com/revanced/revanced-patches/issues/2612)) ([5e4c054](5e4c054834))
2023-07-10 18:05:19 +00:00
Ushie
5e4c054834 feat: change patches naming convention (#2612) 2023-07-10 20:02:05 +02:00
semantic-release-bot
c0f11e7848 chore(release): 2.182.1-dev.2 [skip ci]
## [2.182.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.182.1-dev.1...v2.182.1-dev.2) (2023-07-09)

### Bug Fixes

* **youtube/custom-video-speed:** don not implicitly depend on `old-video-quality-menu` patch ([9b2d89c](9b2d89cda5))
2023-07-09 14:18:55 +00:00
oSumAtrIX
9b2d89cda5 fix(youtube/custom-video-speed): don not implicitly depend on old-video-quality-menu patch 2023-07-09 16:15:55 +02:00
281 changed files with 1389 additions and 1351 deletions

View File

@@ -30,13 +30,12 @@ jobs:
${{ runner.home }}/.gradle/caches ${{ runner.home }}/.gradle/caches
${{ runner.home }}/.gradle/wrapper ${{ runner.home }}/.gradle/wrapper
.gradle .gradle
build
node_modules node_modules
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }} key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
- name: Build with Gradle - name: Build with Gradle
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew generateMeta clean --no-daemon run: ./gradlew generateMeta clean
- name: Setup semantic-release - name: Setup semantic-release
run: npm install run: npm install
- name: Release - name: Release

View File

@@ -10,7 +10,7 @@
[ [
"@semantic-release/commit-analyzer", { "@semantic-release/commit-analyzer", {
"releaseRules": [ "releaseRules": [
{ "type": "build", "scope": "revanced-patcher", "release": "patch" } { "type": "build", "scope": "Needs bump", "release": "patch" }
] ]
} }
], ],

View File

@@ -1,3 +1,268 @@
# [2.187.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.9...v2.187.0-dev.10) (2023-08-02)
### Features
* **Reddit is Fun - Spoof client:** Spoof the user agent ([b9aaf61](https://github.com/ReVanced/revanced-patches/commit/b9aaf610ad9f1f45a72265a3782d2cf996020139))
# [2.187.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.8...v2.187.0-dev.9) (2023-07-30)
### Bug Fixes
* Use clearer descriptions ([8dbb0e2](https://github.com/ReVanced/revanced-patches/commit/8dbb0e212e8ceeb0381a3509e45afca095ddee53))
# [2.187.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.7...v2.187.0-dev.8) (2023-07-30)
### Bug Fixes
* **Sync for Reddit - Change OAuth client id:** Disable piracy detection ([cd103dd](https://github.com/ReVanced/revanced-patches/commit/cd103dd9b8ff2667246d4abaf75577f28bf1a11b))
### Features
* **Joey for Reddit:** Add `Change OAuth client id` patch ([1bac47d](https://github.com/ReVanced/revanced-patches/commit/1bac47df889b5221bef1c03e652f894be8d39385))
* **Joey for Reddit:** Add `Disable ads` patch ([ad7e147](https://github.com/ReVanced/revanced-patches/commit/ad7e14771208dcab08fd6dc29403b1a4cf602111))
# [2.187.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.6...v2.187.0-dev.7) (2023-07-30)
### Features
* **YouTube:** add `Player Flyout Menu` patch ([#2295](https://github.com/ReVanced/revanced-patches/issues/2295)) ([aea0af0](https://github.com/ReVanced/revanced-patches/commit/aea0af059784ae4820a0e73ff91f97bbc3ebc4c7))
# [2.187.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.5...v2.187.0-dev.6) (2023-07-30)
# [2.187.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.4...v2.187.0-dev.5) (2023-07-28)
### Bug Fixes
* **YouTube - Spoof app version:** Fix grammar in description ([#2711](https://github.com/ReVanced/revanced-patches/issues/2711)) ([dd249e6](https://github.com/ReVanced/revanced-patches/commit/dd249e62243e57733a6ff4d3a17d30db0e08a84d))
# [2.187.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.3...v2.187.0-dev.4) (2023-07-28)
### Bug Fixes
* Remove version numbers from individual patches ([#2709](https://github.com/ReVanced/revanced-patches/issues/2709)) ([7a828ea](https://github.com/ReVanced/revanced-patches/commit/7a828ea8826864505fac9b2bdb3a1261d9f4dc35))
# [2.187.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.2...v2.187.0-dev.3) (2023-07-26)
### Bug Fixes
* **YouTube - Spoof App Version:** Remove 17.30.35 target (version no longer works correctly) ([#2703](https://github.com/ReVanced/revanced-patches/issues/2703)) ([210108b](https://github.com/ReVanced/revanced-patches/commit/210108bd8f86f583f5cd5d5538480b76d51d7776))
# [2.187.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.1...v2.187.0-dev.2) (2023-07-26)
### Features
* **YouTube - Hide layout components:** Hide `chips shelf` ([#2699](https://github.com/ReVanced/revanced-patches/issues/2699)) ([8e6058b](https://github.com/ReVanced/revanced-patches/commit/8e6058b62350b3d14d79e6fe52b0ad781b66b5de))
# [2.187.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.186.1-dev.1...v2.187.0-dev.1) (2023-07-24)
### Features
* **Sync for Reddit:** add `Disable Sync for Lemmy bottom sheet` patch ([56b535b](https://github.com/ReVanced/revanced-patches/commit/56b535b2a136d4b0afbddf2c8e251889c2555056))
## [2.186.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.186.0...v2.186.1-dev.1) (2023-07-21)
### Bug Fixes
* **YouTube - Theme:** only set splash screen color if background colors are set ([f058db4](https://github.com/ReVanced/revanced-patches/commit/f058db4ba4300400ac92b4a9790708eb8bde7092))
# [2.186.0](https://github.com/ReVanced/revanced-patches/compare/v2.185.0...v2.186.0) (2023-07-21)
### Bug Fixes
* **Tiktok - Settings:** get instruction registers dynamically ([#2676](https://github.com/ReVanced/revanced-patches/issues/2676)) ([b34e45b](https://github.com/ReVanced/revanced-patches/commit/b34e45b6dafad8e9d567ad65f58a182b8cc04676))
* **YouTube - Spoof app version:** update target app version description ([#2666](https://github.com/ReVanced/revanced-patches/issues/2666)) ([307442e](https://github.com/ReVanced/revanced-patches/commit/307442e654ff5486656319d91e4a5f5fb2b92651))
* **YouTube - Theme:** allow setting no background color ([8a4e77a](https://github.com/ReVanced/revanced-patches/commit/8a4e77a290a61a1caf93eb8bccaf728c84a3ef53))
* **YouTube - Theme:** apply custom seekbar color to shorts ([#2670](https://github.com/ReVanced/revanced-patches/issues/2670)) ([1f6fe3d](https://github.com/ReVanced/revanced-patches/commit/1f6fe3da4284fd768057ef068c7ddf88d3a11049))
### Features
* **Twitter:** remove `Hide view stats` patch ([f0d3800](https://github.com/ReVanced/revanced-patches/commit/f0d38001b34db63f212209afb91eebf59dad2b24))
* **Youtube - Theme:** add a switch to enable/disable custom seekbar color ([#2663](https://github.com/ReVanced/revanced-patches/issues/2663)) ([5c39985](https://github.com/ReVanced/revanced-patches/commit/5c39985888cdfe3acfdd8811ff9b6f80e243704e))
# [2.186.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.4...v2.186.0-dev.5) (2023-07-20)
### Bug Fixes
* **YouTube - Theme:** allow setting no background color ([8a4e77a](https://github.com/ReVanced/revanced-patches/commit/8a4e77a290a61a1caf93eb8bccaf728c84a3ef53))
# [2.186.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.3...v2.186.0-dev.4) (2023-07-20)
### Bug Fixes
* **YouTube - Spoof app version:** update target app version description ([#2666](https://github.com/ReVanced/revanced-patches/issues/2666)) ([307442e](https://github.com/ReVanced/revanced-patches/commit/307442e654ff5486656319d91e4a5f5fb2b92651))
# [2.186.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.2...v2.186.0-dev.3) (2023-07-20)
### Bug Fixes
* **Tiktok - Settings:** get instruction registers dynamically ([#2676](https://github.com/ReVanced/revanced-patches/issues/2676)) ([b34e45b](https://github.com/ReVanced/revanced-patches/commit/b34e45b6dafad8e9d567ad65f58a182b8cc04676))
# [2.186.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.186.0-dev.1...v2.186.0-dev.2) (2023-07-20)
### Bug Fixes
* **YouTube - Theme:** apply custom seekbar color to shorts ([#2670](https://github.com/ReVanced/revanced-patches/issues/2670)) ([1f6fe3d](https://github.com/ReVanced/revanced-patches/commit/1f6fe3da4284fd768057ef068c7ddf88d3a11049))
### Features
* **Youtube - Theme:** add a switch to enable/disable custom seekbar color ([#2663](https://github.com/ReVanced/revanced-patches/issues/2663)) ([5c39985](https://github.com/ReVanced/revanced-patches/commit/5c39985888cdfe3acfdd8811ff9b6f80e243704e))
# [2.186.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.185.0...v2.186.0-dev.1) (2023-07-20)
### Features
* **Twitter:** remove `Hide view stats` patch ([f0d3800](https://github.com/ReVanced/revanced-patches/commit/f0d38001b34db63f212209afb91eebf59dad2b24))
# [2.185.0](https://github.com/ReVanced/revanced-patches/compare/v2.184.0...v2.185.0) (2023-07-20)
### Bug Fixes
* allocate for more than eight `LithoFilter` array items ([#2643](https://github.com/ReVanced/revanced-patches/issues/2643)) ([fc8660b](https://github.com/ReVanced/revanced-patches/commit/fc8660b740bec2747e5f82b7321027bb8a51e0cf))
* **Sync for Reddit - Disable ads:** fix compatibility with latest version ([1456577](https://github.com/ReVanced/revanced-patches/commit/1456577f11c4a7e49d6c1ba0103b919dc487f4cf))
* **Tiktok - Settings:** bump compatibility ([#2656](https://github.com/ReVanced/revanced-patches/issues/2656)) ([6641356](https://github.com/ReVanced/revanced-patches/commit/6641356d41813a20c77faac67c37ea517690d25b))
* **TikTok - Show seekbar:** fix seekbar not always showing ([#2660](https://github.com/ReVanced/revanced-patches/issues/2660)) ([f2742f1](https://github.com/ReVanced/revanced-patches/commit/f2742f1ba117809971a10780823fca99c19a4f34))
* **Trakt - Unlock pro:** constraint to last known working version ([#2662](https://github.com/ReVanced/revanced-patches/issues/2662)) ([324bbde](https://github.com/ReVanced/revanced-patches/commit/324bbde92a851e855c11f266e92fa14c39d88160))
* **YouTube - Spoof client:** show video time and chapters while using seekbar ([#2607](https://github.com/ReVanced/revanced-patches/issues/2607)) ([9546d12](https://github.com/ReVanced/revanced-patches/commit/9546d126430870d1abd8f43bb687b31b9fcb6fb5))
* **youtube/sponsorblock:** fix some segments skipping slightly too late ([#2634](https://github.com/ReVanced/revanced-patches/issues/2634)) ([3175431](https://github.com/ReVanced/revanced-patches/commit/31754311870324b1e245b12965d7486878e9eba4))
### Features
* **youtube:** rename `video-speed` to `playback-speed` ([#2642](https://github.com/ReVanced/revanced-patches/issues/2642)) ([77e8639](https://github.com/ReVanced/revanced-patches/commit/77e8639b71048f2795f8f32fe18d052b335e3ce4))
# [2.185.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.6...v2.185.0-dev.7) (2023-07-19)
### Bug Fixes
* **YouTube - Spoof client:** show video time and chapters while using seekbar ([#2607](https://github.com/ReVanced/revanced-patches/issues/2607)) ([9546d12](https://github.com/ReVanced/revanced-patches/commit/9546d126430870d1abd8f43bb687b31b9fcb6fb5))
# [2.185.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.5...v2.185.0-dev.6) (2023-07-19)
### Bug Fixes
* **Tiktok - Settings:** bump compatibility ([#2656](https://github.com/ReVanced/revanced-patches/issues/2656)) ([6641356](https://github.com/ReVanced/revanced-patches/commit/6641356d41813a20c77faac67c37ea517690d25b))
# [2.185.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.4...v2.185.0-dev.5) (2023-07-19)
### Bug Fixes
* **Trakt - Unlock pro:** constraint to last known working version ([#2662](https://github.com/ReVanced/revanced-patches/issues/2662)) ([324bbde](https://github.com/ReVanced/revanced-patches/commit/324bbde92a851e855c11f266e92fa14c39d88160))
# [2.185.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.3...v2.185.0-dev.4) (2023-07-19)
### Bug Fixes
* **TikTok - Show seekbar:** fix seekbar not always showing ([#2660](https://github.com/ReVanced/revanced-patches/issues/2660)) ([f2742f1](https://github.com/ReVanced/revanced-patches/commit/f2742f1ba117809971a10780823fca99c19a4f34))
# [2.185.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.2...v2.185.0-dev.3) (2023-07-17)
### Bug Fixes
* **Sync for Reddit - Disable ads:** fix compatibility with latest version ([1456577](https://github.com/ReVanced/revanced-patches/commit/1456577f11c4a7e49d6c1ba0103b919dc487f4cf))
# [2.185.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.185.0-dev.1...v2.185.0-dev.2) (2023-07-15)
### Bug Fixes
* allocate for more than eight `LithoFilter` array items ([#2643](https://github.com/ReVanced/revanced-patches/issues/2643)) ([fc8660b](https://github.com/ReVanced/revanced-patches/commit/fc8660b740bec2747e5f82b7321027bb8a51e0cf))
# [2.185.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.184.1-dev.1...v2.185.0-dev.1) (2023-07-15)
### Features
* **youtube:** rename `video-speed` to `playback-speed` ([#2642](https://github.com/revanced/revanced-patches/issues/2642)) ([77e8639](https://github.com/revanced/revanced-patches/commit/77e8639b71048f2795f8f32fe18d052b335e3ce4))
## [2.184.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.184.0...v2.184.1-dev.1) (2023-07-14)
### Bug Fixes
* **youtube/sponsorblock:** fix some segments skipping slightly too late ([#2634](https://github.com/revanced/revanced-patches/issues/2634)) ([3175431](https://github.com/revanced/revanced-patches/commit/31754311870324b1e245b12965d7486878e9eba4))
# [2.184.0](https://github.com/revanced/revanced-patches/compare/v2.183.1...v2.184.0) (2023-07-11)
### Features
* **youtube/custom-branding:** update logo ([e2187f3](https://github.com/revanced/revanced-patches/commit/e2187f33ff82fce40592517aef31cb191b42987c))
# [2.184.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.183.1...v2.184.0-dev.1) (2023-07-11)
### Features
* **youtube/custom-branding:** update logo ([e2187f3](https://github.com/revanced/revanced-patches/commit/e2187f33ff82fce40592517aef31cb191b42987c))
## [2.183.1](https://github.com/revanced/revanced-patches/compare/v2.183.0...v2.183.1) (2023-07-10)
### Bug Fixes
* find resource by correct name ([7e562f3](https://github.com/revanced/revanced-patches/commit/7e562f3fb30d0ef5601114433090b2eebcf04c9e))
* use correct patch naming convention ([3d8856b](https://github.com/revanced/revanced-patches/commit/3d8856b29aba4d7436e637bc5778261b4acddeba))
## [2.183.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.183.0...v2.183.1-dev.1) (2023-07-10)
### Bug Fixes
* find resource by correct name ([7e562f3](https://github.com/revanced/revanced-patches/commit/7e562f3fb30d0ef5601114433090b2eebcf04c9e))
* use correct patch naming convention ([3d8856b](https://github.com/revanced/revanced-patches/commit/3d8856b29aba4d7436e637bc5778261b4acddeba))
# [2.183.0](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.183.0) (2023-07-10)
### Bug Fixes
* **youtube/custom-video-buffer:** remove non functional deprecated patch ([de233e2](https://github.com/revanced/revanced-patches/commit/de233e28246b1716b42bf331d2355ff4beed9564))
* **youtube/custom-video-speed:** don not implicitly depend on `old-video-quality-menu` patch ([acfda46](https://github.com/revanced/revanced-patches/commit/acfda46bce2558df18a6fa562008e058df5ad31e))
### Features
* change patches naming convention ([#2612](https://github.com/revanced/revanced-patches/issues/2612)) ([2dacc45](https://github.com/revanced/revanced-patches/commit/2dacc45f7430f7b3e60a8a2db60c3d6395a2f5cc))
# [2.183.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.1-dev.2...v2.183.0-dev.1) (2023-07-10)
### Features
* change patches naming convention ([#2612](https://github.com/revanced/revanced-patches/issues/2612)) ([2dacc45](https://github.com/revanced/revanced-patches/commit/2dacc45f7430f7b3e60a8a2db60c3d6395a2f5cc))
## [2.182.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.182.1-dev.1...v2.182.1-dev.2) (2023-07-09)
### Bug Fixes
* **youtube/custom-video-speed:** don not implicitly depend on `old-video-quality-menu` patch ([acfda46](https://github.com/revanced/revanced-patches/commit/acfda46bce2558df18a6fa562008e058df5ad31e))
## [2.182.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.182.1-dev.1) (2023-07-08) ## [2.182.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.182.0...v2.182.1-dev.1) (2023-07-08)

View File

@@ -27,7 +27,7 @@ repositories {
} }
dependencies { dependencies {
implementation("app.revanced:revanced-patcher:11.0.3") implementation("app.revanced:revanced-patcher:12.0.0")
implementation("app.revanced:multidexlib2:2.5.3-a3836654") implementation("app.revanced:multidexlib2:2.5.3-a3836654")
// Required for meta // Required for meta
implementation("com.google.code.gson:gson:2.10.1") implementation("com.google.code.gson:gson:2.10.1")

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true org.gradle.parallel = true
org.gradle.caching = true org.gradle.caching = true
kotlin.code.style = official kotlin.code.style = official
version = 2.182.1-dev.1 version = 2.187.0-dev.10

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.all.activity.exportAll.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -10,9 +9,8 @@ import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
@Patch(false) @Patch(false)
@Name("export-all-activities") @Name("Export all activities")
@Description("Makes all app activities exportable.") @Description("Makes all app activities exportable.")
@Version("0.0.1")
class ExportAllActivitiesPatch : ResourcePatch { class ExportAllActivitiesPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { editor -> context.xmlEditor["AndroidManifest.xml"].use { editor ->

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.all.connectivity.wifi.spoof.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
@@ -13,9 +12,8 @@ import org.jf.dexlib2.iface.instruction.Instruction
import java.util.* import java.util.*
@Patch(false) @Patch(false)
@Name("spoof-wifi-connection") @Name("Spoof wifi connection")
@Description("Spoofs an existing Wi-Fi connection.") @Description("Spoofs an existing Wi-Fi connection.")
@Version("0.0.1")
@RequiresIntegrations @RequiresIntegrations
internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.all.interaction.gestures.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -10,9 +9,8 @@ import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
@Patch(false) @Patch(false)
@Name("predictive-back-gesture") @Name("Predictive back gesture")
@Description("Enables the predictive back gesture introduced on Android 13.") @Description("Enables the predictive back gesture introduced on Android 13.")
@Version("0.0.1")
class PredictiveBackGesturePatch : ResourcePatch { class PredictiveBackGesturePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { editor -> context.xmlEditor["AndroidManifest.xml"].use { editor ->

View File

@@ -2,16 +2,14 @@ package app.revanced.patches.all.misc.debugging.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.* import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import org.w3c.dom.Element import org.w3c.dom.Element
@Patch(false) @Patch(false)
@Name("enable-android-debugging") @Name("Enable android debugging")
@Description("Enables Android debugging capabilities.") @Description("Enables Android debugging capabilities.")
@Version("0.0.1")
class EnableAndroidDebuggingPatch : ResourcePatch { class EnableAndroidDebuggingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { dom -> context.xmlEditor["AndroidManifest.xml"].use { dom ->

View File

@@ -2,16 +2,14 @@ package app.revanced.patches.all.misc.packagename.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.* import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import org.w3c.dom.Element import org.w3c.dom.Element
@Patch(false) @Patch(false)
@Name("change-package-name") @Name("Change package name")
@Description("Changes the package name.") @Description("Changes the package name.")
@Version("0.0.1")
class ChangePackageNamePatch : ResourcePatch { class ChangePackageNamePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
packageName?.let { packageName -> packageName?.let { packageName ->

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.all.screencapture.removerestriction.bytecode.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patcher.patch.annotations.RequiresIntegrations
@@ -14,9 +13,8 @@ import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.Instruction import org.jf.dexlib2.iface.instruction.Instruction
@Patch(false) @Patch(false)
@Name("remove-screen-capture-restriction") @Name("Remove screen capture restriction")
@Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.") @Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.")
@Version("0.0.1")
@DependsOn([RemoveCaptureRestrictionResourcePatch::class]) @DependsOn([RemoveCaptureRestrictionResourcePatch::class])
@RequiresIntegrations @RequiresIntegrations
internal class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { internal class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {

View File

@@ -1,17 +1,13 @@
package app.revanced.patches.all.screencapture.removerestriction.resource.patch package app.revanced.patches.all.screencapture.removerestriction.resource.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.ResourcePatch
import org.w3c.dom.Element import org.w3c.dom.Element
@Name("remove-screen-capture-restriction-resource-patch")
@Description("Sets allowAudioPlaybackCapture in manifest to true.") @Description("Sets allowAudioPlaybackCapture in manifest to true.")
@Version("0.0.1")
internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch { internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
// create an xml editor instance // create an xml editor instance

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.all.screenshot.removerestriction.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
@@ -13,9 +12,8 @@ import org.jf.dexlib2.iface.instruction.Instruction
import java.util.* import java.util.*
@Patch(false) @Patch(false)
@Name("remove-screenshot-restriction") @Name("Remove screenshot restriction")
@Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.") @Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.")
@Version("0.0.1")
@RequiresIntegrations @RequiresIntegrations
internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.backdrops.misc.pro.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -16,10 +15,9 @@ import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@Name("pro-unlock") @Name("Pro unlock")
@Description("Unlocks pro-only functions.") @Description("Unlocks pro-only functions.")
@ProUnlockCompatibility @ProUnlockCompatibility
@Version("0.0.1")
class ProUnlockPatch : BytecodePatch( class ProUnlockPatch : BytecodePatch(
listOf(ProUnlockFingerprint) listOf(ProUnlockFingerprint)
) { ) {

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.candylinkvpn.fingereprints package app.revanced.patches.candylinkvpn.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
@@ -7,5 +7,4 @@ object IsPremiumPurchasedFingerprint : MethodFingerprint(
methodDef.definingClass.endsWith("PreferenceProvider;") && methodDef.definingClass.endsWith("PreferenceProvider;") &&
methodDef.name == "isPremiumPurchased" methodDef.name == "isPremiumPurchased"
} }
) { )
}

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.candylinkvpn.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -11,13 +10,12 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility
import app.revanced.patches.candylinkvpn.fingereprints.IsPremiumPurchasedFingerprint import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks premium features.") @Description("Unlocks premium features.")
@UnlockProCompatibility @UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf(IsPremiumPurchasedFingerprint) listOf(IsPremiumPurchasedFingerprint)
) { ) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.finanzonline.detection.bootloader.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -16,10 +15,9 @@ import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionC
@Patch @Patch
@Name("remove-bootloader-detection") @Name("Remove bootloader detection")
@Description("Removes the check for an unlocked bootloader.") @Description("Removes the check for an unlocked bootloader.")
@DetectionCompatibility @DetectionCompatibility
@Version("0.0.1")
class BootloaderDetectionPatch : BytecodePatch( class BootloaderDetectionPatch : BytecodePatch(
listOf(CreateKeyFingerprint, BootStateFingerprint) listOf(CreateKeyFingerprint, BootStateFingerprint)
) { ) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.finanzonline.detection.root.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetecti
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
@Patch @Patch
@Name("remove-root-detection") @Name("Remove root detection")
@Description("Removes the check for root permissions.") @Description("Removes the check for root permissions.")
@DetectionCompatibility @DetectionCompatibility
@Version("0.0.1")
class RootDetectionPatch : BytecodePatch( class RootDetectionPatch : BytecodePatch(
listOf(RootDetectionFingerprint) listOf(RootDetectionFingerprint)
) { ) {

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.googlerecorder.restrictions.fingereprints package app.revanced.patches.googlerecorder.restrictions.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@@ -5,7 +5,6 @@ import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -14,14 +13,13 @@ import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.googlerecorder.restrictions.fingereprints.OnApplicationCreateFingerprint import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@Name("remove-device-restrictions") @Name("Remove device restrictions")
@Description("Removes restrictions from using the app on any device.") @Description("Removes restrictions from using the app on any device.")
@Compatibility([Package("com.google.android.apps.recorder")]) @Compatibility([Package("com.google.android.apps.recorder")])
@Version("0.0.1")
class RemoveDeviceRestrictions : BytecodePatch( class RemoveDeviceRestrictions : BytecodePatch(
listOf(OnApplicationCreateFingerprint) listOf(OnApplicationCreateFingerprint)
) { ) {

View File

@@ -2,9 +2,7 @@ package app.revanced.patches.hexeditor.ad.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
@@ -14,10 +12,9 @@ import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
@Patch @Patch
@Name("disable-ads") @Name("Disable ads")
@Description("Disables ads in HexEditor.") @Description("Disables ads in HexEditor.")
@HexEditorAdsCompatibility @HexEditorAdsCompatibility
@Version("0.0.1")
class HexEditorAdsPatch : BytecodePatch( class HexEditorAdsPatch : BytecodePatch(
listOf( listOf(
PrimaryAdsFingerprint PrimaryAdsFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.iconpackstudio.misc.pro.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompati
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks all pro features.") @Description("Unlocks all pro features.")
@UnlockProCompatibility @UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf( listOf(
CheckProFingerprint CheckProFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.idaustria.detection.root.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionF
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
@Patch @Patch
@Name("remove-root-detection") @Name("Remove root detection")
@Description("Removes the check for root permissions and unlocked bootloader.") @Description("Removes the check for root permissions and unlocked bootloader.")
@DetectionCompatibility @DetectionCompatibility
@Version("0.0.1")
class RootDetectionPatch : BytecodePatch( class RootDetectionPatch : BytecodePatch(
listOf(RootDetectionFingerprint) listOf(RootDetectionFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.idaustria.detection.signature.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.idaustria.detection.shared.annotations.DetectionComp
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
@Patch @Patch
@Name("spoof-signature") @Name("Spoof signature")
@Description("Spoofs the signature of the app.") @Description("Spoofs the signature of the app.")
@DetectionCompatibility @DetectionCompatibility
@Version("0.0.1")
class SpoofSignaturePatch : BytecodePatch( class SpoofSignaturePatch : BytecodePatch(
listOf(SpoofSignatureFingerprint) listOf(SpoofSignatureFingerprint)
) { ) {

View File

@@ -4,7 +4,6 @@ import app.revanced.extensions.toErrorResult
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
@@ -14,10 +13,9 @@ import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
@Patch @Patch
@Name("hide-ads") @Name("Hide ads")
@Description("Removes ads from Inshorts.") @Description("Removes ads from Inshorts.")
@HideAdsCompatibility @HideAdsCompatibility
@Version("0.0.1")
class HideAdsPatch : BytecodePatch( class HideAdsPatch : BytecodePatch(
listOf(InshortsAdsFingerprint) listOf(InshortsAdsFingerprint)
) { ) {

View File

@@ -22,10 +22,9 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@Name("hide-timeline-ads") @Name("Hide timeline ads")
@Description("Removes ads from the timeline.") @Description("Removes ads from the timeline.")
@Compatibility([Package("com.instagram.android", arrayOf("275.0.0.27.98"))]) @Compatibility([Package("com.instagram.android", arrayOf("275.0.0.27.98"))])
@Version("0.0.1")
class HideTimelineAdsPatch : BytecodePatch( class HideTimelineAdsPatch : BytecodePatch(
listOf( listOf(
ShowAdFingerprint, ShowAdFingerprint,

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.irplus.ad.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
@Patch @Patch
@Name("remove-ads") @Name("Remove ads")
@Description("Removes all ads from the app.") @Description("Removes all ads from the app.")
@IrplusAdsCompatibility @IrplusAdsCompatibility
@Version("0.0.1")
class IrplusAdsPatch : BytecodePatch( class IrplusAdsPatch : BytecodePatch(
listOf(IrplusAdsFingerprint) listOf(IrplusAdsFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.memegenerator.detection.license.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -11,7 +10,6 @@ import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint
@Description("Disables Firebase license validation.") @Description("Disables Firebase license validation.")
@Version("0.0.1")
class LicenseValidationPatch : BytecodePatch( class LicenseValidationPatch : BytecodePatch(
listOf(LicenseValidationFingerprint) listOf(LicenseValidationFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.memegenerator.detection.signature.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -11,7 +10,6 @@ import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.memegenerator.detection.signature.fingerprint.VerifySignatureFingerprint import app.revanced.patches.memegenerator.detection.signature.fingerprint.VerifySignatureFingerprint
@Description("Disables detection of incorrect signature.") @Description("Disables detection of incorrect signature.")
@Version("0.0.1")
class SignatureVerificationPatch : BytecodePatch( class SignatureVerificationPatch : BytecodePatch(
listOf(VerifySignatureFingerprint) listOf(VerifySignatureFingerprint)
) { ) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.memegenerator.misc.pro.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -17,14 +16,13 @@ import app.revanced.patches.memegenerator.misc.pro.annotations.UnlockProCompatib
import app.revanced.patches.memegenerator.misc.pro.fingerprint.IsFreeVersionFingerprint import app.revanced.patches.memegenerator.misc.pro.fingerprint.IsFreeVersionFingerprint
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks pro features.") @Description("Unlocks pro features.")
@DependsOn([ @DependsOn([
SignatureVerificationPatch::class, SignatureVerificationPatch::class,
LicenseValidationPatch::class LicenseValidationPatch::class
]) ])
@UnlockProCompatibility @UnlockProCompatibility
@Version("0.0.1")
class UnlockProVersionPatch : BytecodePatch( class UnlockProVersionPatch : BytecodePatch(
listOf( listOf(
IsFreeVersionFingerprint IsFreeVersionFingerprint

View File

@@ -11,10 +11,9 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerprint import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerprint
@Patch @Patch
@Name("hide-inbox-ads") @Name("Hide inbox ads")
@Description("Hides ads in inbox.") @Description("Hides ads in inbox.")
@Compatibility([Package("com.facebook.orca")]) @Compatibility([Package("com.facebook.orca")])
@Version("0.0.1")
class HideInboxAdsPatch : BytecodePatch( class HideInboxAdsPatch : BytecodePatch(
listOf(LoadInboxAdsFingerprint) listOf(LoadInboxAdsFingerprint)
) { ) {

View File

@@ -13,10 +13,9 @@ import app.revanced.patches.messenger.inputfield.fingerprints.SwitchMessangeInpu
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@Name("disable-switching-emoji-to-sticker-in-message-input-field") @Name("Disable switching emoji to sticker in message input field")
@Description("Disables switching from emoji to sticker search mode in message input field") @Description("Disables switching from emoji to sticker search mode in message input field")
@Compatibility([Package("com.facebook.orca")]) @Compatibility([Package("com.facebook.orca")])
@Version("0.0.1")
class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) { class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
SwitchMessangeInputEmojiButtonFingerprint.result?.let { SwitchMessangeInputEmojiButtonFingerprint.result?.let {

View File

@@ -5,7 +5,6 @@ import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -15,10 +14,9 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicatorFingerprint import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicatorFingerprint
@Patch @Patch
@Name("disable-typing-indicator") @Name("Disable typing indicator")
@Description("Disables the indicator while typing a message") @Description("Disables the indicator while typing a message")
@Compatibility([Package("com.facebook.orca")]) @Compatibility([Package("com.facebook.orca")])
@Version("0.0.1")
class DisableTypingIndicator : BytecodePatch(listOf(SendTypingIndicatorFingerprint)) { class DisableTypingIndicator : BytecodePatch(listOf(SendTypingIndicatorFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
SendTypingIndicatorFingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void") SendTypingIndicatorFingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void")

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.moneymanager.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.moneymanager.annotations.UnlockProCompatibility
import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks pro features.") @Description("Unlocks pro features.")
@UnlockProCompatibility @UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf(UnlockProFingerprint) listOf(UnlockProFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.ad.video.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
@@ -15,10 +14,9 @@ import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerp
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.annotations.MusicCompatibility
@Patch @Patch
@Name("music-video-ads") @Name("Music video ads")
@Description("Removes ads in the music player.") @Description("Removes ads in the music player.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class MusicVideoAdsPatch : BytecodePatch( class MusicVideoAdsPatch : BytecodePatch(
listOf(ShowMusicVideoAdsConstructorFingerprint) listOf(ShowMusicVideoAdsConstructorFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.audio.codecs.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -16,10 +15,9 @@ import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprin
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@Patch @Patch
@Name("codecs-unlock") @Name("Codecs unlock")
@Description("Adds more audio codec options. The new audio codecs usually result in better audio quality.") @Description("Adds more audio codec options. The new audio codecs usually result in better audio quality.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class CodecsUnlockPatch : BytecodePatch( class CodecsUnlockPatch : BytecodePatch(
listOf( listOf(
CodecsLockFingerprint, AllCodecsReferenceFingerprint CodecsLockFingerprint, AllCodecsReferenceFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.audio.exclusiveaudio.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
@@ -14,10 +13,9 @@ import app.revanced.patches.music.annotations.MusicCompatibility
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
@Patch @Patch
@Name("exclusive-audio-playback") @Name("Exclusive audio playback")
@Description("Enables the option to play music without video.") @Description("Enables the option to play music without video.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class ExclusiveAudioPatch : BytecodePatch( class ExclusiveAudioPatch : BytecodePatch(
listOf(AudioOnlyEnablerFingerprint) listOf(AudioOnlyEnablerFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.layout.compactheader.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeade
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
@Patch(false) @Patch(false)
@Name("compact-header") @Name("Compact header")
@Description("Hides the music category bar at the top of the homepage.") @Description("Hides the music category bar at the top of the homepage.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class CompactHeaderPatch : BytecodePatch( class CompactHeaderPatch : BytecodePatch(
listOf(CompactHeaderConstructorFingerprint) listOf(CompactHeaderConstructorFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.layout.minimizedplayback.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.music.annotations.MusicCompatibility
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
@Patch @Patch
@Name("minimized-playback-music") @Name("Minimized playback music")
@Description("Enables minimized playback on Kids music.") @Description("Enables minimized playback on Kids music.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class MinimizedPlaybackPatch : BytecodePatch( class MinimizedPlaybackPatch : BytecodePatch(
listOf(MinimizedPlaybackManagerFingerprint) listOf(MinimizedPlaybackManagerFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.layout.premium.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
@@ -16,10 +15,9 @@ import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFing
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
@Patch @Patch
@Name("hide-get-premium") @Name("Hide get premium")
@Description("Removes all \"Get Premium\" evidences from the avatar menu.") @Description("Removes all \"Get Premium\" evidences from the avatar menu.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class HideGetPremiumPatch : BytecodePatch( class HideGetPremiumPatch : BytecodePatch(
listOf(HideGetPremiumParentFingerprint) listOf(HideGetPremiumParentFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.layout.upgradebutton.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -19,10 +18,9 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Patch @Patch
@Name("upgrade-button-remover") @Name("Upgrade button remover")
@Description("Removes the upgrade tab from the pivot bar.") @Description("Removes the upgrade tab from the pivot bar.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class RemoveUpgradeButtonPatch : BytecodePatch( class RemoveUpgradeButtonPatch : BytecodePatch(
listOf(PivotBarConstructorFingerprint) listOf(PivotBarConstructorFingerprint)
) { ) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.music.misc.androidauto.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.music.annotations.MusicCompatibility
import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint
@Patch @Patch
@Name("bypass-certificate-checks") @Name("Bypass certificate checks")
@Description("Bypasses certificate checks which prevent YouTube Music from working on Android Auto.") @Description("Bypasses certificate checks which prevent YouTube Music from working on Android Auto.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class BypassCertificateChecksPatch : BytecodePatch( class BypassCertificateChecksPatch : BytecodePatch(
listOf(CheckCertificateFingerprint) listOf(CheckCertificateFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.misc.microg.patch.bytecode
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -18,10 +17,9 @@ import app.revanced.util.microg.MicroGBytecodeHelper
@Patch @Patch
@DependsOn([MicroGResourcePatch::class]) @DependsOn([MicroGResourcePatch::class])
@Name("vanced-microg-support") @Name("Vanced MicroG support")
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.") @Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.2")
class MicroGBytecodePatch : BytecodePatch( class MicroGBytecodePatch : BytecodePatch(
listOf( listOf(
ServiceCheckFingerprint, ServiceCheckFingerprint,

View File

@@ -1,13 +1,10 @@
package app.revanced.patches.music.misc.microg.patch.resource package app.revanced.patches.music.misc.microg.patch.resource
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patches.music.annotations.MusicCompatibility
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
@@ -16,10 +13,7 @@ import app.revanced.patches.music.misc.microg.shared.Constants.SPOOFED_PACKAGE_S
import app.revanced.util.microg.MicroGManifestHelper import app.revanced.util.microg.MicroGManifestHelper
import app.revanced.util.microg.MicroGResourceHelper import app.revanced.util.microg.MicroGResourceHelper
@Name("microg-resource-patch")
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.") @Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
@MusicCompatibility
@Version("0.0.2")
class MicroGResourcePatch : ResourcePatch { class MicroGResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
// update manifest // update manifest

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.music.premium.backgroundplay.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.music.annotations.MusicCompatibility
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
@Patch @Patch
@Name("background-play") @Name("Background play")
@Description("Enables playing music in the background.") @Description("Enables playing music in the background.")
@MusicCompatibility @MusicCompatibility
@Version("0.0.1")
class BackgroundPlayPatch : BytecodePatch( class BackgroundPlayPatch : BytecodePatch(
listOf(BackgroundPlaybackDisableFingerprint) listOf(BackgroundPlaybackDisableFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.myexpenses.misc.pro.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.myexpenses.misc.pro.annotations.UnlockProCompatibili
import app.revanced.patches.myexpenses.misc.pro.fingerprints.IsEnabledFingerprint import app.revanced.patches.myexpenses.misc.pro.fingerprints.IsEnabledFingerprint
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks all professional features.") @Description("Unlocks all professional features.")
@UnlockProCompatibility @UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf( listOf(
IsEnabledFingerprint IsEnabledFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.netguard.broadcasts.removerestriction.resource.patc
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -12,10 +11,9 @@ import app.revanced.patches.netguard.broadcasts.removerestriction.resource.annot
import org.w3c.dom.Element import org.w3c.dom.Element
@Patch(false) @Patch(false)
@Name("remove-broadcasts-restriction") @Name("Remove broadcasts restriction")
@Description("Enables starting/stopping NetGuard via broadcasts.") @Description("Enables starting/stopping NetGuard via broadcasts.")
@RemoveBroadcastsRestrictionCompatibility @RemoveBroadcastsRestrictionCompatibility
@Version("0.0.1")
class RemoveBroadcastsRestrictionPatch : ResourcePatch { class RemoveBroadcastsRestrictionPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { dom -> context.xmlEditor["AndroidManifest.xml"].use { dom ->

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.nfctoolsse.misc.pro.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -15,9 +14,8 @@ import app.revanced.patches.nfctoolsse.misc.pro.fingerprints.IsLicenseRegistered
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks all pro features.") @Description("Unlocks all pro features.")
@Version("0.0.1")
@UnlockProCompatibility @UnlockProCompatibility
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf( listOf(

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.nova.prime.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -15,10 +14,9 @@ import app.revanced.patches.nova.prime.fingerprints.UnlockPrimeFingerprint
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
@Patch @Patch
@Name("unlock-prime") @Name("Unlock prime")
@Description("Unlocks Nova Prime and all functions of the app.") @Description("Unlocks Nova Prime and all functions of the app.")
@UnlockPrimeCompatibility @UnlockPrimeCompatibility
@Version("0.0.1")
class UnlockPrimePatch : BytecodePatch( class UnlockPrimePatch : BytecodePatch(
listOf( listOf(
UnlockPrimeFingerprint UnlockPrimeFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.nyx.misc.pro.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.nyx.misc.pro.annotations.UnlockProCompatibility
import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint
@Patch @Patch
@Name("unlock-pro") @Name("Unlock pro")
@Description("Unlocks all pro features.") @Description("Unlocks all pro features.")
@UnlockProCompatibility @UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf( listOf(
CheckProFingerprint CheckProFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.photomath.detection.signature.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
@@ -13,7 +12,6 @@ import app.revanced.patches.photomath.detection.signature.fingerprints.CheckSign
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Disables detection of incorrect signature.") @Description("Disables detection of incorrect signature.")
@Version("0.0.2")
class SignatureDetectionPatch : BytecodePatch( class SignatureDetectionPatch : BytecodePatch(
listOf( listOf(
CheckSignatureFingerprint CheckSignatureFingerprint

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.photomath.misc.unlockplus.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -16,11 +15,10 @@ import app.revanced.patches.photomath.misc.unlockplus.annotations.UnlockPlusComp
import app.revanced.patches.photomath.misc.unlockplus.fingerprints.IsPlusUnlockedFingerprint import app.revanced.patches.photomath.misc.unlockplus.fingerprints.IsPlusUnlockedFingerprint
@Patch @Patch
@Name("unlock-plus") @Name("Unlock plus")
@DependsOn([SignatureDetectionPatch::class]) @DependsOn([SignatureDetectionPatch::class])
@Description("Unlocks plus features.") @Description("Unlocks plus features.")
@UnlockPlusCompatibilty @UnlockPlusCompatibilty
@Version("0.0.1")
class UnlockPlusPatch : BytecodePatch( class UnlockPlusPatch : BytecodePatch(
listOf( listOf(
IsPlusUnlockedFingerprint IsPlusUnlockedFingerprint

View File

@@ -11,10 +11,9 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.pixiv.ads.fingerprints.IsNotPremiumFingerprint import app.revanced.patches.pixiv.ads.fingerprints.IsNotPremiumFingerprint
@Patch @Patch
@Name("hide-ads") @Name("Hide ads")
@Description("Hides ads.") @Description("Hides ads.")
@Compatibility([Package("jp.pxv.android")]) @Compatibility([Package("jp.pxv.android")])
@Version("0.0.1")
class HideAdsPatch : BytecodePatch(listOf(IsNotPremiumFingerprint)) { class HideAdsPatch : BytecodePatch(listOf(IsNotPremiumFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
// Always return false in the "isNotPremium" method which normally returns !this.accountManager.isPremium. // Always return false in the "isNotPremium" method which normally returns !this.accountManager.isPremium.

View File

@@ -2,15 +2,13 @@ package app.revanced.patches.reddit.ad.banner.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.ResourcePatch
@Name("hide-subreddit-banner") @Name("Hide subreddit banner")
@Description("Hides banner ads from comments on subreddits.") @Description("Hides banner ads from comments on subreddits.")
@Version("0.0.1")
class HideBannerPatch : ResourcePatch { class HideBannerPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor[RESOURCE_FILE_PATH].use { context.xmlEditor[RESOURCE_FILE_PATH].use {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.reddit.ad.comments.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -10,9 +9,8 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFingerprint import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFingerprint
@Name("hide-comment-ads") @Name("Hide comment ads")
@Description("Removes all comment ads.") @Description("Removes all comment ads.")
@Version("0.0.1")
class HideCommentAdsPatch : BytecodePatch( class HideCommentAdsPatch : BytecodePatch(
listOf(HideCommentAdsFingerprint) listOf(HideCommentAdsFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.reddit.ad.general.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -24,12 +23,11 @@ import org.jf.dexlib2.iface.reference.FieldReference
import org.jf.dexlib2.iface.reference.MethodReference import org.jf.dexlib2.iface.reference.MethodReference
@Patch @Patch
@Name("hide-ads") @Name("Hide ads")
@Description("Removes ads from the Reddit.") @Description("Removes ads from the Reddit.")
@DependsOn([HideBannerPatch::class, HideCommentAdsPatch::class]) @DependsOn([HideBannerPatch::class, HideCommentAdsPatch::class])
@HideAdsCompatibility @HideAdsCompatibility
@RequiresIntegrations @RequiresIntegrations
@Version("0.0.2")
class HideAdsPatch : BytecodePatch( class HideAdsPatch : BytecodePatch(
listOf(AdPostFingerprint, NewAdPostFingerprint) listOf(AdPostFingerprint, NewAdPostFingerprint)
) { ) {

View File

@@ -8,11 +8,15 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.* import app.revanced.patcher.patch.*
import java.io.File import java.io.File
abstract class AbstractChangeOAuthClientIdPatch( abstract class AbstractSpoofClientPatch(
private val redirectUri: String, private val redirectUri: String,
private val options: ChangeOAuthClientIdOptionsContainer, private val options: SpoofClientOptionsContainer,
private val fingerprints: List<MethodFingerprint> private val clientIdFingerprints: List<MethodFingerprint>,
) : BytecodePatch(fingerprints) { private val userAgentFingerprints: List<MethodFingerprint>? = null,
) : BytecodePatch(buildList {
addAll(clientIdFingerprints)
userAgentFingerprints?.let(::addAll)
}) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
if (options.clientId == null) { if (options.clientId == null) {
// Ensure device runs Android. // Ensure device runs Android.
@@ -38,13 +42,39 @@ abstract class AbstractChangeOAuthClientIdPatch(
}.let { options.clientId = it.readText().trim() } }.let { options.clientId = it.readText().trim() }
} }
return fingerprints.map { it.result ?: throw it.toErrorResult() }.patch(context) fun List<MethodFingerprint>?.executePatch(
patch: List<MethodFingerprintResult>.(BytecodeContext) -> PatchResult
) {
when (val result = this?.map { it.result ?: throw it.toErrorResult() }?.patch(context)) {
is PatchResultError -> throw result
}
}
clientIdFingerprints.executePatch { patchClientId(context) }
userAgentFingerprints.executePatch { patchUserAgent(context) }
return PatchResultSuccess()
} }
abstract fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult /**
* Patch the client ID. The fingerprints are guaranteed to be in the same order as in [clientIdFingerprints].
*
* @param context The current [BytecodeContext].
*
*/
abstract fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult
/**
* Patch the user agent. The fingerprints are guaranteed to be in the same order as in [userAgentFingerprints].
*
* @param context The current [BytecodeContext].
*/
// Not every client needs to patch the user agent.
open fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult =
PatchResultSuccess()
companion object Options { companion object Options {
open class ChangeOAuthClientIdOptionsContainer : OptionsContainer() { open class SpoofClientOptionsContainer : OptionsContainer() {
var clientId by option( var clientId by option(
PatchOption.StringOption( PatchOption.StringOption(
"client-id", "client-id",

View File

@@ -1,10 +1,9 @@
package app.revanced.patches.reddit.customclients package app.revanced.patches.reddit.customclients
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Patch @Patch
@Name("change-oauth-client-id") @Name("Spoof client")
annotation class ChangeOAuthClientIdPatchAnnotation annotation class SpoofClientAnnotation

View File

@@ -9,15 +9,15 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://baconreader.com/auth\".") "and the redirect URI has to be set to \"http://baconreader.com/auth\".")
@Compatibility( @Compatibility(
@@ -26,11 +26,11 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
Package("com.onelouder.baconreader.premium") Package("com.onelouder.baconreader.premium")
] ]
) )
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( class SpoofClientPatch : AbstractSpoofClientPatch(
"http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint) "http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint)
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
fun MethodFingerprintResult.patch(replacementString: String) { fun MethodFingerprintResult.patch(replacementString: String) {
val clientIdIndex = scanResult.stringsScanResult!!.matches.first().index val clientIdIndex = scanResult.stringsScanResult!!.matches.first().index
@@ -52,5 +52,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -8,29 +8,29 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://rubenmayayo.com\".") "and the redirect URI has to be set to \"http://rubenmayayo.com\".")
@Compatibility([Package("com.rubenmayayo.reddit")]) @Compatibility([Package("com.rubenmayayo.reddit")])
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( class SpoofClientPatch : AbstractSpoofClientPatch(
"http://rubenmayayo.com", Options, listOf(GetClientIdFingerprint) "http://rubenmayayo.com", Options, listOf(GetClientIdFingerprint)
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
first().mutableMethod.addInstructions( first().mutableMethod.addInstructions(
0, 0,
""" """
const-string v0, "$clientId" const-string v0, "$clientId"
return-object v0 return-object v0
""" """
) )
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -9,23 +9,23 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"infinity://localhost\".") "and the redirect URI has to be set to \"infinity://localhost\".")
@Compatibility([Package("ml.docilealligator.infinityforreddit")]) @Compatibility([Package("ml.docilealligator.infinityforreddit")])
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( class SpoofClientPatch : AbstractSpoofClientPatch(
"infinity://localhost", "infinity://localhost",
Options, Options,
listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint) listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint)
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
forEach { forEach {
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
it.mutableMethod.apply { it.mutableMethod.apply {
@@ -41,5 +41,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object IsAdFreeUserFingerprint : MethodFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC.value,
strings = listOf("AD_FREE_USER")
)

View File

@@ -0,0 +1,33 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.ads.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints.IsAdFreeUserFingerprint
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
@Patch
@Name("Disable ads")
@DependsOn([DisablePiracyDetectionPatch::class])
@Compatibility([Package("o.o.joey")])
class DisableAdsPatch : BytecodePatch(listOf(IsAdFreeUserFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
IsAdFreeUserFingerprint.result?.mutableMethod?.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
) ?: return IsAdFreeUserFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints
import app.revanced.patcher.extensions.or
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object GetClientIdFingerprint : MethodFingerprint(
returnType = "L",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
opcodes = listOf(
Opcode.CONST, // R.string.valuable_cid
Opcode.INVOKE_STATIC, // StringMaster.decrypt
Opcode.MOVE_RESULT_OBJECT,
Opcode.RETURN_OBJECT
),
customFingerprint = custom@{ _, classDef ->
classDef.sourceFile == "AuthUtility.java"
}
)

View File

@@ -0,0 +1,47 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.api.patch
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints.GetClientIdFingerprint
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
@SpoofClientAnnotation
@Description(
"Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"https://127.0.0.1:65023/authorize_callback\"."
)
@Compatibility(
[
Package("o.o.joey"),
Package("o.o.joey.pro"),
Package("o.o.joey.dev")
]
)
@DependsOn([DisablePiracyDetectionPatch::class])
class SpoofClientPatch : AbstractSpoofClientPatch(
"https://127.0.0.1:65023/authorize_callback", Options, listOf(GetClientIdFingerprint)
) {
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
first().mutableMethod.addInstructions(
0,
"""
const-string v0, "$clientId"
return-object v0
"""
)
return PatchResultSuccess()
}
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
}

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object PiracyDetectionFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PRIVATE or AccessFlags.STATIC,
opcodes = listOf(
Opcode.NEW_INSTANCE, // new PiracyDetectionRunnable()
Opcode.CONST_16,
Opcode.CONST_WIDE_16,
Opcode.INVOKE_DIRECT, // <init>(..)
Opcode.INVOKE_VIRTUAL, // run()
Opcode.RETURN_VOID
),
customFingerprint = custom@{ _, classDef ->
classDef.type.endsWith("ProcessLifeCyleListener;")
}
)

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint
class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
PiracyDetectionFingerprint.result?.mutableMethod?.addInstruction(
0,
"""
return-void
"""
) ?: return PiracyDetectionFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object GetUserAgentFingerprint : MethodFingerprint(
"Ljava/lang/String;",
AccessFlags.PUBLIC or AccessFlags.STATIC,
emptyList(),
listOf(
Opcode.NEW_ARRAY,
Opcode.CONST_4,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.APUT_OBJECT,
Opcode.CONST,
)
)

View File

@@ -4,32 +4,32 @@ import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult.MethodFingerprintScanResult.StringsScanResult.StringMatch import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult.MethodFingerprintScanResult.StringsScanResult.StringMatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.GetUserAgentFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"redditisfun://auth\".") "and the redirect URI has to be set to \"redditisfun://auth\".")
@Compatibility([Package("com.andrewshu.android.reddit"), Package("com.andrewshu.android.redditdonation")]) @Compatibility([Package("com.andrewshu.android.reddit"), Package("com.andrewshu.android.redditdonation")])
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( class SpoofClientPatch : AbstractSpoofClientPatch(
"redditisfun://auth", "redditisfun://auth",
Options, Options,
listOf( listOf(BuildAuthorizationStringFingerprint, BasicAuthorizationFingerprint),
BuildAuthorizationStringFingerprint, listOf(GetUserAgentFingerprint)
BasicAuthorizationFingerprint,
)
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
/** /**
* Replaces a one register instruction with a const-string instruction * Replaces a one register instruction with a const-string instruction
* at the index returned by [getReplacementIndex]. * at the index returned by [getReplacementIndex].
@@ -57,5 +57,20 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult {
// Use a random number as the user agent string.
val randomUserAgent = (0..100000).random()
first().mutableMethod.addInstructions(
0,
"""
const-string v0, "$randomUserAgent"
return-object v0
"""
)
return PatchResultSuccess()
}
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -9,20 +9,20 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedInBearerTokenFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedInBearerTokenFingerprint
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"dbrady://relay\".") "and the redirect URI has to be set to \"dbrady://relay\".")
@Compatibility([Package("free.reddit.news"), Package("reddit.news")]) @Compatibility([Package("free.reddit.news"), Package("reddit.news")])
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( class SpoofClientPatch : AbstractSpoofClientPatch(
"dbrady://relay", "dbrady://relay",
Options, Options,
listOf( listOf(
@@ -32,7 +32,7 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
GetRefreshTokenFingerprint GetRefreshTokenFingerprint
) )
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
forEach { forEach {
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
it.mutableMethod.apply { it.mutableMethod.apply {
@@ -48,5 +48,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -1,36 +1,36 @@
package app.revanced.patches.reddit.customclients.slide.api.patch package app.revanced.patches.reddit.customclients.slide.api.patch
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://www.ccrama.me\".") "and the redirect URI has to be set to \"http://www.ccrama.me\".")
@Compatibility([Package("me.ccrama.redditslide")]) @Compatibility([Package("me.ccrama.redditslide")])
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( class SpoofClientPatch : AbstractSpoofClientPatch(
"http://www.ccrama.me", Options, listOf(GetClientIdFingerprint) "http://www.ccrama.me", Options, listOf(GetClientIdFingerprint)
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
first().mutableMethod.addInstructions( first().mutableMethod.addInstructions(
0, 0,
""" """
const-string v0, "$clientId" const-string v0, "$clientId"
return-object v0 return-object v0
""" """
) )
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -13,11 +13,9 @@ import app.revanced.patches.reddit.customclients.syncforreddit.ads.fingerprints.
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
@Patch @Patch
@Name("disable-ads") @Name("Disable ads")
@DependsOn([DisablePiracyDetectionPatch::class]) @DependsOn([DisablePiracyDetectionPatch::class])
@Description("Disables ads.")
@Compatibility([Package("com.laurencedawson.reddit_sync")]) @Compatibility([Package("com.laurencedawson.reddit_sync")])
@Version("0.0.1")
class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) { class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
IsAdsEnabledFingerprint.result?.mutableMethod?.apply { IsAdsEnabledFingerprint.result?.mutableMethod?.apply {

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object MainActivityOnCreate : MethodFingerprint(
customFingerprint = custom@{ method, classDef ->
classDef.type.endsWith("MainActivity;") && method.name == "onCreate"
}
)

View File

@@ -0,0 +1,35 @@
package app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.patch
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.fingerprints.MainActivityOnCreate
@Patch
@Name("Disable Sync for Lemmy bottom sheet")
@Description("Disables the bottom sheet at the startup that asks you to signup to \"Sync for Lemmy\".")
@Compatibility(
[
Package("com.laurencedawson.reddit_sync", ["v23.06.30-13:39"]),
Package("com.laurencedawson.reddit_sync.pro"), // Version unknown.
Package("com.laurencedawson.reddit_sync.dev") // Version unknown.
]
)
class DisableSyncForLemmyBottomSheetPatch : BytecodePatch(listOf(MainActivityOnCreate)) {
override fun execute(context: BytecodeContext): PatchResult {
MainActivityOnCreate.result?.mutableMethod?.apply {
val showBottomSheetIndex = implementation!!.instructions.lastIndex - 1
removeInstruction(showBottomSheetIndex)
}
return PatchResultSuccess()
}
}

View File

@@ -12,17 +12,19 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.customclients.AbstractChangeOAuthClientIdPatch import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.reddit.customclients.ChangeOAuthClientIdPatchAnnotation import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.StringReference import org.jf.dexlib2.iface.reference.StringReference
import java.util.* import java.util.*
@ChangeOAuthClientIdPatchAnnotation @SpoofClientAnnotation
@Description("Changes the OAuth client ID. " + @Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://redditsync/auth\".") "and the redirect URI has to be set to \"http://redditsync/auth\".")
@Compatibility( @Compatibility(
@@ -32,10 +34,11 @@ import java.util.*
Package("com.laurencedawson.reddit_sync.dev") Package("com.laurencedawson.reddit_sync.dev")
] ]
) )
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch( @DependsOn([DisablePiracyDetectionPatch::class])
class SpoofClientPatch : AbstractSpoofClientPatch(
"http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint) "http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint)
) { ) {
override fun List<MethodFingerprintResult>.patch(context: BytecodeContext): PatchResult { override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult {
forEach { fingerprintResult -> forEach { fingerprintResult ->
fingerprintResult.also { result -> fingerprintResult.also { result ->
GetBearerTokenFingerprint.also { it.resolve(context, result.classDef) }.result?.mutableMethod?.apply { GetBearerTokenFingerprint.also { it.resolve(context, result.classDef) }.result?.mutableMethod?.apply {
@@ -72,5 +75,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
return PatchResultSuccess() return PatchResultSuccess()
} }
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer() companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
} }

View File

@@ -1,11 +1,10 @@
package app.revanced.patches.syncforreddit.detection.piracy.fingerprints package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.fingerprints
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.TypeReference
object PiracyDetectionFingerprint : MethodFingerprint( object PiracyDetectionFingerprint : MethodFingerprint(
returnType = "V", returnType = "V",

View File

@@ -1,19 +1,18 @@
package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.syncforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint
@Description("Disables detection of modified versions.") @Description("Disables detection of modified versions.")
@Version("0.0.1")
class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) { class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
// Do not return an error if the fingerprint is not resolved.
// This is fine because new versions of the target app do not need this patch.
PiracyDetectionFingerprint.result?.mutableMethod?.apply { PiracyDetectionFingerprint.result?.mutableMethod?.apply {
addInstruction( addInstruction(
0, 0,
@@ -21,7 +20,7 @@ class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerpr
return-void return-void
""" """
) )
} ?: return PiracyDetectionFingerprint.toErrorResult() }
return PatchResultSuccess() return PatchResultSuccess()
} }

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.reddit.layout.disablescreenshotpopup.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.reddit.layout.disablescreenshotpopup.annotations.Dis
import app.revanced.patches.reddit.layout.disablescreenshotpopup.fingerprints.DisableScreenshotPopupFingerprint import app.revanced.patches.reddit.layout.disablescreenshotpopup.fingerprints.DisableScreenshotPopupFingerprint
@Patch @Patch
@Name("disable-screenshot-popup") @Name("Disable screenshot popup")
@Description("Disables the popup that shows up when taking a screenshot.") @Description("Disables the popup that shows up when taking a screenshot.")
@DisableScreenshotPopupCompatibility @DisableScreenshotPopupCompatibility
@Version("0.0.1")
class DisableScreenshotPopupPatch : BytecodePatch( class DisableScreenshotPopupPatch : BytecodePatch(
listOf(DisableScreenshotPopupFingerprint) listOf(DisableScreenshotPopupFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.reddit.layout.premiumicon.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCom
import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFingerprint import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFingerprint
@Patch @Patch
@Name("premium-icon-reddit") @Name("Premium icon reddit")
@Description("Unlocks premium Reddit app icons.") @Description("Unlocks premium Reddit app icons.")
@PremiumIconCompatibility @PremiumIconCompatibility
@Version("0.0.1")
class PremiumIconPatch : BytecodePatch( class PremiumIconPatch : BytecodePatch(
listOf( listOf(
PremiumIconFingerprint PremiumIconFingerprint

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.reddit.misc.tracking.url.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.reddit.misc.tracking.url.annotations.SanitizeUrlQuer
import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFormatterFingerprint import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFormatterFingerprint
@Patch @Patch
@Name("sanitize-sharing-links") @Name("Sanitize sharing links")
@Description("Removes (tracking) query parameters from the URLs when sharing links.") @Description("Removes (tracking) query parameters from the URLs when sharing links.")
@SanitizeUrlQueryCompatibility @SanitizeUrlQueryCompatibility
@Version("0.0.1")
class SanitizeUrlQueryPatch : BytecodePatch( class SanitizeUrlQueryPatch : BytecodePatch(
listOf(ShareLinkFormatterFingerprint) listOf(ShareLinkFormatterFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.scbeasy.detection.debugging.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.scbeasy.detection.debugging.annotations.RemoveDebugg
import app.revanced.patches.scbeasy.detection.debugging.fingerprints.DebuggingDetectionFingerprint import app.revanced.patches.scbeasy.detection.debugging.fingerprints.DebuggingDetectionFingerprint
@Patch(false) @Patch(false)
@Name("remove-debugging-detection") @Name("Remove debugging detection")
@Description("Removes the USB and wireless debugging checks.") @Description("Removes the USB and wireless debugging checks.")
@RemoveDebuggingDetectionCompatibility @RemoveDebuggingDetectionCompatibility
@Version("0.0.1")
class RemoveDebuggingDetectionPatch : BytecodePatch( class RemoveDebuggingDetectionPatch : BytecodePatch(
listOf(DebuggingDetectionFingerprint) listOf(DebuggingDetectionFingerprint)
) { ) {

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.shared.integrations.patch package app.revanced.patches.shared.integrations.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
@@ -15,7 +14,6 @@ import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.Method import org.jf.dexlib2.iface.Method
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.") @Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
@Version("0.0.1")
abstract class AbstractIntegrationsPatch( abstract class AbstractIntegrationsPatch(
private val integrationsDescriptor: String, private val integrationsDescriptor: String,
private val hooks: Iterable<IntegrationsFingerprint> private val hooks: Iterable<IntegrationsFingerprint>

View File

@@ -1,8 +1,5 @@
package app.revanced.patches.shared.mapping.misc.patch package app.revanced.patches.shared.mapping.misc.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -13,9 +10,6 @@ import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@Name("resource-mapping")
@Description("Creates a map of public resources.")
@Version("0.0.1")
class ResourceMappingPatch : ResourcePatch { class ResourceMappingPatch : ResourcePatch {
companion object { companion object {
internal lateinit var resourceMappings: List<ResourceElement> internal lateinit var resourceMappings: List<ResourceElement>

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.shared.misc.fix.verticalscroll.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -15,7 +14,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Fixes issues with refreshing the feed when the first component is of type EmptyComponent.") @Description("Fixes issues with refreshing the feed when the first component is of type EmptyComponent.")
@VerticalScrollCompatibility @VerticalScrollCompatibility
@Version("0.0.1")
class VerticalScrollPatch : BytecodePatch( class VerticalScrollPatch : BytecodePatch(
listOf(CanScrollVerticallyFingerprint) listOf(CanScrollVerticallyFingerprint)
) { ) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.songpal.badge.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
@@ -15,10 +14,9 @@ import app.revanced.patches.songpal.badge.annotations.BadgeCompatibility
import app.revanced.patches.songpal.badge.fingerprints.CreateTabsFingerprint import app.revanced.patches.songpal.badge.fingerprints.CreateTabsFingerprint
@Patch @Patch
@Name("remove-badge-tab") @Name("Remove badge tab")
@Description("Removes the badge tab from the activity tab.") @Description("Removes the badge tab from the activity tab.")
@BadgeCompatibility @BadgeCompatibility
@Version("0.0.1")
class BadgeTabPatch : BytecodePatch( class BadgeTabPatch : BytecodePatch(
listOf(CreateTabsFingerprint) listOf(CreateTabsFingerprint)
) { ) {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.songpal.badge.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.songpal.badge.annotations.BadgeCompatibility
import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerprint import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerprint
@Patch @Patch
@Name("remove-notification-badge") @Name("Remove notification badge")
@Description("Removes the red notification badge from the activity tab.") @Description("Removes the red notification badge from the activity tab.")
@BadgeCompatibility @BadgeCompatibility
@Version("0.0.1")
class RemoveNotificationBadgePatch : BytecodePatch( class RemoveNotificationBadgePatch : BytecodePatch(
listOf(ShowNotificationFingerprint) listOf(ShowNotificationFingerprint)
) { ) {

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.spotify.layout.theme.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.* import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
@@ -10,10 +9,9 @@ import app.revanced.patches.spotify.layout.theme.annotations.ThemeCompatibility
import org.w3c.dom.Element import org.w3c.dom.Element
@Patch @Patch
@Name("spotify-theme") @Name("Spotify theme")
@Description("Applies a custom theme.") @Description("Applies a custom theme.")
@ThemeCompatibility @ThemeCompatibility
@Version("0.0.1")
class ThemePatch : ResourcePatch { class ThemePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["res/values/colors.xml"].use { editor -> context.xmlEditor["res/values/colors.xml"].use { editor ->

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.spotify.lite.ondemand.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -14,10 +13,9 @@ import app.revanced.patches.spotify.lite.ondemand.annotations.OnDemandCompatibil
import app.revanced.patches.spotify.lite.ondemand.fingerprints.OnDemandFingerprint import app.revanced.patches.spotify.lite.ondemand.fingerprints.OnDemandFingerprint
@Patch @Patch
@Name("enable-on-demand") @Name("Enable on demand")
@Description("Enables listening to songs on-demand, allowing to play any song from playlists, albums or artists without limitations. This does not remove ads.") @Description("Enables listening to songs on-demand, allowing to play any song from playlists, albums or artists without limitations. This does not remove ads.")
@OnDemandCompatibility @OnDemandCompatibility
@Version("0.0.1")
class OnDemandPatch : BytecodePatch( class OnDemandPatch : BytecodePatch(
listOf( listOf(
OnDemandFingerprint OnDemandFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.spotify.premium_navbar_tab.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
@@ -19,10 +18,9 @@ import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
@Patch @Patch
@Name("hide-premium-navbar") @Name("Hide premium navbar")
@Description("Removes the premium tab from the navbar.") @Description("Removes the premium tab from the navbar.")
@PremiumNavbarTabCompatibility @PremiumNavbarTabCompatibility
@Version("0.0.1")
@DependsOn([ResourceMappingPatch::class]) @DependsOn([ResourceMappingPatch::class])
class PremiumNavbarTabPatch : BytecodePatch( class PremiumNavbarTabPatch : BytecodePatch(
listOf( listOf(

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.tasker.trial.unlock.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -13,10 +12,9 @@ import app.revanced.patches.tasker.trial.unlock.annotations.UnlockTrialCompatibi
import app.revanced.patches.tasker.trial.unlock.fingerprints.CheckLicenseFingerprint import app.revanced.patches.tasker.trial.unlock.fingerprints.CheckLicenseFingerprint
@Patch @Patch
@Name("unlock-trial") @Name("Unlock trial")
@Description("Unlocks the trial version.") @Description("Unlocks the trial version.")
@UnlockTrialCompatibility @UnlockTrialCompatibility
@Version("0.0.1")
class UnlockLicensePatch : BytecodePatch( class UnlockLicensePatch : BytecodePatch(
listOf( listOf(
CheckLicenseFingerprint CheckLicenseFingerprint

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.ticktick.misc.themeunlock.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
@@ -15,10 +14,9 @@ import app.revanced.patches.ticktick.misc.themeunlock.fingerprints.CheckLockedTh
import app.revanced.patches.ticktick.misc.themeunlock.fingerprints.SetThemeFingerprint import app.revanced.patches.ticktick.misc.themeunlock.fingerprints.SetThemeFingerprint
@Patch @Patch
@Name("unlock-themes") @Name("Unlock themes")
@Description("Unlocks all themes that are inaccessible until a certain level is reached.") @Description("Unlocks all themes that are inaccessible until a certain level is reached.")
@UnlockThemesCompatibility @UnlockThemesCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch( class UnlockProPatch : BytecodePatch(
listOf( listOf(
CheckLockedThemesFingerprint, CheckLockedThemesFingerprint,

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.tiktok.ad.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -19,10 +18,9 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
import org.jf.dexlib2.iface.reference.FieldReference import org.jf.dexlib2.iface.reference.FieldReference
@Patch @Patch
@Name("hide-ads") @Name("Hide ads")
@Description("Removes ads from TikTok.") @Description("Removes ads from TikTok.")
@HideAdsCompatibility @HideAdsCompatibility
@Version("0.0.1")
class HideAdsPatch : BytecodePatch( class HideAdsPatch : BytecodePatch(
listOf( listOf(
FeedItemListCloneFingerprint, FeedItemListCloneFingerprint,

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.tiktok.feedfilter.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@@ -20,10 +19,9 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("feed-filter") @Name("Feed filter")
@Description("Filters tiktok videos: removing ads, removing livestreams.") @Description("Filters tiktok videos: removing ads, removing livestreams.")
@FeedFilterCompatibility @FeedFilterCompatibility
@Version("0.0.1")
class FeedFilterPatch : BytecodePatch( class FeedFilterPatch : BytecodePatch(
listOf( listOf(
FeedApiServiceLIZFingerprint, FeedApiServiceLIZFingerprint,

View File

@@ -1,15 +1,13 @@
package app.revanced.patches.tiktok.interaction.downloads.fingerprints package app.revanced.patches.tiktok.interaction.downloads.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-show-type") @Name("Acl common share get show type")
@DownloadsCompatibility @DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint2 : MethodFingerprint( object ACLCommonShareFingerprint2 : MethodFingerprint(
"I", "I",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,

View File

@@ -1,15 +1,13 @@
package app.revanced.patches.tiktok.interaction.downloads.fingerprints package app.revanced.patches.tiktok.interaction.downloads.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-transcode") @Name("Acl common share get transcode")
@DownloadsCompatibility @DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint3 : MethodFingerprint( object ACLCommonShareFingerprint3 : MethodFingerprint(
"I", "I",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.tiktok.interaction.downloads.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
@@ -32,10 +31,9 @@ import org.jf.dexlib2.iface.reference.StringReference
@Patch @Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("downloads") @Name("Downloads")
@Description("Removes download restrictions and changes the default path to download to.") @Description("Removes download restrictions and changes the default path to download to.")
@DownloadsCompatibility @DownloadsCompatibility
@Version("0.0.1")
class DownloadsPatch : BytecodePatch( class DownloadsPatch : BytecodePatch(
listOf( listOf(
ACLCommonShareFingerprint, ACLCommonShareFingerprint,

View File

@@ -1,12 +0,0 @@
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object AwemeGetVideoControlFingerprint : MethodFingerprint(
"L",
AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/Aweme;") && methodDef.name == "getVideoControl"
}
)

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SetSeekBarShowTypeFingerprint : MethodFingerprint(
strings = listOf(
"seekbar show type change, change to:"
),
)

View File

@@ -3,49 +3,37 @@ package app.revanced.patches.tiktok.interaction.seekbar.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.AwemeGetVideoControlFingerprint import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.formats.Instruction22t
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
import org.jf.dexlib2.builder.instruction.BuilderInstruction22c
@Patch @Patch
@Name("show-seekbar") @Name("Show seekbar")
@Description("Shows progress bar for all video.") @Description("Shows progress bar for all video.")
@ShowSeekbarCompatibility @ShowSeekbarCompatibility
@Version("0.0.1")
class ShowSeekbarPatch : BytecodePatch( class ShowSeekbarPatch : BytecodePatch(
listOf( listOf(
AwemeGetVideoControlFingerprint SetSeekBarShowTypeFingerprint,
) )
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
//Get VideoControl FieldReference SetSeekBarShowTypeFingerprint.result?.mutableMethod?.apply {
val videoControl = context.findClass { it.type.endsWith("/VideoControl;") } val typeRegister = getInstruction<Instruction22t>(1).registerB
?: return PatchResultError("Can not find target class")
val fieldList = videoControl.immutableClass.fields.associateBy { field -> field.name }
AwemeGetVideoControlFingerprint.result?.mutableMethod?.implementation?.apply {
val ifNullLabel = newLabelForIndex(1)
addInstructions( addInstructions(
1, 0,
listOf( """
BuilderInstruction11n(Opcode.CONST_4, 1, 1), const/16 v$typeRegister, 0x64
BuilderInstruction21t(Opcode.IF_EQZ, 0, ifNullLabel), """
BuilderInstruction22c(Opcode.IPUT, 1, 0, fieldList["showProgressBar"]!!),
BuilderInstruction22c(Opcode.IPUT, 1, 0, fieldList["draftProgressBar"]!!)
)
) )
} ?: return AwemeGetVideoControlFingerprint.toErrorResult() } ?: return SetSeekBarShowTypeFingerprint.toErrorResult()
return PatchResultSuccess() return PatchResultSuccess()
} }

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