Compare commits

...

525 Commits

Author SHA1 Message Date
semantic-release-bot
dd1df32036 chore(release): 2.46.0 [skip ci]
# [2.46.0](https://github.com/revanced/revanced-patches/compare/v2.45.3...v2.46.0) (2022-08-29)

### Bug Fixes

* `seekbar-tapping` toggling ([#401](https://github.com/revanced/revanced-patches/issues/401)) ([5550244](67f6041bab))

### Features

* `premium-icon-reddit` patch ([#333](https://github.com/revanced/revanced-patches/issues/333)) ([6739e7b](6b3f8e46fd))
* blacklist `.vsc` folder in `.gitignore` ([#331](https://github.com/revanced/revanced-patches/issues/331)) ([1922253](a52d674cde))
2022-08-29 16:23:03 +00:00
Technikte
a52d674cde feat: blacklist .vsc folder in .gitignore (#331) 2022-08-29 18:21:24 +02:00
d4rkk3y
67f6041bab fix: seekbar-tapping toggling (#401) 2022-08-29 18:20:25 +02:00
Technikte
6b3f8e46fd feat: premium-icon-reddit patch (#333) 2022-08-29 18:19:15 +02:00
semantic-release-bot
b95058f20a chore(release): 2.45.3 [skip ci]
## [2.45.3](https://github.com/revanced/revanced-patches/compare/v2.45.2...v2.45.3) (2022-08-29)

### Bug Fixes

* release `patches.json` file ([#402](https://github.com/revanced/revanced-patches/issues/402)) ([17e351c](5b80ac1216))
2022-08-29 13:33:33 +00:00
reis
5b80ac1216 fix: release patches.json file (#402) 2022-08-29 15:31:37 +02:00
semantic-release-bot
6fe1bfb856 chore(release): 2.45.2 [skip ci]
## [2.45.2](https://github.com/revanced/revanced-patches/compare/v2.45.1...v2.45.2) (2022-08-28)

### Bug Fixes

* add `patches.json` as a release asset ([a0b2c89](589a7c01d1))
2022-08-28 20:26:45 +00:00
Sculas
589a7c01d1 fix: add patches.json as a release asset 2022-08-28 22:24:45 +02:00
semantic-release-bot
4cd6d4459a chore(release): 2.45.1 [skip ci]
## [2.45.1](https://github.com/revanced/revanced-patches/compare/v2.45.0...v2.45.1) (2022-08-28)

### Bug Fixes

* run meta generator ([70a2b45](89a92b2057))
2022-08-28 19:52:25 +00:00
Sculas
89a92b2057 fix: run meta generator 2022-08-28 21:50:38 +02:00
semantic-release-bot
9f265a46cf chore(release): 2.45.0 [skip ci]
# [2.45.0](https://github.com/revanced/revanced-patches/compare/v2.44.0...v2.45.0) (2022-08-28)

### Features

* Add JSON meta ([4c229d3](a740690a08))
2022-08-28 19:42:01 +00:00
Sculas
a740690a08 feat: Add JSON meta 2022-08-28 21:39:13 +02:00
oSumAtrIX
d722a64d3c refactor: remove integrations dependency 2022-08-27 04:59:04 +02:00
oSumAtrIX
abe2674290 refactor: addInstruction instead of addInstructions 2022-08-27 04:01:09 +02:00
semantic-release-bot
e5ec40f6fa chore(release): 2.44.0 [skip ci]
# [2.44.0](https://github.com/revanced/revanced-patches/compare/v2.43.2...v2.44.0) (2022-08-27)

### Features

* add debug switch ([#391](https://github.com/revanced/revanced-patches/issues/391)) ([ee4b776](96c43fc6f5))
2022-08-27 01:23:45 +00:00
Canny
96c43fc6f5 feat: add debug switch (#391) 2022-08-27 03:21:53 +02:00
semantic-release-bot
4e36d72c5c chore(release): 2.43.2 [skip ci]
## [2.43.2](https://github.com/revanced/revanced-patches/compare/v2.43.1...v2.43.2) (2022-08-26)

### Bug Fixes

* package name for Vanced ([#390](https://github.com/revanced/revanced-patches/issues/390)) ([85206b9](6197246e8e))
2022-08-26 23:32:49 +00:00
Robert
6197246e8e fix: package name for Vanced (#390) 2022-08-27 01:31:07 +02:00
semantic-release-bot
15a044cae1 chore(release): 2.43.1 [skip ci]
## [2.43.1](https://github.com/revanced/revanced-patches/compare/v2.43.0...v2.43.1) (2022-08-26)

### Bug Fixes

* `Patch` annotation for `client-spoof` patch ([6a8af47](ede60b994c))
2022-08-26 22:53:56 +00:00
oSumAtrIX
ede60b994c fix: Patch annotation for client-spoof patch 2022-08-27 00:52:10 +02:00
semantic-release-bot
c15cc431d6 chore(release): 2.43.0 [skip ci]
# [2.43.0](https://github.com/revanced/revanced-patches/compare/v2.42.1...v2.43.0) (2022-08-26)

### Features

* `client-spoof` patch ([5512c07](fb006f87ab))
2022-08-26 22:07:20 +00:00
epicsampler
fb006f87ab feat: client-spoof patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-08-27 00:05:21 +02:00
semantic-release-bot
28206fd804 chore(release): 2.42.1 [skip ci]
## [2.42.1](https://github.com/revanced/revanced-patches/compare/v2.42.0...v2.42.1) (2022-08-26)

### Bug Fixes

* changed default value for autorepeat setting ([#386](https://github.com/revanced/revanced-patches/issues/386)) ([d43add7](e425e75152))
2022-08-26 01:14:13 +00:00
afn
e425e75152 fix: changed default value for autorepeat setting (#386) 2022-08-26 03:11:46 +02:00
Levente Ilyó-Kovács
69d6c55942 docs: punctuation in microg-support patch description (#377) 2022-08-23 00:51:02 +02:00
semantic-release-bot
f2b29351b4 chore(release): 2.42.0 [skip ci]
# [2.42.0](https://github.com/revanced/revanced-patches/compare/v2.41.0...v2.42.0) (2022-08-22)

### Bug Fixes

* default values for settings ([834c4ad](b75e759348))

### Features

* setting for downloader package name ([965d05c](db0b468e71))
* v17.29.34 compatibility for `downloads` patch ([#374](https://github.com/revanced/revanced-patches/issues/374)) ([d81f1af](83b41322c4))
2022-08-22 17:16:38 +00:00
oSumAtrIX
db0b468e71 feat: setting for downloader package name 2022-08-22 19:14:17 +02:00
oSumAtrIX
b75e759348 fix: default values for settings 2022-08-22 19:13:57 +02:00
Robert
83b41322c4 feat: v17.29.34 compatibility for downloads patch (#374) 2022-08-22 14:38:21 +02:00
semantic-release-bot
8d8878aa08 chore(release): 2.41.0 [skip ci]
# [2.41.0](https://github.com/revanced/revanced-patches/compare/v2.40.2...v2.41.0) (2022-08-22)

### Features

* `downloads` patch ([#215](https://github.com/revanced/revanced-patches/issues/215)) ([304fbac](d628674cdd))
2022-08-22 03:00:31 +00:00
oSumAtrIX
d628674cdd feat: downloads patch (#215) 2022-08-22 04:58:17 +02:00
semantic-release-bot
23b182ccbb chore(release): 2.40.2 [skip ci]
## [2.40.2](https://github.com/revanced/revanced-patches/compare/v2.40.1...v2.40.2) (2022-08-22)

### Bug Fixes

* correct title for `tablet-miniplayer` setting switch ([6af6c02](4a784ecd6e))
2022-08-22 02:42:29 +00:00
oSumAtrIX
4a784ecd6e fix: correct title for tablet-miniplayer setting switch 2022-08-22 04:40:49 +02:00
semantic-release-bot
0165b53c6d chore(release): 2.40.1 [skip ci]
## [2.40.1](https://github.com/revanced/revanced-patches/compare/v2.40.0...v2.40.1) (2022-08-22)

### Bug Fixes

* add missing switch for `tablet-mini-player` patch ([244a1b2](17a0e16087))
2022-08-22 02:00:11 +00:00
oSumAtrIX
17a0e16087 fix: add missing switch for tablet-mini-player patch 2022-08-22 03:58:15 +02:00
semantic-release-bot
8cf91f39a5 chore(release): 2.40.0 [skip ci]
# [2.40.0](https://github.com/revanced/revanced-patches/compare/v2.39.1...v2.40.0) (2022-08-22)

### Features

* `settings` patch framework ([#266](https://github.com/revanced/revanced-patches/issues/266)) ([084a99b](9ef93f6618))
2022-08-22 00:02:00 +00:00
oSumAtrIX
9ef93f6618 feat: settings patch framework (#266) 2022-08-22 01:59:43 +02:00
semantic-release-bot
8c3866f5e3 chore(release): 2.39.1 [skip ci]
## [2.39.1](https://github.com/revanced/revanced-patches/compare/v2.39.0...v2.39.1) (2022-08-21)

### Bug Fixes

* make `custom-branding` cross-platform ([#366](https://github.com/revanced/revanced-patches/issues/366)) ([02ac62b](d115d649f4))
2022-08-21 00:35:21 +00:00
Alberto Ponces
d115d649f4 fix: make custom-branding cross-platform (#366) 2022-08-21 02:33:04 +02:00
semantic-release-bot
ddc789395e chore(release): 2.39.0 [skip ci]
# [2.39.0](https://github.com/revanced/revanced-patches/compare/v2.38.0...v2.39.0) (2022-08-19)

### Features

* bundle `dex` file into `jar` file ([#359](https://github.com/revanced/revanced-patches/issues/359)) ([f419252](e1200d4e3f))
2022-08-19 23:29:17 +00:00
Alberto Ponces
e1200d4e3f feat: bundle dex file into jar file (#359) 2022-08-20 01:26:59 +02:00
semantic-release-bot
8276340d2b chore(release): 2.38.0 [skip ci]
# [2.38.0](https://github.com/revanced/revanced-patches/compare/v2.37.0...v2.38.0) (2022-08-17)

### Features

* bump YouTube patches to `v17.32.35` ([#347](https://github.com/revanced/revanced-patches/issues/347)) ([5292a0e](8f32af4de1))
2022-08-17 17:13:42 +00:00
inotia00
8f32af4de1 feat: bump YouTube patches to v17.32.35 (#347) 2022-08-17 19:11:53 +02:00
semantic-release-bot
a2bc9f0722 chore(release): 2.37.0 [skip ci]
# [2.37.0](https://github.com/revanced/revanced-patches/compare/v2.36.2...v2.37.0) (2022-08-15)

### Features

* ˋpflotsh-ecmwf-subscription-unlockˋ patch ([#332](https://github.com/revanced/revanced-patches/issues/332)) ([ae2a1d8](f94bb06996))
2022-08-15 18:56:22 +00:00
Technikte
f94bb06996 feat: ˋpflotsh-ecmwf-subscription-unlockˋ patch (#332) 2022-08-15 20:54:22 +02:00
semantic-release-bot
1023936a26 chore(release): 2.36.2 [skip ci]
## [2.36.2](https://github.com/revanced/revanced-patches/compare/v2.36.1...v2.36.2) (2022-08-14)

### Bug Fixes

* disable cast modules in YouTube Music ([#337](https://github.com/revanced/revanced-patches/issues/337)) ([98e5dbc](98e5dbcc73))
2022-08-14 21:15:11 +00:00
Canny
98e5dbcc73 fix: disable cast modules in YouTube Music (#337) 2022-08-14 23:13:16 +02:00
semantic-release-bot
353806828b chore(release): 2.36.1 [skip ci]
## [2.36.1](https://github.com/revanced/revanced-patches/compare/v2.36.0...v2.36.1) (2022-08-14)

### Bug Fixes

* add missing switch for tablet mini-player ([1ad69e3](1ad69e350c))
2022-08-14 20:36:40 +00:00
oSumAtrIX
1ad69e350c fix: add missing switch for tablet mini-player 2022-08-14 22:34:44 +02:00
semantic-release-bot
42c562cff7 chore(release): 2.36.0 [skip ci]
# [2.36.0](https://github.com/revanced/revanced-patches/compare/v2.35.0...v2.36.0) (2022-08-14)

### Features

* `swipe-controls` override volume button behaviour ([#285](https://github.com/revanced/revanced-patches/issues/285)) ([155121f](155121f891))
2022-08-14 20:22:07 +00:00
Chris
155121f891 feat: swipe-controls override volume button behaviour (#285) 2022-08-14 22:19:54 +02:00
semantic-release-bot
c684a1c846 chore(release): 2.35.0 [skip ci]
# [2.35.0](https://github.com/revanced/revanced-patches/compare/v2.34.0...v2.35.0) (2022-08-14)

### Features

* `tiktok-ads` patch ([#335](https://github.com/revanced/revanced-patches/issues/335)) ([49ddc0a](49ddc0a2ed))
2022-08-14 20:18:06 +00:00
oSumAtrIX
49ddc0a2ed feat: tiktok-ads patch (#335) 2022-08-14 22:16:25 +02:00
semantic-release-bot
221b61acc7 chore(release): 2.34.0 [skip ci]
# [2.34.0](https://github.com/revanced/revanced-patches/compare/v2.33.2...v2.34.0) (2022-08-14)

### Features

* `tablet-mini-player` patch ([aab39cb](aab39cbe93))
2022-08-14 15:35:33 +00:00
oSumAtrIX
c133d495c3 build: bump patcher dependency version 2022-08-14 17:33:13 +02:00
oSumAtrIX
aab39cbe93 feat: tablet-mini-player patch 2022-08-14 17:32:32 +02:00
semantic-release-bot
bdab92faf2 chore(release): 2.33.2 [skip ci]
## [2.33.2](https://github.com/revanced/revanced-patches/compare/v2.33.1...v2.33.2) (2022-08-07)
2022-08-07 20:42:34 +00:00
oSumAtrIX
50acd3d3b5 refactor: remove unused parameter 2022-08-07 22:40:07 +02:00
oSumAtrIX
49a369a340 refactor: un-shadow variable name 2022-08-07 22:39:53 +02:00
oSumAtrIX
be8620bf91 build: bump patcher dependency version 2022-08-07 22:36:02 +02:00
semantic-release-bot
32ed4c9f04 chore(release): 2.33.1 [skip ci]
## [2.33.1](https://github.com/revanced/revanced-patches/compare/v2.33.0...v2.33.1) (2022-08-07)

### Bug Fixes

* spoof `X-Android-Cert` of Firebase `authToken` api request ([#315](https://github.com/revanced/revanced-patches/issues/315)) ([9c44497](9c44497d40))
2022-08-07 10:44:47 +00:00
Itroublve
9c44497d40 fix: spoof X-Android-Cert of Firebase authToken api request (#315) 2022-08-07 12:42:39 +02:00
semantic-release-bot
8e604139e3 chore(release): 2.33.0 [skip ci]
# [2.33.0](https://github.com/revanced/revanced-patches/compare/v2.32.1...v2.33.0) (2022-08-06)

### Features

* bump music patches to 5.17.51 ([#307](https://github.com/revanced/revanced-patches/issues/307)) ([3de3a82](3de3a82afb))
2022-08-06 23:04:00 +00:00
epicsampler
3de3a82afb feat: bump music patches to 5.17.51 (#307) 2022-08-07 01:02:08 +02:00
oSumAtrIX
d39fb7ca03 refactor: use approriate description 2022-08-05 03:48:03 +02:00
semantic-release-bot
2d995d3757 chore(release): 2.32.1 [skip ci]
## [2.32.1](https://github.com/revanced/revanced-patches/compare/v2.32.0...v2.32.1) (2022-08-04)

### Bug Fixes

* incorrect compatibilty attribute ([#296](https://github.com/revanced/revanced-patches/issues/296)) ([464c980](464c98093a))
2022-08-04 19:55:13 +00:00
Itroublve
464c98093a fix: incorrect compatibilty attribute (#296) 2022-08-04 21:53:29 +02:00
semantic-release-bot
6ac5ed441f chore(release): 2.32.0 [skip ci]
# [2.32.0](https://github.com/revanced/revanced-patches/compare/v2.31.0...v2.32.0) (2022-08-04)

### Features

* `promo-code-unlock` patch ([#292](https://github.com/revanced/revanced-patches/issues/292)) ([7925ca9](7925ca97c4))
2022-08-04 17:05:39 +00:00
Technikte
7925ca97c4 feat: promo-code-unlock patch (#292) 2022-08-04 19:03:56 +02:00
semantic-release-bot
0c5f117d5d chore(release): 2.31.0 [skip ci]
# [2.31.0](https://github.com/revanced/revanced-patches/compare/v2.30.1...v2.31.0) (2022-08-03)

### Features

* remove `force-vp9-codec` patch ([#287](https://github.com/revanced/revanced-patches/issues/287)) ([6ab475c](6ab475c284))
2022-08-03 18:30:49 +00:00
epicsampler
6ab475c284 feat: remove force-vp9-codec patch (#287) 2022-08-03 20:28:39 +02:00
semantic-release-bot
75ac69455b chore(release): 2.30.1 [skip ci]
## [2.30.1](https://github.com/revanced/revanced-patches/compare/v2.30.0...v2.30.1) (2022-08-03)

### Bug Fixes

* migrate to new patcher api ([e42043b](e42043b939))
2022-08-03 01:56:55 +00:00
oSumAtrIX
e42043b939 fix: migrate to new patcher api 2022-08-03 03:53:35 +02:00
semantic-release-bot
5237c3a1a6 chore(release): 2.30.0 [skip ci]
# [2.30.0](https://github.com/revanced/revanced-patches/compare/v2.29.0...v2.30.0) (2022-08-03)

### Bug Fixes

* incorrect fingerprint version [skip ci] ([a9abab9](a9abab97d7))
* rollback to `Dependencies` annotation ([f82aae9](f82aae930b))

### Features

* set the correct theme of the settings screen ([7d6f205](7d6f205fd9))
2022-08-03 01:11:48 +00:00
oSumAtrIX
7d6f205fd9 feat: set the correct theme of the settings screen 2022-08-03 03:09:52 +02:00
oSumAtrIX
f82aae930b fix: rollback to Dependencies annotation 2022-08-03 03:09:39 +02:00
oSumAtrIX
83b11c92af refactor: remove unused annotation [skip ci] 2022-08-03 02:23:27 +02:00
oSumAtrIX
a9abab97d7 fix: incorrect fingerprint version [skip ci] 2022-08-03 02:01:56 +02:00
semantic-release-bot
a70da4f6c4 chore(release): 2.29.0 [skip ci]
# [2.29.0](https://github.com/revanced/revanced-patches/compare/v2.28.2...v2.29.0) (2022-08-02)

### Features

* add "Application Icon Path" option to branding ([e53b490](e53b490edf))
* add "Application Name" option to branding and move renaming to CustomBrandingPatch.kt ([19cc4a3](19cc4a3e91))
2022-08-02 21:51:01 +00:00
Sculas
e53b490edf feat: add "Application Icon Path" option to branding 2022-08-02 23:48:51 +02:00
Sculas
bfe995f635 build: update patcher lib to 3.3.0 2022-08-02 23:40:13 +02:00
Sculas
19cc4a3e91 feat: add "Application Name" option to branding and move renaming to CustomBrandingPatch.kt 2022-08-02 21:28:22 +02:00
Sculas
16f6486258 build: update patcher lib to 3.0.0 2022-08-02 21:15:43 +02:00
Sculas
47360ea3b7 refactor: migrate CustomBrandingPatch.kt to DependsOn 2022-08-02 20:24:19 +02:00
Sculas
5c5b3d562d refactor: migrate MicroGResourcePatch.kt to DependsOn 2022-08-02 20:22:57 +02:00
Sculas
a62316a8c8 refactor: cleanup MicroGResourcePatch.kt 2022-08-02 20:21:14 +02:00
semantic-release-bot
14f7d514d2 chore(release): 2.28.2 [skip ci]
## [2.28.2](https://github.com/revanced/revanced-patches/compare/v2.28.1...v2.28.2) (2022-08-02)

### Bug Fixes

* remove requirement for solution [skip ci] ([#271](https://github.com/revanced/revanced-patches/issues/271)) ([9ae3d05](9ae3d0546c))
2022-08-02 01:16:42 +00:00
oSumAtrIX
78d901338f build: bump patcher dependency version 2022-08-02 03:14:28 +02:00
Robert
9ae3d0546c fix: remove requirement for solution [skip ci] (#271) 2022-08-01 13:07:47 +02:00
oSumAtrIX
3076a16d14 refactor: use ResourceUtils.copyXmlNode 2022-08-01 04:13:51 +02:00
semantic-release-bot
f8e1f2fe18 chore(release): 2.28.1 [skip ci]
## [2.28.1](https://github.com/revanced/revanced-patches/compare/v2.28.0...v2.28.1) (2022-07-31)

### Bug Fixes

* add missing permission to reboot app ([#260](https://github.com/revanced/revanced-patches/issues/260)) ([a9611f3](a9611f304e))
2022-07-31 18:43:15 +00:00
Joey Peter
a9611f304e fix: add missing permission to reboot app (#260) 2022-07-31 20:41:35 +02:00
semantic-release-bot
7c0e183df5 chore(release): 2.28.0 [skip ci]
# [2.28.0](https://github.com/revanced/revanced-patches/compare/v2.27.0...v2.28.0) (2022-07-31)

### Features

* add `custom-video-buffer` patch ([15e1ced](15e1ced2c9))
2022-07-31 10:36:58 +00:00
Joey Peter
15e1ced2c9 feat: add custom-video-buffer patch 2022-07-31 12:34:49 +02:00
semantic-release-bot
bde7f99b5b chore(release): 2.27.0 [skip ci]
# [2.27.0](https://github.com/revanced/revanced-patches/compare/v2.26.0...v2.27.0) (2022-07-31)

### Features

* `settings` patch ([60866af](60866af97d))
2022-07-31 10:17:43 +00:00
oSumAtrIX
60866af97d feat: settings patch 2022-07-31 12:15:26 +02:00
semantic-release-bot
6580f71392 chore(release): 2.26.0 [skip ci]
# [2.26.0](https://github.com/revanced/revanced-patches/compare/v2.25.3...v2.26.0) (2022-07-31)

### Features

* `ResourceUtils` helper class ([9c57961](9c57961680))
2022-07-31 00:28:57 +00:00
oSumAtrIX
9c57961680 feat: ResourceUtils helper class 2022-07-31 02:27:09 +02:00
semantic-release-bot
1d7a9ac437 chore(release): 2.25.3 [skip ci]
## [2.25.3](https://github.com/revanced/revanced-patches/compare/v2.25.2...v2.25.3) (2022-07-29)

### Bug Fixes

* actually call `VideoInformation.setCurrentVideoId` first ([51e08fb](51e08fb0b6))
2022-07-29 01:34:59 +00:00
oSumAtrIX
51e08fb0b6 fix: actually call VideoInformation.setCurrentVideoId first 2022-07-29 03:32:28 +02:00
oSumAtrIX
91feea1c50 refactor: do not account for order in VideoIdPatch.injectCall (#246) 2022-07-29 03:20:55 +02:00
semantic-release-bot
fc8bfff427 chore(release): 2.25.2 [skip ci]
## [2.25.2](https://github.com/revanced/revanced-patches/compare/v2.25.1...v2.25.2) (2022-07-26)

### Bug Fixes

* rename `default-video-quality` to `remember-video-quality` ([9a3307c](9a3307c1b1))
2022-07-26 19:50:00 +00:00
oSumAtrIX
9a3307c1b1 fix: rename default-video-quality to remember-video-quality
This change describes the patch more clearly
2022-07-26 21:47:40 +02:00
oSumAtrIX
eff806c5e3 docs: add missing . to feature-issue.yml description 2022-07-26 19:38:00 +02:00
oSumAtrIX
b45a44ff3f docs: add missing . to issue description 2022-07-26 19:34:54 +02:00
semantic-release-bot
391e8fa8f6 chore(release): 2.25.1 [skip ci]
## [2.25.1](https://github.com/revanced/revanced-patches/compare/v2.25.0...v2.25.1) (2022-07-26)

### Bug Fixes

* `default-video-quality` patch crashing ([#227](https://github.com/revanced/revanced-patches/issues/227)) ([dbf0668](dbf0668f28))
2022-07-26 17:34:49 +00:00
Canny1913
dbf0668f28 fix: default-video-quality patch crashing (#227) 2022-07-26 19:33:02 +02:00
oSumAtrIX
b228640e4f docs: GitHub issue forms 2022-07-26 19:28:33 +02:00
semantic-release-bot
0ddb2df640 chore(release): 2.25.0 [skip ci]
# [2.25.0](https://github.com/revanced/revanced-patches/compare/v2.24.0...v2.25.0) (2022-07-26)

### Features

* `general-reddit-ads` patch ([#235](https://github.com/revanced/revanced-patches/issues/235)) ([c9525d0](c9525d0c26))
2022-07-26 16:13:10 +00:00
Alberto Ponces
c9525d0c26 feat: general-reddit-ads patch (#235) 2022-07-26 18:10:54 +02:00
oSumAtrIX
3c5832eda2 docs: normalize description of music-microg-support patch 2022-07-26 17:46:01 +02:00
semantic-release-bot
eef7e87bbf chore(release): 2.24.0 [skip ci]
# [2.24.0](https://github.com/revanced/revanced-patches/compare/v2.23.0...v2.24.0) (2022-07-26)

### Features

* `music-microg-support` patch ([#208](https://github.com/revanced/revanced-patches/issues/208)) ([535f621](535f621f20))
2022-07-26 15:38:02 +00:00
Canny1913
535f621f20 feat: music-microg-support patch (#208)
* Add files via upload

* feat: complete `music-microg-support` patch

* fix: delete unused patch

* oh no

* dedupelicate some stuff and remove nativelib

* Update src/main/kotlin/app/revanced/patches/music/misc/microg/patch/bytecode/MusicMicroGBytecodePatch.kt

style: formatting

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>

* refactor: remove listOf

* fix: typo

* refactor: switch to using direct pattern

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>

* refactor: constants

* fix: bump patch version

* refactor: use full brand name

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-07-26 17:36:17 +02:00
semantic-release-bot
695a0d14ad chore(release): 2.23.0 [skip ci]
# [2.23.0](https://github.com/revanced/revanced-patches/compare/v2.22.2...v2.23.0) (2022-07-26)

### Features

* bump compatibility of YouTube Music patches to v5.16.51 ([#238](https://github.com/revanced/revanced-patches/issues/238)) ([f70e545](f70e54545b))
2022-07-26 15:14:20 +00:00
Lacia~chan
f70e54545b feat: bump compatibility of YouTube Music patches to v5.16.51 (#238) 2022-07-26 17:12:27 +02:00
bogadana
353f036a72 docs: fix readme skipping first patch (#237) 2022-07-26 16:38:14 +02:00
semantic-release-bot
4d305775a0 chore(release): 2.22.2 [skip ci]
## [2.22.2](https://github.com/revanced/revanced-patches/compare/v2.22.1...v2.22.2) (2022-07-26)

### Bug Fixes

* bump youtube version to 17.29.34 ([#236](https://github.com/revanced/revanced-patches/issues/236)) ([d726443](d726443ca0))
2022-07-26 14:08:22 +00:00
Canny1913
d726443ca0 fix: bump youtube version to 17.29.34 (#236) 2022-07-26 16:06:31 +02:00
bogadana
c5046edf8d docs: better structuring (#230) 2022-07-25 20:31:07 +02:00
semantic-release-bot
e15d6afed1 chore(release): 2.22.1 [skip ci]
## [2.22.1](https://github.com/revanced/revanced-patches/compare/v2.22.0...v2.22.1) (2022-07-24)

### Bug Fixes

* remove broken video-quality patch ([f505599](f5055997c7))
2022-07-24 21:47:50 +00:00
Joey Peter
f5055997c7 fix: remove broken video-quality patch 2022-07-24 23:45:53 +02:00
semantic-release-bot
e6f41988dc chore(release): 2.22.0 [skip ci]
# [2.22.0](https://github.com/revanced/revanced-patches/compare/v2.21.3...v2.22.0) (2022-07-24)

### Features

* `default-video-quality` patch ([#141](https://github.com/revanced/revanced-patches/issues/141)) ([c8567d3](c8567d35ef))
2022-07-24 20:30:04 +00:00
Canny1913
c8567d35ef feat: default-video-quality patch (#141) 2022-07-24 22:28:13 +02:00
semantic-release-bot
cea92cacfd chore(release): 2.21.3 [skip ci]
## [2.21.3](https://github.com/revanced/revanced-patches/compare/v2.21.2...v2.21.3) (2022-07-24)

### Bug Fixes

* rename autorepeat-by-default patch to always-autorepeat ([8f83fc1](8f83fc1edf))
2022-07-24 09:48:44 +00:00
Joey Peter
8f83fc1edf fix: rename autorepeat-by-default patch to always-autorepeat 2022-07-24 11:46:18 +02:00
semantic-release-bot
b9e33d0d08 chore(release): 2.21.2 [skip ci]
## [2.21.2](https://github.com/revanced/revanced-patches/compare/v2.21.1...v2.21.2) (2022-07-23)

### Bug Fixes

* bump youtube version to 17.28.34 ([#225](https://github.com/revanced/revanced-patches/issues/225)) ([7df8f6b](7df8f6b42a))
2022-07-23 19:29:51 +00:00
Alberto Ponces
7df8f6b42a fix: bump youtube version to 17.28.34 (#225) 2022-07-23 21:27:50 +02:00
semantic-release-bot
ac117f04df chore(release): 2.21.1 [skip ci]
## [2.21.1](https://github.com/revanced/revanced-patches/compare/v2.21.0...v2.21.1) (2022-07-23)

### Bug Fixes

* add v17.28.34 compatiblity for the `hide-shorts-button` patch ([#224](https://github.com/revanced/revanced-patches/issues/224)) ([d3bb96d](d3bb96d8b3))
2022-07-23 16:50:54 +00:00
Alberto Ponces
d3bb96d8b3 fix: add v17.28.34 compatiblity for the hide-shorts-button patch (#224) 2022-07-23 18:49:03 +02:00
semantic-release-bot
a31e4b4df3 chore(release): 2.21.0 [skip ci]
# [2.21.0](https://github.com/revanced/revanced-patches/compare/v2.20.5...v2.21.0) (2022-07-23)

### Features

* twitter `timeline-ads` patch ([#222](https://github.com/revanced/revanced-patches/issues/222)) ([90144fc](90144fc55a))
2022-07-23 01:36:15 +00:00
oSumAtrIX
90144fc55a feat: twitter timeline-ads patch (#222) 2022-07-23 03:33:36 +02:00
semantic-release-bot
12d1c36a3f chore(release): 2.20.5 [skip ci]
## [2.20.5](https://github.com/revanced/revanced-patches/compare/v2.20.4...v2.20.5) (2022-07-22)

### Bug Fixes

* exclude `swipe-controls` by default due to instability ([a7fce11](a7fce11015))
2022-07-22 20:13:13 +00:00
oSumAtrIX
a7fce11015 fix: exclude swipe-controls by default due to instability 2022-07-22 22:10:26 +02:00
semantic-release-bot
60029da7a3 chore(release): 2.20.4 [skip ci]
## [2.20.4](https://github.com/revanced/revanced-patches/compare/v2.20.3...v2.20.4) (2022-07-21)

### Bug Fixes

* crash when using force-vp9-codec patch ([964b598](964b598ad9))
* use dependency in correct patch ([16d5010](16d50100e7))
2022-07-21 15:16:19 +00:00
TheJeterLP
46a586b2af build: trigger release 2022-07-21 17:13:59 +02:00
semantic-release-bot
8a86034728 chore(release): 2.20.4 [skip ci]
## [2.20.4](https://github.com/revanced/revanced-patches/compare/v2.20.3...v2.20.4) (2022-07-21)

### Bug Fixes

* crash when using force-vp9-codec patch ([964b598](964b598ad9))
* use dependency in correct patch ([16d5010](16d50100e7))
2022-07-21 15:09:38 +00:00
TheJeterLP
ba1abf9319 build: trigger release 2022-07-21 17:07:25 +02:00
semantic-release-bot
82810cca6b chore(release): 2.20.4 [skip ci]
## [2.20.4](https://github.com/revanced/revanced-patches/compare/v2.20.3...v2.20.4) (2022-07-21)

### Bug Fixes

* crash when using force-vp9-codec patch ([964b598](964b598ad9))
* use dependency in correct patch ([16d5010](16d50100e7))
2022-07-21 15:06:16 +00:00
TheJeterLP
964b598ad9 fix: crash when using force-vp9-codec patch 2022-07-21 17:04:30 +02:00
semantic-release-bot
16fbfe555f chore(release): 2.20.4 [skip ci]
## [2.20.4](https://github.com/revanced/revanced-patches/compare/v2.20.3...v2.20.4) (2022-07-21)

### Bug Fixes

* use dependency in correct patch ([16d5010](16d50100e7))
2022-07-21 00:14:24 +00:00
oSumAtrIX
16d50100e7 fix: use dependency in correct patch 2022-07-21 01:35:04 +02:00
semantic-release-bot
2397d6140b chore(release): 2.20.3 [skip ci]
## [2.20.3](https://github.com/revanced/revanced-patches/compare/v2.20.2...v2.20.3) (2022-07-20)

### Bug Fixes

* disable-fullscreen-panels patch not working ([#213](https://github.com/revanced/revanced-patches/issues/213)) ([513276e](513276e950))
2022-07-20 22:20:59 +00:00
TheJeterLP
513276e950 fix: disable-fullscreen-panels patch not working (#213) 2022-07-21 00:19:04 +02:00
TheJeterLP
2aab1a0c66 refactor: cleanup code 2022-07-20 22:58:48 +02:00
semantic-release-bot
cfb5d0908b chore(release): 2.20.2 [skip ci]
## [2.20.2](https://github.com/revanced/revanced-patches/compare/v2.20.1...v2.20.2) (2022-07-20)

### Bug Fixes

* autoplay not working. ([eddf520](eddf520626))
2022-07-20 20:51:45 +00:00
TheJeterLP
5e3eefe5dd build: trigger release 2022-07-20 22:49:33 +02:00
TheJeterLP
6ccee3ef68 Merge branch 'main' of https://github.com/revanced/revanced-patches 2022-07-20 22:47:39 +02:00
TheJeterLP
eddf520626 fix: autoplay not working. 2022-07-20 22:47:27 +02:00
semantic-release-bot
3613fb5409 chore(release): 2.20.1 [skip ci]
## [2.20.1](https://github.com/revanced/revanced-patches/compare/v2.20.0...v2.20.1) (2022-07-20)

### Bug Fixes

* autoplay still enabled when using patch ([97366cd](97366cdd4c))
2022-07-20 20:33:51 +00:00
TheJeterLP
97366cdd4c fix: autoplay still enabled when using patch 2022-07-20 22:31:58 +02:00
oSumAtrIX
ee55cf970e refactor: remove unused strings 2022-07-20 11:49:46 +02:00
semantic-release-bot
ad1ed56a71 chore(release): 2.20.0 [skip ci]
# [2.20.0](https://github.com/revanced/revanced-patches/compare/v2.19.0...v2.20.0) (2022-07-18)

### Features

* `minimize-playback-music` patch ([#200](https://github.com/revanced/revanced-patches/issues/200)) ([13ccea2](13ccea2e7c))
2022-07-18 23:43:01 +00:00
Alberto Ponces
13ccea2e7c feat: minimize-playback-music patch (#200)
* feat: `minimize-playback` - unblocks minimized playback on kids music

* refactor: add missing `;`

* fix: rename to `minimized-playback-music`

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-07-19 01:40:56 +02:00
semantic-release-bot
02d4ba64d6 chore(release): 2.19.0 [skip ci]
# [2.19.0](https://github.com/revanced/revanced-patches/compare/v2.18.3...v2.19.0) (2022-07-18)

### Features

* `compact-header` patch ([891ac04](891ac04155))
2022-07-18 23:37:20 +00:00
Alberto Ponces
891ac04155 feat: compact-header patch 2022-07-19 01:35:34 +02:00
semantic-release-bot
c70c3de205 chore(release): 2.18.3 [skip ci]
## [2.18.3](https://github.com/revanced/revanced-patches/compare/v2.18.2...v2.18.3) (2022-07-18)

### Bug Fixes

* compatibility of `force-vp9-codec-parent-fingerprint` fingerprint with version `17.27.39` ([92dc97e](92dc97e2bf))
2022-07-18 23:18:30 +00:00
oSumAtrIX
92dc97e2bf fix: compatibility of force-vp9-codec-parent-fingerprint fingerprint with version 17.27.39 2022-07-19 01:16:45 +02:00
oSumAtrIX
cdf4313880 style: uppercase first letter in descriptions 2022-07-19 01:16:45 +02:00
semantic-release-bot
0e0763221c chore(release): 2.18.2 [skip ci]
## [2.18.2](https://github.com/revanced/revanced-patches/compare/v2.18.1...v2.18.2) (2022-07-18)

### Bug Fixes

* make all patches toggleable with settings ([#202](https://github.com/revanced/revanced-patches/issues/202)) ([6b515dd](6b515dd59e))
2022-07-18 21:01:38 +00:00
TheJeterLP
6b515dd59e fix: make all patches toggleable with settings (#202) 2022-07-18 22:59:21 +02:00
semantic-release-bot
4ee40a954f chore(release): 2.18.1 [skip ci]
## [2.18.1](https://github.com/revanced/revanced-patches/compare/v2.18.0...v2.18.1) (2022-07-18)

### Bug Fixes

* `minimized-playback` patch for YouTube Kids videos ([#201](https://github.com/revanced/revanced-patches/issues/201)) ([fb96c6e](fb96c6e4bc))
2022-07-18 14:31:50 +00:00
Alberto Ponces
fb96c6e4bc fix: minimized-playback patch for YouTube Kids videos (#201) 2022-07-18 16:29:51 +02:00
semantic-release-bot
c5156fa7e3 chore(release): 2.18.0 [skip ci]
# [2.18.0](https://github.com/revanced/revanced-patches/compare/v2.17.0...v2.18.0) (2022-07-18)

### Features

* `hide-get-premium` patch ([#195](https://github.com/revanced/revanced-patches/issues/195)) ([8b0622f](8b0622f0bf))
2022-07-18 14:25:54 +00:00
Alberto Ponces
8b0622f0bf feat: hide-get-premium patch (#195)
* feat: `hide-get-premium` patch

* fix: improve `hide-get-premium` fingerprints
2022-07-18 16:24:10 +02:00
semantic-release-bot
1e3eddd3f2 chore(release): 2.17.0 [skip ci]
# [2.17.0](https://github.com/revanced/revanced-patches/compare/v2.16.1...v2.17.0) (2022-07-17)

### Bug Fixes

* check if node has attributes before accessing them ([1d12a17](1d12a17999))

### Features

* `sponsorblock` patch ([#101](https://github.com/revanced/revanced-patches/issues/101)) ([db410e1](db410e1be6)), closes [#89](https://github.com/revanced/revanced-patches/issues/89) [#90](https://github.com/revanced/revanced-patches/issues/90)
2022-07-17 23:52:36 +00:00
oSumAtrIX
1d12a17999 fix: check if node has attributes before accessing them 2022-07-18 01:50:46 +02:00
oSumAtrIX
db410e1be6 feat: sponsorblock patch (#101)
* chore(release): 2.5.1-dev.1 [skip ci]

## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30)

### Bug Fixes

* freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([d3e1419](d3e1419d0e))
* invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([c21e177](c21e177ed1))

* feat: migrate to breaking changes of patcher

* chore(release): 2.6.0-dev.1 [skip ci]

# [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02)

### Features

* migrate to breaking changes of patcher ([c95c241](c95c241887))

* refactor: add package for fingerprints

* feat: partial `sponsorblock` patch

* feat: add `Name` annotation to `sponsorblock-resource-patch`

* fix: `sponsorblock-resource-patch`

* refactor: remove unused resources

* refactor: remove `locale-config-fix` dependency

* fix: broken fingerprints

* feat: general fixes on `sponsorblock` patch

* feat: more fixes on `sponsorblock` patch

* feat: update `sponsorblock` patch to 17.26.35

* style: use better wording and fix spelling mistakes

* fix: finish `sponsorblock` patch

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
semantic-release-bot
9969d03116 chore(release): 2.16.1 [skip ci]
## [2.16.1](https://github.com/revanced/revanced-patches/compare/v2.16.0...v2.16.1) (2022-07-17)

### Bug Fixes

* bump youtube version to 17.27.39 ([9d1fecc](9d1fecc2f5))
2022-07-17 15:04:31 +00:00
TheJeterLP
9d1fecc2f5 fix: bump youtube version to 17.27.39 2022-07-17 17:02:43 +02:00
semantic-release-bot
63df96d251 chore(release): 2.16.0 [skip ci]
# [2.16.0](https://github.com/revanced/revanced-patches/compare/v2.15.1...v2.16.0) (2022-07-17)

### Features

* `force-vp9-codec` patch ([#157](https://github.com/revanced/revanced-patches/issues/157)) ([d1266a2](d1266a252d))
2022-07-17 14:34:06 +00:00
TheJeterLP
d1266a252d feat: force-vp9-codec patch (#157) 2022-07-17 16:32:29 +02:00
semantic-release-bot
6ec6d16dbc chore(release): 2.15.1 [skip ci]
## [2.15.1](https://github.com/revanced/revanced-patches/compare/v2.15.0...v2.15.1) (2022-07-17)

### Bug Fixes

* `old-quality-layout` patch ([f940e46](f940e4647e))
* references to integrations in `return-youtube-dislike` patch ([9860658](986065858d))
2022-07-17 14:05:02 +00:00
oSumAtrIX
f940e4647e fix: old-quality-layout patch 2022-07-17 16:03:20 +02:00
oSumAtrIX
cc39b77b49 refactor: use .single for resourceMappings 2022-07-17 16:03:20 +02:00
oSumAtrIX
986065858d fix: references to integrations in return-youtube-dislike patch 2022-07-17 16:03:19 +02:00
TheJeterLP
56475e8f38 refactor: rename HDRAutoBrightnessPatch 2022-07-17 15:07:21 +02:00
Palm
2e0ff07d1a style: better patch descriptions (#193) 2022-07-17 12:36:46 +02:00
oSumAtrIX
a654e25000 refactor: simplify use of dependencies field in Dependencies annotations 2022-07-16 17:32:03 +02:00
oSumAtrIX
a8736a8f70 style: naming for ReturnYouTubeDislike patch 2022-07-16 17:31:40 +02:00
semantic-release-bot
b0d6cee4db chore(release): 2.15.0 [skip ci]
# [2.15.0](https://github.com/revanced/revanced-patches/compare/v2.14.1...v2.15.0) (2022-07-16)

### Features

* `return-youtube-dislikes` patch ([#175](https://github.com/revanced/revanced-patches/issues/175)) ([6bbcdf8](6bbcdf8ebd))
2022-07-16 14:52:58 +00:00
j4k0xb
6bbcdf8ebd feat: return-youtube-dislikes patch (#175)
* feat: ryd

* refactor: use ryd patches class

* feat: add video id dependency patch

* fix: compatibility with 17.26.35

* refactor: named param variable, simpler mutableClass access
2022-07-16 16:50:37 +02:00
semantic-release-bot
6fa8289ca6 chore(release): 2.14.1 [skip ci]
## [2.14.1](https://github.com/revanced/revanced-patches/compare/v2.14.0...v2.14.1) (2022-07-15)

### Bug Fixes

* `codecs-unlock` patch and update Music patches to `5.14.53` ([97dbb43](97dbb43caa))
2022-07-15 12:57:47 +00:00
Alberto Ponces
97dbb43caa fix: codecs-unlock patch and update Music patches to 5.14.53 2022-07-15 14:56:10 +02:00
semantic-release-bot
8cda5663ef chore(release): 2.14.0 [skip ci]
# [2.14.0](https://github.com/revanced/revanced-patches/compare/v2.13.6...v2.14.0) (2022-07-15)

### Features

* `music-video-ads` patch ([#172](https://github.com/revanced/revanced-patches/issues/172)) ([5587c91](5587c91899))
2022-07-15 11:20:04 +00:00
Alberto Ponces
5587c91899 feat: music-video-ads patch (#172) 2022-07-15 13:18:25 +02:00
semantic-release-bot
4e6d82a334 chore(release): 2.13.6 [skip ci]
## [2.13.6](https://github.com/revanced/revanced-patches/compare/v2.13.5...v2.13.6) (2022-07-14)
2022-07-14 16:48:23 +00:00
TheJeterLP
be7302689e build: trigger build 2022-07-14 18:46:33 +02:00
TheJeterLP
14d94d6a44 refactor: prepare for settings patch (#168) 2022-07-14 18:42:22 +02:00
genericness
8d598f5b82 style: casing in description (#174) 2022-07-14 18:40:21 +02:00
semantic-release-bot
918782908b chore(release): 2.13.5 [skip ci]
## [2.13.5](https://github.com/revanced/revanced-patches/compare/v2.13.4...v2.13.5) (2022-07-14)

### Bug Fixes

* `swipe-controls` with active engagement panel ([#177](https://github.com/revanced/revanced-patches/issues/177)) ([524fe19](524fe19840))
2022-07-14 15:23:07 +00:00
Chris
524fe19840 fix: swipe-controls with active engagement panel (#177) 2022-07-14 17:21:26 +02:00
semantic-release-bot
18aafb400b chore(release): 2.13.4 [skip ci]
## [2.13.4](https://github.com/revanced/revanced-patches/compare/v2.13.3...v2.13.4) (2022-07-13)

### Bug Fixes

* constrain `old-quality-layout` to older version ([83ac6b3](83ac6b3e34))
2022-07-13 11:38:21 +00:00
oSumAtrIX
83ac6b3e34 fix: constrain old-quality-layout to older version 2022-07-13 13:36:09 +02:00
oSumAtrIX
890ebf04df docs: change size of headings [skip ci] 2022-07-12 01:13:09 +02:00
oSumAtrIX
6838daf1c3 refactor: rename class and move to sub-package 2022-07-12 00:04:22 +02:00
bogadana
08f4e8532c docs: properly handle semantic versions (#156) [skip ci] 2022-07-11 21:08:47 +02:00
semantic-release-bot
30d25a87da chore(release): 2.13.3 [skip ci]
## [2.13.3](https://github.com/revanced/revanced-patches/compare/v2.13.2...v2.13.3) (2022-07-11)

### Bug Fixes

* `exclusive-audio-playback` patch ([#153](https://github.com/revanced/revanced-patches/issues/153)) ([af0523d](af0523df39))
2022-07-11 18:07:27 +00:00
Alberto Ponces
af0523df39 fix: exclusive-audio-playback patch (#153) 2022-07-11 20:05:03 +02:00
semantic-release-bot
18a3f8e80c chore(release): 2.13.2 [skip ci]
## [2.13.2](https://github.com/revanced/revanced-patches/compare/v2.13.1...v2.13.2) (2022-07-11)

### Bug Fixes

* `hrd-auto-brightness` ([#152](https://github.com/revanced/revanced-patches/issues/152)) ([ce32c6f](ce32c6f3f7))
2022-07-11 17:01:08 +00:00
Chris
ce32c6f3f7 fix: hrd-auto-brightness (#152) 2022-07-11 18:59:26 +02:00
semantic-release-bot
6b706bc93c chore(release): 2.13.1 [skip ci]
## [2.13.1](https://github.com/revanced/revanced-patches/compare/v2.13.0...v2.13.1) (2022-07-11)

### Bug Fixes

* bump youtube version for swipe-controls patch ([6838e25](6838e25764))
2022-07-11 12:41:09 +00:00
TheJeterLP
6838e25764 fix: bump youtube version for swipe-controls patch 2022-07-11 14:39:36 +02:00
semantic-release-bot
f6f8b0ee31 chore(release): 2.13.0 [skip ci]
# [2.13.0](https://github.com/revanced/revanced-patches/compare/v2.12.4...v2.13.0) (2022-07-11)

### Features

* `swipe-controls` rewrite ([#131](https://github.com/revanced/revanced-patches/issues/131)) ([8e26d09](8e26d0933d))
2022-07-11 12:31:53 +00:00
Chris
8e26d0933d feat: swipe-controls rewrite (#131)
* move patch 'fenster' to 'swipe-controls'

* remove 'injectIntoNamedMethod' function

* move updatePlayerType hook into its own patch

* refactor 'swipe-controls' patch

* add resources for new ui to patch

Co-authored-by: TheJeterLP <joey.peter1998@gmail.com>
2022-07-11 14:29:46 +02:00
semantic-release-bot
6f29325a85 chore(release): 2.12.4 [skip ci]
## [2.12.4](https://github.com/revanced/revanced-patches/compare/v2.12.3...v2.12.4) (2022-07-11)

### Bug Fixes

*  `autorepeat-by-default` patch ([#148](https://github.com/revanced/revanced-patches/issues/148)) ([46e163c](46e163caa9))
2022-07-11 06:58:15 +00:00
TheJeterLP
46e163caa9 fix: autorepeat-by-default patch (#148) 2022-07-11 08:56:33 +02:00
semantic-release-bot
af19363997 chore(release): 2.12.3 [skip ci]
## [2.12.3](https://github.com/revanced/revanced-patches/compare/v2.12.2...v2.12.3) (2022-07-11)

### Bug Fixes

* listing of wrong fingerprint class ([#147](https://github.com/revanced/revanced-patches/issues/147)) ([c578e21](c578e210bb))
2022-07-11 05:51:29 +00:00
Alberto Ponces
c578e210bb fix: listing of wrong fingerprint class (#147) 2022-07-11 07:49:40 +02:00
Sculas
980f7f04cc chore: remove assignees [skip ci] 2022-07-10 20:30:47 +02:00
Sculas
baeb0ad0d4 chore: remove assignees [skip ci] 2022-07-10 20:30:35 +02:00
semantic-release-bot
6c4a69fcfb chore(release): 2.12.2 [skip ci]
## [2.12.2](https://github.com/revanced/revanced-patches/compare/v2.12.1...v2.12.2) (2022-07-10)

### Bug Fixes

* display codename for patch names ([7107ee8](7107ee87d9))
* incorrect package name in gradle task ([8ce3a6b](8ce3a6b4e3))
* invalid regex ([b39d60f](b39d60f46c))
2022-07-10 18:00:21 +00:00
oSumAtrIX
4129fcf8a8 refactor: add missing space in generated string 2022-07-10 19:58:32 +02:00
oSumAtrIX
b39d60f46c fix: invalid regex 2022-07-10 19:58:32 +02:00
oSumAtrIX
8ce3a6b4e3 fix: incorrect package name in gradle task 2022-07-10 19:58:32 +02:00
oSumAtrIX
7107ee87d9 fix: display codename for patch names 2022-07-10 19:58:32 +02:00
semantic-release-bot
7ea5d87fa2 chore(release): 2.12.1 [skip ci]
## [2.12.1](https://github.com/revanced/revanced-patches/compare/v2.12.0...v2.12.1) (2022-07-10)
2022-07-10 16:14:45 +00:00
TheJeterLP
471a3d3263 build: fix readme autogeneration not working 2022-07-10 18:12:52 +02:00
bogadana
b95fe30c78 docs: templated readme (#138) 2022-07-10 15:28:18 +02:00
semantic-release-bot
cb0cf342c0 chore(release): 2.12.0 [skip ci]
# [2.12.0](https://github.com/revanced/revanced-patches/compare/v2.11.0...v2.12.0) (2022-07-10)

### Bug Fixes

* update patches to `17.26.35` ([#142](https://github.com/revanced/revanced-patches/issues/142)) ([11db0f4](11db0f49c9))
* wording [skip ci] ([017ef1f](017ef1fb88))

### Features

* issue templates ([0991fbc](0991fbc9e8))
2022-07-10 05:38:19 +00:00
bogadana
11db0f49c9 fix: update patches to 17.26.35 (#142) 2022-07-10 07:36:43 +02:00
oSumAtrIX
017ef1fb88 fix: wording [skip ci] 2022-07-10 00:31:01 +02:00
oSumAtrIX
0991fbc9e8 feat: issue templates 2022-07-10 00:27:29 +02:00
semantic-release-bot
e1eedc02ab chore(release): 2.11.0 [skip ci]
# [2.11.0](https://github.com/revanced/revanced-patches/compare/v2.10.2...v2.11.0) (2022-07-09)

### Features

* `autorepeat-by-default` patch ([#106](https://github.com/revanced/revanced-patches/issues/106)) ([9be32e1](9be32e10f6))
2022-07-09 13:55:53 +00:00
oSumAtrIX
9be32e10f6 feat: autorepeat-by-default patch (#106) 2022-07-09 15:53:33 +02:00
semantic-release-bot
87996f67a8 chore(release): 2.10.2 [skip ci]
## [2.10.2](https://github.com/revanced/revanced-patches/compare/v2.10.1...v2.10.2) (2022-07-08)

### Bug Fixes

* trigger release on `build` commits ([0822383](0822383271))
2022-07-08 22:19:09 +00:00
Sculas
0822383271 fix: trigger release on build commits 2022-07-09 00:17:31 +02:00
TheJeterLP
0934af1ccd refactor: remove unused imports and merge packages together (#136) 2022-07-08 21:17:50 +02:00
bogadana
b3ad6fb8af docs: auto generate list of patches in README.md (#133)
* feat: auto generate list of patches in `README.md`

* sample readme

* formatting

* add codeblocks

* sample readme

* run on publish

* make workflow commit readme

* update readme [skip ci]

* update gen [skip ci]

* update workflow [skip ci]

* add readme to release assets

* fix: spacing in title

Co-authored-by: Sculas <contact@sculas.xyz>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-07-08 21:17:39 +02:00
semantic-release-bot
87f5ebce9b chore(release): 2.10.1 [skip ci]
## [2.10.1](https://github.com/revanced/revanced-patches/compare/v2.10.0...v2.10.1) (2022-07-08)

### Bug Fixes

* patch description consistency ([#134](https://github.com/revanced/revanced-patches/issues/134)) ([a35d7c8](a35d7c8951))
2022-07-08 04:32:37 +00:00
bogadana
a35d7c8951 fix: patch description consistency (#134) 2022-07-08 06:30:59 +02:00
semantic-release-bot
3c8d3edff4 chore(release): 2.10.0 [skip ci]
# [2.10.0](https://github.com/revanced/revanced-patches/compare/v2.9.4...v2.10.0) (2022-07-07)

### Features

* implement `wide-searchbar` Patch ([#130](https://github.com/revanced/revanced-patches/issues/130)) ([c35734b](c35734bec2))
2022-07-07 23:42:01 +00:00
TheJeterLP
c35734bec2 feat: implement wide-searchbar Patch (#130) 2022-07-08 01:40:12 +02:00
semantic-release-bot
e2b634053b chore(release): 2.9.4 [skip ci]
## [2.9.4](https://github.com/revanced/revanced-patches/compare/v2.9.3...v2.9.4) (2022-07-06)

### Bug Fixes

* add 17.25.34 as supported version for swipe-controls patch ([3e6df0c](3e6df0c96d))
2022-07-06 18:34:04 +00:00
TheJeterLP
3e6df0c96d fix: add 17.25.34 as supported version for swipe-controls patch 2022-07-06 20:31:59 +02:00
semantic-release-bot
7a2ea95e55 chore(release): 2.9.3 [skip ci]
## [2.9.3](https://github.com/revanced/revanced-patches/compare/v2.9.2...v2.9.3) (2022-07-06)

### Bug Fixes

* Readd `swipe-controls` patch ([#123](https://github.com/revanced/revanced-patches/issues/123)) ([add3058](add3058d24))
2022-07-06 18:29:29 +00:00
TheJeterLP
add3058d24 fix: Readd swipe-controls patch (#123) 2022-07-06 20:27:28 +02:00
semantic-release-bot
ef888f6b59 chore(release): 2.9.2 [skip ci]
## [2.9.2](https://github.com/revanced/revanced-patches/compare/v2.9.1...v2.9.2) (2022-07-05)

### Bug Fixes

* revert `swipe-controls` patch  ([9b077d6](9b077d6ada))
2022-07-05 21:26:17 +00:00
oSumAtrIX
9b077d6ada fix: revert swipe-controls patch
This reverts commit cd66ee4e57.
2022-07-05 23:24:10 +02:00
semantic-release-bot
93d4cee16e chore(release): 2.9.1 [skip ci]
## [2.9.1](https://github.com/revanced/revanced-patches/compare/v2.9.0...v2.9.1) (2022-07-05)

### Bug Fixes

* make `minimized-playback-manager-fingerprint` unique ([#120](https://github.com/revanced/revanced-patches/issues/120)) ([bc3b654](bc3b654357))
2022-07-05 20:24:42 +00:00
bogadana
bc3b654357 fix: make minimized-playback-manager-fingerprint unique (#120) 2022-07-05 22:23:00 +02:00
semantic-release-bot
64b4c92ca0 chore(release): 2.9.0 [skip ci]
# [2.9.0](https://github.com/revanced/revanced-patches/compare/v2.8.2...v2.9.0) (2022-07-05)

### Features

* `swipe-controls` patch ([#115](https://github.com/revanced/revanced-patches/issues/115)) ([cd66ee4](cd66ee4e57))
2022-07-05 20:04:45 +00:00
Chris
cd66ee4e57 feat: swipe-controls patch (#115) 2022-07-05 22:03:07 +02:00
semantic-release-bot
f527226757 chore(release): 2.8.2 [skip ci]
## [2.8.2](https://github.com/revanced/revanced-patches/compare/v2.8.1...v2.8.2) (2022-07-05)

### Bug Fixes

* show minimized playback options in settings ([#118](https://github.com/revanced/revanced-patches/issues/118)) ([ec0b17a](ec0b17a4d8))
2022-07-05 17:47:26 +00:00
bogadana
ec0b17a4d8 fix: show minimized playback options in settings (#118) 2022-07-05 19:45:46 +02:00
bogadana
63598d0d42 build: bump patcher dependency version (#119) 2022-07-05 18:44:58 +02:00
semantic-release-bot
14f6b66135 chore(release): 2.8.1 [skip ci]
## [2.8.1](https://github.com/revanced/revanced-patches/compare/v2.8.0...v2.8.1) (2022-07-05)

### Bug Fixes

* remove unnecessary version constraints ([#117](https://github.com/revanced/revanced-patches/issues/117)) ([18893c0](18893c005e))
2022-07-05 13:04:01 +00:00
bogadana
18893c005e fix: remove unnecessary version constraints (#117) 2022-07-05 15:02:00 +02:00
semantic-release-bot
73b51a0687 chore(release): 2.8.0 [skip ci]
# [2.8.0](https://github.com/revanced/revanced-patches/compare/v2.7.0...v2.8.0) (2022-07-04)

### Features

* `enable-debugging` patch ([#116](https://github.com/revanced/revanced-patches/issues/116)) ([c4de003](c4de003fc1))
2022-07-04 16:12:27 +00:00
Chris
c4de003fc1 feat: enable-debugging patch (#116) 2022-07-04 18:10:49 +02:00
semantic-release-bot
45b8ad099e chore(release): 2.7.0 [skip ci]
# [2.7.0](https://github.com/revanced/revanced-patches/compare/v2.6.0...v2.7.0) (2022-07-03)

### Features

* `hdr-max-brightness` patch ([#105](https://github.com/revanced/revanced-patches/issues/105)) ([8c40ff4](8c40ff4852))
* `hide-infocard-suggestions` patch ([#107](https://github.com/revanced/revanced-patches/issues/107)) ([f304c86](f304c866f1))
2022-07-03 18:52:05 +00:00
oSumAtrIX
8c40ff4852 feat: hdr-max-brightness patch (#105) 2022-07-03 20:50:20 +02:00
oSumAtrIX
f304c866f1 feat: hide-infocard-suggestions patch (#107) 2022-07-03 20:50:09 +02:00
Robert
9adf42c308 Update description (#110) 2022-07-03 19:19:50 +02:00
semantic-release-bot
2391db0f53 chore(release): 2.6.0 [skip ci]
# [2.6.0](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.6.0) (2022-07-02)

### Bug Fixes

* freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([d3e1419](d3e1419d0e))
* invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([c21e177](c21e177ed1))
* remove refreshing home screen not working ([c5ec801](c5ec801b90))

### Features

* migrate to breaking changes of patcher ([9395e08](9395e0835e))
2022-07-02 23:03:09 +00:00
oSumAtrIX
9809e4dfd0 build: bump patcher dependency version 2022-07-03 01:01:20 +02:00
semantic-release-bot
b191efea2d chore(release): 2.6.0-dev.2 [skip ci]
# [2.6.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.6.0-dev.1...v2.6.0-dev.2) (2022-07-02)

### Bug Fixes

* remove refreshing home screen not working ([42def27](42def27fa5))
2022-07-03 01:01:20 +02:00
oSumAtrIX
c5ec801b90 fix: remove refreshing home screen not working 2022-07-03 01:01:20 +02:00
oSumAtrIX
95f22bc2a1 refactor: add package for fingerprints 2022-07-03 01:01:20 +02:00
semantic-release-bot
0098f25bfb chore(release): 2.6.0-dev.1 [skip ci]
# [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02)

### Features

* migrate to breaking changes of patcher ([c95c241](c95c241887))
2022-07-03 01:01:20 +02:00
oSumAtrIX
9395e0835e feat: migrate to breaking changes of patcher 2022-07-03 01:01:20 +02:00
semantic-release-bot
d59d6b7022 chore(release): 2.5.1-dev.1 [skip ci]
## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30)

### Bug Fixes

* freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([d3e1419](d3e1419d0e))
* invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([c21e177](c21e177ed1))
2022-07-03 01:01:20 +02:00
Aunali321
c21e177ed1 fix: invalid version in compatibility annotation (#90) 2022-06-30 20:24:29 +02:00
bogadana
d3e1419d0e fix: freezing panels when watching video in fullscreen (#89) 2022-06-30 19:15:51 +02:00
semantic-release-bot
f44d09059b chore(release): 2.5.0 [skip ci]
# [2.5.0](https://github.com/revanced/revanced-patches/compare/v2.4.0...v2.5.0) (2022-06-30)

### Features

* hide watermark support for 17.25.34 ([#87](https://github.com/revanced/revanced-patches/issues/87)) ([185f6d8](185f6d84fb))
2022-06-30 15:45:24 +00:00
Aunali321
185f6d84fb feat: hide watermark support for 17.25.34 (#87) 2022-06-30 17:43:21 +02:00
semantic-release-bot
3dc6be5d8d chore(release): 2.4.0 [skip ci]
# [2.4.0](https://github.com/revanced/revanced-patches/compare/v2.3.1...v2.4.0) (2022-06-30)

### Features

* add youtube version 17.25.34 ([#85](https://github.com/revanced/revanced-patches/issues/85)) ([742e239](742e2394a9))
2022-06-30 12:51:48 +00:00
Aunali321
742e2394a9 feat: add youtube version 17.25.34 (#85) 2022-06-30 14:50:16 +02:00
bogadana
d9d389b939 refactor: change name to fit in (#86) 2022-06-30 14:48:27 +02:00
semantic-release-bot
b0775e13d5 chore(release): 2.3.1 [skip ci]
## [2.3.1](https://github.com/revanced/revanced-patches/compare/v2.3.0...v2.3.1) (2022-06-30)

### Bug Fixes

* change fingerprint to work on latest youtube ([#80](https://github.com/revanced/revanced-patches/issues/80)) ([0fe98b6](0fe98b6c5e))
2022-06-30 04:19:47 +00:00
bogadana
0fe98b6c5e fix: change fingerprint to work on latest youtube (#80) 2022-06-30 06:18:14 +02:00
oSumAtrIX
3a78021f5e refactor: description of custom-playback-speed patch. 2022-06-30 02:48:18 +02:00
oSumAtrIX
e096009893 refactor: hide-autoplay-button & refactor: hide-autoplay-button && premium-heading patch 2022-06-30 02:39:24 +02:00
semantic-release-bot
b599ee2096 chore(release): 2.3.0 [skip ci]
# [2.3.0](https://github.com/revanced/revanced-patches/compare/v2.2.0...v2.3.0) (2022-06-30)

### Features

* `disable-autoplay-button` patch ([#79](https://github.com/revanced/revanced-patches/issues/79)) ([bd7cede](bd7cedee48))
2022-06-30 00:36:57 +00:00
bogadana
bd7cedee48 feat: disable-autoplay-button patch (#79) 2022-06-30 02:35:11 +02:00
oSumAtrIX
278c07ea56 build: bump patcher dependency version 2022-06-30 01:41:38 +02:00
semantic-release-bot
6dc2875057 chore(release): 2.2.0 [skip ci]
# [2.2.0](https://github.com/revanced/revanced-patches/compare/v2.1.0...v2.2.0) (2022-06-29)

### Features

* make resource mapping patch aware of types ([#77](https://github.com/revanced/revanced-patches/issues/77)) ([7b24071](7b24071956))
2022-06-29 22:50:21 +00:00
bogadana
7b24071956 feat: make resource mapping patch aware of types (#77) 2022-06-30 00:48:53 +02:00
semantic-release-bot
6c472aa71d chore(release): 2.1.0 [skip ci]
# [2.1.0](https://github.com/revanced/revanced-patches/compare/v2.0.3...v2.1.0) (2022-06-28)

### Features

* `custom-playback-speed` patch ([#50](https://github.com/revanced/revanced-patches/issues/50)) ([ca66490](ca66490930))
2022-06-28 21:44:38 +00:00
bogadana
ca66490930 feat: custom-playback-speed patch (#50) 2022-06-28 23:43:07 +02:00
semantic-release-bot
5317a482d1 chore(release): 2.0.3 [skip ci]
## [2.0.3](https://github.com/revanced/revanced-patches/compare/v2.0.2...v2.0.3) (2022-06-27)

### Bug Fixes

* check if resource files exist ([f21d1d8](f21d1d83f6))
2022-06-27 22:41:37 +00:00
oSumAtrIX
f21d1d83f6 fix: check if resource files exist 2022-06-28 00:39:51 +02:00
semantic-release-bot
bb6c805f55 chore(release): 2.0.2 [skip ci]
## [2.0.2](https://github.com/revanced/revanced-patches/compare/v2.0.1...v2.0.2) (2022-06-27)

### Bug Fixes

* some more refactoring of integrations, add hide-watermark patch ([#63](https://github.com/revanced/revanced-patches/issues/63)) ([c5dfe3e](c5dfe3e842))
2022-06-27 20:10:53 +00:00
Joey Peter
c5dfe3e842 fix: some more refactoring of integrations, add hide-watermark patch (#63)
* refactor: integrations

* add HideWatermark patch

* add hidewatermark patch

* fix bug

* use latest patcher version

* Fix sig name

* update to fingerprints

* make cleaner patch

* add 17.24.35 support for hide-watermark
2022-06-27 22:09:17 +02:00
oSumAtrIX
4290a4e820 refactor: remove trimIndent before compiling instructions 2022-06-27 01:09:40 +02:00
semantic-release-bot
1f6b450df3 chore(release): 2.0.1 [skip ci]
## [2.0.1](https://github.com/revanced/revanced-patches/compare/v2.0.0...v2.0.1) (2022-06-26)

### Bug Fixes

* invalid string in strings list ([a29de19](a29de19d4c))
* migrate to new `proxy` api ([d9f05ff](d9f05ffdf8))
2022-06-26 16:12:29 +00:00
oSumAtrIX
d9f05ffdf8 fix: migrate to new proxy api 2022-06-26 18:10:37 +02:00
oSumAtrIX
ddc693e909 build: bump patcher dependency version 2022-06-26 18:03:38 +02:00
oSumAtrIX
a29de19d4c fix: invalid string in strings list 2022-06-26 17:59:28 +02:00
semantic-release-bot
c6d50e8450 chore(release): 2.0.0 [skip ci]
# [2.0.0](https://github.com/revanced/revanced-patches/compare/v1.11.0...v2.0.0) (2022-06-26)

### Code Refactoring

* migrate from `Signature` to `Fingerprint` ([f0aeece](f0aeece867))

### BREAKING CHANGES

* Not backwards compatible, since a lot of classes where renamed.
2022-06-26 14:36:01 +00:00
oSumAtrIX
f0aeece867 refactor: migrate from Signature to Fingerprint
BREAKING CHANGE: Not backwards compatible, since a lot of classes where renamed.
2022-06-26 16:33:58 +02:00
semantic-release-bot
015443d9db chore(release): 1.11.0 [skip ci]
# [1.11.0](https://github.com/revanced/revanced-patches/compare/v1.10.5...v1.11.0) (2022-06-26)

### Features

* add youtube version 17.24.35 ([fde42c5](fde42c5bae))
* add youtube version 17.24.35 ([b4ae564](b4ae564102))
2022-06-26 12:26:50 +00:00
Joey Peter
fde42c5bae feat: add youtube version 17.24.35 2022-06-26 14:25:23 +02:00
Aunali321
b4ae564102 feat: add youtube version 17.24.35 2022-06-26 12:12:05 +05:30
semantic-release-bot
aabbe110b9 chore(release): 1.10.5 [skip ci]
## [1.10.5](https://github.com/revanced/revanced-patches/compare/v1.10.4...v1.10.5) (2022-06-25)

### Bug Fixes

* put back proper variable ([#61](https://github.com/revanced/revanced-patches/issues/61)) ([35b86c7](35b86c7d78))
2022-06-25 00:17:35 +00:00
bogadana
35b86c7d78 fix: put back proper variable (#61) 2022-06-25 02:15:58 +02:00
semantic-release-bot
e101af72d4 chore(release): 1.10.4 [skip ci]
## [1.10.4](https://github.com/revanced/revanced-patches/compare/v1.10.3...v1.10.4) (2022-06-23)

### Bug Fixes

* missing brackets at inlining ([59509a3](59509a307e))
2022-06-23 22:57:58 +00:00
oSumAtrIX
59509a307e fix: missing brackets at inlining 2022-06-24 00:56:29 +02:00
Joey Peter
ccf0218b6c refactor: integrations (#44) 2022-06-24 00:17:49 +02:00
semantic-release-bot
d5597fb002 chore(release): 1.10.3 [skip ci]
## [1.10.3](https://github.com/revanced/revanced-patches/compare/v1.10.2...v1.10.3) (2022-06-23)

### Bug Fixes

* get create button view register by more reliable means ([#59](https://github.com/revanced/revanced-patches/issues/59)) ([0515a50](0515a500c6))
2022-06-23 22:07:17 +00:00
bogadana
0515a500c6 fix: get create button view register by more reliable means (#59) 2022-06-24 00:05:41 +02:00
semantic-release-bot
636aac1a28 chore(release): 1.10.2 [skip ci]
## [1.10.2](https://github.com/revanced/revanced-patches/compare/v1.10.1...v1.10.2) (2022-06-23)

### Bug Fixes

* `disable-create-button` not working with prebuilt jar file ([#55](https://github.com/revanced/revanced-patches/issues/55)) ([8ff6c15](8ff6c159fa))
2022-06-23 13:07:52 +00:00
Itroublve
8ff6c159fa fix: disable-create-button not working with prebuilt jar file (#55) 2022-06-23 15:06:00 +02:00
semantic-release-bot
a84766aad9 chore(release): 1.10.1 [skip ci]
## [1.10.1](https://github.com/revanced/revanced-patches/compare/v1.10.0...v1.10.1) (2022-06-23)

### Bug Fixes

* patcher not propagating dexlib ([a120be4](a120be4a79))
* update patcher version ([8cba2c0](8cba2c0f8f))
2022-06-23 10:25:07 +00:00
Sculas
a120be4a79 fix: patcher not propagating dexlib 2022-06-23 12:23:31 +02:00
Sculas
8cba2c0f8f fix: update patcher version 2022-06-23 12:15:00 +02:00
Itroublve
579297efa3 refactor: Migrate to new extension methods for String.toInstruction(...) and String.toInstructions(...) (#45) 2022-06-23 02:22:42 +02:00
semantic-release-bot
9094a69be8 chore(release): 1.10.0 [skip ci]
# [1.10.0](https://github.com/revanced/revanced-patches/compare/v1.9.1...v1.10.0) (2022-06-23)

### Features

* add compatibility for YouTube v17.23.36 and v17.24.34 ([20c77c1](20c77c1769))
2022-06-23 00:21:14 +00:00
Joey Peter
20c77c1769 feat: add compatibility for YouTube v17.23.36 and v17.24.34 2022-06-23 02:19:35 +02:00
semantic-release-bot
fcc450efb4 chore(release): 1.9.1 [skip ci]
## [1.9.1](https://github.com/revanced/revanced-patches/compare/v1.9.0...v1.9.1) (2022-06-21)

### Bug Fixes

* update patcher version ([f02e8b1](f02e8b13ac))
2022-06-21 22:03:16 +00:00
Sculas
f02e8b13ac fix: update patcher version 2022-06-22 00:01:36 +02:00
semantic-release-bot
4c4f7adbce chore(release): 1.9.0 [skip ci]
# [1.9.0](https://github.com/revanced/revanced-patches/compare/v1.8.2...v1.9.0) (2022-06-21)

### Features

* use `install` mode by default ([6662be8](6662be893c))
2022-06-21 16:44:01 +00:00
oSumAtrIX
6662be893c feat: use install mode by default 2022-06-21 18:30:06 +02:00
semantic-release-bot
41cf8e3fa9 chore(release): 1.8.2 [skip ci]
## [1.8.2](https://github.com/revanced/revanced-patches/compare/v1.8.1...v1.8.2) (2022-06-20)

### Bug Fixes

* migrate to breaking changes from patcher ([e002818](e00281819c))
* old usage of `toInstructions` extension method ([aec1602](aec1602a39))
2022-06-20 19:35:33 +00:00
oSumAtrIX
aec1602a39 fix: old usage of toInstructions extension method 2022-06-20 21:33:45 +02:00
oSumAtrIX
e00281819c fix: migrate to breaking changes from patcher 2022-06-20 21:29:55 +02:00
oSumAtrIX
48cf778d56 refactor: improve microg-support reference patches 2022-06-20 21:29:54 +02:00
semantic-release-bot
e6506bd4b4 chore(release): 1.8.1 [skip ci]
## [1.8.1](https://github.com/revanced/revanced-patches/compare/v1.8.0...v1.8.1) (2022-06-20)

### Bug Fixes

* add execute permission to `./gradlew` file ([3a29b6d](3a29b6db64))
2022-06-20 17:19:31 +00:00
MedzikUser
3a29b6db64 fix: add execute permission to ./gradlew file 2022-06-20 19:17:54 +02:00
semantic-release-bot
cecee8f70e chore(release): 1.8.0 [skip ci]
# [1.8.0](https://github.com/revanced/revanced-patches/compare/v1.7.0...v1.8.0) (2022-06-20)

### Features

* bump compatibility of patches for Youtube to v17.23.35 ([e5cad5f](e5cad5f022))
2022-06-20 08:56:19 +00:00
oSumAtrIX
e5cad5f022 feat: bump compatibility of patches for Youtube to v17.23.35 2022-06-20 10:54:37 +02:00
TheJeterLP
85e584f65a fix double character 2022-06-20 10:30:07 +02:00
TheJeterLP
78fe1b67ea bump youtube version to 12.23.35 2022-06-20 10:25:59 +02:00
Joey Peter
9c33d67d80 Update GeneralAdsCompatibility.kt 2022-06-20 10:20:19 +02:00
semantic-release-bot
16d234e761 chore(release): 1.7.0 [skip ci]
# [1.7.0](https://github.com/revanced/revanced-patches/compare/v1.6.4...v1.7.0) (2022-06-20)

### Features

* `disable-fullscreen-panels` patch ([5797e15](5797e15b06))
2022-06-20 06:05:30 +00:00
oSumAtrIX
635f65e5a1 Merge pull request #38 from bogadana/main
feat: `disable-fullscreen-panels` patch
2022-06-20 08:03:45 +02:00
oSumAtrIX
3ef5d2a29d refactor: patch description 2022-06-20 08:03:02 +02:00
bogadana
5797e15b06 feat: disable-fullscreen-panels patch 2022-06-20 01:29:47 +02:00
semantic-release-bot
c987357959 chore(release): 1.6.4 [skip ci]
## [1.6.4](https://github.com/revanced/revanced-patches/compare/v1.6.3...v1.6.4) (2022-06-19)

### Bug Fixes

* update patcher version ([#35](https://github.com/revanced/revanced-patches/issues/35)) ([e452969](e452969cdd)), closes [#34](https://github.com/revanced/revanced-patches/issues/34)
2022-06-19 15:28:06 +00:00
Sculas
e452969cdd fix: update patcher version (#35)
Fixes #34
2022-06-19 17:26:08 +02:00
semantic-release-bot
7484f52bc4 chore(release): 1.6.3 [skip ci]
## [1.6.3](https://github.com/revanced/revanced-patches/compare/v1.6.2...v1.6.3) (2022-06-16)

### Bug Fixes

* wrong dex path ([938dd03](938dd030b0))
2022-06-16 11:38:30 +00:00
Sculas
938dd030b0 fix: wrong dex path 2022-06-16 13:36:52 +02:00
semantic-release-bot
990806118f chore(release): 1.6.2 [skip ci]
## [1.6.2](https://github.com/revanced/revanced-patches/compare/v1.6.1...v1.6.2) (2022-06-16)

### Bug Fixes

* broken gradle task ([6ae1e1d](6ae1e1d0aa))
2022-06-16 11:35:50 +00:00
Sculas
6ae1e1d0aa fix: broken gradle task 2022-06-16 13:33:50 +02:00
semantic-release-bot
ed6a0e5403 chore(release): 1.6.1 [skip ci]
## [1.6.1](https://github.com/revanced/revanced-patches/compare/v1.6.0...v1.6.1) (2022-06-16)

### Bug Fixes

* broken gradle task ([d48a8e9](d48a8e93a2))
2022-06-16 11:29:49 +00:00
Lucaskyy
d48a8e93a2 fix: broken gradle task 2022-06-16 13:27:45 +02:00
semantic-release-bot
51f0a011a7 chore(release): 1.6.0 [skip ci]
# [1.6.0](https://github.com/revanced/revanced-patches/compare/v1.5.3...v1.6.0) (2022-06-16)

### Bug Fixes

* broken gradle task ([0a6a9e9](0a6a9e9f4b))

### Features

* generate dex files using gradle task ([8669a22](8669a22689))
2022-06-16 10:57:06 +00:00
Lucaskyy
0a6a9e9f4b fix: broken gradle task 2022-06-16 12:55:13 +02:00
Lucaskyy
8669a22689 feat: generate dex files using gradle task 2022-06-16 12:47:49 +02:00
semantic-release-bot
1e44644c73 chore(release): 1.5.3 [skip ci]
## [1.5.3](https://github.com/revanced/revanced-patches/compare/v1.5.2...v1.5.3) (2022-06-16)

### Bug Fixes

* forgot about this ([354a1c8](354a1c81ab))
2022-06-16 10:03:37 +00:00
Lucaskyy
5c31dd409f Merge remote-tracking branch 'origin/main' into main 2022-06-16 12:00:53 +02:00
Lucaskyy
354a1c81ab fix: forgot about this 2022-06-16 12:00:06 +02:00
semantic-release-bot
76fb0b3797 chore(release): 1.5.2 [skip ci]
## [1.5.2](https://github.com/revanced/revanced-patches/compare/v1.5.1...v1.5.2) (2022-06-16)

### Bug Fixes

* dummy task for Gradle semantic-release plugin ([06ea9cb](06ea9cb23f))
* releases ([efd7c4c](efd7c4c8eb))
2022-06-16 09:57:44 +00:00
Lucaskyy
06ea9cb23f fix: dummy task for Gradle semantic-release plugin 2022-06-16 11:55:41 +02:00
Sculas
efd7c4c8eb fix: releases 2022-06-16 11:39:24 +02:00
semantic-release-bot
ee80ef909f chore(release): 1.5.1 [skip ci]
## [1.5.1](https://github.com/revanced/revanced-patches/compare/v1.5.0...v1.5.1) (2022-06-16)

### Reverts

* Revert "Changed app name to ReVanced (#21)" (#24) ([0e76fbf](0e76fbfc1b)), closes [#21](https://github.com/revanced/revanced-patches/issues/21) [#24](https://github.com/revanced/revanced-patches/issues/24)
2022-06-16 09:34:36 +00:00
Sculas
0e76fbfc1b Revert "Changed app name to ReVanced (#21)" (#24)
This reverts commit d733981342.
2022-06-16 11:32:58 +02:00
semantic-release-bot
14b520395e chore(release): 1.5.0 [skip ci]
# [1.5.0](https://github.com/revanced/revanced-patches/compare/v1.4.0...v1.5.0) (2022-06-15)

### Bug Fixes

* sync version ([0f204af](0f204afa2a))

### Features

* `hide-cast-button` patch ([d71290f](d71290f6f1))
2022-06-15 22:36:44 +00:00
oSumAtrIX
0f204afa2a fix: sync version 2022-06-16 00:34:41 +02:00
bibarub
d71290f6f1 feat: hide-cast-button patch 2022-06-16 00:33:39 +02:00
semantic-release-bot
114e78171f chore(release): 1.4.0 [skip ci]
# [1.4.0](https://github.com/revanced/revanced-patches/compare/v1.3.1...v1.4.0) (2022-06-15)

### Bug Fixes

* add size `48px` for `custom-branding` patch ([4a20de0](4a20de0410))

### Features

* `premium-heading` patch ([0cfead3](0cfead3914))
2022-06-15 09:55:04 +00:00
oSumAtrIX
0cfead3914 feat: premium-heading patch 2022-06-15 11:53:16 +02:00
oSumAtrIX
4a20de0410 fix: add size 48px for custom-branding patch 2022-06-15 11:52:51 +02:00
semantic-release-bot
f69bd0e636 chore(release): 1.3.1 [skip ci]
## [1.3.1](https://github.com/revanced/revanced-patches/compare/v1.3.0...v1.3.1) (2022-06-15)

### Bug Fixes

* `custom-branding` patch failing to get resources ([eed0427](eed04277d1))
2022-06-15 09:08:43 +00:00
oSumAtrIX
eed04277d1 fix: custom-branding patch failing to get resources 2022-06-15 11:07:10 +02:00
semantic-release-bot
df05aecdcf chore(release): 1.3.0 [skip ci]
# [1.3.0](https://github.com/revanced/revanced-patches/compare/v1.2.2...v1.3.0) (2022-06-14)

### Features

* `custom-branding` patch ([680371a](680371ab30))
2022-06-14 22:08:04 +00:00
oSumAtrIX
680371ab30 feat: custom-branding patch 2022-06-15 00:06:02 +02:00
oSumAtrIX
a465f89354 refactor: rename microg-patch to microg-support 2022-06-15 00:06:02 +02:00
semantic-release-bot
4c633847b2 chore(release): 1.2.2 [skip ci]
## [1.2.2](https://github.com/revanced/revanced-patches/compare/v1.2.1...v1.2.2) (2022-06-13)

### Bug Fixes

* environment variable not found in gradle build script ([75f03db](75f03dbf28))
2022-06-13 23:33:32 +00:00
oSumAtrIX
75f03dbf28 fix: environment variable not found in gradle build script 2022-06-14 01:31:37 +02:00
oSumAtrIX
9c2934d617 chore: bump stdlib dependency version 2022-06-14 01:11:04 +02:00
oSumAtrIX
5e94f464fc chore: publish releases instead of packages 2022-06-14 01:10:01 +02:00
semantic-release-bot
a3f5c11050 chore(release): 1.2.1 [skip ci]
## [1.2.1](https://github.com/revanced/revanced-patches/compare/v1.2.0...v1.2.1) (2022-06-12)

### Performance Improvements

* fix high battery consumption due to chromecast not working with `microg` ([fcb80dc](fcb80dc71f))
2022-06-12 23:36:44 +00:00
oSumAtrIX
09e837d2e0 Merge remote-tracking branch 'origin/main' 2022-06-13 01:34:28 +02:00
oSumAtrIX
fcb80dc71f perf: fix high battery consumption due to chromecast not working with microg 2022-06-13 01:22:28 +02:00
semantic-release-bot
a63446e0e2 chore(release): 1.2.0 [skip ci]
# [1.2.0](https://github.com/revanced/revanced-patches/compare/v1.1.0...v1.2.0) (2022-06-11)

### Bug Fixes

* migrate to `include` annotation ([c53222c](c53222ce69))

### Features

* `microg-patch` ([21ae984](21ae984acb))
* updated all patches to support v17.22.36 of `com.android.google.youtube` ([285aac5](285aac5679))
2022-06-11 23:42:16 +00:00
oSumAtrIX
d3873e6568 Merge pull request #19 from revanced/non-root
feat: `microg-patch`
2022-06-12 01:40:26 +02:00
oSumAtrIX
8105cc0ac6 chore: bump patcher dependency version 2022-06-12 01:38:54 +02:00
oSumAtrIX
433ea02c04 refactor: rename general-bytecode-ads to general-ads 2022-06-12 01:07:23 +02:00
semantic-release-bot
c97feb1cd8 chore(release): 1.1.0 [skip ci]
# [1.1.0](https://github.com/revanced/revanced-patches/compare/v1.0.0...v1.1.0) (2022-06-11)

### Features

* generate & upload dex files ([#18](https://github.com/revanced/revanced-patches/issues/18)) ([aa365d6](aa365d684a))
2022-06-11 22:23:47 +00:00
Sculas
aa365d684a feat: generate & upload dex files (#18)
* fix: generate dex files

* fix: d8 path

* fix: path

* Upload dex assets
2022-06-12 00:22:22 +02:00
oSumAtrIX
285aac5679 feat: updated all patches to support v17.22.36 of com.android.google.youtube 2022-06-11 21:09:59 +02:00
oSumAtrIX
c53222ce69 fix: migrate to include annotation 2022-06-11 19:14:54 +02:00
oSumAtrIX
21ae984acb feat: microg-patch 2022-06-11 06:37:18 +02:00
josesilveiraa
d1b1e5a6cd refactor: more readable code
- Changes singular `prefix` vararg to `prefixes`.
- Changes `_prefix` in loop to `prefix`
2022-06-09 01:13:45 +02:00
josesilveiraa
0e465eb7f8 refactor: fix mispeling
`t he` > `the`
2022-06-07 14:35:41 +02:00
semantic-release-bot
5b2d834a3e chore(release): 1.0.0 [skip ci]
# 1.0.0 (2022-06-05)

### Bug Fixes

* `create-button-signature` ([a2038a0](a2038a0507))
* `enable-seekbar-tapping` patch ([af4d514](af4d514038))
* `Index` in wrong package ([0a57a1d](0a57a1d1c1))
* `minimized-playback` & `old-quality-layout` wrong opcodes ([c36c5f8](c36c5f80b4))
* `minimized-playback` patch ([cc558b3](cc558b35e9))
* `SignatureChecker` not handling nullable field `methodMetadata` ([c2e0e91](c2e0e918d0))
* accidentally removed code in refactor ([affd51d](affd51d2c1))
* add missing `trimIndent()` to string literals ([046d1f0](046d1f05f7))
* add missing opcode for `create-button-method` ([c3f5eec](c3f5eec804))
* attempt on all patches ([9e49e71](9e49e71364))
* breaking changes by `revanced-patcher` dependency ([1748cd9](1748cd98a4))
* breaking changes by `revanced-patcher` dependency ([1136371](113637183a))
* breaking changes of the patcher ([acdb444](acdb44477c))
* breaking patcher changes ([6655f4b](6655f4b5e5))
* breaking patcher changes ([32d828f](32d828fc67))
* breaking patcher changes ([923b0d9](923b0d9a01))
* bugfixes in `microg` ([f4e289c](f4e289c8df))
* clean after building ([96f76b2](96f76b2eb5))
* disable `hide-suggestions-patch` patch until fixed ([fb4dc1d](fb4dc1dcfc))
* incorrect endIndex (fixed in Patcher) ([54196e7](54196e70ab))
* loop in `amoled` patch ([15630fe](15630fe9f9))
* migrate patches to latest patcher api changes ([39cf505](39cf505d84))
* missing extension method `doRecursively` ([62c6543](62c6543485))
* modified opcode for `show-video-ads-constructor` ([5cb333d](5cb333d769))
* multiple bugs in patches ([f4d25ae](f4d25aeea2))
* name for `IntegrationsPatch` ([2d1c3ee](2d1c3ee109))
* print instruction index of warning ([a63db11](a63db11046))
* publish releases ([fa3f6e2](fa3f6e2f33))
* remove `HideSuggestionsPatch` from `Index` ([0c16b51](0c16b51e93))
* remove unused patches ([7a0ae2d](7a0ae2d56a))
* signature checker with changes of patcher ([34449ab](34449abe41))
* spelling mistake ([eb97257](eb97257c41))
* tests failing ([51aeebe](51aeebe1e8))
* update `HomeAdsPatch` ([529fa1e](529fa1edff))
* update patches ([e6f3b3c](e6f3b3cd21))
* use the latest version of patcher dependency ([e09f25c](e09f25cb75))
* version in package metadata of music ([c6dae56](c6dae56521))
* **VideoAds:** remove `istore1` opcode ([ba1103a](ba1103aca3))
* write while reading resources and remove checking for "." in resource extensions ([017bcfa](017bcfa04d))
* wrong access flag in signature for `Create button patch` ([2f2a0ff](2f2a0ff5e3))
* wrong annotation and signature in patches ([a91432f](a91432f6ca))
* wrong opcode for `create-button-method` ([067d530](067d530901))
* wrong opcode pattern for `create-button-method` ([42253f0](42253f016a))
* wrong opcode pattern for `enable-seekbar-tapping-signature` ([38d77be](38d77be08b))
* wrong opcode pattern for signature in `Hide suggestions patch` ([51c45c6](51c45c636f))
* wrong patches in `upgrade-tab-remover` ([08b4294](08b4294f5e))
* wrong signature for `hide-reels-signature` ([9987679](9987679f66))
* wrong signatures for patch `Old Quality Layout Patch` ([d29329f](d29329fb32))
* wrong versions of patches ([89dcb56](89dcb56a9f))

### Code Refactoring

* Rename `net.revanced` to `app.revanced` ([510eb50](510eb50968))

### Features

* `Dependencies` annotation ([73adc6f](73adc6f98c))
* `GeneralBytecodeAds` and `GeneralResourceAds` patch ([05ee34c](05ee34c756))
* `hide-shorts-button` patch ([d6d6438](d6d6438110))
* `tastebuilder-remover` for music ([51a061f](51a061fe2d))
* Add (WIP) Signature Checker ([38761e8](38761e8e26))
* add `amoled` patch ([27f6aa5](27f6aa5b7b))
* add home ads patch ([024ecb2](024ecb2fb0))
* add patches compatibility to the newest version ([4e85cc4](4e85cc4cbb))
* add publishing to package registry ([675367a](675367a4ea))
* add semantic-release ([1ea323f](1ea323faae))
* added `codecs-unlock` patch ([5114ae1](5114ae1a2a))
* begin `MicroG Patch` ([e757e13](e757e13987))
* display metadata for each signature in `SignatureChecker` ([8b5d316](8b5d316ad3))
* get required register dynamically ([f65199c](f65199c028))
* Initial commit ([ce29098](ce29098d8a))
* integrations patch ([61554ce](61554ce809))
* migrate to dalvik patches ([d01658c](d01658c840))
* MinimizedPlayback, CreateButtonRemover ([d35496b](d35496b453))
* OldQualityLayout, HideSuggestions, HideReels, EnableSeekbarTapping ([084fc60](084fc60d3f))
* Patches for YouTube Music ([385c278](385c278e05))
* remove obsolete patch `Hide suggestions patch` ([9cb59b4](9cb59b44e3))
* update MicroG patch to latest version ([45c75cf](45c75cfb0e))
* update patches to latest version ([dd0d58f](dd0d58fc3b))
* use supplier instead of KClass ([bf2b2ae](bf2b2ae791))
* use supplier instead of KClass ([790c84a](790c84a00e))

### BREAKING CHANGES

* signature of patches was changed
* signature of patches was changed
* Package name was changed from "net.revanced" to "app.revanced"
2022-06-05 06:48:27 +00:00
oSumAtrIX
0aabe37152 chore: bump patcher dependency 2022-06-05 08:14:58 +02:00
semantic-release-bot
89bb26b09c chore(release): 1.0.0-dev.16 [skip ci]
# [1.0.0-dev.16](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.15...v1.0.0-dev.16) (2022-06-05)

### Features

* add patches compatibility to the newest version ([4e85cc4](4e85cc4cbb))
2022-06-05 05:58:45 +00:00
oSumAtrIX
4e85cc4cbb feat: add patches compatibility to the newest version 2022-06-05 07:57:25 +02:00
semantic-release-bot
771f237990 chore(release): 1.0.0-dev.15 [skip ci]
# [1.0.0-dev.15](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.14...v1.0.0-dev.15) (2022-06-05)

### Bug Fixes

* remove unused patches ([7a0ae2d](7a0ae2d56a))
2022-06-05 05:27:17 +00:00
oSumAtrIX
4d17ff4fb4 style: move extension and utility methods to their own classes 2022-06-05 07:25:51 +02:00
oSumAtrIX
7a0ae2d56a fix: remove unused patches 2022-06-05 07:25:40 +02:00
semantic-release-bot
71a08ca5eb chore(release): 1.0.0-dev.14 [skip ci]
# [1.0.0-dev.14](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.13...v1.0.0-dev.14) (2022-06-04)

### Bug Fixes

* spelling mistake ([eb97257](eb97257c41))

### Features

* `Dependencies` annotation ([73adc6f](73adc6f98c))
* `GeneralBytecodeAds` and `GeneralResourceAds` patch ([05ee34c](05ee34c756))
2022-06-04 00:34:59 +00:00
oSumAtrIX
4ba5b324a6 chore: bump patcher dependency 2022-06-04 02:33:08 +02:00
oSumAtrIX
05ee34c756 feat: GeneralBytecodeAds and GeneralResourceAds patch 2022-06-04 02:27:02 +02:00
oSumAtrIX
73adc6f98c feat: Dependencies annotation 2022-06-03 17:52:30 +02:00
oSumAtrIX
eb97257c41 fix: spelling mistake 2022-06-03 17:38:56 +02:00
semantic-release-bot
9d99df6f31 chore(release): 1.0.0-dev.13 [skip ci]
# [1.0.0-dev.13](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.12...v1.0.0-dev.13) (2022-05-31)

### Bug Fixes

* migrate patches to latest patcher api changes ([39cf505](39cf505d84))
* missing extension method `doRecursively` ([62c6543](62c6543485))
2022-05-31 23:53:49 +00:00
oSumAtrIX
62c6543485 fix: missing extension method doRecursively 2022-06-01 01:50:01 +02:00
oSumAtrIX
39cf505d84 fix: migrate patches to latest patcher api changes 2022-06-01 01:40:57 +02:00
semantic-release-bot
f55ad46322 chore(release): 1.0.0-dev.12 [skip ci]
# [1.0.0-dev.12](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.11...v1.0.0-dev.12) (2022-05-28)

### Bug Fixes

* wrong annotation and signature in patches ([a91432f](a91432f6ca))
2022-05-28 12:33:20 +00:00
oSumAtrIX
a91432f6ca fix: wrong annotation and signature in patches 2022-05-28 14:31:20 +02:00
semantic-release-bot
15cf96aac7 chore(release): 1.0.0-dev.11 [skip ci]
# [1.0.0-dev.11](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.10...v1.0.0-dev.11) (2022-05-26)

### Bug Fixes

* breaking changes by `revanced-patcher` dependency ([1136371](113637183a))
* breaking patcher changes ([6655f4b](6655f4b5e5))
* breaking patcher changes ([32d828f](32d828fc67))
* bugfixes in `microg` ([f4e289c](f4e289c8df))
* write while reading resources and remove checking for "." in resource extensions ([017bcfa](017bcfa04d))

### Features

* begin `MicroG Patch` ([e757e13](e757e13987))
* update MicroG patch to latest version ([45c75cf](45c75cfb0e))
2022-05-26 02:22:41 +00:00
semantic-release-bot
813529944b chore(release): 1.0.0-dev.11 [skip ci]
# [1.0.0-dev.11](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.10...v1.0.0-dev.11) (2022-05-26)

### Bug Fixes

* breaking changes by `revanced-patcher` dependency ([1136371](113637183a))
* breaking patcher changes ([6655f4b](6655f4b5e5))
* breaking patcher changes ([32d828f](32d828fc67))
* bugfixes in `microg` ([f4e289c](f4e289c8df))
* write while reading resources and remove checking for "." in resource extensions ([017bcfa](017bcfa04d))

### Features

* begin `MicroG Patch` ([e757e13](e757e13987))
* update MicroG patch to latest version ([45c75cf](45c75cfb0e))
2022-05-26 02:19:09 +00:00
oSumAtrIX
eef7d863cb chore: update gradlew wrapper 2022-05-26 03:54:01 +02:00
oSumAtrIX
255f00dd63 chore: update dependencies 2022-05-26 03:53:56 +02:00
oSumAtrIX
f4e289c8df fix: bugfixes in microg 2022-05-26 03:47:11 +02:00
oSumAtrIX
017bcfa04d fix: write while reading resources and remove checking for "." in resource extensions
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-24 02:02:39 +02:00
oSumAtrIX
da81df06ff chore: update kotlin jvm
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-24 00:17:01 +02:00
oSumAtrIX
38c06e2d6f chore: update matching method names for microg patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-23 21:14:43 +02:00
oSumAtrIX
e9fe8d4d12 Merge branch 'dev' into microg-dalvik-patch 2022-05-23 21:07:08 +02:00
oSumAtrIX
bb356cb71c chore: update dependencies
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-23 21:00:27 +02:00
oSumAtrIX
45c75cfb0e feat: update MicroG patch to latest version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-22 17:41:59 +02:00
oSumAtrIX
08aad61b61 Merge branch 'dev' into microg-dalvik-patch
# Conflicts:
#	src/main/kotlin/app/revanced/patches/Index.kt
#	src/main/kotlin/app/revanced/patches/music/audio/codecs/patch/CodecsUnlockPatch.kt
#	src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/patch/ExclusiveAudioPatch.kt
#	src/main/kotlin/app/revanced/patches/music/layout/tastebuilder/patch/RemoveTasteBuilderPatch.kt
#	src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/patch/RemoveUpgradeButtonPatch.kt
#	src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/patch/BackgroundPlayPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/home/annotation/PromotionsCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/home/patch/HomeAdsPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/home/patch/PromotionsPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/home/signatures/PromotedDiscoveryActionParentSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/home/signatures/PromotedDiscoveryAppParentSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/ad/video/signatures/ShowVideoAdsConstructorSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/signatures/SeekbarTappingParentSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/signatures/SeekbarTappingSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/annotations/CreateButtonCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/signatures/CreateButtonSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/minimizedplayback/patch/MinimizedPlaybackPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/minimizedplayback/signatures/MinimizedPlaybackManagerSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/reels/patch/HideReelsPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/reels/signatures/HideReelsSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/annotations/ShortsButtonCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/signatures/PivotBarButtonTabenumSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/signatures/PivotBarButtonsViewSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt
#	src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/misc/integrations/signatures/InitSignature.kt
#	src/main/kotlin/app/revanced/patches/youtube/misc/manifest/annotations/FixLocaleConfigErrorCompatibility.kt
#	src/test/kotlin/app/revanced/patches/SignatureChecker.kt
2022-05-22 17:38:18 +02:00
semantic-release-bot
dd1981a086 chore(release): 1.0.0-dev.10 [skip ci]
# [1.0.0-dev.10](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.9...v1.0.0-dev.10) (2022-05-22)

### Bug Fixes

* `create-button-signature` ([a2038a0](a2038a0507))
* breaking changes by `revanced-patcher` dependency ([1748cd9](1748cd98a4))
* loop in `amoled` patch ([15630fe](15630fe9f9))

### Features

* add `amoled` patch ([27f6aa5](27f6aa5b7b))
* update patches to latest version ([dd0d58f](dd0d58fc3b))
2022-05-22 15:27:30 +00:00
oSumAtrIX
abf42a89c5 add: workflow dispatch 2022-05-22 17:26:22 +02:00
oSumAtrIX
7dfcf3b730 Merge pull request #14 from revanced/annotations
fix: migrate to annotatated patches
2022-05-22 17:15:21 +02:00
oSumAtrIX
dd0d58fc3b feat: update patches to latest version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-22 17:11:34 +02:00
epicsampler
15630fe9f9 fix: loop in amoled patch 2022-05-22 14:34:36 +00:00
epicsampler
27f6aa5b7b feat: add amoled patch 2022-05-22 14:31:17 +00:00
epicsampler
a2038a0507 fix: create-button-signature 2022-05-22 14:17:32 +00:00
oSumAtrIX
1748cd98a4 fix: breaking changes by revanced-patcher dependency
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-22 13:43:41 +02:00
oSumAtrIX
0c3b512fe3 Merge branch 'annotations' into microg-dalvik-patch 2022-05-21 20:46:28 +02:00
oSumAtrIX
113637183a fix: breaking changes by revanced-patcher dependency
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-18 23:58:54 +02:00
oSumAtrIX
595e0ed37e Merge remote-tracking branch 'origin/microg-dalvik-patch' into microg-dalvik-patch
# Conflicts:
#	src/main/kotlin/app/revanced/patches/Index.kt
2022-05-18 03:16:40 +02:00
oSumAtrIX
6655f4b5e5 fix: breaking patcher changes
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-18 03:16:07 +02:00
oSumAtrIX
8798780d22 refactor: furthermore implement logic for MicroGPatch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-18 03:15:02 +02:00
oSumAtrIX
edbd40563f refactor: MicroGPatch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-18 03:15:00 +02:00
semantic-release-bot
96e7aed843 chore(release): 1.0.0-dev.9 [skip ci]
# [1.0.0-dev.9](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.8...v1.0.0-dev.9) (2022-05-13)

### Bug Fixes

* clean after building ([96f76b2](96f76b2eb5))
2022-05-13 18:11:26 +00:00
Sculas
96f76b2eb5 fix: clean after building 2022-05-13 20:10:09 +02:00
semantic-release-bot
f25c8d2cd1 chore(release): 1.0.0-dev.8 [skip ci]
# [1.0.0-dev.8](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.7...v1.0.0-dev.8) (2022-05-13)

### Bug Fixes

* publish releases ([fa3f6e2](fa3f6e2f33))
2022-05-13 18:07:43 +00:00
Sculas
fa3f6e2f33 fix: publish releases 2022-05-13 20:06:34 +02:00
semantic-release-bot
c2aa3b8365 chore(release): 1.0.0-dev.7 [skip ci]
# [1.0.0-dev.7](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.6...v1.0.0-dev.7) (2022-05-07)

### Bug Fixes

* use the latest version of patcher dependency ([e09f25c](e09f25cb75))
2022-05-07 19:43:22 +00:00
oSumAtrIX
e09f25cb75 fix: use the latest version of patcher dependency
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-07 21:42:18 +02:00
oSumAtrIX
0207d08c17 chore: bump project JDK to JDK 17
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-07 21:37:05 +02:00
oSumAtrIX
ae1127c02d Merge remote-tracking branch 'origin/dev' into dev 2022-05-07 21:26:40 +02:00
oSumAtrIX
e49fb3c969 chore: bump java-version for action setup-java
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-07 21:26:33 +02:00
semantic-release-bot
80462bbe1c chore(release): 1.0.0-dev.6 [skip ci]
# [1.0.0-dev.6](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.5...v1.0.0-dev.6) (2022-05-07)

### Bug Fixes

* update patches ([e6f3b3c](e6f3b3cd21))
2022-05-07 16:10:49 +00:00
oSumAtrIX
cc5634851a Merge branch 'dev' into microg-dalvik-patch 2022-05-07 18:09:42 +02:00
oSumAtrIX
8043396ee4 Merge pull request #13 from revanced/patch-update
Update YouTube patches to `17.17.34`
2022-05-07 18:09:26 +02:00
oSumAtrIX
70bfd792bf Merge branch 'dev' into patch-update 2022-05-07 18:01:39 +02:00
oSumAtrIX
e6f3b3cd21 fix: update patches
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-07 17:50:22 +02:00
semantic-release-bot
364155f683 chore(release): 1.0.0-dev.5 [skip ci]
# [1.0.0-dev.5](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.4...v1.0.0-dev.5) (2022-05-07)

### Bug Fixes

* `enable-seekbar-tapping` patch ([af4d514](af4d514038))
* `Index` in wrong package ([0a57a1d](0a57a1d1c1))
* `minimized-playback` & `old-quality-layout` wrong opcodes ([c36c5f8](c36c5f80b4))
* `minimized-playback` patch ([cc558b3](cc558b35e9))
* `SignatureChecker` not handling nullable field `methodMetadata` ([c2e0e91](c2e0e918d0))
* accidentally removed code in refactor ([affd51d](affd51d2c1))
* add missing `trimIndent()` to string literals ([046d1f0](046d1f05f7))
* add missing opcode for `create-button-method` ([c3f5eec](c3f5eec804))
* attempt on all patches ([9e49e71](9e49e71364))
* breaking changes of the patcher ([acdb444](acdb44477c))
* breaking patcher changes ([923b0d9](923b0d9a01))
* disable `hide-suggestions-patch` patch until fixed ([fb4dc1d](fb4dc1dcfc))
* incorrect endIndex (fixed in Patcher) ([54196e7](54196e70ab))
* modified opcode for `show-video-ads-constructor` ([5cb333d](5cb333d769))
* multiple bugs in patches ([f4d25ae](f4d25aeea2))
* name for `IntegrationsPatch` ([2d1c3ee](2d1c3ee109))
* print instruction index of warning ([a63db11](a63db11046))
* remove `HideSuggestionsPatch` from `Index` ([0c16b51](0c16b51e93))
* signature checker with changes of patcher ([34449ab](34449abe41))
* tests failing ([51aeebe](51aeebe1e8))
* update `HomeAdsPatch` ([529fa1e](529fa1edff))
* version in package metadata of music ([c6dae56](c6dae56521))
* **VideoAds:** remove `istore1` opcode ([ba1103a](ba1103aca3))
* wrong access flag in signature for `Create button patch` ([2f2a0ff](2f2a0ff5e3))
* wrong opcode for `create-button-method` ([067d530](067d530901))
* wrong opcode pattern for `create-button-method` ([42253f0](42253f016a))
* wrong opcode pattern for `enable-seekbar-tapping-signature` ([38d77be](38d77be08b))
* wrong opcode pattern for signature in `Hide suggestions patch` ([51c45c6](51c45c636f))
* wrong patches in `upgrade-tab-remover` ([08b4294](08b4294f5e))
* wrong signature for `hide-reels-signature` ([9987679](9987679f66))
* wrong signatures for patch `Old Quality Layout Patch` ([d29329f](d29329fb32))
* wrong versions of patches ([89dcb56](89dcb56a9f))

### Features

* `hide-shorts-button` patch ([d6d6438](d6d6438110))
* `tastebuilder-remover` for music ([51a061f](51a061fe2d))
* Add (WIP) Signature Checker ([38761e8](38761e8e26))
* add home ads patch ([024ecb2](024ecb2fb0))
* added `codecs-unlock` patch ([5114ae1](5114ae1a2a))
* display metadata for each signature in `SignatureChecker` ([8b5d316](8b5d316ad3))
* get required register dynamically ([f65199c](f65199c028))
* integrations patch ([61554ce](61554ce809))
* migrate to dalvik patches ([d01658c](d01658c840))
* Patches for YouTube Music ([385c278](385c278e05))
* remove obsolete patch `Hide suggestions patch` ([9cb59b4](9cb59b44e3))
2022-05-07 03:36:21 +00:00
oSumAtrIX
24245b8d53 Merge pull request #2 from revanced/dalvik-patches
feat: migrate to Dalvik patches
2022-05-07 05:34:16 +02:00
oSumAtrIX
51aeebe1e8 fix: tests failing
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-07 05:31:29 +02:00
oSumAtrIX
6f72b84a32 Merge pull request #12 from autergame/dalvik-patches
Replace ReVancedTeam with revanced in build.gradle.kts
2022-05-07 05:23:42 +02:00
oSumAtrIX
2ea7ccdf43 Migrate to new organization 2022-05-07 01:23:58 +02:00
autergame
2aa5c2d611 Replace ReVancedTeam with revanced in build.gradle.kts 2022-05-06 20:22:28 -03:00
oSumAtrIX
1d1a20f7aa Merge branch 'dalvik-patches' into microg-dalvik-patch 2022-05-06 16:53:07 +02:00
oSumAtrIX
34f6dcfc63 Merge pull request #11 from Iamlooker/dalvik-patches
fix: build broken by 5cf23a7
2022-05-06 16:50:58 +02:00
LooKeR
a182ff5bdb Fix build broken by 5cf23a7 2022-05-06 13:39:29 +05:30
oSumAtrIX
32d828fc67 fix: breaking patcher changes
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-05 00:04:14 +02:00
oSumAtrIX
927e12791b Merge branch 'dalvik-patches' into microg-dalvik-patch
# Conflicts:
#	src/main/kotlin/app/revanced/patches/Index.kt
#	src/main/kotlin/app/revanced/patches/youtube/misc/MicroGPatch.kt
2022-05-05 00:02:03 +02:00
oSumAtrIX
8242fde8f1 Merge pull request #8 from ReVancedTeam/migrate-to-resource-patcher
add: resource patcher
2022-05-04 23:57:59 +02:00
oSumAtrIX
923b0d9a01 fix: breaking patcher changes
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-04 23:52:50 +02:00
oSumAtrIX
98ce25d50f add: resource patcher
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-05-04 23:50:45 +02:00
oSumAtrIX
5cf23a72d2 Merge pull request #7 from ReVancedTeam/music-patches
feat: `YouTube Music` patches
2022-04-28 23:38:03 +02:00
epicsampler
7193575eee refactor: YouTube Music patches 2022-04-28 23:30:31 +02:00
epicsampler
51a061fe2d feat: tastebuilder-remover for music 2022-04-28 15:47:08 +00:00
epicsampler
c6dae56521 fix: version in package metadata of music 2022-04-28 15:02:57 +00:00
oSumAtrIX
08b4294f5e fix: wrong patches in upgrade-tab-remover
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-04-27 03:06:52 +02:00
epicsampler
5114ae1a2a feat: added codecs-unlock patch 2022-04-26 21:44:02 +00:00
oSumAtrIX
385c278e05 feat: Patches for YouTube Music
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-04-26 23:10:36 +02:00
oSumAtrIX
2fbefea52c Merge branch 'dalvik-patches' into microg-dalvik-patch 2022-04-21 19:44:55 +02:00
oSumAtrIX
529fa1edff fix: update HomeAdsPatch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-04-21 19:44:44 +02:00
oSumAtrIX
291441c5d7 refactor: furthermore implement logic for MicroGPatch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-04-20 02:44:56 +02:00
oSumAtrIX
a08c4429d0 Merge branch 'dalvik-patches' into microg-dalvik-patch 2022-04-19 20:01:18 +02:00
oSumAtrIX
426597889f refactor: MicroGPatch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-04-19 20:00:50 +02:00
oSumAtrIX
a80fc38b60 Merge pull request #4 from j4k0xb/dalvik-patches
feat: `hide-shorts-button` patch
2022-04-19 18:17:03 +02:00
j4k0xb
d6d6438110 feat: hide-shorts-button patch 2022-04-19 17:51:45 +02:00
oSumAtrIX
e757e13987 feat: begin MicroG Patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-04-19 02:00:48 +02:00
oSumAtrIX
acdb44477c fix: breaking changes of the patcher 2022-04-18 18:41:26 +02:00
oSumAtrIX
1a3fed3b65 Merge remote-tracking branch 'origin/dalvik-patches' into dalvik-patches 2022-04-18 18:01:33 +02:00
oSumAtrIX
5877714361 refactor: remove .trimIndent() from each MethodSignatureMetadata description 2022-04-18 18:01:23 +02:00
oSumAtrIX
57f506dbfd add: HomePromoPatch (#3)
* add: `HomePromoPatch`

* fix: `HomePromoPatch` using the last signature in loop
2022-04-18 18:00:10 +02:00
oSumAtrIX
c2e0e918d0 fix: SignatureChecker not handling nullable field methodMetadata 2022-04-18 17:16:28 +02:00
oSumAtrIX
8b5d316ad3 feat: display metadata for each signature in SignatureChecker 2022-04-17 18:46:27 +02:00
oSumAtrIX
2d1c3ee109 fix: name for IntegrationsPatch 2022-04-17 18:45:38 +02:00
baiorett
89d5b08d85 Merge remote-tracking branch 'origin/dalvik-patches' into dalvik-patches 2022-04-16 23:52:08 +03:00
baiorett
024ecb2fb0 feat: add home ads patch 2022-04-16 23:46:40 +03:00
Lucaskyy
54196e70ab fix: incorrect endIndex (fixed in Patcher) 2022-04-16 21:42:02 +02:00
Lucaskyy
b67dec3294 revert: "fix: wrong signature for hide-reels-signature"
This reverts commit 22d8791ac6.
2022-04-15 21:32:17 +02:00
Lucaskyy
22d8791ac6 fix: wrong signature for hide-reels-signature 2022-04-15 11:55:58 +02:00
Lucaskyy
34449abe41 fix: signature checker with changes of patcher 2022-04-15 11:55:35 +02:00
oSumAtrIX
42253f016a fix: wrong opcode pattern for create-button-method 2022-04-15 06:31:15 +02:00
oSumAtrIX
89dcb56a9f fix: wrong versions of patches 2022-04-15 05:28:30 +02:00
oSumAtrIX
0c16b51e93 fix: remove HideSuggestionsPatch from Index 2022-04-15 04:58:11 +02:00
oSumAtrIX
d29329fb32 fix: wrong signatures for patch Old Quality Layout Patch 2022-04-15 04:57:51 +02:00
oSumAtrIX
9cb59b44e3 feat: remove obsolete patch Hide suggestions patch 2022-04-15 04:56:58 +02:00
oSumAtrIX
9987679f66 fix: wrong signature for hide-reels-signature 2022-04-15 04:56:17 +02:00
oSumAtrIX
38d77be08b fix: wrong opcode pattern for enable-seekbar-tapping-signature 2022-04-15 04:53:34 +02:00
oSumAtrIX
f65199c028 feat: get required register dynamically 2022-04-14 22:59:26 +02:00
Lucaskyy
a63db11046 fix: print instruction index of warning 2022-04-14 21:48:46 +02:00
Lucaskyy
78d1c97aa1 refactor: finalize Signature Checker 2022-04-14 21:47:43 +02:00
Lucaskyy
affd51d2c1 fix: accidentally removed code in refactor 2022-04-14 20:07:01 +02:00
Lucaskyy
067d530901 fix: wrong opcode for create-button-method
Added in latest(?) version of the app.
2022-04-14 20:00:45 +02:00
Lucaskyy
c46c150629 refactor: print surrounding opcodes of a warning 2022-04-14 19:58:55 +02:00
Lucaskyy
5cb333d769 fix: modified opcode for show-video-ads-constructor
Modified in latest(?) version of the app.
2022-04-14 19:58:24 +02:00
Lucaskyy
c3f5eec804 fix: add missing opcode for create-button-method
Added in latest(?) version of the app.
2022-04-14 19:57:00 +02:00
Lucaskyy
38761e8e26 feat: Add (WIP) Signature Checker 2022-04-14 19:19:43 +02:00
Lucaskyy
a55fa685f6 chore: upgrade Kotlin & add test library 2022-04-14 19:19:26 +02:00
Lucaskyy
c36c5f80b4 fix: minimized-playback & old-quality-layout wrong opcodes 2022-04-14 19:18:34 +02:00
Lucaskyy
9fa44443fa chore: clarify order of writing in EnableSeekbarTappingPatch.kt 2022-04-14 18:47:26 +02:00
Lucaskyy
858468dc1d refactor: remove all parameter names
also fixed some warnings.
2022-04-14 18:45:34 +02:00
Lucaskyy
dcc825088c Merge remote-tracking branch 'origin/dalvik-patches' into dalvik-patches 2022-04-14 12:13:38 +02:00
Lucaskyy
f073388b9a refactor: make patches compatible with breaking changes of the patcher
also commented HideSuggestionsPatch.kt so warnings suppressed
2022-04-14 12:11:24 +02:00
Lucaskyy
97e1b65900 refactor: replace Array with List 2022-04-14 11:58:25 +02:00
oSumAtrIX
046d1f05f7 fix: add missing trimIndent() to string literals
Co-authored-by: Sculas <contact@sculas.xyz>
2022-04-14 11:50:15 +02:00
oSumAtrIX
51c45c636f fix: wrong opcode pattern for signature in Hide suggestions patch 2022-04-14 11:01:25 +02:00
oSumAtrIX
2f2a0ff5e3 fix: wrong access flag in signature for Create button patch 2022-04-14 11:01:04 +02:00
oSumAtrIX
0a57a1d1c1 fix: Index in wrong package 2022-04-14 10:39:15 +02:00
oSumAtrIX
dc59fe1b22 refactor: make patches compatible with breaking changes of the patcher 2022-04-14 10:17:53 +02:00
oSumAtrIX
73a47dc3f6 refact: include each signature in its corresponding patch 2022-04-14 08:49:11 +02:00
Lucaskyy
d474d669e6 refactor: start migrating some signatures to Kotlin 2022-04-13 21:47:09 +02:00
Lucaskyy
ecacfd72e8 refactor: make patches compatible with the newest patcher 2022-04-13 21:25:50 +02:00
oSumAtrIX
fb4dc1dcfc fix: disable hide-suggestions-patch patch until fixed 2022-04-13 05:18:51 +02:00
oSumAtrIX
af4d514038 fix: enable-seekbar-tapping patch 2022-04-13 05:18:12 +02:00
oSumAtrIX
cc558b35e9 fix: minimized-playback patch 2022-04-13 00:16:20 +02:00
oSumAtrIX
ab234789cc refact: use kebab-case for VideoAds patch 2022-04-12 21:10:11 +02:00
oSumAtrIX
61554ce809 feat: integrations patch 2022-04-12 20:59:06 +02:00
Lucaskyy
65c6794a7c Merge remote-tracking branch 'origin/dalvik-patches' into dalvik-patches 2022-04-11 16:41:44 +02:00
Lucaskyy
051e80cc2b refactor: make patches compatible with the newest patcher 2022-04-11 16:41:29 +02:00
oSumAtrIX
f4d25aeea2 fix: multiple bugs in patches 2022-04-10 05:13:20 +02:00
Lucaskyy
95be597eab chore: publish and get from maven local 2022-04-10 00:51:24 +02:00
oSumAtrIX
9e49e71364 fix: attempt on all patches 2022-04-09 22:59:51 +02:00
oSumAtrIX
d01658c840 feat: migrate to dalvik patches 2022-04-07 22:41:55 +02:00
Lucaskyy
ba1103aca3 fix(VideoAds): remove istore1 opcode 2022-03-24 22:02:45 +01:00
semantic-release-bot
85236c57b8 chore(release): 1.0.0-dev.4 [skip ci]
# [1.0.0-dev.4](https://github.com/ReVancedTeam/revanced-patches/compare/v1.0.0-dev.3...v1.0.0-dev.4) (2022-03-22)

### Features

* use supplier instead of KClass ([bf2b2ae](bf2b2ae791))
* use supplier instead of KClass ([790c84a](790c84a00e))

### BREAKING CHANGES

* signature of patches was changed
* signature of patches was changed
2022-03-22 21:26:34 +00:00
Lucaskyy
bf2b2ae791 feat: use supplier instead of KClass
BREAKING CHANGE: signature of patches was changed
2022-03-22 22:24:56 +01:00
Lucaskyy
9e1dac57e7 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	src/main/kotlin/app/revanced/patches/Index.kt
2022-03-22 22:23:57 +01:00
Lucaskyy
790c84a00e feat: use supplier instead of KClass
BREAKING CHANGE: signature of patches was changed
2022-03-22 22:22:46 +01:00
semantic-release-bot
d32424bc42 chore(release): 1.0.0-dev.3 [skip ci]
# [1.0.0-dev.3](https://github.com/ReVancedTeam/revanced-patches/compare/v1.0.0-dev.2...v1.0.0-dev.3) (2022-03-21)

### Features

* OldQualityLayout, HideSuggestions, HideReels, EnableSeekbarTapping ([084fc60](084fc60d3f))
2022-03-21 23:56:40 +00:00
oSumAtrIX
084fc60d3f feat: OldQualityLayout, HideSuggestions, HideReels, EnableSeekbarTapping 2022-03-22 00:55:42 +01:00
semantic-release-bot
4bfd46fa94 chore(release): 1.0.0-dev.2 [skip ci]
# [1.0.0-dev.2](https://github.com/ReVancedTeam/revanced-patches/compare/v1.0.0-dev.1...v1.0.0-dev.2) (2022-03-21)

### Code Refactoring

* Rename `net.revanced` to `app.revanced` ([510eb50](510eb50968))

### BREAKING CHANGES

* Package name was changed from "net.revanced" to "app.revanced"
2022-03-21 21:07:19 +00:00
Lucaskyy
510eb50968 refactor: Rename net.revanced to app.revanced
BREAKING CHANGE: Package name was changed from "net.revanced" to "app.revanced"
2022-03-21 22:06:24 +01:00
303 changed files with 12045 additions and 161 deletions

61
.github/ISSUE_TEMPLATE/bug-issue.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: 🐞 Bug report
description: Report a very clearly broken issue.
title: 'bug: <title>'
labels: [bug]
body:
- type: markdown
attributes:
value: |
# ReVanced bug report
Important to note that your issue may have already been reported before. Please check for existing issues [here](https://github.com/revanced/revanced-patches/labels/bug).
- type: dropdown
attributes:
label: Type
options:
- Error while patching
- Error at runtime
- Cosmetic
- Other
validations:
required: true
- type: textarea
attributes:
label: Bug description
description: How did you find the bug? Any additional details that might help?
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Add the steps to reproduce this bug including your environment.
placeholder: Step 1. Download some files. Step 2. ...
validations:
required: true
- type: textarea
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
attributes:
label: Screenshots or videos
description: Add screenshots or videos that show the bug here.
placeholder: Drag and drop the screenshots/videos into this box.
validations:
required: false
- type: textarea
attributes:
label: Solution
description: If applicable, add a possible solution.
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add additional context here.
validations:
required: false

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 📃 Documentation
url: https://github.com/revanced/revanced-documentation/
about: Don't know how or where to start? Check out our documentation!
- name: 🗨 Discussions
url: https://github.com/revanced/revanced-suggestions/discussions
about: Got something you think should change or be added? Search for or start a new discussion!

View File

@@ -0,0 +1,46 @@
name: ⭐ Feature request
description: Create a detailed feature request.
title: 'feat: <title>'
labels: [feature-request]
body:
- type: markdown
attributes:
value: |
# ReVanced feature request
Do not submit requests for patches here. Please submit them [here](https://github.com/orgs/revanced/discussions/categories/patches) instead.
Important to note that your feature request may have already been made before. Please check for existing feature requests [here](https://github.com/revanced/revanced-patches/labels/feature-request).
- type: dropdown
attributes:
label: Type
options:
- Functionality
- Cosmetic
- Other
validations:
required: true
- type: textarea
attributes:
label: Issue
description: What is the current problem. Why does it require a feature request?
validations:
required: true
- type: textarea
attributes:
label: Feature
description: Describe your feature in detail. How does it solve the issue?
validations:
required: true
- type: textarea
attributes:
label: Motivation
description: Why should your feature should be considered?
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add additional context here.
validations:
required: false

View File

@@ -1,5 +1,6 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- main
@@ -11,7 +12,7 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -20,19 +21,17 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "lts/*"
- name: Make gradlew executable
run: chmod +x gradlew
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build
run: ./gradlew build clean generateMeta
- name: Install Android build-tools
run: sdkmanager "build-tools;32.0.0"
- name: Setup semantic-release
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
- name: Release

8
.gitignore vendored
View File

@@ -111,4 +111,10 @@ gradle-app.setting
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
# gradle/wrapper/gradle-wrapper.properties
# Potentially copyrighted test APK
*.apk
# Ignore vscode config
.vscode/

2
.idea/misc.xml generated
View File

@@ -4,5 +4,5 @@
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="azul-17" project-jdk-type="JavaSDK" />
</project>

View File

@@ -7,7 +7,11 @@
}
],
"plugins": [
"@semantic-release/commit-analyzer",
["@semantic-release/commit-analyzer", {
"releaseRules": [
{"type": "build", "release": "patch"}
]
}],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
@@ -15,11 +19,25 @@
"@semantic-release/git",
{
"assets": [
"README.md",
"CHANGELOG.md",
"gradle.properties"
"gradle.properties",
"patches.json"
]
}
],
"@semantic-release/github"
[
"@semantic-release/github",
{
"assets": [
{
"path": "build/libs/*.jar"
},
{
"path": "patches.json"
}
]
}
]
]
}

File diff suppressed because it is too large Load Diff

72
README-template.md Normal file
View File

@@ -0,0 +1,72 @@
## 🧩 Patches
The official Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json).
{{ table }}
## 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file.
The file contains an array of objects, each object representing a patch. The object contains the following properties:
| key | description |
|-------------------------------|------------------------------------------------------------------------------------------------------------------|
| `name` | The name of the patch. |
| `description` | The description of the patch. |
| `version` | The version of the patch. |
| `excluded` | Whether a patch is excluded by default. If `true`, the patch must never be included by default. |
| `dependencies` | An array of dependencies, which are patch names. |
| `compatiblePackages` | An array of packages compatible with this patch. |
| `compatiblePackages.name` | The name of the package. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
Example:
```json
[
{
"name": "remember-video-quality",
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
"version": "0.0.1",
"excluded": false,
"dependencies": [
"integrations",
"video-id-hook"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": [
"17.22.36",
"17.24.35",
"17.26.35",
"17.27.39",
"17.28.34",
"17.29.34",
"17.32.35"
]
}
]
},
{
"name": "client-spoof",
"description": "Spoofs the YouTube or Vanced client to prevent playback issues.",
"version": "0.0.1",
"excluded": false,
"dependencies": [],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": []
},
{
"name": "com.vanced.android.youtube",
"versions": []
}
]
}
]
```

169
README.md
View File

@@ -1,2 +1,167 @@
# revanced-patches
Repo for all ReVanced patches
## 🧩 Patches
The official Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json).
### 📦 `com.twitter.android`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
</details>
### 📦 `com.reddit.frontpage`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `premium-icon-reddit` | Unlocking Premium Icons in reddit app. | all |
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
</details>
### 📦 `com.garzotto.pflotsh.ecmwf_a`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 |
</details>
### 📦 `com.google.android.apps.youtube.music`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.17.51 |
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.16.51 |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.17.51 |
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.16.51 |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.17.51 |
| `background-play` | Enables playing music in the background. | 5.17.51 |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.17.51 |
| `music-video-ads` | Removes ads in the music player. | 5.17.51 |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.17.51 |
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.17.51 |
</details>
### 📦 `de.dwd.warnapp`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
</details>
### 📦 `com.ss.android.ugc.trill`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `tiktok-ads` | Removes ads from TikTok. | all |
</details>
### 📦 `com.google.android.youtube`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.32.35 |
| `downloads` | Enables downloading music and videos from YouTube. | 17.32.35 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.32.35 |
| `amoled` | Enables pure black theme. | 17.32.35 |
| `disable-create-button` | Hides the create button in the navigation bar. | 17.32.35 |
| `hide-cast-button` | Hides the cast button in the video player. | all |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.32.35 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.32.35 |
| `premium-heading` | Shows premium branding on the home screen. | all |
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.32.35 |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.32.35 |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.32.35 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.32.35 |
| `sponsorblock` | Integrate SponsorBlock. | 17.32.35 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.32.35 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.32.35 |
| `minimized-playback` | Enables minimized and background playback. | 17.32.35 |
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.32.35 |
| `always-autorepeat` | Always repeats the playing video again. | 17.32.35 |
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.32.35 |
| `settings` | Adds settings for ReVanced to YouTube. | all |
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
| `custom-playback-speed` | Adds more video playback speed options. | 17.32.35 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.32.35 |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.32.35 |
| `video-ads` | Removes ads in the video player. | 17.32.35 |
| `general-ads` | Removes general ads. | 17.32.35 |
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.32.35 |
</details>
## 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file.
The file contains an array of objects, each object representing a patch. The object contains the following properties:
| key | description |
|-------------------------------|------------------------------------------------------------------------------------------------------------------|
| `name` | The name of the patch. |
| `description` | The description of the patch. |
| `version` | The version of the patch. |
| `excluded` | Whether a patch is excluded by default. If `true`, the patch must never be included by default. |
| `dependencies` | An array of dependencies, which are patch names. |
| `compatiblePackages` | An array of packages compatible with this patch. |
| `compatiblePackages.name` | The name of the package. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
Example:
```json
[
{
"name": "remember-video-quality",
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
"version": "0.0.1",
"excluded": false,
"dependencies": [
"integrations",
"video-id-hook"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": [
"17.22.36",
"17.24.35",
"17.26.35",
"17.27.39",
"17.28.34",
"17.29.34",
"17.32.35"
]
}
]
},
{
"name": "client-spoof",
"description": "Spoofs the YouTube or Vanced client to prevent playback issues.",
"version": "0.0.1",
"excluded": false,
"dependencies": [],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": []
},
{
"name": "com.vanced.android.youtube",
"versions": []
}
]
}
]
```

View File

@@ -1,56 +1,69 @@
plugins {
kotlin("jvm") version "1.6.10"
java
`maven-publish`
kotlin("jvm") version "1.7.0"
}
group = "net.revanced"
group = "app.revanced"
val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://maven.pkg.github.com/ReVancedTeam/revanced-patcher") // note the "r"!
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
credentials {
// DO NOT set these variables in the project's gradle.properties.
// Instead, you should set them in:
// Windows: %homepath%\.gradle\gradle.properties
// Linux: ~/.gradle/gradle.properties
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE!
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE!
username = githubUsername
password = githubPassword
}
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.10")
implementation(kotlin("stdlib"))
implementation("org.ow2.asm:asm:9.2")
implementation("org.ow2.asm:asm-util:9.2")
implementation("org.ow2.asm:asm-tree:9.2")
implementation("org.ow2.asm:asm-commons:9.2")
implementation("app.revanced:revanced-patcher:3.3.3")
implementation("app.revanced:multidexlib2:2.5.2.r2")
implementation("net.revanced:revanced-patcher:1.+") // use latest version.
// Required for meta
implementation("com.google.code.gson:gson:2.9.1")
}
java {
withSourcesJar()
withJavadocJar()
}
tasks {
register<DefaultTask>("generateBundle") {
description = "Generate dex files from build and bundle them in the jar file"
dependsOn(build)
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ReVancedTeam/revanced-patches") // note the "s"!
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
doLast {
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
val d8 = "${androidHome}/build-tools/32.0.0/d8"
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
val work = File("${buildDir}/libs")
exec {
workingDir = work
commandLine = listOf(d8, input)
}
exec {
workingDir = work
commandLine = listOf("zip", "-u", input, "classes.dex")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
register<JavaExec>("generateMeta") {
description = "Generate metadata for this bundle"
dependsOn(build)
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("app.revanced.meta.Meta")
}
}
// Dummy task to fix the Gradle semantic-release plugin.
// Remove this if you forked it to support building only.
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
register<DefaultTask>("publish") {
group = "publish"
description = "Dummy task"
dependsOn(named("generateBundle"), named("generateMeta"))
}
}

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 1.0.0-dev.1
version = 2.46.0

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0
gradlew vendored Normal file → Executable file
View File

1
patches.json Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,212 @@
package app.revanced.extensions
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patcher.util.smali.toInstruction
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
import org.w3c.dom.Node
import java.nio.file.Files
// TODO: this method does not make sense here
internal fun MutableMethodImplementation.injectHideCall(
index: Int,
register: Int
) {
this.addInstruction(
index,
"invoke-static { v$register }, Lapp/revanced/integrations/patches/HideHomeAdsPatch;->HideHomeAds(Landroid/view/View;)V".toInstruction()
)
}
/**
* traverse the class hierarchy starting from the given root class
*
* @param targetClass the class to start traversing the class hierarchy from
* @param callback function that is called for every class in the hierarchy
*/
fun BytecodeData.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
callback(targetClass)
this.findClass(targetClass.superclass ?: return)?.resolve()?.let {
traverseClassHierarchy(it, callback)
}
}
/**
* apply a transform to all methods of the class
*
* @param transform the transformation function. original method goes in, transformed method goes out
*/
fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
val transformedMethods = methods.map { it.transform() }
methods.clear()
methods.addAll(transformedMethods)
}
/**
* Insert an event hook at the top of the method. If the hook returns true, the event is consumed and the method will return with true
*
* the hook method MUST return a boolean and MUST take two parameters, like so:
* fun hook(thisRef: Object, eventData: Object): Boolean {}
*
* The final injected code will resemble the following logic:
* if( YouHook(this, event) ) { return true; }
* ...
*
* @param hookRef reference to the hook method
*/
internal fun MutableMethod.injectConsumableEventHook(hookRef: ImmutableMethodReference) {
val isStaticMethod = AccessFlags.STATIC.isSet(this.accessFlags)
this.implementation?.let { impl ->
// create label to index 0 to continue to the normal program flow
val lblContinueNormalFlow = impl.newLabelForIndex(0)
// define registers
/** V0 */
val regV0 = 0
/** this */
val regP0 = impl.registerCount - this.parameters.size - (if (isStaticMethod) 0 else 1)
/** motionEvent */
val regP1 = regP0 + 1
// insert instructions at the start of the method:
// if( Hook(this, event) ) { return true; }
impl.addInstructions(
0, listOf(
// invoke-static { p0, p1 } <hook>
BuilderInstruction35c(
Opcode.INVOKE_STATIC,
2,
regP0,
regP1,
0, 0, 0,
hookRef
),
// move-result v0
BuilderInstruction11x(
Opcode.MOVE_RESULT,
regV0
),
// if-eqz v0, :continue_normal_flow
BuilderInstruction21t(
Opcode.IF_EQZ,
regV0,
lblContinueNormalFlow
),
// const/4 v0, 0x1
BuilderInstruction11n(
Opcode.CONST_4,
regV0,
0x1
),
// return v0
BuilderInstruction11x(
Opcode.RETURN,
regV0
)
// :continue_normal_flow
)
)
}
}
/**
* inject resources into the patched app
*
* @param classLoader classloader to use for loading the resources
* @param patchDirectoryPath path to the files. this will be the directory you created under the 'resources' source folder
* @param resourceType the resource type, for example 'drawable'. this has to match both the source and the target
* @param resourceFileNames names of all resources of this type to inject
*/
fun ResourceData.injectResources(
classLoader: ClassLoader,
patchDirectoryPath: String,
resourceType: String,
resourceFileNames: List<String>
) {
resourceFileNames.forEach { name ->
val relativePath = "$resourceType/$name"
val sourceRes = classLoader.getResourceAsStream("$patchDirectoryPath/$relativePath")
?: throw PatchResultError("could not open resource '$patchDirectoryPath/$relativePath'")
Files.copy(
sourceRes,
this["res"].resolve(relativePath).toPath()
)
}
}
/**
* inject strings into the patched app
*
* @param classLoader classloader to use for loading the resources
* @param patchDirectoryPath path to the files. this will be the directory you created under the 'resources' source folder
* @param languageIdentifier ISO 639-2 two- letter language code identifier (aka the one android uses for values directory)
*/
fun ResourceData.injectStrings(
classLoader: ClassLoader,
patchDirectoryPath: String,
languageIdentifier: String? = null,
) {
val relativePath =
if (languageIdentifier.isNullOrBlank()) "values/strings.xml" else "values/strings-$languageIdentifier.xml"
// open source strings.xml
val sourceInputStream = classLoader.getResourceAsStream("$patchDirectoryPath/$relativePath")
?: throw PatchResultError("failed to open '$patchDirectoryPath/$relativePath'")
xmlEditor[sourceInputStream].use { sourceStringsXml ->
val strings = sourceStringsXml.file.getElementsByTagName("resources").item(0).childNodes
// open target strings.xml
xmlEditor["res/$relativePath"].use { targetStringsXml ->
val targetFile = targetStringsXml.file
val targetRootNode = targetFile.getElementsByTagName("resources").item(0)
// process all children strings in the source
for (i in 0 until strings.length) {
// clone the node from source to target
val node = strings.item(i).cloneNode(true)
targetFile.adoptNode(node)
targetRootNode.appendChild(node)
}
}
}
}
internal fun Node.doRecursively(action: (Node) -> Unit) {
action(this)
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
}
internal fun String.startsWithAny(vararg prefixes: String): Boolean {
for (prefix in prefixes)
if (this.startsWith(prefix))
return true
return false
}
internal fun String.equalsAny(vararg other: String): Boolean {
for (_other in other)
if (this == _other)
return true
return false
}

View File

@@ -0,0 +1,27 @@
package app.revanced.meta
import app.revanced.meta.json.generateJson
import app.revanced.meta.readme.generateText
import app.revanced.patcher.data.Data
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.util.patch.impl.JarPatchBundle
import java.io.File
typealias Bundle = List<Class<out Patch<Data>>>
object Meta {
@JvmStatic
fun main(args: Array<String>) {
val patches = accumulatePatches()
if (patches.isEmpty()) throw IllegalStateException("No patches found")
generateText(patches)
generateJson(patches)
}
}
fun accumulatePatches() = JarPatchBundle(
File("build/libs/").listFiles()!!.first {
it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar")
}.absolutePath
).loadPatches()

View File

@@ -0,0 +1,33 @@
package app.revanced.meta.json
import app.revanced.meta.Bundle
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.dependencies
import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.include
import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.extensions.PatchExtensions.version
import com.google.gson.Gson
import java.io.File
private val gson = Gson()
fun generateJson(bundle: Bundle) {
val patches = bundle.map {
JsonPatch(
it.patchName,
it.description ?: "This patch has no description.",
it.version ?: "0.0.0",
!it.include,
it.dependencies?.map { dep ->
dep.java.patchName
}?.toTypedArray() ?: emptyArray(),
it.compatiblePackages?.map { pkg ->
CompatiblePackage(pkg.name, pkg.versions)
}?.toTypedArray() ?: emptyArray()
)
}
val json = File("patches.json")
json.writeText(gson.toJson(patches))
}

View File

@@ -0,0 +1,17 @@
@file:Suppress("ArrayInDataClass") // We don't need it here.
package app.revanced.meta.json
data class JsonPatch(
val name: String,
val description: String,
val version: String,
val excluded: Boolean,
val dependencies: Array<String>,
val compatiblePackages: Array<CompatiblePackage>,
)
data class CompatiblePackage(
val name: String,
val versions: Array<String>,
)

View File

@@ -0,0 +1,10 @@
package app.revanced.meta.readme
import app.revanced.patcher.data.Data
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.patch.Patch
internal fun Class<out Patch<Data>>.getLatestVersion() =
this.compatiblePackages?.first()?.versions?.map {
SemanticVersion.fromString(it)
}?.maxWithOrNull(SemanticVersionComparator)

View File

@@ -0,0 +1,44 @@
package app.revanced.meta.readme
import app.revanced.meta.Bundle
import app.revanced.patcher.data.Data
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.patch.Patch
import java.io.File
private const val TABLE_HEADER =
"| \uD83D\uDC8A Patch | \uD83D\uDCDC Description | \uD83C\uDFF9 Target Version |\n" + "|:--------:|:--------------:|:-----------------:|"
private val TABLE_REGEX = Regex("\\{\\{\\s?table\\s?}}")
fun generateText(bundle: Bundle) {
val output = StringBuilder()
val packages = mutableMapOf<String, MutableList<Class<out Patch<Data>>>>()
bundle.map {
val packageName = it.compatiblePackages?.first()?.name!!
if (!packages.contains(packageName)) {
packages[packageName] = mutableListOf()
}
packages[packageName]?.add(it)
}
for (pkg in packages) {
output.appendLine("### \uD83D\uDCE6 `${pkg.key}`")
output.appendLine("<details>\n")
output.appendLine(TABLE_HEADER)
pkg.value.forEach { output.appendLine("| `${it.patchName}` | ${it.description} | ${it.getLatestVersion() ?: "all"} |") }
output.appendLine("</details>\n")
}
val readmeTemplate = Template(File("README-template.md").readText())
readmeTemplate.replaceVariable(TABLE_REGEX, output.toString())
val readme = File("README.md")
readme.writeText(readmeTemplate.toString())
}

View File

@@ -0,0 +1,22 @@
package app.revanced.meta.readme
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int) {
companion object {
fun fromString(version: String): SemanticVersion {
val parts = version.split(".")
if (parts.count() != 3) throw IllegalArgumentException("Invalid semantic version")
val versionNumbers = parts.map { it.toInt() }
return SemanticVersion(versionNumbers[0], versionNumbers[1], versionNumbers[2])
}
}
override fun toString(): String = "$major.$minor.$patch"
}
object SemanticVersionComparator : Comparator<SemanticVersion> {
override fun compare(a: SemanticVersion, b: SemanticVersion): Int = when {
a.major != b.major -> a.major - b.major
a.minor != b.minor -> a.minor - b.minor
else -> a.patch - b.patch
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.meta.readme
class Template(template: String) {
val result = StringBuilder(template)
fun replaceVariable(regex: Regex, value: String) {
val range = regex.find(result)!!.range
result.replace(range.first, range.last + 1, value)
}
override fun toString(): String = result.toString()
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.ad.video.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class MusicVideoAdsCompatibility

View File

@@ -0,0 +1,39 @@
package app.revanced.patches.music.ad.video.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("show-video-ads-constructor-fingerprint")
@MatchingMethod(
"Laghd;",
"<init>",
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MusicVideoAdsCompatibility
@Version("0.0.1")
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST_4,
Opcode.IPUT_BOOLEAN,
Opcode.RETURN_VOID
)
)

View File

@@ -0,0 +1,26 @@
package app.revanced.patches.music.ad.video.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("show-video-ads-method-fingerprint")
@MatchingMethod(
"Laghd;", "d"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MusicVideoAdsCompatibility
@Version("0.0.1")
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
Opcode.IPUT_BOOLEAN,
Opcode.INVOKE_VIRTUAL,
Opcode.RETURN_VOID
)
)

View File

@@ -0,0 +1,40 @@
package app.revanced.patches.music.ad.video.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
@Patch
@Name("music-video-ads")
@Description("Removes ads in the music player.")
@MusicVideoAdsCompatibility
@Version("0.0.1")
class MusicVideoAdsPatch : BytecodePatch(
listOf(
ShowMusicVideoAdsConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
ShowMusicVideoAdsFingerprint.resolve(data, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
val result = ShowMusicVideoAdsFingerprint.result!!
result.mutableMethod.addInstructions(
result.patternScanResult!!.startIndex, """
const/4 p1, 0x0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.audio.codecs.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class CodecsUnlockCompatibility

View File

@@ -0,0 +1,62 @@
package app.revanced.patches.music.audio.codecs.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher. fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("all-codecs-reference-fingerprint")
@MatchingMethod(
"Laari;",
"b",
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@CodecsUnlockCompatibility
@Version("0.0.1")
object AllCodecsReferenceFingerprint : MethodFingerprint(
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.CONST_4,
Opcode.IF_EQZ,
Opcode.IGET_BOOLEAN,
Opcode.IF_NEZ,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.IPUT_BOOLEAN,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.GOTO,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.IGET_BOOLEAN,
Opcode.IF_NEZ,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.IPUT_BOOLEAN,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.GOTO,
Opcode.MOVE_EXCEPTION,
Opcode.INVOKE_SUPER,
Opcode.MOVE_RESULT_WIDE,
Opcode.RETURN_WIDE
), listOf("itag")
)

View File

@@ -0,0 +1,39 @@
package app.revanced.patches.music.audio.codecs.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("codec-lock-fingerprint")
@MatchingMethod(
"Lacfr;",
"a",
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@CodecsUnlockCompatibility
@Version("0.0.1")
object CodecsLockFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, null, listOf(
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.INVOKE_DIRECT,
Opcode.RETURN_OBJECT
),
listOf("eac3_supported")
)

View File

@@ -0,0 +1,56 @@
package app.revanced.patches.music.audio.codecs.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.data.impl.toMethodWalker
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.util.smali.toInstruction
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint
import org.jf.dexlib2.Opcode
@Patch
@Name("codecs-unlock")
@Description("Adds more audio codec options. The new audio codecs usually result in better audio quality.")
@CodecsUnlockCompatibility
@Version("0.0.1")
class CodecsUnlockPatch : BytecodePatch(
listOf(
CodecsLockFingerprint, AllCodecsReferenceFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val codecsLockResult = CodecsLockFingerprint.result!!
val implementation = codecsLockResult.mutableMethod.implementation!!
val scanResultStartIndex = codecsLockResult.patternScanResult!!.startIndex
val instructionIndex = scanResultStartIndex +
if (implementation.instructions[scanResultStartIndex - 1].opcode == Opcode.CHECK_CAST) {
// for 5.16.xx and lower
-3
} else {
// since 5.17.xx
-2
}
val allCodecsResult = AllCodecsReferenceFingerprint.result!!
val allCodecsMethod =
data.toMethodWalker(allCodecsResult.method)
.nextMethod(allCodecsResult.patternScanResult!!.startIndex)
.getMethod()
implementation.replaceInstruction(
instructionIndex,
"invoke-static {}, ${allCodecsMethod.definingClass}->${allCodecsMethod.name}()Ljava/util/Set;".toInstruction()
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.audio.exclusiveaudio.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class ExclusiveAudioCompatibility

View File

@@ -0,0 +1,43 @@
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("audio-only-enabler-fingerprint")
@MatchingMethod(
"Lgmd;",
"d"
)
@DirectPatternScanMethod
@ExclusiveAudioCompatibility
@Version(
"0.0.1"
)
object AudioOnlyEnablerFingerprint: MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IF_NEZ,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.GOTO,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.RETURN
)
)

View File

@@ -0,0 +1,60 @@
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("exclusive-audio-fingerprints")
@MatchingMethod(
"Lgmd;", "c"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@ExclusiveAudioCompatibility
@Version("0.0.1")
object ExclusiveAudioFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("L", "Z"),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQ,
Opcode.CONST_4,
Opcode.GOTO,
Opcode.NOP,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IF_EQZ,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IF_EQZ,
Opcode.IF_EQZ,
Opcode.INVOKE_INTERFACE,
Opcode.INVOKE_INTERFACE,
Opcode.GOTO,
Opcode.RETURN_VOID
)
)

View File

@@ -0,0 +1,35 @@
package app.revanced.patches.music.audio.exclusiveaudio.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.ExclusiveAudioFingerprint
@Patch
@Name("exclusive-audio-playback")
@Description("Enables the option to play music without video.")
@ExclusiveAudioCompatibility
@Version("0.0.1")
class ExclusiveAudioPatch : BytecodePatch(
listOf(
AudioOnlyEnablerFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1")
method.addInstruction("return v0")
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.layout.compactheader.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class CompactHeaderCompatibility

View File

@@ -0,0 +1,33 @@
package app.revanced.patches.music.layout.compactheader.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("compact-header-constructor-fingerprint")
@MatchingMethod(
"Llcz;", "<init>"
)
@CompactHeaderCompatibility
@Version("0.0.1")
object CompactHeaderConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.CONST_4,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST
)
)

View File

@@ -0,0 +1,41 @@
package app.revanced.patches.music.layout.compactheader.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
@Patch(false)
@Name("compact-header")
@Description("Hides the music category bar at the top of the homepage.")
@CompactHeaderCompatibility
@Version("0.0.1")
class CompactHeaderPatch : BytecodePatch(
listOf(
CompactHeaderConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val result = CompactHeaderConstructorFingerprint.result!!
val method = result.mutableMethod
val insertIndex = result.patternScanResult!!.endIndex
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
method.addInstructions(
insertIndex, """
const/16 v0, 0x8
invoke-virtual {v${register}, v0}, Landroid/view/View;->setVisibility(I)V
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.layout.minimizedplayback.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class MinimizedPlaybackCompatibility

View File

@@ -0,0 +1,36 @@
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("minimized-playback-manager-fingerprint")
@MatchingMethod(
"Llxw;", "c"
)
@MinimizedPlaybackCompatibility
@Version("0.0.1")
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("I", "L", "Z"),
listOf(
Opcode.IGET,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.IF_NE,
Opcode.IGET_BOOLEAN,
Opcode.IF_EQ,
Opcode.GOTO,
Opcode.RETURN_VOID,
Opcode.SGET_OBJECT,
Opcode.CONST_4,
Opcode.IF_NE,
Opcode.IPUT_BOOLEAN,
)
)

View File

@@ -0,0 +1,38 @@
package app.revanced.patches.music.layout.minimizedplayback.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.data.impl.toMethodWalker
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.MethodReference
@Patch
@Name("minimized-playback-music")
@Description("Enables minimized playback on Kids music.")
@MinimizedPlaybackCompatibility
@Version("0.0.1")
class MinimizedPlaybackPatch : BytecodePatch(
listOf(
MinimizedPlaybackManagerFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstructions(
0, """
return-void
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.layout.premium.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class HideGetPremiumCompatibility

View File

@@ -0,0 +1,26 @@
package app.revanced.patches.music.layout.premium.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("hide-get-premium-fingerprint")
@MatchingMethod(
"Lktn;", "k"
)
@HideGetPremiumCompatibility
@Version("0.0.1")
object HideGetPremiumFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IF_NEZ,
Opcode.CONST_16,
Opcode.GOTO,
Opcode.NOP,
Opcode.INVOKE_VIRTUAL
)
)

View File

@@ -0,0 +1,29 @@
package app.revanced.patches.music.layout.premium.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("hide-get-premium-parent-fingerprint")
@MatchingMethod(
"Lktn;", "k"
)
@HideGetPremiumCompatibility
@Version("0.0.1")
object HideGetPremiumParentFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IGET_BOOLEAN,
Opcode.CONST_4,
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC
),
listOf("FEmusic_history"),
)

View File

@@ -0,0 +1,49 @@
package app.revanced.patches.music.layout.premium.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
@Patch
@Name("hide-get-premium")
@Description("Removes all \"Get Premium\" evidences from the avatar menu.")
@HideGetPremiumCompatibility
@Version("0.0.1")
class HideGetPremiumPatch : BytecodePatch(
listOf(
HideGetPremiumParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val parentResult = HideGetPremiumParentFingerprint.result!!
HideGetPremiumFingerprint.resolve(data, parentResult.classDef)
val parentMethod = parentResult.mutableMethod
parentMethod.replaceInstruction(
parentResult.patternScanResult!!.startIndex, """
const/4 v1, 0x0
"""
)
val result = HideGetPremiumFingerprint.result!!
val method = result.mutableMethod
method.addInstructions(
result.patternScanResult!!.startIndex, """
const/16 v0, 0x8
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,18 @@
package app.revanced.patches.music.layout.tastebuilder.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
/**
* -- Note 2022-08-05 --
* Since 5.17.xx the tastebuilder component is dismissible, so this patch is less useful
* also it is partly litho now
*/
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class RemoveTasteBuilderCompatibility

View File

@@ -0,0 +1,43 @@
package app.revanced.patches.music.layout.tastebuilder.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("taste-builder-constructor-fingerprint")
@MatchingMethod(
"Lkyu;", "<init>"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@RemoveTasteBuilderCompatibility
@Version("0.0.1")
object TasteBuilderConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST,
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT
)
)

View File

@@ -0,0 +1,41 @@
package app.revanced.patches.music.layout.tastebuilder.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
import app.revanced.patches.music.layout.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
@Patch
@Name("tasteBuilder-remover")
@Description("Removes the \"Tell us which artists you like\" card from the home screen.")
@RemoveTasteBuilderCompatibility
@Version("0.0.1")
class RemoveTasteBuilderPatch : BytecodePatch(
listOf(
TasteBuilderConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val result = TasteBuilderConstructorFingerprint.result!!
val method = result.mutableMethod
val insertIndex = result.patternScanResult!!.endIndex - 8
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
method.addInstructions(
insertIndex, """
const/16 v1, 0x8
invoke-virtual {v${register}, v1}, Landroid/view/View;->setVisibility(I)V
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.layout.upgradebutton.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class RemoveUpgradeButtonCompatibility

View File

@@ -0,0 +1,71 @@
package app.revanced.patches.music.layout.upgradebutton.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("pivot-bar-constructor-fingerprint")
@MatchingMethod(
"Lhfu;", "<init2>"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@RemoveUpgradeButtonCompatibility
@Version("0.0.1")
object PivotBarConstructorFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L", "Z"),
listOf(
Opcode.INVOKE_DIRECT,
Opcode.CONST_4,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_BOOLEAN,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.GOTO,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IGET,
Opcode.CONST,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.CHECK_CAST,
Opcode.GOTO,
Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IGET,
Opcode.CONST,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.CHECK_CAST,
Opcode.INVOKE_INTERFACE,
Opcode.GOTO,
Opcode.NOP,
Opcode.IPUT_OBJECT,
Opcode.RETURN_VOID
)
)

View File

@@ -0,0 +1,76 @@
package app.revanced.patches.music.layout.upgradebutton.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.util.smali.toInstructions
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction22t
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Patch
@Name("upgrade-button-remover")
@Description("Removes the upgrade tab from the pivot bar.")
@RemoveUpgradeButtonCompatibility
@Version("0.0.1")
class RemoveUpgradeButtonPatch : BytecodePatch(
listOf(
PivotBarConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val result = PivotBarConstructorFingerprint.result!!
val implementation = result.mutableMethod.implementation!!
val pivotBarElementFieldRef =
(implementation.instructions[result.patternScanResult!!.endIndex - 1] as Instruction22c).reference
val register = (implementation.instructions.first() as Instruction35c).registerC
// first compile all the needed instructions
val instructionList = """
invoke-interface { v0 }, Ljava/util/List;->size()I
move-result v1
const/4 v2, 0x3
invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
iput-object v0, v$register, $pivotBarElementFieldRef
""".toInstructions().toMutableList()
// replace the instruction to retain the label at given index
implementation.replaceInstruction(
result.patternScanResult!!.endIndex - 1, instructionList[0] // invoke-interface
)
// do not forget to remove this instruction since we added it already
instructionList.removeFirst()
val exitInstruction = instructionList.last() // iput-object
implementation.addInstruction(
result.patternScanResult!!.endIndex, exitInstruction
)
// do not forget to remove this instruction since we added it already
instructionList.removeLast()
// add the necessary if statement to remove the upgrade tab button in case it exists
instructionList.add(
2, // if-le
BuilderInstruction22t(
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(result.patternScanResult!!.endIndex)
)
)
implementation.addInstructions(
result.patternScanResult!!.endIndex, instructionList
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.misc.microg.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class MusicMicroGPatchCompatibility

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-context-fetch-fingerprint")
@MatchingMethod(
"Lvvz;", "a"
)
@DirectPatternScanMethod
@MicroGPatchCompatibility
@Version("0.0.1")
object CastContextFetchFingerprint : MethodFingerprint(
null, null, null, null,
listOf("Error fetching CastContext.")
)

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-module-fingerprint")
@MatchingMethod(
"Llqh;", "c"
)
@DirectPatternScanMethod
@MicroGPatchCompatibility
@Version("0.0.1")
object CastDynamiteModuleFingerprint : MethodFingerprint(
null, null, null, null,
listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
)

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-context-fetch-fingerprint")
@MatchingMethod(
"Lmcf;", "c"
)
@DirectPatternScanMethod
@MicroGPatchCompatibility
@Version("0.0.1")
object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
null, null, null, null,
listOf("Failed to load module via V2: ")
)

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import org.jf.dexlib2.AccessFlags
@Name("google-play-utility-fingerprint")
@MatchingMethod(
"Lnuv;", "b"
)
@DirectPatternScanMethod
@MusicMicroGPatchCompatibility
@Version("0.0.1")
object GooglePlayUtilityFingerprint : MethodFingerprint(
"I", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null, listOf("This should never happen.", "MetadataValueReader", "GooglePlayServicesUtil", "com.android.vending", "android.hardware.type.embedded")
)

View File

@@ -0,0 +1,19 @@
package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
@Name("google-play-prime-fingerprint")
@MatchingMethod(
"Lrwi;", "a"
)
@DirectPatternScanMethod
@MusicMicroGPatchCompatibility
@Version("0.0.1")
object PrimeFingerprint : MethodFingerprint(
null, null, null, null, listOf("com.google.android.GoogleCamera", "com.android.vending")
)

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import org.jf.dexlib2.AccessFlags
@Name("google-play-service-checker-fingerprint")
@MatchingMethod(
"Lnuv;", "d"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MusicMicroGPatchCompatibility
@Version("0.0.1")
object ServiceCheckFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null, listOf("Google Play Services not available")
)

View File

@@ -0,0 +1,171 @@
package app.revanced.patches.music.misc.microg.patch.bytecode
import app.revanced.extensions.equalsAny
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import app.revanced.patches.music.misc.microg.patch.resource.MusicMicroGResourcePatch
import app.revanced.patches.youtube.misc.microg.patch.resource.enum.StringReplaceMode
import app.revanced.patches.music.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.microg.fingerprints.*
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
import org.jf.dexlib2.iface.reference.StringReference
import org.jf.dexlib2.immutable.reference.ImmutableStringReference
@Patch
@DependsOn([MusicMicroGResourcePatch::class])
@Name("music-microg-support")
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
@MusicMicroGPatchCompatibility
@Version("0.0.1")
class MusicMicroGBytecodePatch : BytecodePatch(
listOf(
ServiceCheckFingerprint,
GooglePlayUtilityFingerprint,
CastDynamiteModuleFingerprint,
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint,
PrimeFingerprint,
)
) {
override fun execute(data: BytecodeData): PatchResult {
disablePlayServiceChecks()
data.classes.forEach { classDef ->
var proxiedClass: MutableClass? = null
classDef.methods.forEach methodLoop@{ method ->
val implementation = method.implementation ?: return@methodLoop
var proxiedImplementation: MutableMethodImplementation? = null
implementation.instructions.forEachIndexed { i, instruction ->
if (instruction.opcode != Opcode.CONST_STRING) return@forEachIndexed
val stringValue = ((instruction as Instruction21c).reference as StringReference).string
val replaceMode = if (stringValue.equalsAny(
"com.google.android.gms",
"com.google.android.gms.chimera",
"com.google.android.c2dm.intent.REGISTER",
"com.google.android.c2dm.permission.SEND",
"com.google.iid.TOKEN_REQUEST",
"com.google",
"com.google.android.gms.chimera.GmsIntentOperationService",
"com.google.android.gms.phenotype.internal.IPhenotypeCallbacks",
"com.google.android.gms.phenotype.internal.IPhenotypeService",
"com.google.android.gms.phenotype.service.START",
"com.google.android.gms.phenotype.PACKAGE_NAME",
"com.google.android.gms.phenotype.UPDATE",
"com.google.android.gms.phenotype",
"com.google.android.gms.auth.accounts",
"com.google.android.c2dm.intent.REGISTRATION",
"com.google.android.gsf.action.GET_GLS",
"com.google.android.gsf.login",
"content://com.google.settings/partner",
"content://com.google.android.gms.phenotype/",
"content://com.google.android.gsf.gservices",
"content://com.google.android.gsf.gservices/prefix",
"com.google.android.c2dm.intent.RECEIVE"
)
) {
StringReplaceMode.REPLACE_WITH_MICROG
} else if (stringValue.equalsAny(
"com.google.android.apps.youtube.music.SuggestionsProvider", "com.google.android.apps.youtube.music.fileprovider"
)
) {
StringReplaceMode.REPLACE_WITH_REVANCED
} else {
StringReplaceMode.DO_NOT_REPLACE
}
if (replaceMode != StringReplaceMode.DO_NOT_REPLACE) {
if (proxiedClass == null) {
proxiedClass = data.proxy(classDef).resolve()
}
if (proxiedImplementation == null) {
proxiedImplementation = proxiedClass!!.methods.first {
it.name == method.name && it.parameterTypes.containsAll(method.parameterTypes)
}.implementation!!
}
val newString = if (replaceMode == StringReplaceMode.REPLACE_WITH_REVANCED) stringValue.replace(
"com.google.android.apps.youtube.music", REVANCED_MUSIC_PACKAGE_NAME
)
else stringValue.replace("com.google", BASE_MICROG_PACKAGE_NAME)
proxiedImplementation!!.replaceInstruction(
i, BuilderInstruction21c(
Opcode.CONST_STRING, instruction.registerA, ImmutableStringReference(newString)
)
)
}
}
}
}
return PatchResultSuccess()
}
private fun disablePlayServiceChecks() {
listOf(
ServiceCheckFingerprint,
GooglePlayUtilityFingerprint,
CastDynamiteModuleFingerprint,
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint,
).forEach { fingerprint ->
val result = fingerprint.result!!
val stringInstructions = when (result.method.returnType.first()) {
'L' -> """
const/4 v0, 0x0
return-object v0
"""
'V' -> "return-void"
'I' -> """
const/4 v0, 0x0
return v0
"""
else -> throw Exception("This case should never happen.")
}
result.mutableMethod.addInstructions(
0, stringInstructions
)
}
val primeMethod = PrimeFingerprint.result!!.mutableMethod
val implementation = primeMethod.implementation!!
var register = 2
val index = implementation.instructions.indexOfFirst {
if (it.opcode != Opcode.CONST_STRING) return@indexOfFirst false
val instructionString = ((it as Instruction21c).reference as StringReference).string
if (instructionString != "com.google.android.apps.youtube.music") return@indexOfFirst false
register = it.registerA
return@indexOfFirst true
}
primeMethod.replaceInstruction(
index, "const-string v$register, \"$REVANCED_MUSIC_PACKAGE_NAME\""
)
}
}

View File

@@ -0,0 +1,44 @@
package app.revanced.patches.music.misc.microg.patch.resource
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import app.revanced.patches.music.misc.microg.shared.Constants.BASE_MICROG_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_PACKAGE_NAME
@Name("music-microg-resource-patch")
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
@MusicMicroGPatchCompatibility
@Version("0.0.1")
class MusicMicroGResourcePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val manifest = data["AndroidManifest.xml"].readText()
data["AndroidManifest.xml"].writeText(
manifest.replace(
"package=\"com.google.android.apps.youtube.music", "package=\"$REVANCED_MUSIC_PACKAGE_NAME"
).replace(
"android:label=\"@string/app_name", "android:label=\"$REVANCED_MUSIC_APP_NAME"
).replace(
"android:label=\"@string/app_launcher_name", "android:label=\"$REVANCED_MUSIC_APP_NAME"
).replace(
"android:authorities=\"com.google.android.apps.youtube.music", "android:authorities=\"$REVANCED_MUSIC_PACKAGE_NAME"
).replace(
"com.google.android.apps.youtube.music.permission.C2D_MESSAGE", "$REVANCED_MUSIC_PACKAGE_NAME.permission.C2D_MESSAGE"
).replace(
"com.google.android.c2dm", "$BASE_MICROG_PACKAGE_NAME.android.c2dm"
).replace(
"</queries>", "<package android:name=\"$BASE_MICROG_PACKAGE_NAME.android.gms\"/></queries>"
)
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,7 @@
package app.revanced.patches.music.misc.microg.shared
object Constants {
internal const val BASE_MICROG_PACKAGE_NAME = "com.mgoogle"
internal const val REVANCED_MUSIC_APP_NAME = "YouTube Music ReVanced"
internal const val REVANCED_MUSIC_PACKAGE_NAME = "app.revanced.android.apps.youtube.music"
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.premium.backgroundplay.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class BackgroundPlayCompatibility

View File

@@ -0,0 +1,52 @@
package app.revanced.patches.music.premium.backgroundplay.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("background-playback-disabler-fingerprint")
@MatchingMethod(
"Lafgf;", "e"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@BackgroundPlayCompatibility
@Version("0.0.1")
object BackgroundPlaybackDisableFingerprint : MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf(
Opcode.CONST_4,
Opcode.IF_EQZ,
Opcode.IGET,
Opcode.AND_INT_LIT16,
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET,
Opcode.CONST,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.CHECK_CAST,
Opcode.GOTO,
Opcode.SGET_OBJECT,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.IF_EQZ,
Opcode.IGET_BOOLEAN,
Opcode.IF_EQZ,
Opcode.CONST_4,
Opcode.RETURN,
Opcode.RETURN,
Opcode.RETURN
)
)

View File

@@ -0,0 +1,36 @@
package app.revanced.patches.music.premium.backgroundplay.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
@Patch
@Name("background-play")
@Description("Enables playing music in the background.")
@BackgroundPlayCompatibility
@Version("0.0.1")
class BackgroundPlayPatch : BytecodePatch(
listOf(
BackgroundPlaybackDisableFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.reddit.ad.general.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.reddit.frontpage", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class GeneralAdsCompatibility

View File

@@ -0,0 +1,55 @@
package app.revanced.patches.reddit.ad.general.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.ad.general.annotations.GeneralAdsCompatibility
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.StringReference
import org.jf.dexlib2.immutable.reference.ImmutableStringReference
@Patch
@Name("general-reddit-ads")
@Description("Removes general ads from the Reddit frontpage and subreddits.")
@GeneralAdsCompatibility
@Version("0.0.1")
class GeneralAdsPatch : BytecodePatch() {
override fun execute(data: BytecodeData): PatchResult {
data.classes.forEach { classDef ->
classDef.methods.forEach methodLoop@{ method ->
val implementation = method.implementation ?: return@methodLoop
implementation.instructions.forEachIndexed { i, instruction ->
if (instruction.opcode != Opcode.CONST_STRING) return@forEachIndexed
if (((instruction as ReferenceInstruction).reference as StringReference).string != "AdPost") return@forEachIndexed
val proxiedClass = data.proxy(classDef).resolve()
val proxiedImplementation = proxiedClass.methods.first {
it.name == method.name && it.parameterTypes.containsAll(method.parameterTypes)
}.implementation!!
var newString = "AdPost1"
if (proxiedImplementation.instructions[i - 1].opcode == Opcode.CONST_STRING) {
newString = "SubredditPost"
}
proxiedImplementation.replaceInstruction(
i, BuilderInstruction21c(
Opcode.CONST_STRING, (proxiedImplementation.instructions[i] as BuilderInstruction21c).registerA, ImmutableStringReference(newString)
)
)
}
}
}
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.reddit.layout.premiumicon.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.reddit.frontpage", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class PremiumIconCompatibility

View File

@@ -0,0 +1,24 @@
package app.revanced.patches.reddit.layout.premiumicon.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility
@Name("premium-icon-fingerprint")
@MatchingMethod(
"Lcom/reddit/domain/model/MyAccount;", "isPremiumSubscriber"
)
@PremiumIconCompatibility
@Version("0.0.1")
object PremiumIconFingerprint : MethodFingerprint(
"Z",
null,
null,
null,
null,
{ methodDef ->
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
}
)

View File

@@ -0,0 +1,32 @@
package app.revanced.patches.reddit.layout.premiumicon.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility
import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFingerprint
@Patch
@Name("premium-icon-reddit")
@Description("Unlocking Premium Icons in reddit app.")
@PremiumIconCompatibility
@Version("0.0.1")
class PremiumIconPatch : BytecodePatch() {
override fun execute(data: BytecodeData): PatchResult {
val method = PremiumIconFingerprint.result!!.mutableMethod
method.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.tiktok.ad.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[
Package("com.ss.android.ugc.trill", arrayOf()),
Package("com.zhiliaoapp.musically", arrayOf())
]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class TiktokAdsCompatibility

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.tiktok.ad.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
@Name("feed-item-clone-fingerprint")
@MatchingMethod(
"Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;",
"clone",
)
@TiktokAdsCompatibility
@Version("0.0.1")
object FeedItemListCloneFingerprint : MethodFingerprint(
null, null, null, null,null, { methodDef ->
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
}
)

View File

@@ -0,0 +1,48 @@
package app.revanced.patches.tiktok.ad.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
import org.jf.dexlib2.iface.reference.FieldReference
@Patch
@Name("tiktok-ads")
@Description("Removes ads from TikTok.")
@TiktokAdsCompatibility
@Version("0.0.1")
class TiktokAdsPatch : BytecodePatch(
listOf(FeedItemListCloneFingerprint)
) {
override fun execute(data: BytecodeData): PatchResult {
val method = FeedItemListCloneFingerprint.result!!.mutableMethod
// iterate all instructions in the clone method
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
// conditions for the instruction we need
if (instruction.opcode.ordinal != Opcode.IPUT_OBJECT.ordinal) continue
val clonePreloadAdsFieldInstruction = (instruction as? ReferenceInstruction)
if ((clonePreloadAdsFieldInstruction?.reference as? FieldReference)?.name != "preloadAds") continue
// set null instead of the field "preloadAds"
val overrideRegister = (clonePreloadAdsFieldInstruction as TwoRegisterInstruction).registerA
method.addInstruction(
index,
"const/4 v$overrideRegister, 0x0"
)
return PatchResultSuccess()
}
return PatchResultError("Could not find required instruction.")
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.twitter.ad.timeline.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.twitter.android", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class TimelineAdsCompatibility

View File

@@ -0,0 +1,26 @@
package app.revanced.patches.twitter.ad.timeline.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.twitter.ad.timeline.annotations.TimelineAdsCompatibility
import org.jf.dexlib2.Opcode
@Name("timeline-tweet-json-parser-fingerprint")
@MatchingMethod("LJsonTimelineTweet\$\$JsonObjectMapper;", "parseField")
@TimelineAdsCompatibility
@Version("0.0.1")
object TimelineTweetJsonParserFingerprint : MethodFingerprint(
null, null, null, listOf(
Opcode.IPUT_OBJECT,
Opcode.GOTO,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.RETURN_VOID,
), listOf("tweetPromotedMetadata", "promotedMetadata", "hasModeratedReplies", "conversationAnnotation"),
{ methodDef -> methodDef.name == "parseField" }
)

View File

@@ -0,0 +1,77 @@
package app.revanced.patches.twitter.ad.timeline.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.twitter.ad.timeline.annotations.TimelineAdsCompatibility
import app.revanced.patches.twitter.ad.timeline.fingerprints.TimelineTweetJsonParserFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.BuilderInstruction
import org.jf.dexlib2.builder.instruction.BuilderInstruction22c
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.FieldReference
import org.jf.dexlib2.iface.reference.StringReference
@Patch
@Name("timeline-ads")
@Description("Removes ads from the Twitter timeline.")
@TimelineAdsCompatibility
@Version("0.0.1")
class TimelineAdsPatch : BytecodePatch(
listOf(TimelineTweetJsonParserFingerprint)
) {
override fun execute(data: BytecodeData): PatchResult {
if (removePromotedAds())
return PatchResultError("The instruction for the tweet id field could not be found")
return PatchResultSuccess()
}
private fun removePromotedAds(): Boolean {
val (parserFingerprintResult, parserMethod, instructions) = TimelineTweetJsonParserFingerprint.unwrap()
// Anchor index
val tweetIdFieldInstructionIndex = instructions.indexOfFirst { instruction ->
if (instruction.opcode.ordinal != Opcode.CONST_STRING.ordinal) return@indexOfFirst false
if (((instruction as? ReferenceInstruction)?.reference as StringReference).string != "tweetSocialProof") return@indexOfFirst false
// Use the above conditions as an anchor to find the index for the instruction with the field we need
return@indexOfFirst true
} - 2 // This is where the instruction with the field is located
// Reference to the tweetId field for of the timeline tweet
val tweetIdFieldReference =
(parserMethod.instruction(tweetIdFieldInstructionIndex) as? BuilderInstruction22c)?.reference as? FieldReference
?: return true
// Set the tweetId field to null
// This will cause twitter to not show the promoted ads, because we set it to null, when the tweet is promoted
parserFingerprintResult.mutableMethod.addInstructions(
parserFingerprintResult.patternScanResult!!.startIndex + 1,
"""
const/4 v2, 0x0
iput-object v2, p0, Lcom/twitter/model/json/timeline/urt/JsonTimelineTweet;->${tweetIdFieldReference.name}:Ljava/lang/String;
"""
)
return false
}
private fun MethodFingerprint.unwrap(): Triple<MethodFingerprintResult, MutableMethod, MutableList<BuilderInstruction>> {
val parserFingerprintResult = this.result!!
val parserMethod = parserFingerprintResult.mutableMethod
val instructions = parserMethod.implementation!!.instructions
return Triple(parserFingerprintResult, parserMethod, instructions)
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.warnwetter.misc.firebasegetcert.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"de.dwd.warnapp", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class FirebaseGetCertPatchCompatibility

View File

@@ -0,0 +1,25 @@
package app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility
@Name("messaging-app-certificate-fingerprint")
@MatchingMethod(
"Lcom/google/firebase/installations/remote/c;", "f"
)
@FirebaseGetCertPatchCompatibility
@Version("0.0.1")
object GetMessagingCertFingerprint : MethodFingerprint(
"Ljava/lang/String;",
null,
null,
null,
listOf(
"ContentValues",
"Could not get fingerprint hash for package: ",
"No such package: "
)
)

View File

@@ -0,0 +1,25 @@
package app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility
@Name("registration-app-certificate-fingerprint")
@MatchingMethod(
"Lcom/google/firebase/remoteconfig/internal/ConfigFetchHttpClient;", "f"
)
@FirebaseGetCertPatchCompatibility
@Version("0.0.1")
object GetReqistrationCertFingerprint : MethodFingerprint(
"Ljava/lang/String;",
null,
null,
null,
listOf(
"FirebaseRemoteConfig",
"Could not get fingerprint hash for package: ",
"No such package: "
)
)

View File

@@ -0,0 +1,45 @@
package app.revanced.patches.warnwetter.misc.firebasegetcert.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints.*
import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility
@Name("spoof-cert-patch")
@Description("Spoofs the X-Android-Cert header.")
@FirebaseGetCertPatchCompatibility
@Version("0.0.1")
class FirebaseGetCertPatch : BytecodePatch(
listOf(
GetReqistrationCertFingerprint,
GetMessagingCertFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val spoofedInstruction =
"""
const-string v0, "0799DDF0414D3B3475E88743C91C0676793ED450"
return-object v0
"""
val registrationCertMethod = GetReqistrationCertFingerprint.result!!.mutableMethod
val messagingCertMethod = GetMessagingCertFingerprint.result!!.mutableMethod
registrationCertMethod.addInstructions(
0,
spoofedInstruction
)
messagingCertMethod.addInstructions(
0,
spoofedInstruction
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.warnwetter.misc.promocode.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"de.dwd.warnapp", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class PromoCodeUnlockCompatibility

View File

@@ -0,0 +1,24 @@
package app.revanced.patches.warnwetter.misc.promocode.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility
@Name("promo-code-unlock-fingerprint")
@MatchingMethod(
"Lde/dwd/warnapp/model/PromoTokenVerification;", "isValid"
)
@PromoCodeUnlockCompatibility
@Version("0.0.1")
object PromoCodeUnlockFingerprint : MethodFingerprint(
null,
null,
null,
null,
null,
{ methodDef ->
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
}
)

View File

@@ -0,0 +1,47 @@
package app.revanced.patches.warnwetter.misc.promocode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.warnwetter.misc.firebasegetcert.patch.FirebaseGetCertPatch
import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility
import app.revanced.patches.warnwetter.misc.promocode.fingerprints.PromoCodeUnlockFingerprint
@DependsOn(
[
FirebaseGetCertPatch::class
]
)
@Patch
@Name("promo-code-unlock")
@Description("Disables the validation of promo code. Any code will work to unlock all features.")
@PromoCodeUnlockCompatibility
@Version("0.0.1")
class PromoCodeUnlockPatch : BytecodePatch(
listOf(
PromoCodeUnlockFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val method = PromoCodeUnlockFingerprint.result!!.mutableMethod
method.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.youtube.ad.general.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class GeneralAdsCompatibility

View File

@@ -0,0 +1,64 @@
package app.revanced.patches.youtube.ad.general.bytecode.extensions
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.softCompareTo
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import org.jf.dexlib2.builder.BuilderInstruction
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.Instruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.FieldReference
import org.jf.dexlib2.iface.reference.MethodReference
import org.jf.dexlib2.iface.reference.Reference
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
internal object MethodExtensions {
internal fun MutableMethodImplementation.insertBlocks(
startIndex: Int,
vararg blocks: List<BuilderInstruction>,
) {
blocks.reversed().forEach {
this.addInstructions(
startIndex, it
)
}
}
internal fun MutableClass.addMethod(mutableMethod: MutableMethod) {
this.methods.add(mutableMethod)
}
internal fun MutableClass.findMutableMethodOf(
method: Method
) = this.methods.first {
it.softCompareTo(
ImmutableMethodReference(
method.definingClass, method.name, method.parameters, method.returnType
)
)
}
internal inline fun <reified T : Reference> Instruction.toDescriptor(): String {
val reference = (this as ReferenceInstruction).reference
return when (T::class) {
MethodReference::class -> {
val methodReference = reference as MethodReference
"${methodReference.definingClass}->${methodReference.name}(${
methodReference.parameterTypes.joinToString(
""
) { it }
})${methodReference.returnType}"
}
FieldReference::class -> {
val fieldReference = reference as FieldReference
"${fieldReference.definingClass}->${fieldReference.name}:${fieldReference.type}"
}
else -> throw PatchResultError("Unsupported reference type")
}
}
}

View File

@@ -0,0 +1,555 @@
package app.revanced.patches.youtube.ad.general.bytecode.patch
import app.revanced.extensions.injectHideCall
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patcher.util.smali.toInstructions
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.addMethod
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.findMutableMethodOf
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.insertBlocks
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.toDescriptor
import app.revanced.patches.youtube.ad.general.bytecode.utils.MethodUtils.createMutableMethod
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.jf.dexlib2.builder.instruction.*
import org.jf.dexlib2.iface.MethodImplementation
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
import org.jf.dexlib2.iface.reference.FieldReference
import org.jf.dexlib2.iface.reference.MethodReference
import org.jf.dexlib2.iface.reference.StringReference
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
@Patch
@DependsOn([ResourceIdMappingProviderResourcePatch::class, IntegrationsPatch::class, SettingsPatch::class])
@Name("general-ads")
@Description("Removes general ads.")
@GeneralAdsCompatibility
@Version("0.0.1")
class GeneralBytecodeAdsPatch : BytecodePatch() {
// a constant used by litho
private val lithoConstant = 0xaed2868
// list of resource names to get the id of
private val resourceIds = arrayOf(
"ad_attribution",
"reel_multiple_items_shelf",
"info_cards_drawer_header",
"endscreen_element_layout_video",
"endscreen_element_layout_circle",
"endscreen_element_layout_icon",
"promoted_video_item_land",
"promoted_video_item_full_bleed",
).map { name ->
ResourceIdMappingProviderResourcePatch.resourceMappings.single { it.name == name }.id
}
private val stringReferences = arrayOf(
"Claiming to use more elements than provided",
"loadVideo() called on LocalDirector in wrong state",
"LoggingProperties are not in proto format"
)
override fun execute(data: BytecodeData): PatchResult {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
SwitchPreference(
"revanced_home_ads_removal",
StringResource("revanced_home_ads_removal_title", "Remove home ads"),
true,
StringResource("revanced_home_ads_removal_summary_on", "Home ads are hidden"),
StringResource("revanced_home_ads_removal_summary_off", "Home ads are shown")
),
SwitchPreference(
"revanced_adremover_ad_removal",
StringResource("revanced_adremover_ad_removal_enabled_title", "Remove general ads"),
true,
StringResource("revanced_adremover_ad_removal_enabled_summary_on", "General ads are hidden"),
StringResource("revanced_adremover_ad_removal_enabled_summary_off", "General ads are shown")
),
SwitchPreference(
"revanced_adremover_merchandise",
StringResource("revanced_adremover_merchandise_enabled_title", "Remove merchandise banners"),
true,
StringResource("revanced_adremover_merchandise_enabled_summary_on", "Merchandise banners are hidden"),
StringResource("revanced_adremover_merchandise_enabled_summary_off", "Merchandise banners are shown")
),
SwitchPreference(
"revanced_adremover_community_posts_removal",
StringResource("revanced_adremover_community_posts_enabled_title", "Remove community posts"),
true,
StringResource("revanced_adremover_community_posts_enabled_summary_on", "Community posts are hidden"),
StringResource("revanced_adremover_community_posts_enabled_summary_off", "Community posts are shown")
),
SwitchPreference(
"revanced_adremover_compact_banner_removal",
StringResource("revanced_adremover_compact_banner_enabled_title", "Remove compact banners"),
true,
StringResource("revanced_adremover_compact_banner_enabled_summary_on", "Compact banners are hidden"),
StringResource("revanced_adremover_compact_banner_enabled_summary_off", "Compact banners are shown")
),
SwitchPreference(
"revanced_adremover_comments_removal",
StringResource("revanced_adremover_comments_enabled_title", "Remove comments section"),
false,
StringResource("revanced_adremover_comments_enabled_summary_on", "Comment section is hidden"),
StringResource("revanced_adremover_comments_enabled_summary_off", "Comment section is shown")
),
SwitchPreference(
"revanced_adremover_movie",
StringResource("revanced_adremover_movie_enabled_title", "Remove movies section"),
true,
StringResource("revanced_adremover_movie_enabled_summary_on", "Movies section is hidden"),
StringResource("revanced_adremover_movie_enabled_summary_off", "Movies section is shown")
),
SwitchPreference(
"revanced_adremover_feed_survey",
StringResource("revanced_adremover_feed_survey_enabled_title", "Remove feed surveys"),
true,
StringResource("revanced_adremover_feed_survey_enabled_summary_on", "Feed surveys are hidden"),
StringResource("revanced_adremover_feed_survey_enabled_summary_off", "Feed surveys are shown")
),
SwitchPreference(
"revanced_adremover_shorts_shelf",
StringResource("revanced_adremover_shorts_shelf_enabled_title", "Remove shorts shelf"),
true,
StringResource("revanced_adremover_shorts_shelf_enabled_summary_on", "Shorts shelves are hidden"),
StringResource("revanced_adremover_shorts_shelf_enabled_summary_off", "Shorts shelves are shown")
),
SwitchPreference(
"revanced_adremover_community_guidelines",
StringResource("revanced_adremover_community_guidelines_enabled_title", "Remove community guidelines"),
true,
StringResource("revanced_adremover_community_guidelines_enabled_summary_on", "Community guidelines are hidden"),
StringResource("revanced_adremover_community_guidelines_enabled_summary_off", "Community guidelines are shown")
),
SwitchPreference(
"revanced_adremover_emergency_box_removal",
StringResource("revanced_adremover_emergency_box_enabled_title", "Remove emergency boxes"),
true,
StringResource("revanced_adremover_emergency_box_enabled_summary_on", "Emergency boxes are hidden"),
StringResource("revanced_adremover_emergency_box_enabled_summary_off", "Emergency boxes are shown")
),
SwitchPreference(
"revanced_adremover_info_panel",
StringResource("revanced_adremover_info_panel_enabled_title", "Remove info panels"),
true,
StringResource("revanced_adremover_info_panel_enabled_summary_on", "Merchandise banners are hidden"),
StringResource("revanced_adremover_info_panel_enabled_summary_off", "Merchandise banners are shown")
),
SwitchPreference(
"revanced_adremover_medical_panel",
StringResource("revanced_adremover_medical_panel_enabled_title", "Remove medical panels"),
true,
StringResource("revanced_adremover_medical_panel_enabled_summary_on", "Medical panels are hidden"),
StringResource("revanced_adremover_medical_panel_enabled_summary_off", "Medical panels are shown")
),
SwitchPreference(
"revanced_adremover_paid_content",
StringResource("revanced_adremover_paid_content_enabled_title", "Remove paid content"),
true,
StringResource("revanced_adremover_paid_content_enabled_summary_on", "Paid content is hidden"),
StringResource("revanced_adremover_paid_content_enabled_summary_off", "Paid content is shown")
),
SwitchPreference(
"revanced_adremover_suggested",
StringResource("revanced_adremover_suggested_enabled_title", "Remove personal suggestions"),
true,
StringResource("revanced_adremover_suggested_enabled_summary_on", "Personal suggestions are hidden"),
StringResource("revanced_adremover_suggested_enabled_summary_off", "Personal suggestions are shown")
),
SwitchPreference(
"revanced_adremover_hide_suggestions",
StringResource("revanced_adremover_hide_suggestions_enabled_title", "Hide suggestions"),
true,
StringResource("revanced_adremover_hide_suggestions_enabled_summary_on", "Suggestions are hidden"),
StringResource("revanced_adremover_hide_suggestions_enabled_summary_off", "Suggestions are shown")
),
SwitchPreference(
"revanced_adremover_hide_latest_posts",
StringResource("revanced_adremover_hide_latest_posts_enabled_title", "Hide latest posts"),
true,
StringResource("revanced_adremover_hide_latest_posts_enabled_summary_on", "Latest posts are hidden"),
StringResource("revanced_adremover_hide_latest_posts_enabled_summary_off", "Latest posts are shown")
),
SwitchPreference(
"revanced_adremover_hide_channel_guidelines",
StringResource("revanced_adremover_hide_channel_guidelines_enabled_title", "Hide channel guidelines"),
true,
StringResource("revanced_adremover_hide_channel_guidelines_enabled_summary_on", "Channel guidelines are hidden"),
StringResource("revanced_adremover_hide_channel_guidelines_enabled_summary_off", "Channel guidelines are shown")
),
)
// iterating through all classes is expensive
for (classDef in data.classes) {
var mutableClass: MutableClass? = null
method@ for (method in classDef.methods) {
var mutableMethod: MutableMethod? = null
if (method.implementation == null) continue@method
val instructions = method.implementation!!.instructions
instructions.forEachIndexed { index, instruction ->
when (instruction.opcode) {
Opcode.CONST -> {
// TODO: find a way to de-duplicate code.
// The issue is we need to save mutableClass and mutableMethod to the existing fields
when ((instruction as Instruction31i).wideLiteral) {
resourceIds[0] -> { // general ads
// and is followed by an instruction with the mnemonic INVOKE_VIRTUAL
val insertIndex = index + 1
val invokeInstruction = instructions.elementAt(insertIndex)
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// insert hide call to hide the view corresponding to the resource
val viewRegister = (invokeInstruction as Instruction35c).registerC
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
}
resourceIds[1] -> { // reel ads
// and is followed by an instruction at insertIndex with the mnemonic IPUT_OBJECT
val insertIndex = index + 4
val iPutInstruction = instructions.elementAt(insertIndex)
if (iPutInstruction.opcode != Opcode.IPUT_OBJECT) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
val viewRegister = (iPutInstruction as Instruction22c).registerA
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
}
resourceIds[2] -> { // info cards ads
// and is followed by an instruction with the mnemonic INVOKE_VIRTUAL
val removeIndex = index - 1
val invokeInstruction = instructions.elementAt(removeIndex)
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
//ToDo: Add Settings toggle for whatever this is
mutableMethod!!.implementation!!.removeInstruction(removeIndex)
}
resourceIds[3], resourceIds[4], resourceIds[5] -> { // end screen ads
// and is followed by an instruction with the mnemonic IPUT_OBJECT
val insertIndex = index + 7
val invokeInstruction = instructions.elementAt(insertIndex)
if (invokeInstruction.opcode != Opcode.IPUT_OBJECT) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// TODO: dynamically get registers
mutableMethod!!.addInstructions(
insertIndex, """
const/16 v1, 0x8
invoke-virtual {v0,v1}, Landroid/widget/FrameLayout;->setVisibility(I)V
"""
)
}
resourceIds[6] -> {
// and is followed by an instruction with the mnemonic INVOKE_DIRECT
val insertIndex = index + 3
val invokeInstruction = instructions.elementAt(insertIndex)
if (invokeInstruction.opcode != Opcode.INVOKE_DIRECT) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// insert hide call to hide the view corresponding to the resource
val viewRegister = (invokeInstruction as Instruction35c).registerE
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
}
resourceIds[7] -> {
// TODO, go to class, hide the inflated view
}
}
}
Opcode.CONST_STRING -> {
when (((instruction as Instruction21c).reference as StringReference).string) {
stringReferences[0] -> {
val stringInstruction = instructions.elementAt(3)
if (stringInstruction.opcode == Opcode.CONST_STRING) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// return the method
val insertIndex = 1 // after super constructor
//ToDo: Add setting here
mutableMethod!!.implementation!!.addInstruction(
insertIndex, BuilderInstruction10x(Opcode.RETURN_VOID)
)
}
stringReferences[1] -> {
// TODO: migrate video ads patch to here if necessary
}
stringReferences[2] -> { // Litho ads
// create proxied method.
val proxy = data.proxy(classDef)
val proxiedClass = proxy.resolve()
// add getIsEmpty method
proxiedClass.addGetIsEmptyMethod()
// get required method to patch and get references from
val lithoMethod = getLithoMethod(proxiedClass)
?: return PatchResultError("Could not find required litho method to patch.")
val lithoMethodImplementation = lithoMethod.implementation!!
// create and add getTemplateName method
val getTemplateMethod =
proxiedClass.createGetTemplateNameMethod(lithoMethodImplementation)
proxiedClass.addMethod(getTemplateMethod)
val lithoInstructions = lithoMethodImplementation.instructions
val thisType = proxiedClass.type
val templateNameParameterType = getTemplateMethod.parameterTypes.first()
// get reference descriptors
val indexOfReference1 = lithoInstructions.indexOfFirst {
it.opcode == Opcode.INVOKE_STATIC_RANGE
}
val descriptor1 =
lithoInstructions.elementAt(indexOfReference1).toDescriptor<MethodReference>()
val descriptor2 = lithoInstructions.elementAt(indexOfReference1 + 2)
.toDescriptor<FieldReference>()
// create label
val lithoRemoveLabel = lithoMethodImplementation.newLabelForIndex(0)
// create branch instructions
val ifEqzFirstInstruction =
BuilderInstruction21t(Opcode.IF_EQZ, 0, lithoRemoveLabel)
val ifEqzSecondInstruction =
BuilderInstruction21t(Opcode.IF_EQZ, 1, lithoRemoveLabel)
// create blocks
val block1 = """
invoke-static/range {p3}, $thisType->getTemplateName($templateNameParameterType)Ljava/lang/String;
move-result-object v0
""".toInstructions(lithoMethod)
val block2 = """
move-object/from16 v1, p3
iget-object v2, v1, $templateNameParameterType->b:Ljava/nio/ByteBuffer;
invoke-static {v0, v2}, Lapp/revanced/integrations/patches/GeneralBytecodeAdsPatch;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z
move-result v1
""".toInstructions(lithoMethod)
val block3 = """
move-object/from16 v2, p1
invoke-static {v2}, $descriptor1
move-result-object v0
iget-object v0, v0, $descriptor2
return-object v0
""".toInstructions(lithoMethod)
// insert blocks and branch instructions
lithoMethodImplementation.insertBlocks(
0,
block1,
listOf(ifEqzFirstInstruction),
block2,
listOf(ifEqzSecondInstruction),
block3,
)
}
}
}
else -> return@forEachIndexed
}
}
}
}
return PatchResultSuccess()
}
private fun getLithoMethod(mutableClass: MutableClass) = mutableClass.methods.firstOrNull {
it.implementation?.instructions?.any { instruction ->
instruction.opcode == Opcode.CONST && (instruction as Instruction31i).narrowLiteral == lithoConstant
} ?: false
}
private fun MutableClass.addGetIsEmptyMethod() {
val getIsEmptyImplementation = MutableMethodImplementation(1)
// create target instructions
val firstTargetInstruction = BuilderInstruction11n(Opcode.CONST_4, 0, 1)
val secondTargetInstruction = BuilderInstruction11n(Opcode.CONST_4, 0, 0)
// add instructions to the instruction list
getIsEmptyImplementation.addInstructions(
0, listOf(
// BuilderInstruction21t(Opcode.IF_EQZ, 0, first),
BuilderInstruction35c(
Opcode.INVOKE_VIRTUAL,
1,
0,
0,
0,
0,
0,
ImmutableMethodReference("Ljava/lang/String;", "isEmpty", null, "Z")
),
BuilderInstruction11x(Opcode.MOVE_RESULT, 0),
// BuilderInstruction21t(Opcode.IF_EQZ, 0, second),
// BuilderInstruction10t(Opcode.GOTO, first),
secondTargetInstruction,
BuilderInstruction11x(Opcode.RETURN, 0),
firstTargetInstruction,
BuilderInstruction11x(Opcode.RETURN, 0),
)
)
val getIsEmptyInstructions = getIsEmptyImplementation.instructions
// create labels for the target instructions
val firstLabel =
getIsEmptyImplementation.newLabelForIndex(getIsEmptyInstructions.indexOf(firstTargetInstruction))
val secondLabel =
getIsEmptyImplementation.newLabelForIndex(getIsEmptyInstructions.indexOf(secondTargetInstruction))
// create branch instructions to the labels
val ifEqzFirstInstruction = BuilderInstruction21t(Opcode.IF_EQZ, 0, firstLabel)
val ifEqzSecondInstruction = BuilderInstruction21t(Opcode.IF_EQZ, 0, secondLabel)
val gotoInstruction = BuilderInstruction10t(Opcode.GOTO, firstLabel)
// insert remaining branch instructions, order of adding those instructions is important
getIsEmptyImplementation.addInstructions(
2, listOf(
ifEqzSecondInstruction, gotoInstruction
)
)
getIsEmptyImplementation.addInstruction(
0, ifEqzFirstInstruction
)
this.addMethod(
createMutableMethod(
this.type, "getIsEmpty", "Z", "Ljava/lang/String;", getIsEmptyImplementation
)
)
}
private fun MutableClass.createGetTemplateNameMethod(lithoMethodImplementation: MethodImplementation): MutableMethod {
var counter = 1
val descriptors = buildList {
for (instruction in lithoMethodImplementation.instructions) {
if (instruction !is ReferenceInstruction) continue
if (counter++ > 4) break
add(instruction.toDescriptor<MethodReference>())
}
}
val getTemplateNameImplementation = MutableMethodImplementation(2)
// create code blocks
val block1 = """
invoke-virtual {p0}, ${descriptors[0]}
move-result-object p0
const v0, $lithoConstant
invoke-static {p0, v0}, ${descriptors[1]}
move-result-object p0
""".toInstructions()
val block2 = """
invoke-static {p0}, ${descriptors[2]}
move-result-object p0
invoke-virtual {p0}, ${descriptors[3]}
move-result-object v0
invoke-static {v0}, ${this.type}->getIsEmpty(Ljava/lang/String;)Z
move-result v0
""".toInstructions()
val block3 = """
invoke-virtual {p0}, ${descriptors[3]}
move-result-object p0
return-object p0
""".toInstructions()
// create target instruction
val targetInstruction = BuilderInstruction11n(Opcode.CONST_4, 1, 0)
// and remaining instruction
val returnInstruction = BuilderInstruction11x(Opcode.RETURN_OBJECT, 1)
// insert blocks and instructions
getTemplateNameImplementation.insertBlocks(
0,
block1,
block2,
block3,
listOf(
targetInstruction, returnInstruction
),
)
// create label for target instruction
val targetInstructionLabel =
getTemplateNameImplementation.newLabelForIndex(getTemplateNameImplementation.instructions.size - 2)
// create branch instructions to the label
val ifEqzInstruction = BuilderInstruction21t(Opcode.IF_EQZ, 1, targetInstructionLabel)
val ifNezInstruction = BuilderInstruction21t(Opcode.IF_NEZ, 0, targetInstructionLabel)
// insert branch instructions
getTemplateNameImplementation.addInstruction(
block1.size, ifEqzInstruction
)
getTemplateNameImplementation.addInstruction(
block1.size + block2.size + 1, ifNezInstruction
)
// create the method
return createMutableMethod(
this.type,
"getTemplateName",
"Ljava/lang/String;",
descriptors[0].split("->")[0], // a bit weird to get the type this way,
getTemplateNameImplementation
)
}
}

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.youtube.ad.general.bytecode.utils
import app.revanced.patcher.extensions.or
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.iface.MethodImplementation
import org.jf.dexlib2.immutable.ImmutableMethod
import org.jf.dexlib2.immutable.ImmutableMethodParameter
internal object MethodUtils {
internal fun createMutableMethod(
definingClass: String, name: String, returnType: String, parameter: String, implementation: MethodImplementation
) = ImmutableMethod(
definingClass, name, listOf(
ImmutableMethodParameter(
parameter, null, null
)
), returnType, AccessFlags.PRIVATE or AccessFlags.STATIC, null, null, implementation
).toMutable()
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.ad.infocardsuggestions.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class HideInfocardSuggestionsCompatibility

View File

@@ -0,0 +1,24 @@
package app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("hide-infocard-suggestions-fingerprint")
@MatchingMethod("Liff;", "i")
@FuzzyPatternScanMethod(2)
@HideInfocardSuggestionsCompatibility
@Version("0.0.1")
object HideInfocardSuggestionsFingerprint : MethodFingerprint(
"Ljava/lang/Boolean;",
AccessFlags.PUBLIC or AccessFlags.FINAL,
null,
null,
listOf("vibrator"),
null
)

View File

@@ -0,0 +1,24 @@
package app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("hide-infocard-suggestions-parent-fingerprint")
@MatchingMethod("Liff;", "lE")
@FuzzyPatternScanMethod(2)
@HideInfocardSuggestionsCompatibility
@Version("0.0.1")
object HideInfocardSuggestionsParentFingerprint : MethodFingerprint(
"Ljava/lang/String;",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf(),
null,
listOf("player_overlay_info_card_teaser"),
null
)

View File

@@ -0,0 +1,67 @@
package app.revanced.patches.youtube.ad.infocardsuggestions.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility
import app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints.HideInfocardSuggestionsFingerprint
import app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints.HideInfocardSuggestionsParentFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
@Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("hide-infocard-suggestions")
@Description("Hides infocards in videos.")
@HideInfocardSuggestionsCompatibility
@Version("0.0.1")
class HideInfocardSuggestionsPatch : BytecodePatch(
listOf(
HideInfocardSuggestionsParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
SwitchPreference(
"revanced_info_cards_enabled",
StringResource("revanced_info_cards_enabled_title", "Show info-cards"),
false,
StringResource("revanced_info_cards_enabled_summary_on", "Info-cards are shown"),
StringResource("revanced_info_cards_enabled_summary_off", "Info-cards are hidden")
)
)
val parentResult = HideInfocardSuggestionsParentFingerprint.result
?: return PatchResultError("Parent fingerprint not resolved!")
HideInfocardSuggestionsFingerprint.resolve(data, parentResult.classDef)
val result = HideInfocardSuggestionsFingerprint.result
?: return PatchResultError("Required parent method could not be found.")
val method = result.mutableMethod
val implementation = method.implementation
?: return PatchResultError("Implementation not found.")
val index = implementation.instructions.indexOfFirst { ((it as? BuilderInstruction35c)?.reference.toString() == "Landroid/view/View;->setVisibility(I)V") }
method.replaceInstruction(index, """
invoke-static {p1}, Lapp/revanced/integrations/patches/HideInfoCardSuggestionsPatch;->hideInfoCardSuggestions(Landroid/view/View;)V
""")
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.youtube.ad.video.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class VideoAdsCompatibility

View File

@@ -0,0 +1,40 @@
package app.revanced.patches.youtube.ad.video.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("show-video-ads-constructor-fingerprint")
@MatchingMethod(
"Laair",
"<init>",
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@VideoAdsCompatibility
@Version("0.0.1")
object ShowVideoAdsConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
null, // either CONST_4 or CONST_16
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST_4,
Opcode.IPUT_BOOLEAN,
Opcode.RETURN_VOID
)
)

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.youtube.ad.video.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("show-video-ads-method-fingerprint")
@MatchingMethod(
definingClass = "zai"
)
@DirectPatternScanMethod
@VideoAdsCompatibility
@Version("0.0.1")
object ShowVideoAdsFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), null
)

View File

@@ -0,0 +1,58 @@
package app.revanced.patches.youtube.ad.video.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
import app.revanced.patches.youtube.ad.video.fingerprints.ShowVideoAdsConstructorFingerprint
import app.revanced.patches.youtube.ad.video.fingerprints.ShowVideoAdsFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
@Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("video-ads")
@Description("Removes ads in the video player.")
@VideoAdsCompatibility
@Version("0.0.1")
class VideoAdsPatch : BytecodePatch(
listOf(
ShowVideoAdsConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
SwitchPreference(
"revanced_video_ads_removal",
StringResource("revanced_video_ads_removal_title", "Hide video ads"),
true,
StringResource("revanced_video_ads_removal_summary_on", "Video ads are hidden"),
StringResource("revanced_video_ads_removal_summary_off", "Video ads are shown")
)
)
ShowVideoAdsFingerprint.resolve(
data, ShowVideoAdsConstructorFingerprint.result!!.classDef
)
// Override the parameter by calling shouldShowAds and setting the parameter to the result
ShowVideoAdsFingerprint.result!!.mutableMethod.addInstructions(
0, """
invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z
move-result v1
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.youtube.interaction.downloads.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.27.39", "17.29.34", "17.32.35")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class DownloadsCompatibility

View File

@@ -0,0 +1,52 @@
package app.revanced.patches.youtube.interaction.downloads.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.interaction.downloads.annotation.DownloadsCompatibility
import app.revanced.patches.youtube.interaction.downloads.resource.patch.DownloadsResourcePatch
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
@Patch
@Name("downloads")
@DependsOn([DownloadsResourcePatch::class, PlayerControlsBytecodePatch::class, VideoIdPatch::class])
@Description("Enables downloading music and videos from YouTube.")
@DownloadsCompatibility
@Version("0.0.1")
class DownloadsBytecodePatch : BytecodePatch() {
override fun execute(data: BytecodeData): PatchResult {
val integrationsPackage = "app/revanced/integrations"
val classDescriptor = "L$integrationsPackage/videoplayer/DownloadButton;"
/*
initialize the control
*/
val initializeDownloadsDescriptor = "$classDescriptor->initializeDownloadButton(Ljava/lang/Object;)V"
PlayerControlsBytecodePatch.initializeControl(initializeDownloadsDescriptor)
/*
add code to change the visibility of the control
*/
val changeVisibilityDescriptor = "$classDescriptor->changeVisibility(Z)V"
PlayerControlsBytecodePatch.injectVisibilityCheckCall(changeVisibilityDescriptor)
/*
add code to change to update the video id
*/
val setVideoIdDescriptor =
"L$integrationsPackage/patches/downloads/DownloadsPatch;->setVideoId(Ljava/lang/String;)V"
VideoIdPatch.injectCall(setVideoIdDescriptor)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,72 @@
package app.revanced.patches.youtube.interaction.downloads.resource.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.interaction.downloads.annotation.DownloadsCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import app.revanced.patches.youtube.misc.playercontrols.resource.patch.BottomControlsResourcePatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.settings.framework.components.impl.*
import app.revanced.util.resources.ResourceUtils
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
import app.revanced.util.resources.ResourceUtils.copyResources
@Name("downloads-resource-patch")
@DependsOn([BottomControlsResourcePatch::class, FixLocaleConfigErrorPatch::class, SettingsPatch::class])
@Description("Makes necessary changes to resources for the download button.")
@DownloadsCompatibility
@Version("0.0.1")
class DownloadsResourcePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
PreferenceScreen(
"revanced_downloads",
StringResource("revanced_downloads_title", "Download settings"),
listOf(
SwitchPreference(
"revanced_downloads",
StringResource("revanced_downloads_enabled_title", "Show download button"),
true,
StringResource("revanced_downloads_enabled_summary_on", "Download button is visible"),
StringResource("revanced_downloads_enabled_summary_off", "Download button is hidden")
),
TextPreference(
"revanced_downloads_package_name",
StringResource("revanced_downloads_package_name_title", "Downloader package name"),
InputType.STRING,
"org.schabi.newpipe" /* NewPipe */,
StringResource("revanced_downloads_package_name_summary", "Package name of the downloader app such as NewPipe\\'s or PowerTube\\'s")
)
),
StringResource("revanced_downloads_summary", "Settings related to downloads")
)
)
/*
* Copy strings
*/
data.mergeStrings("downloads/host/values/strings.xml")
/*
* Copy resources
*/
data.copyResources("downloads", ResourceUtils.ResourceGroup("drawable", "revanced_yt_download_button.xml"))
/*
* Add download button node
*/
BottomControlsResourcePatch.addControls("downloads/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.youtube.interaction.seekbar.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class SeekbarTappingCompatibility

View File

@@ -0,0 +1,41 @@
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.interaction.seekbar.annotation.SeekbarTappingCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("enable-seekbar-tapping-fingerprint")
@MatchingMethod("Lfbl;", "onTouchEvent")
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@SeekbarTappingCompatibility
@Version("0.0.1")
object SeekbarTappingFingerprint : MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_WIDE,
Opcode.IGET,
Opcode.IGET_OBJECT,
Opcode.IGET,
Opcode.DIV_INT_2ADDR,
Opcode.ADD_INT,
Opcode.SUB_INT_2ADDR,
Opcode.INT_TO_FLOAT,
Opcode.CMPG_FLOAT,
Opcode.IF_GTZ,
Opcode.INT_TO_FLOAT,
Opcode.CMPG_FLOAT,
Opcode.IF_GTZ,
Opcode.CONST_4,
Opcode.INVOKE_INTERFACE,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.INVOKE_VIRTUAL
)
)

View File

@@ -0,0 +1,51 @@
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.interaction.seekbar.annotation.SeekbarTappingCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("enable-seekbar-tapping-parent-fingerprint")
@MatchingMethod("Lzmx;", "I")
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@SeekbarTappingCompatibility
@Version("0.0.1")
object SeekbarTappingParentFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_4,
Opcode.NEW_ARRAY,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_WIDE,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_4,
Opcode.APUT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_WIDE,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_4,
Opcode.APUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.RETURN_OBJECT
)
)

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