Compare commits

...

129 Commits

Author SHA1 Message Date
semantic-release-bot
eee47ee37c chore(release): 2.101.0 [skip ci]
# [2.101.0](https://github.com/revanced/revanced-patches/compare/v2.100.3...v2.101.0) (2022-11-01)

### Features

* **youtube:** bump patches compatibility to v17.43.36 ([#924](https://github.com/revanced/revanced-patches/issues/924)) ([74da7c0](d340dd0e0d))
2022-11-01 17:23:50 +00:00
OxrxL
d340dd0e0d feat(youtube): bump patches compatibility to v17.43.36 (#924) 2022-11-01 18:21:56 +01:00
semantic-release-bot
2193a0307e chore(release): 2.100.3 [skip ci]
## [2.100.3](https://github.com/revanced/revanced-patches/compare/v2.100.2...v2.100.3) (2022-11-01)

### Bug Fixes

* **youtube/video-ads:** add switch to temporarily fix buffering issues ([1d5fb1b](58dcd172f9))
2022-11-01 06:13:16 +00:00
oSumAtrIX
58dcd172f9 fix(youtube/video-ads): add switch to temporarily fix buffering issues 2022-11-01 07:10:54 +01:00
semantic-release-bot
f818396243 chore(release): 2.100.2 [skip ci]
## [2.100.2](https://github.com/revanced/revanced-patches/compare/v2.100.1...v2.100.2) (2022-10-31)

### Bug Fixes

* **youtube/theme-patch:** respect app specific theme ([#946](https://github.com/revanced/revanced-patches/issues/946)) ([40cc03c](3d124af58c))
2022-10-31 23:08:40 +00:00
OxrxL
3d124af58c fix(youtube/theme-patch): respect app specific theme (#946) 2022-11-01 00:06:42 +01:00
semantic-release-bot
df18d4a15a chore(release): 2.100.1 [skip ci]
## [2.100.1](https://github.com/revanced/revanced-patches/compare/v2.100.0...v2.100.1) (2022-10-31)
2022-10-31 14:17:35 +00:00
SriBalaji
f08a2b6a90 build: update actions/checkout to v3 (#942) 2022-10-31 15:15:14 +01:00
semantic-release-bot
fce8df8284 chore(release): 2.100.0 [skip ci]
# [2.100.0](https://github.com/revanced/revanced-patches/compare/v2.99.0...v2.100.0) (2022-10-30)

### Features

* `hide-watch-in-vr` patch ([#911](https://github.com/revanced/revanced-patches/issues/911)) ([df84368](6ec99045d7))
2022-10-30 12:03:30 +00:00
inotia00
6ec99045d7 feat: hide-watch-in-vr patch (#911)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-10-30 13:01:40 +01:00
semantic-release-bot
757784b038 chore(release): 2.99.0 [skip ci]
# [2.99.0](https://github.com/revanced/revanced-patches/compare/v2.98.0...v2.99.0) (2022-10-29)

### Features

* **youtube/sponsorblock:** skip segments once automatically ([#907](https://github.com/revanced/revanced-patches/issues/907)) ([cbce50c](7e06f23e29))
2022-10-29 21:15:08 +00:00
thebestnom
7e06f23e29 feat(youtube/sponsorblock): skip segments once automatically (#907) 2022-10-29 23:13:15 +02:00
semantic-release-bot
26a43b1753 chore(release): 2.98.0 [skip ci]
# [2.98.0](https://github.com/revanced/revanced-patches/compare/v2.97.0...v2.98.0) (2022-10-29)

### Features

* **youtube/comments:** hide shorts comments button ([#866](https://github.com/revanced/revanced-patches/issues/866)) ([2004d79](c8023f0b66))
2022-10-29 14:04:09 +00:00
OxrxL
c8023f0b66 feat(youtube/comments): hide shorts comments button (#866)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-10-29 16:01:52 +02:00
semantic-release-bot
25f65c7c02 chore(release): 2.97.0 [skip ci]
# [2.97.0](https://github.com/revanced/revanced-patches/compare/v2.96.0...v2.97.0) (2022-10-29)

### Features

* **youtube/microg-support:** handle availability of Vanced MicroG ([b9e875c](07d39f2b81))
2022-10-29 01:06:18 +00:00
oSumAtrIX
07d39f2b81 feat(youtube/microg-support): handle availability of Vanced MicroG 2022-10-29 03:03:57 +02:00
semantic-release-bot
01e226d0c9 chore(release): 2.96.0 [skip ci]
# [2.96.0](https://github.com/revanced/revanced-patches/compare/v2.95.0...v2.96.0) (2022-10-28)

### Features

* **youtube/return-youtube-dislike:** compatibility for old and new button layout ([03b9b94](c98e10adf7))
2022-10-28 23:56:07 +00:00
oSumAtrIX
c98e10adf7 feat(youtube/return-youtube-dislike): compatibility for old and new button layout 2022-10-29 01:54:28 +02:00
semantic-release-bot
858b8a6fa8 chore(release): 2.95.0 [skip ci]
# [2.95.0](https://github.com/revanced/revanced-patches/compare/v2.94.0...v2.95.0) (2022-10-28)

### Features

* **youtube:** bump patches compatibility to v17.41.37 ([#888](https://github.com/revanced/revanced-patches/issues/888)) ([8aba027](53a66f64ab))
2022-10-28 13:09:21 +00:00
OxrxL
53a66f64ab feat(youtube): bump patches compatibility to v17.41.37 (#888) 2022-10-28 15:07:32 +02:00
semantic-release-bot
e2b9baed25 chore(release): 2.94.0 [skip ci]
# [2.94.0](https://github.com/revanced/revanced-patches/compare/v2.93.0...v2.94.0) (2022-10-28)

### Features

* remove compatibility for YouTube  v17.41.37 ([#886](https://github.com/revanced/revanced-patches/issues/886)) ([fc6226d](6bc24755d5))
2022-10-28 09:57:40 +00:00
oSumAtrIX
6bc24755d5 feat: remove compatibility for YouTube v17.41.37 (#886) 2022-10-28 11:55:51 +02:00
semantic-release-bot
e871d655d2 chore(release): 2.93.0 [skip ci]
# [2.93.0](https://github.com/revanced/revanced-patches/compare/v2.92.3...v2.93.0) (2022-10-27)

### Features

* bump YouTube patches to v17.41.37 ([#878](https://github.com/revanced/revanced-patches/issues/878)) ([d2e6c45](1fa0d5da0e))
2022-10-27 23:42:10 +00:00
OxrxL
1fa0d5da0e feat: bump YouTube patches to v17.41.37 (#878) 2022-10-28 01:40:24 +02:00
semantic-release-bot
461e4bef09 chore(release): 2.92.3 [skip ci]
## [2.92.3](https://github.com/revanced/revanced-patches/compare/v2.92.2...v2.92.3) (2022-10-27)

### Bug Fixes

* **youtube:** resolve fingerprints on mutable methods ([c769c42](9b1df03087))
2022-10-27 20:48:42 +00:00
oSumAtrIX
9b1df03087 fix(youtube): resolve fingerprints on mutable methods 2022-10-27 22:46:51 +02:00
semantic-release-bot
541a1a0e0a chore(release): 2.92.2 [skip ci]
## [2.92.2](https://github.com/revanced/revanced-patches/compare/v2.92.1...v2.92.2) (2022-10-27)

### Bug Fixes

* **youtube/theme:** theme missing gray color ([#873](https://github.com/revanced/revanced-patches/issues/873)) ([324d022](ce2f7042da))
2022-10-27 14:03:24 +00:00
OxrxL
ce2f7042da fix(youtube/theme): theme missing gray color (#873) 2022-10-27 16:00:49 +02:00
semantic-release-bot
ca3438b640 chore(release): 2.92.1 [skip ci]
## [2.92.1](https://github.com/revanced/revanced-patches/compare/v2.92.0...v2.92.1) (2022-10-26)

### Bug Fixes

* **youtube/custom-branding:** use proper scaled icons ([ba82fb8](666b241a53))
2022-10-26 23:13:00 +00:00
oSumAtrIX
5121c3d45b refactor(youtube/custom-branding): improve general code quality 2022-10-27 01:11:10 +02:00
oSumAtrIX
666b241a53 fix(youtube/custom-branding): use proper scaled icons 2022-10-27 01:11:10 +02:00
semantic-release-bot
b961bdf9d3 chore(release): 2.92.0 [skip ci]
# [2.92.0](https://github.com/revanced/revanced-patches/compare/v2.91.0...v2.92.0) (2022-10-26)

### Features

* **youtube/hide-mix-playlists:** hide in video suggestions ([#854](https://github.com/revanced/revanced-patches/issues/854)) ([2bf9a54](8aa1d58b76))
2022-10-26 20:54:00 +00:00
johnconner122
8aa1d58b76 feat(youtube/hide-mix-playlists): hide in video suggestions (#854)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-10-26 22:51:49 +02:00
semantic-release-bot
570723bb59 chore(release): 2.91.0 [skip ci]
# [2.91.0](https://github.com/revanced/revanced-patches/compare/v2.90.0...v2.91.0) (2022-10-26)

### Features

* remove partially complete patch ([74f7d57](7027929e30))
2022-10-26 04:59:06 +00:00
oSumAtrIX
7027929e30 feat: remove partially complete patch 2022-10-26 06:56:18 +02:00
semantic-release-bot
f11f269c2f chore(release): 2.90.0 [skip ci]
# [2.90.0](https://github.com/revanced/revanced-patches/compare/v2.89.0...v2.90.0) (2022-10-25)

### Features

* `comment` patch ([#858](https://github.com/revanced/revanced-patches/issues/858)) ([9a257c3](b0cd520b1a))
2022-10-25 21:35:38 +00:00
OxrxL
b0cd520b1a feat: comment patch (#858) 2022-10-25 23:33:49 +02:00
semantic-release-bot
5c0fd8a6da chore(release): 2.89.0 [skip ci]
# [2.89.0](https://github.com/revanced/revanced-patches/compare/v2.88.0...v2.89.0) (2022-10-25)

### Features

* `hide-album-cards` patch ([#857](https://github.com/revanced/revanced-patches/issues/857)) ([622acc0](e34d67f01e))
2022-10-25 18:46:34 +00:00
OxrxL
e34d67f01e feat: hide-album-cards patch (#857) 2022-10-25 20:44:34 +02:00
semantic-release-bot
72703d6a56 chore(release): 2.88.0 [skip ci]
# [2.88.0](https://github.com/revanced/revanced-patches/compare/v2.87.0...v2.88.0) (2022-10-25)

### Features

* `hide-artist-card` patch ([#859](https://github.com/revanced/revanced-patches/issues/859)) ([54e8dd1](b8c473796a))
2022-10-25 18:19:50 +00:00
OxrxL
b8c473796a feat: hide-artist-card patch (#859) 2022-10-25 20:17:56 +02:00
semantic-release-bot
25e86c5545 chore(release): 2.87.0 [skip ci]
# [2.87.0](https://github.com/revanced/revanced-patches/compare/v2.86.0...v2.87.0) (2022-10-25)

### Bug Fixes

* **metanav/fix-scaling:** use semantic versioning in package versions ([d45279f](f1bf2c589b))
* **youtube/theme:** theme litho ui components & use correct theme for settings ([#791](https://github.com/revanced/revanced-patches/issues/791)) ([03b565c](8cf0343f29))

### Features

* `fix-metanav-scaling` patch ([#831](https://github.com/revanced/revanced-patches/issues/831)) ([2ddc846](3761dbd7b2))
* `hide-crowdfunding-box` patch ([#856](https://github.com/revanced/revanced-patches/issues/856)) ([823beeb](8b54559953))
2022-10-25 18:15:10 +00:00
oSumAtrIX
f1bf2c589b fix(metanav/fix-scaling): use semantic versioning in package versions 2022-10-25 20:12:49 +02:00
OxrxL
8b54559953 feat: hide-crowdfunding-box patch (#856)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-10-25 18:20:05 +02:00
Caroline Joy Bell
3761dbd7b2 feat: fix-metanav-scaling patch (#831) 2022-10-25 08:39:28 +02:00
OxrxL
8cf0343f29 fix(youtube/theme): theme litho ui components & use correct theme for settings (#791) 2022-10-25 08:36:59 +02:00
semantic-release-bot
f3753a22da chore(release): 2.86.0 [skip ci]
# [2.86.0](https://github.com/revanced/revanced-patches/compare/v2.85.2...v2.86.0) (2022-10-25)

### Features

* **youtube/theme:** extend theming to splash screen ([#769](https://github.com/revanced/revanced-patches/issues/769)) ([297db08](c90312a925))
2022-10-25 06:32:58 +00:00
OxrxL
c90312a925 feat(youtube/theme): extend theming to splash screen (#769) 2022-10-25 08:30:42 +02:00
semantic-release-bot
c1d6aa3e49 chore(release): 2.85.2 [skip ci]
## [2.85.2](https://github.com/revanced/revanced-patches/compare/v2.85.1...v2.85.2) (2022-10-22)

### Bug Fixes

* **youtube/integrations:** set context for remaining activities ([#828](https://github.com/revanced/revanced-patches/issues/828)) ([ba515d2](c097370960))
2022-10-22 10:46:54 +00:00
Canny
c097370960 fix(youtube/integrations): set context for remaining activities (#828) 2022-10-22 12:45:10 +02:00
semantic-release-bot
8ffa3b4746 chore(release): 2.85.1 [skip ci]
## [2.85.1](https://github.com/revanced/revanced-patches/compare/v2.85.0...v2.85.1) (2022-10-21)

### Bug Fixes

* **youtube/theme:** extend dark mode theming ([#827](https://github.com/revanced/revanced-patches/issues/827)) ([1e26d6a](1e6d0f7f62))
2022-10-21 13:16:26 +00:00
OxrxL
1e6d0f7f62 fix(youtube/theme): extend dark mode theming (#827) 2022-10-21 15:14:24 +02:00
semantic-release-bot
e73c5dfebd chore(release): 2.85.0 [skip ci]
# [2.85.0](https://github.com/revanced/revanced-patches/compare/v2.84.1...v2.85.0) (2022-10-20)

### Features

* **youtube:** `hide-captions-button` patch ([#770](https://github.com/revanced/revanced-patches/issues/770)) ([a13fdbd](32309ac007))
2022-10-20 20:07:51 +00:00
OxrxL
32309ac007 feat(youtube): hide-captions-button patch (#770)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-10-20 22:05:34 +02:00
semantic-release-bot
079800aa1a chore(release): 2.84.1 [skip ci]
## [2.84.1](https://github.com/revanced/revanced-patches/compare/v2.84.0...v2.84.1) (2022-10-20)

### Bug Fixes

* **youtube/hide-mix-playlists:** correct switch title, summary and defaults ([#821](https://github.com/revanced/revanced-patches/issues/821)) ([c37b8cd](06f0d05d19))
2022-10-20 18:31:56 +00:00
johnconner122
06f0d05d19 fix(youtube/hide-mix-playlists): correct switch title, summary and defaults (#821) 2022-10-20 20:29:41 +02:00
semantic-release-bot
c618a18851 chore(release): 2.84.0 [skip ci]
# [2.84.0](https://github.com/revanced/revanced-patches/compare/v2.83.3...v2.84.0) (2022-10-20)

### Features

* **youtube:** `hide-mix-playlists` patch  ([#816](https://github.com/revanced/revanced-patches/issues/816)) ([a5b5e78](1aac521af3))
2022-10-20 17:09:55 +00:00
johnconner122
1aac521af3 feat(youtube): hide-mix-playlists patch (#816) 2022-10-20 19:07:44 +02:00
semantic-release-bot
68fe1cc792 chore(release): 2.83.3 [skip ci]
## [2.83.3](https://github.com/revanced/revanced-patches/compare/v2.83.2...v2.83.3) (2022-10-20)

### Bug Fixes

* **youtube/video-ads:** revert faulty method patch ([#820](https://github.com/revanced/revanced-patches/issues/820)) ([d93f5ee](ba519d4b10))
2022-10-20 17:05:54 +00:00
OxrxL
ba519d4b10 fix(youtube/video-ads): revert faulty method patch (#820) 2022-10-20 19:04:11 +02:00
semantic-release-bot
0351c8a50d chore(release): 2.83.2 [skip ci]
## [2.83.2](https://github.com/revanced/revanced-patches/compare/v2.83.1...v2.83.2) (2022-10-19)

### Bug Fixes

* **youtube/video-ads:** add back initial method to block ads ([#818](https://github.com/revanced/revanced-patches/issues/818)) ([86e09c5](d0c4ac5d8a))
2022-10-19 22:01:39 +00:00
OxrxL
d0c4ac5d8a fix(youtube/video-ads): add back initial method to block ads (#818) 2022-10-19 23:59:18 +02:00
semantic-release-bot
daa55c59e2 chore(release): 2.83.1 [skip ci]
## [2.83.1](https://github.com/revanced/revanced-patches/compare/v2.83.0...v2.83.1) (2022-10-19)

### Bug Fixes

* **youtube/video-ads:** block earlier in call hirarchy ([#813](https://github.com/revanced/revanced-patches/issues/813)) ([a764e07](4ad057b748))
2022-10-19 09:33:19 +00:00
OxrxL
4ad057b748 fix(youtube/video-ads): block earlier in call hirarchy (#813) 2022-10-19 11:31:42 +02:00
semantic-release-bot
3eaefc7979 chore(release): 2.83.0 [skip ci]
# [2.83.0](https://github.com/revanced/revanced-patches/compare/v2.82.1...v2.83.0) (2022-10-18)

### Features

* bump YouTube Music patches compatibility ([#809](https://github.com/revanced/revanced-patches/issues/809)) ([9a6ba89](d81ce614a8))
2022-10-18 19:37:38 +00:00
Palm
d81ce614a8 feat: bump YouTube Music patches compatibility (#809) 2022-10-18 21:35:50 +02:00
semantic-release-bot
dcd711b341 chore(release): 2.82.1 [skip ci]
## [2.82.1](https://github.com/revanced/revanced-patches/compare/v2.82.0...v2.82.1) (2022-10-17)

### Bug Fixes

* **youtube/video-ads:** return empty ad list earlier ([dac833f](96d500bc70))
2022-10-17 23:47:49 +00:00
oSumAtrIX
96d500bc70 fix(youtube/video-ads): return empty ad list earlier 2022-10-18 01:45:51 +02:00
afn
031b517245 style(reddit/premium-icon-reddit): fix consistency of patch description (#795) 2022-10-16 00:30:19 +02:00
semantic-release-bot
79a0ea78cf chore(release): 2.82.0 [skip ci]
# [2.82.0](https://github.com/revanced/revanced-patches/compare/v2.81.11...v2.82.0) (2022-10-13)

### Features

* **youtube/remember-video-quality:** remember the quality until changed by default ([c6a01df](2a54e624a0))
2022-10-13 04:04:21 +00:00
oSumAtrIX
2a54e624a0 feat(youtube/remember-video-quality): remember the quality until changed by default 2022-10-13 06:02:04 +02:00
semantic-release-bot
e8cc0de11c chore(release): 2.81.11 [skip ci]
## [2.81.11](https://github.com/revanced/revanced-patches/compare/v2.81.10...v2.81.11) (2022-10-11)

### Bug Fixes

* **youtube/theme:** add missing theme condition check ([#771](https://github.com/revanced/revanced-patches/issues/771)) ([1408058](d2209569e0))
2022-10-11 23:38:39 +00:00
OxrxL
d2209569e0 fix(youtube/theme): add missing theme condition check (#771) 2022-10-12 01:36:38 +02:00
semantic-release-bot
492cce9452 chore(release): 2.81.10 [skip ci]
## [2.81.10](https://github.com/revanced/revanced-patches/compare/v2.81.9...v2.81.10) (2022-10-11)

### Bug Fixes

* **spotify/disable-capture-restriction:** dynamically find indices ([#759](https://github.com/revanced/revanced-patches/issues/759)) ([3829a10](a17232da24))
2022-10-11 12:43:42 +00:00
Tim Schneeberger
a17232da24 fix(spotify/disable-capture-restriction): dynamically find indices (#759) 2022-10-11 14:41:23 +02:00
semantic-release-bot
3ae7858adf chore(release): 2.81.9 [skip ci]
## [2.81.9](https://github.com/revanced/revanced-patches/compare/v2.81.8...v2.81.9) (2022-10-11)

### Bug Fixes

* **youtube/general-ads:** hide ads on wide screens ([#765](https://github.com/revanced/revanced-patches/issues/765)) ([48778cf](2b10b834c7))
* **youtube/theme:** colore the comment action bar ([#762](https://github.com/revanced/revanced-patches/issues/762)) ([38d1f6d](1a6bb30789))
2022-10-11 12:39:59 +00:00
OxrxL
1a6bb30789 fix(youtube/theme): colore the comment action bar (#762)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-10-11 14:38:11 +02:00
TheNoFace
2b10b834c7 fix(youtube/general-ads): hide ads on wide screens (#765) 2022-10-11 14:36:39 +02:00
semantic-release-bot
35c86c6ff5 chore(release): 2.81.8 [skip ci]
## [2.81.8](https://github.com/revanced/revanced-patches/compare/v2.81.7...v2.81.8) (2022-10-10)

### Bug Fixes

* **youtube/video-ads:** invert condition to hide ads ([b0df548](f4897e41a9))
2022-10-10 20:20:12 +00:00
oSumAtrIX
f4897e41a9 fix(youtube/video-ads): invert condition to hide ads
This reverts commit 7eb2a0b1bc.
2022-10-10 22:17:52 +02:00
semantic-release-bot
1eadafb098 chore(release): 2.81.7 [skip ci]
## [2.81.7](https://github.com/revanced/revanced-patches/compare/v2.81.6...v2.81.7) (2022-10-10)

### Bug Fixes

* **video-ads:** invert the condition to hide ads ([ac66364](7eb2a0b1bc))
2022-10-10 15:15:45 +00:00
oSumAtrIX
7eb2a0b1bc fix(video-ads): invert the condition to hide ads 2022-10-10 17:12:53 +02:00
semantic-release-bot
a13e294978 chore(release): 2.81.6 [skip ci]
## [2.81.6](https://github.com/revanced/revanced-patches/compare/v2.81.5...v2.81.6) (2022-10-10)

### Bug Fixes

* **video-ads:** return empty list in correct method ([ef095b1](a3548ed524))
2022-10-10 13:53:46 +00:00
oSumAtrIX
a3548ed524 fix(video-ads): return empty list in correct method 2022-10-10 15:51:32 +02:00
semantic-release-bot
37cbbccec5 chore(release): 2.81.5 [skip ci]
## [2.81.5](https://github.com/revanced/revanced-patches/compare/v2.81.4...v2.81.5) (2022-10-10)

### Bug Fixes

* **video-ads:** clobber unused register ([d5fbf10](4e83400de4))
2022-10-10 13:08:57 +00:00
oSumAtrIX
4e83400de4 fix(video-ads): clobber unused register 2022-10-10 15:06:27 +02:00
semantic-release-bot
e9e5f7b018 chore(release): 2.81.4 [skip ci]
## [2.81.4](https://github.com/revanced/revanced-patches/compare/v2.81.3...v2.81.4) (2022-10-10)

### Bug Fixes

* **general-ads:** invalid smali syntax ([1772dcf](01be9fd79e))
2022-10-10 12:30:28 +00:00
oSumAtrIX
01be9fd79e fix(general-ads): invalid smali syntax 2022-10-10 14:28:35 +02:00
semantic-release-bot
e8faa5d944 chore(release): 2.81.3 [skip ci]
## [2.81.3](https://github.com/revanced/revanced-patches/compare/v2.81.2...v2.81.3) (2022-10-10)

### Bug Fixes

* **video-ads:** return empty ad list instead of null ([9f9ad19](9ac84ae720))
2022-10-10 11:56:13 +00:00
oSumAtrIX
9ac84ae720 fix(video-ads): return empty ad list instead of null 2022-10-10 13:50:24 +02:00
semantic-release-bot
52424bd6ab chore(release): 2.81.2 [skip ci]
## [2.81.2](https://github.com/revanced/revanced-patches/compare/v2.81.1...v2.81.2) (2022-10-08)

### Bug Fixes

* **theme:** include coloring the playlist action bar ([#742](https://github.com/revanced/revanced-patches/issues/742)) ([24f52e9](4c2d6466cc))
2022-10-08 23:47:09 +00:00
OxrxL
4c2d6466cc fix(theme): include coloring the playlist action bar (#742) 2022-10-09 01:44:50 +02:00
semantic-release-bot
6bcae6ddeb chore(release): 2.81.1 [skip ci]
## [2.81.1](https://github.com/revanced/revanced-patches/compare/v2.81.0...v2.81.1) (2022-10-07)

### Bug Fixes

* **video-ads:** block remaining video ads ([6618e53](65cee57493))
2022-10-07 21:04:25 +00:00
oSumAtrIX
65cee57493 fix(video-ads): block remaining video ads 2022-10-07 23:02:01 +02:00
semantic-release-bot
5058fd3c43 chore(release): 2.81.0 [skip ci]
# [2.81.0](https://github.com/revanced/revanced-patches/compare/v2.80.0...v2.81.0) (2022-10-06)

### Features

* **youtube/general-ads:** do not hide community posts by default ([6f4c37c](b2affc5493))
2022-10-06 08:11:29 +00:00
oSumAtrIX
b2affc5493 feat(youtube/general-ads): do not hide community posts by default 2022-10-06 10:08:54 +02:00
oSumAtrIX
01a4349a3f chore: migrate to new changes from the patcher 2022-10-05 04:13:14 +02:00
semantic-release-bot
3a25dc4fa2 chore(release): 2.80.0 [skip ci]
# [2.80.0](https://github.com/revanced/revanced-patches/compare/v2.79.2...v2.80.0) (2022-10-04)

### Features

* **youtube/remember-video-quality:** remember current quality option ([038041f](7f1a918649))
2022-10-04 05:53:56 +00:00
oSumAtrIX
7f1a918649 feat(youtube/remember-video-quality): remember current quality option 2022-10-04 07:51:47 +02:00
semantic-release-bot
c26de68a27 chore(release): 2.79.2 [skip ci]
## [2.79.2](https://github.com/revanced/revanced-patches/compare/v2.79.1...v2.79.2) (2022-10-04)

### Bug Fixes

* **youtube/disable-startup-shorts-player:** don't affect functionality of navigation bar  ([#716](https://github.com/revanced/revanced-patches/issues/716)) ([f344603](9381508678))
2022-10-04 05:44:44 +00:00
OxrxL
9381508678 fix(youtube/disable-startup-shorts-player): don't affect functionality of navigation bar (#716) 2022-10-04 07:43:01 +02:00
semantic-release-bot
6d9c743618 chore(release): 2.79.1 [skip ci]
## [2.79.1](https://github.com/revanced/revanced-patches/compare/v2.79.0...v2.79.1) (2022-10-03)

### Bug Fixes

* **youtube/disable-startup-shorts-player:** do not prevent playing videos on startup ([#714](https://github.com/revanced/revanced-patches/issues/714)) ([5711cd8](6c9986290b))
2022-10-03 23:42:37 +00:00
OxrxL
6c9986290b fix(youtube/disable-startup-shorts-player): do not prevent playing videos on startup (#714) 2022-10-04 01:40:11 +02:00
semantic-release-bot
adc7f670d1 chore(release): 2.79.0 [skip ci]
# [2.79.0](https://github.com/revanced/revanced-patches/compare/v2.78.0...v2.79.0) (2022-10-03)

### Features

* `hide-video-buttons` patch ([39da5b7](1e54bc457f))
2022-10-03 11:42:13 +00:00
oSumAtrIX
fdc34023fc refactor(youtube/general-ads): abstract integrations code 2022-10-03 13:38:07 +02:00
oSumAtrIX
1e54bc457f feat: hide-video-buttons patch 2022-10-03 13:37:30 +02:00
semantic-release-bot
9552100878 chore(release): 2.78.0 [skip ci]
# [2.78.0](https://github.com/revanced/revanced-patches/compare/v2.77.1...v2.78.0) (2022-10-02)

### Features

* **youtube/general-ads:** check for ad in identifier ([fe6f3bd](9166024b01))
2022-10-02 23:26:59 +00:00
oSumAtrIX
9166024b01 feat(youtube/general-ads): check for ad in identifier 2022-10-03 01:25:08 +02:00
semantic-release-bot
acc0f5018c chore(release): 2.77.1 [skip ci]
## [2.77.1](https://github.com/revanced/revanced-patches/compare/v2.77.0...v2.77.1) (2022-10-01)

### Bug Fixes

* **tiktok/tiktok-downloads:** add missing patch dependencies ([#686](https://github.com/revanced/revanced-patches/issues/686)) ([2b6bbba](05c043ada3))
2022-10-01 04:30:50 +00:00
d4rkk3y
05c043ada3 fix(tiktok/tiktok-downloads): add missing patch dependencies (#686) 2022-10-01 06:28:40 +02:00
semantic-release-bot
e30967bedd chore(release): 2.77.0 [skip ci]
# [2.77.0](https://github.com/revanced/revanced-patches/compare/v2.76.3...v2.77.0) (2022-10-01)

### Features

* **youtube/hdr-auto-brightness:** increase strength of fingerprint ([91e2f88](40d56f6e59))
2022-10-01 03:22:03 +00:00
oSumAtrIX
40d56f6e59 feat(youtube/hdr-auto-brightness): increase strength of fingerprint 2022-10-01 05:19:00 +02:00
semantic-release-bot
8bdfe8b74f chore(release): 2.76.3 [skip ci]
## [2.76.3](https://github.com/revanced/revanced-patches/compare/v2.76.2...v2.76.3) (2022-10-01)

### Performance Improvements

* **general-ads:** hook pathBuilder ([ebe922d](c7c9440a60))
2022-10-01 02:01:13 +00:00
oSumAtrIX
c7c9440a60 perf(general-ads): hook pathBuilder 2022-10-01 03:58:19 +02:00
semantic-release-bot
4dcd487275 chore(release): 2.76.2 [skip ci]
## [2.76.2](https://github.com/revanced/revanced-patches/compare/v2.76.1...v2.76.2) (2022-09-30)

### Bug Fixes

* **twitter/monochrome-icon:** add missing `File.write` call ([#682](https://github.com/revanced/revanced-patches/issues/682)) ([7f78d6f](68eff6fd76))
2022-09-30 18:02:24 +00:00
Ushie
68eff6fd76 fix(twitter/monochrome-icon): add missing File.write call (#682) 2022-09-30 20:00:29 +02:00
semantic-release-bot
9b58c642f3 chore(release): 2.76.1 [skip ci]
## [2.76.1](https://github.com/revanced/revanced-patches/compare/v2.76.0...v2.76.1) (2022-09-30)

### Bug Fixes

* **disable-startup-shorts-player:** remove redundant opcode pattern ([#679](https://github.com/revanced/revanced-patches/issues/679)) ([2774c0f](f9c16396d6))
2022-09-30 17:59:47 +00:00
OxrxL
f9c16396d6 fix(disable-startup-shorts-player): remove redundant opcode pattern (#679)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-30 19:58:09 +02:00
semantic-release-bot
7c528856e1 chore(release): 2.76.0 [skip ci]
# [2.76.0](https://github.com/revanced/revanced-patches/compare/v2.75.2...v2.76.0) (2022-09-30)

### Features

* bump YouTube Music patches compatibility to v5.26.52 ([#681](https://github.com/revanced/revanced-patches/issues/681)) ([24bfab8](29c18ad537))
2022-09-30 14:52:51 +00:00
Palm
29c18ad537 feat: bump YouTube Music patches compatibility to v5.26.52 (#681) 2022-09-30 16:50:36 +02:00
Sculas
1654d4121b refactor(twitter/dynamic-color): remove formatting in XML (#680) 2022-09-30 16:49:07 +02:00
semantic-release-bot
05c6c9e683 chore(release): 2.75.2 [skip ci]
## [2.75.2](https://github.com/revanced/revanced-patches/compare/v2.75.1...v2.75.2) (2022-09-30)

### Bug Fixes

* **twitter patches.:** use wider compatible Java API for writing to file ([#678](https://github.com/revanced/revanced-patches/issues/678)) ([bbf5ccf](facb808e37))
2022-09-30 14:39:21 +00:00
Aunali321
facb808e37 fix(twitter patches.): use wider compatible Java API for writing to file (#678)
Allows running the patch on Android
2022-09-30 16:37:40 +02:00
semantic-release-bot
fe1427b88a chore(release): 2.75.1 [skip ci]
## [2.75.1](https://github.com/revanced/revanced-patches/compare/v2.75.0...v2.75.1) (2022-09-29)

### Bug Fixes

* **disable-startup-shorts-player:** incorrect offsets, invert branch condition ([#672](https://github.com/revanced/revanced-patches/issues/672)) ([c5a772b](634c6c3344))
2022-09-29 22:27:30 +00:00
OxrxL
634c6c3344 fix(disable-startup-shorts-player): incorrect offsets, invert branch condition (#672) 2022-09-30 00:25:29 +02:00
semantic-release-bot
d438d9b866 chore(release): 2.75.0 [skip ci]
# [2.75.0](https://github.com/revanced/revanced-patches/compare/v2.74.0...v2.75.0) (2022-09-29)

### Features

* `disable-capture-restriction` patch ([#655](https://github.com/revanced/revanced-patches/issues/655)) ([87cf71a](e4139a112e))
2022-09-29 22:01:52 +00:00
Tim Schneeberger
e4139a112e feat: disable-capture-restriction patch (#655)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-30 00:00:16 +02:00
semantic-release-bot
559d7ad50c chore(release): 2.74.0 [skip ci]
# [2.74.0](https://github.com/revanced/revanced-patches/compare/v2.73.0...v2.74.0) (2022-09-29)

### Features

* `disable-startup-shorts-player` patch ([#670](https://github.com/revanced/revanced-patches/issues/670)) ([c4f4d4a](e1bbe59b40))
2022-09-29 21:56:14 +00:00
OxrxL
e1bbe59b40 feat: disable-startup-shorts-player patch (#670)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-29 23:53:58 +02:00
340 changed files with 3143 additions and 1877 deletions

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup JDK

View File

@@ -1,3 +1,426 @@
# [2.101.0](https://github.com/revanced/revanced-patches/compare/v2.100.3...v2.101.0) (2022-11-01)
### Features
* **youtube:** bump patches compatibility to v17.43.36 ([#924](https://github.com/revanced/revanced-patches/issues/924)) ([3867514](https://github.com/revanced/revanced-patches/commit/38675144dcb616474a047bcf8f7e1bf1f668ea46))
## [2.100.3](https://github.com/revanced/revanced-patches/compare/v2.100.2...v2.100.3) (2022-11-01)
### Bug Fixes
* **youtube/video-ads:** add switch to temporarily fix buffering issues ([7aa3bce](https://github.com/revanced/revanced-patches/commit/7aa3bce6ccd669a66de10ef6ffe2151f27b40365))
## [2.100.2](https://github.com/revanced/revanced-patches/compare/v2.100.1...v2.100.2) (2022-10-31)
### Bug Fixes
* **youtube/theme-patch:** respect app specific theme ([#946](https://github.com/revanced/revanced-patches/issues/946)) ([fe8d6c7](https://github.com/revanced/revanced-patches/commit/fe8d6c7b2c10be5cca0717b6a03cfa1bef10e2c0))
## [2.100.1](https://github.com/revanced/revanced-patches/compare/v2.100.0...v2.100.1) (2022-10-31)
# [2.100.0](https://github.com/revanced/revanced-patches/compare/v2.99.0...v2.100.0) (2022-10-30)
### Features
* `hide-watch-in-vr` patch ([#911](https://github.com/revanced/revanced-patches/issues/911)) ([8ea0b20](https://github.com/revanced/revanced-patches/commit/8ea0b20e96df53211039df0468b2d4a735a381f1))
# [2.99.0](https://github.com/revanced/revanced-patches/compare/v2.98.0...v2.99.0) (2022-10-29)
### Features
* **youtube/sponsorblock:** skip segments once automatically ([#907](https://github.com/revanced/revanced-patches/issues/907)) ([afc7588](https://github.com/revanced/revanced-patches/commit/afc75882062a9316dbc28a9dc4f990cf88b52654))
# [2.98.0](https://github.com/revanced/revanced-patches/compare/v2.97.0...v2.98.0) (2022-10-29)
### Features
* **youtube/comments:** hide shorts comments button ([#866](https://github.com/revanced/revanced-patches/issues/866)) ([c78a74e](https://github.com/revanced/revanced-patches/commit/c78a74e21b4521034f44e9bfd226c5a362c21e6c))
# [2.97.0](https://github.com/revanced/revanced-patches/compare/v2.96.0...v2.97.0) (2022-10-29)
### Features
* **youtube/microg-support:** handle availability of Vanced MicroG ([bfd0d14](https://github.com/revanced/revanced-patches/commit/bfd0d1418fb68f1d37687ec2072d3b64a9c3c6ee))
# [2.96.0](https://github.com/revanced/revanced-patches/compare/v2.95.0...v2.96.0) (2022-10-28)
### Features
* **youtube/return-youtube-dislike:** compatibility for old and new button layout ([6629bd7](https://github.com/revanced/revanced-patches/commit/6629bd71716a753be06617724e536b8ab4c3b69a))
# [2.95.0](https://github.com/revanced/revanced-patches/compare/v2.94.0...v2.95.0) (2022-10-28)
### Features
* **youtube:** bump patches compatibility to v17.41.37 ([#888](https://github.com/revanced/revanced-patches/issues/888)) ([11ed0c0](https://github.com/revanced/revanced-patches/commit/11ed0c0fb3236d87284806d2fa957699e908cc61))
# [2.94.0](https://github.com/revanced/revanced-patches/compare/v2.93.0...v2.94.0) (2022-10-28)
### Features
* remove compatibility for YouTube v17.41.37 ([#886](https://github.com/revanced/revanced-patches/issues/886)) ([0f4bc19](https://github.com/revanced/revanced-patches/commit/0f4bc197455574b84dd1cb1a43f03af90858bc39))
# [2.93.0](https://github.com/revanced/revanced-patches/compare/v2.92.3...v2.93.0) (2022-10-27)
### Features
* bump YouTube patches to v17.41.37 ([#878](https://github.com/revanced/revanced-patches/issues/878)) ([9072986](https://github.com/revanced/revanced-patches/commit/9072986f99e624386ff51c7eeb1d65158bd9249a))
## [2.92.3](https://github.com/revanced/revanced-patches/compare/v2.92.2...v2.92.3) (2022-10-27)
### Bug Fixes
* **youtube:** resolve fingerprints on mutable methods ([10e4af3](https://github.com/revanced/revanced-patches/commit/10e4af386652d51c621519f7a67aac8c22ed8c18))
## [2.92.2](https://github.com/revanced/revanced-patches/compare/v2.92.1...v2.92.2) (2022-10-27)
### Bug Fixes
* **youtube/theme:** theme missing gray color ([#873](https://github.com/revanced/revanced-patches/issues/873)) ([5267d56](https://github.com/revanced/revanced-patches/commit/5267d56a05b4053d556171ffd2d2870f3f932e8e))
## [2.92.1](https://github.com/revanced/revanced-patches/compare/v2.92.0...v2.92.1) (2022-10-26)
### Bug Fixes
* **youtube/custom-branding:** use proper scaled icons ([24b5bcd](https://github.com/revanced/revanced-patches/commit/24b5bcdd703474c940fd436a37f0ae924d8b8c74))
# [2.92.0](https://github.com/revanced/revanced-patches/compare/v2.91.0...v2.92.0) (2022-10-26)
### Features
* **youtube/hide-mix-playlists:** hide in video suggestions ([#854](https://github.com/revanced/revanced-patches/issues/854)) ([acde5f0](https://github.com/revanced/revanced-patches/commit/acde5f066053ca3d58ca09fc2a6a1381ba27d84b))
# [2.91.0](https://github.com/revanced/revanced-patches/compare/v2.90.0...v2.91.0) (2022-10-26)
### Features
* remove partially complete patch ([d212e19](https://github.com/revanced/revanced-patches/commit/d212e19c3276c2ba6550f03dfd9bba47b7773524))
# [2.90.0](https://github.com/revanced/revanced-patches/compare/v2.89.0...v2.90.0) (2022-10-25)
### Features
* `comment` patch ([#858](https://github.com/revanced/revanced-patches/issues/858)) ([472fb4f](https://github.com/revanced/revanced-patches/commit/472fb4f3747c835be2c5069a0f65017ab42f8d7e))
# [2.89.0](https://github.com/revanced/revanced-patches/compare/v2.88.0...v2.89.0) (2022-10-25)
### Features
* `hide-album-cards` patch ([#857](https://github.com/revanced/revanced-patches/issues/857)) ([bce9d0c](https://github.com/revanced/revanced-patches/commit/bce9d0c9405d7afd5c51c2a9c2c247f3ff7581f5))
# [2.88.0](https://github.com/revanced/revanced-patches/compare/v2.87.0...v2.88.0) (2022-10-25)
### Features
* `hide-artist-card` patch ([#859](https://github.com/revanced/revanced-patches/issues/859)) ([1f76246](https://github.com/revanced/revanced-patches/commit/1f7624680b86e3a7afd45521bfef86f88f52c976))
# [2.87.0](https://github.com/revanced/revanced-patches/compare/v2.86.0...v2.87.0) (2022-10-25)
### Bug Fixes
* **metanav/fix-scaling:** use semantic versioning in package versions ([a9445a8](https://github.com/revanced/revanced-patches/commit/a9445a823e3a4885764cea9d08b51a1584d3238f))
* **youtube/theme:** theme litho ui components & use correct theme for settings ([#791](https://github.com/revanced/revanced-patches/issues/791)) ([91c03c5](https://github.com/revanced/revanced-patches/commit/91c03c5624ca28ac13ee761261dea423f0ac42d7))
### Features
* `fix-metanav-scaling` patch ([#831](https://github.com/revanced/revanced-patches/issues/831)) ([4808e09](https://github.com/revanced/revanced-patches/commit/4808e099856e50a6f7e66834a92e2210cc84c8bc))
* `hide-crowdfunding-box` patch ([#856](https://github.com/revanced/revanced-patches/issues/856)) ([3704ce2](https://github.com/revanced/revanced-patches/commit/3704ce22dbbff02b2e2d6dbdf9a74254a2511d3c))
# [2.86.0](https://github.com/revanced/revanced-patches/compare/v2.85.2...v2.86.0) (2022-10-25)
### Features
* **youtube/theme:** extend theming to splash screen ([#769](https://github.com/revanced/revanced-patches/issues/769)) ([f7bb937](https://github.com/revanced/revanced-patches/commit/f7bb937ef2374d1042ea3772f03627d7f0111b78))
## [2.85.2](https://github.com/revanced/revanced-patches/compare/v2.85.1...v2.85.2) (2022-10-22)
### Bug Fixes
* **youtube/integrations:** set context for remaining activities ([#828](https://github.com/revanced/revanced-patches/issues/828)) ([b2b6a3d](https://github.com/revanced/revanced-patches/commit/b2b6a3d1492bc2d5a6e27c68c74e3904764dda4b))
## [2.85.1](https://github.com/revanced/revanced-patches/compare/v2.85.0...v2.85.1) (2022-10-21)
### Bug Fixes
* **youtube/theme:** extend dark mode theming ([#827](https://github.com/revanced/revanced-patches/issues/827)) ([6d803c5](https://github.com/revanced/revanced-patches/commit/6d803c5386e1f6f6fb6a7fa0a9f0bb81ee1022ac))
# [2.85.0](https://github.com/revanced/revanced-patches/compare/v2.84.1...v2.85.0) (2022-10-20)
### Features
* **youtube:** `hide-captions-button` patch ([#770](https://github.com/revanced/revanced-patches/issues/770)) ([478af6a](https://github.com/revanced/revanced-patches/commit/478af6ad54ffdf6f99abab35a84a4f50b59d28c8))
## [2.84.1](https://github.com/revanced/revanced-patches/compare/v2.84.0...v2.84.1) (2022-10-20)
### Bug Fixes
* **youtube/hide-mix-playlists:** correct switch title, summary and defaults ([#821](https://github.com/revanced/revanced-patches/issues/821)) ([f9eea33](https://github.com/revanced/revanced-patches/commit/f9eea332cea0b8c3d5c3dfff645b60861e925b5a))
# [2.84.0](https://github.com/revanced/revanced-patches/compare/v2.83.3...v2.84.0) (2022-10-20)
### Features
* **youtube:** `hide-mix-playlists` patch ([#816](https://github.com/revanced/revanced-patches/issues/816)) ([e76c73b](https://github.com/revanced/revanced-patches/commit/e76c73b455c65aa605e418f19d88b64e0e244901))
## [2.83.3](https://github.com/revanced/revanced-patches/compare/v2.83.2...v2.83.3) (2022-10-20)
### Bug Fixes
* **youtube/video-ads:** revert faulty method patch ([#820](https://github.com/revanced/revanced-patches/issues/820)) ([666248a](https://github.com/revanced/revanced-patches/commit/666248ae65d1ee84d1a278714c0dcd2528c5dd14))
## [2.83.2](https://github.com/revanced/revanced-patches/compare/v2.83.1...v2.83.2) (2022-10-19)
### Bug Fixes
* **youtube/video-ads:** add back initial method to block ads ([#818](https://github.com/revanced/revanced-patches/issues/818)) ([8b02acd](https://github.com/revanced/revanced-patches/commit/8b02acd3b33c4702d81ec46dccb35604ec5fbe02))
## [2.83.1](https://github.com/revanced/revanced-patches/compare/v2.83.0...v2.83.1) (2022-10-19)
### Bug Fixes
* **youtube/video-ads:** block earlier in call hirarchy ([#813](https://github.com/revanced/revanced-patches/issues/813)) ([f9517d2](https://github.com/revanced/revanced-patches/commit/f9517d2058c7561cf89b59ed36f690417dc076f7))
# [2.83.0](https://github.com/revanced/revanced-patches/compare/v2.82.1...v2.83.0) (2022-10-18)
### Features
* bump YouTube Music patches compatibility ([#809](https://github.com/revanced/revanced-patches/issues/809)) ([09f2d8e](https://github.com/revanced/revanced-patches/commit/09f2d8e14937b582bc4bfb7d3a8bb2b7622f772d))
## [2.82.1](https://github.com/revanced/revanced-patches/compare/v2.82.0...v2.82.1) (2022-10-17)
### Bug Fixes
* **youtube/video-ads:** return empty ad list earlier ([a47ce9b](https://github.com/revanced/revanced-patches/commit/a47ce9ba4f75673de23eb6054f5652224a48f43e))
# [2.82.0](https://github.com/revanced/revanced-patches/compare/v2.81.11...v2.82.0) (2022-10-13)
### Features
* **youtube/remember-video-quality:** remember the quality until changed by default ([1aebabe](https://github.com/revanced/revanced-patches/commit/1aebabefdb0b163e0020fd3b52d7d1fa2404764b))
## [2.81.11](https://github.com/revanced/revanced-patches/compare/v2.81.10...v2.81.11) (2022-10-11)
### Bug Fixes
* **youtube/theme:** add missing theme condition check ([#771](https://github.com/revanced/revanced-patches/issues/771)) ([40b70b9](https://github.com/revanced/revanced-patches/commit/40b70b9f9a24cfbf76bcd69f562b87e5cfade66f))
## [2.81.10](https://github.com/revanced/revanced-patches/compare/v2.81.9...v2.81.10) (2022-10-11)
### Bug Fixes
* **spotify/disable-capture-restriction:** dynamically find indices ([#759](https://github.com/revanced/revanced-patches/issues/759)) ([2cc64c6](https://github.com/revanced/revanced-patches/commit/2cc64c61d1bc18a1717354085ddc60a251173837))
## [2.81.9](https://github.com/revanced/revanced-patches/compare/v2.81.8...v2.81.9) (2022-10-11)
### Bug Fixes
* **youtube/general-ads:** hide ads on wide screens ([#765](https://github.com/revanced/revanced-patches/issues/765)) ([f0d2f3e](https://github.com/revanced/revanced-patches/commit/f0d2f3e01b90bbe6d2b55b941eaf96be2295cd3c))
* **youtube/theme:** colore the comment action bar ([#762](https://github.com/revanced/revanced-patches/issues/762)) ([4b3abe0](https://github.com/revanced/revanced-patches/commit/4b3abe0d45ac8c0c5ae6cf4955681ba76ce10309))
## [2.81.8](https://github.com/revanced/revanced-patches/compare/v2.81.7...v2.81.8) (2022-10-10)
### Bug Fixes
* **youtube/video-ads:** invert condition to hide ads ([e353ed0](https://github.com/revanced/revanced-patches/commit/e353ed0b0fe78feae65f1ad2f6567c1e9aa9c71d))
## [2.81.7](https://github.com/revanced/revanced-patches/compare/v2.81.6...v2.81.7) (2022-10-10)
### Bug Fixes
* **video-ads:** invert the condition to hide ads ([a32af95](https://github.com/revanced/revanced-patches/commit/a32af951566a7187ae2618ef08f9298f78f8ea8c))
## [2.81.6](https://github.com/revanced/revanced-patches/compare/v2.81.5...v2.81.6) (2022-10-10)
### Bug Fixes
* **video-ads:** return empty list in correct method ([bbcf050](https://github.com/revanced/revanced-patches/commit/bbcf0501d4be0c43eddb7a9b3c32394222efc8f0))
## [2.81.5](https://github.com/revanced/revanced-patches/compare/v2.81.4...v2.81.5) (2022-10-10)
### Bug Fixes
* **video-ads:** clobber unused register ([0feb607](https://github.com/revanced/revanced-patches/commit/0feb6073dd3de5dc179ffa9fde2da24439986431))
## [2.81.4](https://github.com/revanced/revanced-patches/compare/v2.81.3...v2.81.4) (2022-10-10)
### Bug Fixes
* **general-ads:** invalid smali syntax ([86224c1](https://github.com/revanced/revanced-patches/commit/86224c1f601c1bd22c0ce4dcf2a8e79ea3b8b2ae))
## [2.81.3](https://github.com/revanced/revanced-patches/compare/v2.81.2...v2.81.3) (2022-10-10)
### Bug Fixes
* **video-ads:** return empty ad list instead of null ([f6c5027](https://github.com/revanced/revanced-patches/commit/f6c5027981a2b55bbcd2e55d294ebfd5e6f0b527))
## [2.81.2](https://github.com/revanced/revanced-patches/compare/v2.81.1...v2.81.2) (2022-10-08)
### Bug Fixes
* **theme:** include coloring the playlist action bar ([#742](https://github.com/revanced/revanced-patches/issues/742)) ([6766ec8](https://github.com/revanced/revanced-patches/commit/6766ec8f31da6dd71fff0ae4b7044af5ec4a5dfd))
## [2.81.1](https://github.com/revanced/revanced-patches/compare/v2.81.0...v2.81.1) (2022-10-07)
### Bug Fixes
* **video-ads:** block remaining video ads ([fbc83a2](https://github.com/revanced/revanced-patches/commit/fbc83a22d37012394311a87d27202b7cc86e047d))
# [2.81.0](https://github.com/revanced/revanced-patches/compare/v2.80.0...v2.81.0) (2022-10-06)
### Features
* **youtube/general-ads:** do not hide community posts by default ([6269638](https://github.com/revanced/revanced-patches/commit/626963819c183cbfeca4ff4ab0a16fc39ed9d8a8))
# [2.80.0](https://github.com/revanced/revanced-patches/compare/v2.79.2...v2.80.0) (2022-10-04)
### Features
* **youtube/remember-video-quality:** remember current quality option ([9c510d4](https://github.com/revanced/revanced-patches/commit/9c510d472048f5bce127eb0329e53aaf259e9b1b))
## [2.79.2](https://github.com/revanced/revanced-patches/compare/v2.79.1...v2.79.2) (2022-10-04)
### Bug Fixes
* **youtube/disable-startup-shorts-player:** don't affect functionality of navigation bar ([#716](https://github.com/revanced/revanced-patches/issues/716)) ([05f5cc1](https://github.com/revanced/revanced-patches/commit/05f5cc17e3fcbf255c6fe5b503c9fd20c218f5a1))
## [2.79.1](https://github.com/revanced/revanced-patches/compare/v2.79.0...v2.79.1) (2022-10-03)
### Bug Fixes
* **youtube/disable-startup-shorts-player:** do not prevent playing videos on startup ([#714](https://github.com/revanced/revanced-patches/issues/714)) ([9a0d379](https://github.com/revanced/revanced-patches/commit/9a0d3798afd75bba5c63e1b8803dc25814586be9))
# [2.79.0](https://github.com/revanced/revanced-patches/compare/v2.78.0...v2.79.0) (2022-10-03)
### Features
* `hide-video-buttons` patch ([584803a](https://github.com/revanced/revanced-patches/commit/584803aa900f94de1b2b2a0c41fb0884fa9270d3))
# [2.78.0](https://github.com/revanced/revanced-patches/compare/v2.77.1...v2.78.0) (2022-10-02)
### Features
* **youtube/general-ads:** check for ad in identifier ([fd0506e](https://github.com/revanced/revanced-patches/commit/fd0506eb95dbf398eb7d6bfa8732f517b9867545))
## [2.77.1](https://github.com/revanced/revanced-patches/compare/v2.77.0...v2.77.1) (2022-10-01)
### Bug Fixes
* **tiktok/tiktok-downloads:** add missing patch dependencies ([#686](https://github.com/revanced/revanced-patches/issues/686)) ([5c3b4ed](https://github.com/revanced/revanced-patches/commit/5c3b4ed0530e89d50db3b5bb9893e1ef4b463bae))
# [2.77.0](https://github.com/revanced/revanced-patches/compare/v2.76.3...v2.77.0) (2022-10-01)
### Features
* **youtube/hdr-auto-brightness:** increase strength of fingerprint ([2379b58](https://github.com/revanced/revanced-patches/commit/2379b5892b3505c8780f475bbc56f520613fa31d))
## [2.76.3](https://github.com/revanced/revanced-patches/compare/v2.76.2...v2.76.3) (2022-10-01)
### Performance Improvements
* **general-ads:** hook pathBuilder ([b9bad0b](https://github.com/revanced/revanced-patches/commit/b9bad0bb922bbd44ddf2acbfae87243beb28851a))
## [2.76.2](https://github.com/revanced/revanced-patches/compare/v2.76.1...v2.76.2) (2022-09-30)
### Bug Fixes
* **twitter/monochrome-icon:** add missing `File.write` call ([#682](https://github.com/revanced/revanced-patches/issues/682)) ([de22e3f](https://github.com/revanced/revanced-patches/commit/de22e3f03ef1d6db08f9446f02e687721d9017d7))
## [2.76.1](https://github.com/revanced/revanced-patches/compare/v2.76.0...v2.76.1) (2022-09-30)
### Bug Fixes
* **disable-startup-shorts-player:** remove redundant opcode pattern ([#679](https://github.com/revanced/revanced-patches/issues/679)) ([5197a24](https://github.com/revanced/revanced-patches/commit/5197a24cc5ecc1b51cdc5c00c77c873b86394994))
# [2.76.0](https://github.com/revanced/revanced-patches/compare/v2.75.2...v2.76.0) (2022-09-30)
### Features
* bump YouTube Music patches compatibility to v5.26.52 ([#681](https://github.com/revanced/revanced-patches/issues/681)) ([f195734](https://github.com/revanced/revanced-patches/commit/f195734925dd41596d058f9cbf2b7e619a8d5833))
## [2.75.2](https://github.com/revanced/revanced-patches/compare/v2.75.1...v2.75.2) (2022-09-30)
### Bug Fixes
* **twitter patches.:** use wider compatible Java API for writing to file ([#678](https://github.com/revanced/revanced-patches/issues/678)) ([4448de8](https://github.com/revanced/revanced-patches/commit/4448de80a6277862d81c7a29b9489e4fbec48496))
## [2.75.1](https://github.com/revanced/revanced-patches/compare/v2.75.0...v2.75.1) (2022-09-29)
### Bug Fixes
* **disable-startup-shorts-player:** incorrect offsets, invert branch condition ([#672](https://github.com/revanced/revanced-patches/issues/672)) ([bfe1e38](https://github.com/revanced/revanced-patches/commit/bfe1e3808ece85fbb0785a4378ee95591115ac33))
# [2.75.0](https://github.com/revanced/revanced-patches/compare/v2.74.0...v2.75.0) (2022-09-29)
### Features
* `disable-capture-restriction` patch ([#655](https://github.com/revanced/revanced-patches/issues/655)) ([3cc26c3](https://github.com/revanced/revanced-patches/commit/3cc26c31d378c27ca7f768f777daa00e3f849dff))
# [2.74.0](https://github.com/revanced/revanced-patches/compare/v2.73.0...v2.74.0) (2022-09-29)
### Features
* `disable-startup-shorts-player` patch ([#670](https://github.com/revanced/revanced-patches/issues/670)) ([feb3bd0](https://github.com/revanced/revanced-patches/commit/feb3bd02aaf67379733d10988fd58b0c3924f88e))
# [2.73.0](https://github.com/revanced/revanced-patches/compare/v2.72.1...v2.73.0) (2022-09-29)

202
README.md
View File

@@ -4,22 +4,42 @@ The official Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json).
### 📦 `com.reddit.frontpage`
### 📦 `com.ss.android.ugc.trill`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
| `premium-icon-reddit` | Unlocking Premium Icons in reddit app. | all |
| `tiktok-ads` | Removes ads from TikTok. | all |
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-settings` | Add settings menu to TikTok. | all |
| `tiktok-force-login` | Do not force login. | all |
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
</details>
### 📦 `com.spotify.music`
### 📦 `com.zhiliaoapp.musically`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-premium-navbar` | Removes the premium tab from the navbar. | all |
| `spotify-theme` | Applies a custom theme. | all |
| `tiktok-ads` | Removes ads from TikTok. | all |
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-settings` | Add settings menu to TikTok. | all |
| `tiktok-force-login` | Do not force login. | all |
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
</details>
### 📦 `com.twitter.android`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
| `monochrome-icon` | Adds a monochrome icon. | all |
</details>
### 📦 `de.dwd.warnapp`
@@ -30,67 +50,14 @@ The official Patch bundle provided by ReVanced and the community.
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
</details>
### 📦 `com.garzotto.pflotsh.ecmwf_a`
### 📦 `com.spotify.music`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 |
</details>
### 📦 `com.ss.android.ugc.trill`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-force-login` | Do not force login. | all |
| `tiktok-settings` | Add settings menu to TikTok. | all |
| `tiktok-ads` | Removes ads from TikTok. | all |
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
</details>
### 📦 `com.zhiliaoapp.musically`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `tiktok-speed` | Enables the playback speed option for all videos. | all |
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-force-login` | Do not force login. | all |
| `tiktok-settings` | Add settings menu to TikTok. | all |
| `tiktok-ads` | Removes ads from TikTok. | all |
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
</details>
### 📦 `com.twitter.android`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `monochrome-icon` | Adds a monochrome icon. | all |
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
</details>
### 📦 `com.google.android.apps.youtube.music`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.25.51 |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.25.51 |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.25.51 |
| `music-video-ads` | Removes ads in the music player. | 5.25.51 |
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.25.51 |
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.25.51 |
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.25.51 |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.25.51 |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.25.51 |
| `background-play` | Enables playing music in the background. | 5.25.51 |
| `spotify-theme` | Applies a custom theme. | all |
| `disable-capture-restriction` | Allows capturing Spotify's audio output while screen sharing or screen recording. | all |
| `hide-premium-navbar` | Removes the premium tab from the navbar. | all |
</details>
### 📦 `com.google.android.youtube`
@@ -98,40 +65,49 @@ The official Patch bundle provided by ReVanced and the community.
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.36.37 |
| `downloads` | Enables downloading music and videos from YouTube. | 17.36.37 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.36.37 |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.36.37 |
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
| `custom-playback-speed` | Adds more video playback speed options. | 17.36.37 |
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.36.37 |
| `settings` | Adds settings for ReVanced to YouTube. | all |
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.36.37 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.36.37 |
| `always-autorepeat` | Always repeats the playing video again. | 17.36.37 |
| `general-ads` | Removes general ads. | 17.36.37 |
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.36.37 |
| `video-ads` | Removes ads in the video player. | 17.36.37 |
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
| `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 |
| `hide-create-button` | Hides the create button in the navigation bar. | 17.36.37 |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
| `theme` | Applies a custom theme. | all |
| `hide-email-address` | Hides the email address in the account switcher. | 17.36.37 |
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.43.36 |
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.43.36 |
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.43.36 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.43.36 |
| `hide-captions-button` | Hides the captions button on video player. | 17.43.36 |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.43.36 |
| `hide-create-button` | Hides the create button in the navigation bar. | 17.43.36 |
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.43.36 |
| `hide-cast-button` | Hides the cast button in the video player. | all |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.36.37 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
| `sponsorblock` | Integrate SponsorBlock. | 17.43.36 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.43.36 |
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.43.36 |
| `hide-album-cards` | Hides the album cards below the artist description. | 17.43.36 |
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.43.36 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.43.36 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.43.36 |
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.43.36 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.43.36 |
| `comments` | Hides components related to comments. | 17.43.36 |
| `theme` | Applies a custom theme. | all |
| `hide-email-address` | Hides the email address in the account switcher. | 17.43.36 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.43.36 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.43.36 |
| `hide-my-mix` | Hides mix playlists. | 17.43.36 |
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `premium-heading` | Shows premium branding on the home screen. | all |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.43.36 |
| `general-ads` | Removes general ads. | 17.43.36 |
| `video-ads` | Removes ads in the video player. | 17.43.36 |
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.43.36 |
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.43.36 |
| `downloads` | Enables downloading music and videos from YouTube. | 17.43.36 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.43.36 |
| `settings` | Adds settings for ReVanced to YouTube. | all |
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.43.36 |
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.43.36 |
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `always-autorepeat` | Always repeats the playing video again. | 17.43.36 |
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.43.36 |
| `minimized-playback` | Enables minimized and background playback. | 17.43.36 |
| `custom-playback-speed` | Adds more video playback speed options. | 17.43.36 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.43.36 |
</details>
### 📦 `com.vanced.android.youtube`
@@ -142,6 +118,40 @@ The official Patch bundle provided by ReVanced and the community.
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | 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 |
|:--------:|:--------------:|:-----------------:|
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.29.52 |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.29.52 |
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.29.52 |
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.29.52 |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.29.52 |
| `music-video-ads` | Removes ads in the music player. | 5.29.52 |
| `background-play` | Enables playing music in the background. | 5.29.52 |
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.29.52 |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.29.52 |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.29.52 |
</details>
### 📦 `com.reddit.frontpage`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
</details>
## 📝 JSON Format

View File

@@ -20,7 +20,7 @@ repositories {
}
dependencies {
implementation("app.revanced:revanced-patcher:5.1.2")
implementation("app.revanced:revanced-patcher:6.0.0")
implementation("app.revanced:multidexlib2:2.5.2.r2")
// Required for meta
implementation("com.google.code.gson:gson:2.9.1")

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.73.0
version = 2.101.0

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
package app.revanced.extensions
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
@@ -35,9 +35,9 @@ internal fun MutableMethodImplementation.injectHideCall(
* @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) {
fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
callback(targetClass)
this.findClass(targetClass.superclass ?: return)?.resolve()?.let {
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
traverseClassHierarchy(it, callback)
}
}
@@ -135,7 +135,7 @@ internal fun MutableMethod.injectConsumableEventHook(hookRef: ImmutableMethodRef
* @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(
fun ResourceContext.injectResources(
classLoader: ClassLoader,
patchDirectoryPath: String,
resourceType: String,
@@ -160,7 +160,7 @@ fun ResourceData.injectResources(
* @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(
fun ResourceContext.injectStrings(
classLoader: ClassLoader,
patchDirectoryPath: String,
languageIdentifier: String? = null,

View File

@@ -2,12 +2,12 @@ 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.data.Context
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.util.patch.impl.JarPatchBundle
import app.revanced.patcher.util.patch.PatchBundle
import java.io.File
typealias Bundle = List<Class<out Patch<Data>>>
typealias Bundle = List<Class<out Patch<Context>>>
object Meta {
@JvmStatic
@@ -20,7 +20,7 @@ object Meta {
}
}
fun accumulatePatches() = JarPatchBundle(
fun accumulatePatches() = PatchBundle.Jar(
File("build/libs/").listFiles()!!.first {
it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar")
}.absolutePath

View File

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

View File

@@ -1,7 +1,7 @@
package app.revanced.meta.readme
import app.revanced.meta.Bundle
import app.revanced.patcher.data.Data
import app.revanced.patcher.data.Context
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.patchName
@@ -15,7 +15,7 @@ private val TABLE_REGEX = Regex("\\{\\{\\s?table\\s?}}")
fun generateText(bundle: Bundle) {
val output = StringBuilder()
val packages = mutableMapOf<String, MutableList<Class<out Patch<Data>>>>()
val packages = mutableMapOf<String, MutableList<Class<out Patch<Context>>>>()
for (patch in bundle) {
patch.compatiblePackages?.forEach { pkg ->

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -3,18 +3,13 @@ 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.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-constructor-fingerprint")
@MatchingMethod(
"Laghd;",
"<init>",
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MusicVideoAdsCompatibility
@Version("0.0.1")

View File

@@ -4,16 +4,12 @@ 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")

View File

@@ -3,13 +3,13 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.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
@@ -24,8 +24,8 @@ class MusicVideoAdsPatch : BytecodePatch(
ShowMusicVideoAdsConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
ShowMusicVideoAdsFingerprint.resolve(data, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
override fun execute(context: BytecodeContext): PatchResult {
ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
val result = ShowMusicVideoAdsFingerprint.result!!

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -3,18 +3,13 @@ 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.patcher.fingerprint.method.impl.MethodFingerprint
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")

View File

@@ -4,17 +4,12 @@ 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.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")

View File

@@ -3,12 +3,12 @@ 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.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.toInstruction
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
@@ -25,7 +25,7 @@ class CodecsUnlockPatch : BytecodePatch(
CodecsLockFingerprint, AllCodecsReferenceFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val codecsLockResult = CodecsLockFingerprint.result!!
val implementation = codecsLockResult.mutableMethod.implementation!!
@@ -42,7 +42,7 @@ class CodecsUnlockPatch : BytecodePatch(
val allCodecsResult = AllCodecsReferenceFingerprint.result!!
val allCodecsMethod =
data.toMethodWalker(allCodecsResult.method)
context.toMethodWalker(allCodecsResult.method)
.nextMethod(allCodecsResult.scanResult.patternScanResult!!.startIndex)
.getMethod()

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -3,19 +3,14 @@ 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"

View File

@@ -3,17 +3,13 @@ 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.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("exclusive-audio-fingerprints")
@MatchingMethod(
"Lgmd;", "c"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@ExclusiveAudioCompatibility
@Version("0.0.1")

View File

@@ -3,13 +3,13 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
@@ -23,7 +23,7 @@ class ExclusiveAudioPatch : BytecodePatch(
AudioOnlyEnablerFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1")
method.addInstruction("return v0")

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -4,15 +4,11 @@ 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(

View File

@@ -3,12 +3,12 @@ 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.data.BytecodeContext
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.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
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
@@ -23,7 +23,7 @@ class CompactHeaderPatch : BytecodePatch(
CompactHeaderConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val result = CompactHeaderConstructorFingerprint.result!!
val method = result.mutableMethod

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -4,15 +4,11 @@ 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(

View File

@@ -3,18 +3,14 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.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")
@@ -26,7 +22,7 @@ class MinimizedPlaybackPatch : BytecodePatch(
MinimizedPlaybackManagerFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstructions(
0, """
return-void

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -4,15 +4,11 @@ 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(

View File

@@ -4,15 +4,11 @@ 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(

View File

@@ -3,14 +3,14 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
@@ -25,9 +25,9 @@ class HideGetPremiumPatch : BytecodePatch(
HideGetPremiumParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val parentResult = HideGetPremiumParentFingerprint.result!!
HideGetPremiumFingerprint.resolve(data, parentResult.classDef)
HideGetPremiumFingerprint.resolve(context, parentResult.classDef)
val startIndex = parentResult.scanResult.patternScanResult!!.startIndex

View File

@@ -10,7 +10,7 @@ import app.revanced.patcher.annotation.Package
*/
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -3,17 +3,13 @@ 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.patcher.fingerprint.method.impl.MethodFingerprint
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")

View File

@@ -3,12 +3,12 @@ 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.data.BytecodeContext
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.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
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
@@ -23,7 +23,7 @@ class RemoveTasteBuilderPatch : BytecodePatch(
TasteBuilderConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val result = TasteBuilderConstructorFingerprint.result!!
val method = result.mutableMethod

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -3,17 +3,13 @@ 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.patcher.fingerprint.method.impl.MethodFingerprint
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")

View File

@@ -3,12 +3,12 @@ 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.data.BytecodeContext
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.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
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
@@ -28,7 +28,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
PivotBarConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val result = PivotBarConstructorFingerprint.result!!
val implementation = result.mutableMethod.implementation!!

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -2,16 +2,12 @@ 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.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -2,16 +2,12 @@ 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.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -2,16 +2,12 @@ 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.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -3,17 +3,13 @@ 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.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -2,16 +2,12 @@ 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.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -4,15 +4,11 @@ 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.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")

View File

@@ -3,11 +3,11 @@ package app.revanced.patches.music.misc.microg.patch.bytecode
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.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
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.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import app.revanced.patches.music.misc.microg.fingerprints.*
import app.revanced.patches.music.misc.microg.patch.resource.MusicMicroGResourcePatch
@@ -39,10 +39,10 @@ class MusicMicroGBytecodePatch : BytecodePatch(
// - "com.google.android.gms.phenotype.PACKAGE_NAME",
// - "com.google.android.gms.phenotype.UPDATE",
// - "com.google.android.gms.phenotype",
override fun execute(data: BytecodeData) =
override fun execute(context: BytecodeContext) =
// apply common microG patch
MicroGBytecodeHelper.patchBytecode(
data,
context,
arrayOf(
MicroGBytecodeHelper.packageNameTransform(
Constants.PACKAGE_NAME,

View File

@@ -3,10 +3,10 @@ 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.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
@@ -20,11 +20,11 @@ import app.revanced.util.microg.MicroGResourceHelper
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
@MusicMicroGPatchCompatibility
@Version("0.0.2")
class MusicMicroGResourcePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
class MusicMicroGResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
// update manifest
MicroGResourceHelper.patchManifest(
data,
context,
MUSIC_PACKAGE_NAME,
REVANCED_MUSIC_PACKAGE_NAME,
REVANCED_MUSIC_APP_NAME
@@ -32,7 +32,7 @@ class MusicMicroGResourcePatch : ResourcePatch() {
// add metadata to the manifest
MicroGManifestHelper.addSpoofingMetadata(
data,
context,
SPOOFED_PACKAGE_NAME,
SPOOFED_PACKAGE_SIGNATURE
)

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50","5.25.51")
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50", "5.25.51", "5.25.52", "5.26.52", "5.27.51", "5.28.52", "5.29.52")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -3,17 +3,13 @@ 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.patcher.fingerprint.method.impl.MethodFingerprint
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")

View File

@@ -3,12 +3,12 @@ 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.data.BytecodeContext
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.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
@@ -22,7 +22,7 @@ class BackgroundPlayPatch : BytecodePatch(
BackgroundPlaybackDisableFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
0,
"""

View File

@@ -3,12 +3,11 @@ 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.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.reddit.ad.general.annotations.GeneralAdsCompatibility
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
@@ -22,8 +21,8 @@ import org.jf.dexlib2.immutable.reference.ImmutableStringReference
@GeneralAdsCompatibility
@Version("0.0.1")
class GeneralAdsPatch : BytecodePatch() {
override fun execute(data: BytecodeData): PatchResult {
data.classes.forEach { classDef ->
override fun execute(context: BytecodeContext): PatchResult {
context.classes.forEach { classDef ->
classDef.methods.forEach methodLoop@{ method ->
val implementation = method.implementation ?: return@methodLoop
@@ -31,7 +30,7 @@ class GeneralAdsPatch : BytecodePatch() {
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 proxiedClass = context.proxy(classDef).mutableClass
val proxiedImplementation = proxiedClass.methods.first {
it.name == method.name && it.parameterTypes.containsAll(method.parameterTypes)

View File

@@ -2,14 +2,10 @@ 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.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -3,18 +3,18 @@ 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.data.BytecodeContext
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.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.reddit.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.")
@Description("Unlocks premium Reddit app icons.")
@PremiumIconCompatibility
@Version("0.0.1")
class PremiumIconPatch : BytecodePatch(
@@ -22,7 +22,7 @@ class PremiumIconPatch : BytecodePatch(
PremiumIconFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val method = PremiumIconFingerprint.result!!.mutableMethod
method.addInstructions(
0,

View File

@@ -0,0 +1,12 @@
package app.revanced.patches.spotify.audio.annotation
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package("com.spotify.music")]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class DisableCaptureRestrictionCompatibility

View File

@@ -0,0 +1,86 @@
package app.revanced.patches.spotify.audio.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.BytecodeContext
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.spotify.audio.annotation.DisableCaptureRestrictionCompatibility
import app.revanced.patches.spotify.audio.fingerprints.DisableCaptureRestrictionAudioDriverFingerprint
import app.revanced.patches.spotify.audio.resource.patch.DisableCaptureRestrictionResourcePatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.MethodReference
@Patch
@Name("disable-capture-restriction")
@DependsOn([DisableCaptureRestrictionResourcePatch::class])
@Description("Allows capturing Spotify's audio output while screen sharing or screen recording.")
@DisableCaptureRestrictionCompatibility
@Version("0.0.2")
class DisableCaptureRestrictionBytecodePatch : BytecodePatch(
listOf(
DisableCaptureRestrictionAudioDriverFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
val method = DisableCaptureRestrictionAudioDriverFingerprint.result!!.mutableMethod
var invokePosition: Int? = null
var invokeParamRegister: Int? = null
// Find INVOKE_VIRTUAL opcode with call to AudioAttributesBuilder.setAllowedCapturePolicy(I)
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
if(instruction.opcode != Opcode.INVOKE_VIRTUAL)
continue
val methodName = ((instruction as ReferenceInstruction).reference as MethodReference).name
if (methodName != "setAllowedCapturePolicy")
continue
// Store register of the integer parameter for setAllowedCapturePolicy
invokeParamRegister = (instruction as FiveRegisterInstruction).registerD
invokePosition = index
}
if(invokePosition == null || invokeParamRegister == null)
return PatchResultError("Cannot find setAllowedCapturePolicy method call")
// Walk back to the const/4 instruction that sets the parameter register
var matchFound = false
for (index in invokePosition downTo 0) {
val instruction = method.instruction(index)
if(instruction.opcode != Opcode.CONST_4)
continue
val register = (instruction as OneRegisterInstruction).registerA
if(register != invokeParamRegister)
continue
// Replace parameter value
method.replaceInstruction(
index, "const/4 v$register, $ALLOW_CAPTURE_BY_ALL"
)
matchFound = true
break
}
return if (matchFound)
PatchResultSuccess()
else
PatchResultError("Const instruction not found")
}
private companion object {
const val ALLOW_CAPTURE_BY_ALL = 0x01
}
}

View File

@@ -0,0 +1,17 @@
package app.revanced.patches.spotify.audio.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.spotify.audio.annotation.DisableCaptureRestrictionCompatibility
@Name("disable-capture-restriction-audio-driver-fingerprint")
@DisableCaptureRestrictionCompatibility
@Version("0.0.2")
object DisableCaptureRestrictionAudioDriverFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass == "Lcom/spotify/playback/playbacknative/AudioDriver;" && methodDef.name == "constructAudioAttributes"
}
)

View File

@@ -0,0 +1,33 @@
package app.revanced.patches.spotify.audio.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.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patches.spotify.audio.annotation.DisableCaptureRestrictionCompatibility
import org.w3c.dom.Element
@Name("disable-capture-restriction-resource-patch")
@Description("Sets allowAudioPlaybackCapture in manifest to true.")
@DisableCaptureRestrictionCompatibility
@Version("0.0.2")
class DisableCaptureRestrictionResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
// create an xml editor instance
context.xmlEditor["AndroidManifest.xml"].use { dom ->
// get the application node
val applicationNode = dom
.file
.getElementsByTagName("application")
.item(0) as Element
// set allowAudioPlaybackCapture attribute to true
applicationNode.setAttribute("android:allowAudioPlaybackCapture", "true")
}
return PatchResultSuccess()
}
}

View File

@@ -3,14 +3,10 @@ package app.revanced.patches.spotify.layout.theme.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.OptionsContainer
import app.revanced.patcher.patch.PatchOption
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.spotify.layout.theme.annotations.ThemeCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import org.w3c.dom.Element
@@ -21,9 +17,9 @@ import org.w3c.dom.Element
@Description("Applies a custom theme.")
@ThemeCompatibility
@Version("0.0.1")
class ThemePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
data.xmlEditor["res/values/colors.xml"].use { editor ->
class ThemePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["res/values/colors.xml"].use { editor ->
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
for (i in 0 until resourcesNode.childNodes.length) {

View File

@@ -3,14 +3,14 @@ package app.revanced.patches.spotify.premium_navbar_tab.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.BytecodeContext
import app.revanced.patcher.extensions.removeInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.spotify.premium_navbar_tab.annotations.PremiumNavbarTabCompatibility
import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabFingerprint
import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabParentFingerprint
@@ -29,9 +29,9 @@ class PremiumNavbarTabPatch : BytecodePatch(
AddPremiumNavbarTabParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val parentResult = AddPremiumNavbarTabParentFingerprint.result!!
AddPremiumNavbarTabFingerprint.resolve(data, parentResult.classDef)
AddPremiumNavbarTabFingerprint.resolve(context, parentResult.classDef)
val result = AddPremiumNavbarTabFingerprint.result!!
@@ -39,7 +39,8 @@ class PremiumNavbarTabPatch : BytecodePatch(
val methodInstructions = method.implementation!!.instructions
val lastInstructionIdx = methodInstructions.size - 1
val premiumTabId = ResourceMappingResourcePatch.resourceMappings.single{it.type == "id" && it.name == "premium_tab"}.id
val premiumTabId =
ResourceMappingResourcePatch.resourceMappings.single { it.type == "id" && it.name == "premium_tab" }.id
var removeAmount = 2
// 2nd const remove method

View File

@@ -2,15 +2,10 @@ 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("convert-help-v2-feeditemlist-fingerprint")
@MatchingMethod(
"Lbeancopy/ConvertHelp;",
"com${'$'}ss${'$'}ugc${'$'}aweme${'$'}proto${'$'}aweme_v2_feed_response${'$'}${'$'}com${'$'}ss${'$'}android${'$'}ugc${'$'}aweme${'$'}feed${'$'}model${'$'}FeedItemList",
)
@TiktokAdsCompatibility
@Version("0.0.1")
object ConvertHelpFeedItemListFingerprint : MethodFingerprint(

View File

@@ -2,15 +2,10 @@ 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(

View File

@@ -3,13 +3,13 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint
import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint
@@ -29,7 +29,7 @@ class TiktokAdsPatch : BytecodePatch(
ConvertHelpFeedItemListFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
listOf(
FeedItemListCloneFingerprint,
ConvertHelpFeedItemListFingerprint

View File

@@ -3,16 +3,11 @@ package app.revanced.patches.tiktok.feedfilter.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.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
import org.jf.dexlib2.AccessFlags
@Name("feed-api-service-fingerprint")
@MatchingMethod(
"Lcom/ss/android/ugc/aweme/feed/FeedApiService;",
"LIZ",
)
@FeedFilterCompatibility
@Version("0.0.1")
object FeedApiServiceLIZFingerprint : MethodFingerprint(

View File

@@ -3,13 +3,13 @@ package app.revanced.patches.tiktok.feedfilter.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.BytecodeContext
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
@@ -30,7 +30,7 @@ class TiktokFeedFilter : BytecodePatch(
SettingsStatusLoadFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val method = FeedApiServiceLIZFingerprint.result!!.mutableMethod
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
if (instruction.opcode != Opcode.RETURN_OBJECT) continue

View File

@@ -3,13 +3,11 @@ package app.revanced.patches.tiktok.interaction.downloads.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.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-code")
@MatchingMethod("ACLCommonShare", "getCode")
@DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint : MethodFingerprint(

View File

@@ -3,13 +3,11 @@ package app.revanced.patches.tiktok.interaction.downloads.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.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-show-type")
@MatchingMethod("ACLCommonShare", "getShowType")
@DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint2 : MethodFingerprint(

View File

@@ -3,13 +3,11 @@ package app.revanced.patches.tiktok.interaction.downloads.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.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-transcode")
@MatchingMethod("ACLCommonShare", "getTranscode")
@DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint3 : MethodFingerprint(

View File

@@ -3,13 +3,11 @@ package app.revanced.patches.tiktok.interaction.downloads.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.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("download-path-parent-fingerprint")
@MatchingMethod("LX/4bF;", "LIZ")
@DownloadsCompatibility
@Version("0.0.1")
object DownloadPathParentFingerprint : MethodFingerprint(

View File

@@ -3,30 +3,34 @@ package app.revanced.patches.tiktok.interaction.downloads.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.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.extensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.StringReference
@Patch
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class])
@Name("tiktok-download")
@Description("Removes download restrictions and changes the default path to download to.")
@DownloadsCompatibility
@@ -40,7 +44,7 @@ class DownloadsPatch : BytecodePatch(
SettingsStatusLoadFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val method1 = ACLCommonShareFingerprint.result!!.mutableMethod
method1.replaceInstructions(
0,
@@ -88,7 +92,7 @@ class DownloadsPatch : BytecodePatch(
}
if (targetOffset == -1) return PatchResultError("Can not find download path uri method.")
//Change videos' download path.
val downloadUriMethod = data
val downloadUriMethod = context
.toMethodWalker(DownloadPathParentFingerprint.result!!.method)
.nextMethod(targetOffset, true)
.getMethod() as MutableMethod

View File

@@ -2,13 +2,11 @@ package app.revanced.patches.tiktok.interaction.seekbar.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.interaction.seekbar.annotations.SeekbarCompatibility
import org.jf.dexlib2.AccessFlags
@Name("aweme-get-video-control")
@MatchingMethod("Aweme", "getVideoControl")
@SeekbarCompatibility
@Version("0.0.1")
object AwemeGetVideoControlFingerprint : MethodFingerprint(

View File

@@ -3,15 +3,15 @@ package app.revanced.patches.tiktok.interaction.seekbar.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.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.interaction.seekbar.annotations.SeekbarCompatibility
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.*
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.AwemeGetVideoControlFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
import org.jf.dexlib2.builder.instruction.BuilderInstruction22c
@@ -26,9 +26,9 @@ class TiktokSeekbarPatch : BytecodePatch(
AwemeGetVideoControlFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
//Get VideoControl FieldReference
val videoControl = data.findClass { it.type.endsWith("/VideoControl;") }
val videoControl = context.findClass { it.type.endsWith("/VideoControl;") }
?: return PatchResultError("Can not find target class")
val fieldList = videoControl.immutableClass.fields.associateBy { field -> field.name }

View File

@@ -3,13 +3,11 @@ package app.revanced.patches.tiktok.interaction.speed.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.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.speed.annotations.SpeedCompatibility
import org.jf.dexlib2.AccessFlags
@Name("speed-control-parent-fingerprint")
@MatchingMethod("LX/4cP;", "LJIILL")
@SpeedCompatibility
@Version("0.0.1")
object SpeedControlParentFingerprint : MethodFingerprint(

View File

@@ -3,13 +3,13 @@ package app.revanced.patches.tiktok.interaction.speed.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.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.interaction.speed.annotations.SpeedCompatibility
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint
@@ -25,12 +25,12 @@ class SpeedPatch : BytecodePatch(
SpeedControlParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val parentMethod = SpeedControlParentFingerprint.result!!.mutableMethod
val parentMethodInstructions = parentMethod.implementation!!.instructions
for ((index, instruction) in parentMethodInstructions.withIndex()) {
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) continue
val isSpeedEnableMethod = data
val isSpeedEnableMethod = context
.toMethodWalker(parentMethod)
.nextMethod(index, true)
.getMethod() as MutableMethod

View File

@@ -2,12 +2,10 @@ package app.revanced.patches.tiktok.misc.forcelogin.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.misc.forcelogin.annotations.DisableForceLoginCompatibility
@Name("mandatory-login-service-fingerprint")
@MatchingMethod("/MandatoryLoginService;", "enableForcedLogin")
@DisableForceLoginCompatibility
@Version("0.0.1")
object MandatoryLoginServiceFingerprint : MethodFingerprint(

View File

@@ -2,12 +2,10 @@ package app.revanced.patches.tiktok.misc.forcelogin.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.misc.forcelogin.annotations.DisableForceLoginCompatibility
@Name("mandatory-login-service-fingerprint2")
@MatchingMethod("/MandatoryLoginService;", "shouldShowForcedLogin")
@DisableForceLoginCompatibility
@Version("0.0.1")
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(

View File

@@ -3,12 +3,12 @@ package app.revanced.patches.tiktok.misc.forcelogin.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.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint2
@@ -24,7 +24,7 @@ class DisableForceLoginPatch : BytecodePatch(
MandatoryLoginServiceFingerprint2
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
listOf(
MandatoryLoginServiceFingerprint,
MandatoryLoginServiceFingerprint2

View File

@@ -2,14 +2,10 @@ package app.revanced.patches.tiktok.misc.integrations.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.misc.integrations.annotations.TikTokIntegrationsCompatibility
@Name("init-fingerprint")
@MatchingMethod(
"Lcom/ss/android/ugc/aweme/app/host/AwemeHostApplication;", "onCreate"
)
@TikTokIntegrationsCompatibility
@Version("0.0.1")
object InitFingerprint : MethodFingerprint(

View File

@@ -3,12 +3,12 @@ package app.revanced.patches.tiktok.misc.integrations.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.BytecodeContext
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
@@ -21,8 +21,8 @@ class TikTokIntegrationsPatch : BytecodePatch(
InitFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
if (data.findClass("Lapp/revanced/tiktok/utils/ReVancedUtils") == null)
override fun execute(context: BytecodeContext): PatchResult {
if (context.findClass("Lapp/revanced/tiktok/utils/ReVancedUtils") == null)
return PatchResultError("Integrations have not been merged yet. This patch can not succeed without the integrations.")
val result = InitFingerprint.result!!

View File

@@ -2,15 +2,10 @@ package app.revanced.patches.tiktok.misc.settings.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.misc.settings.annotations.TikTokSettingsCompatibility
@Name("ad-personalization-activity-fingerprint")
@MatchingMethod(
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;",
"onCreate"
)
@TikTokSettingsCompatibility
@Version("0.0.1")
object AdPersonalizationActivityFingerprint : MethodFingerprint(

View File

@@ -2,15 +2,10 @@ package app.revanced.patches.tiktok.misc.settings.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.misc.settings.annotations.TikTokSettingsCompatibility
@Name("copyright-settings-string-fingerprint")
@MatchingMethod(
"Lcom/ss/android/ugc/aweme/setting/ui/SettingNewVersionFragment;",
"onViewCreated"
)
@TikTokSettingsCompatibility
@Version("0.0.1")
object CopyRightSettingsStringFingerprint : MethodFingerprint(

View File

@@ -2,15 +2,10 @@ package app.revanced.patches.tiktok.misc.settings.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.misc.settings.annotations.TikTokSettingsCompatibility
@Name("settings-status-load-fingerprint")
@MatchingMethod(
"Lapp/revanced/tiktok/settingsmenu/SettingsStatus;",
"load"
)
@TikTokSettingsCompatibility
@Version("0.0.1")
object SettingsStatusLoadFingerprint : MethodFingerprint(

View File

@@ -3,15 +3,15 @@ package app.revanced.patches.tiktok.misc.settings.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.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityFingerprint
@@ -35,7 +35,7 @@ class TikTokSettingsPatch : BytecodePatch(
CopyRightSettingsStringFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
//Replace string `Copyright Policy` to 'Revanced Settings` in TikTok settings.
val method1 = CopyRightSettingsStringFingerprint.result!!.mutableMethod
val implementation1 = method1.implementation!!
@@ -66,7 +66,7 @@ class TikTokSettingsPatch : BytecodePatch(
if (clickInstruction.opcode != Opcode.INVOKE_DIRECT)
return PatchResultError("Can not find click listener.")
val clickClass = ((clickInstruction as ReferenceInstruction).reference as MethodReference).definingClass
val mutableClickClass = data.findClass(clickClass)!!.resolve()
val mutableClickClass = context.findClass(clickClass)!!.mutableClass
val mutableOnClickMethod = mutableClickClass.methods.first {
it.name == "onClick"
}

View File

@@ -2,13 +2,11 @@ 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(

View File

@@ -3,16 +3,16 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.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
@@ -31,7 +31,7 @@ import org.jf.dexlib2.iface.reference.StringReference
class TimelineAdsPatch : BytecodePatch(
listOf(TimelineTweetJsonParserFingerprint)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
if (removePromotedAds())
return PatchResultError("The instruction for the tweet id field could not be found")

View File

@@ -3,13 +3,14 @@ package app.revanced.patches.twitter.misc.dynamiccolor.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.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.twitter.misc.dynamiccolor.annotations.DynamicColorCompatibility
import java.io.FileWriter
import java.nio.file.Files
@Patch
@@ -17,9 +18,9 @@ import java.nio.file.Files
@Description("Replaces the default Twitter Blue with the users Material You palette.")
@DynamicColorCompatibility
@Version("0.0.1")
class DynamicColorPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val resDirectory = data["res"]
class DynamicColorPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
val resDirectory = context["res"]
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
val valuesV31Directory = resDirectory.resolve("values-v31")
@@ -28,20 +29,17 @@ class DynamicColorPatch : ResourcePatch() {
val valuesNightV31Directory = resDirectory.resolve("values-night-v31")
if (!valuesNightV31Directory.isDirectory) Files.createDirectories(valuesNightV31Directory.toPath())
listOf(valuesV31Directory, valuesNightV31Directory).forEach {
listOf(valuesV31Directory, valuesNightV31Directory).forEach { it ->
val colorsXml = it.resolve("colors.xml")
if(!colorsXml.exists()) {
Files.writeString(
colorsXml.toPath(),
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<resources>\n" +
"</resources>"
)
FileWriter(colorsXml).use {
it.write("<?xml version=\"1.0\" encoding=\"utf-8\"?><resources></resources>")
}
}
}
data.xmlEditor["res/values-v31/colors.xml"].use { editor ->
context.xmlEditor["res/values-v31/colors.xml"].use { editor ->
val document = editor.file
mapOf(
@@ -64,7 +62,7 @@ class DynamicColorPatch : ResourcePatch() {
}
}
data.xmlEditor["res/values-night-v31/colors.xml"].use { editor ->
context.xmlEditor["res/values-night-v31/colors.xml"].use { editor ->
val document = editor.file
mapOf(
@@ -86,4 +84,4 @@ class DynamicColorPatch : ResourcePatch() {
return PatchResultSuccess()
}
}
}

View File

@@ -3,14 +3,14 @@ package app.revanced.patches.twitter.misc.monochrome.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.DomFileEditor
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.twitter.misc.monochrome.annotations.MonochromeIconCompatibility
import java.io.FileWriter
import java.nio.file.Files
@Patch
@@ -18,35 +18,37 @@ import java.nio.file.Files
@Description("Adds a monochrome icon.")
@MonochromeIconCompatibility
@Version("0.0.1")
class MonochromeIconPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val resDirectory = data["res"]
class MonochromeIconPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
val resDirectory = context["res"]
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
val mipmapV33Directory = resDirectory.resolve("mipmap-anydpi-v33")
if (!mipmapV33Directory.isDirectory) Files.createDirectories(mipmapV33Directory.toPath())
Files.writeString(
mipmapV33Directory.resolve("ic_launcher_twitter.xml").toPath(),
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<adaptive-icon\n" +
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" <background android:drawable=\"@color/ic_launcher_background\" />\n" +
" <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
"</adaptive-icon>"
)
FileWriter(mipmapV33Directory.resolve("ic_launcher_twitter.xml")).use {
it.write(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<adaptive-icon\n" +
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" <background android:drawable=\"@color/ic_launcher_background\" />\n" +
" <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
"</adaptive-icon>"
)
}
Files.writeString(
mipmapV33Directory.resolve("ic_launcher_twitter_round.xml").toPath(),
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<adaptive-icon\n" +
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" <background android:drawable=\"@color/ic_launcher_background\" />\n" +
" <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
"</adaptive-icon>"
)
FileWriter(mipmapV33Directory.resolve("ic_launcher_twitter_round.xml")).use {
it.write(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<adaptive-icon\n" +
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" <background android:drawable=\"@color/ic_launcher_background\" />\n" +
" <foreground android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
" <monochrome android:drawable=\"@mipmap/ic_launcher_twitter_foreground\" />\n" +
"</adaptive-icon>"
)
}
return PatchResultSuccess()
}

View File

@@ -2,14 +2,10 @@ 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(

View File

@@ -2,14 +2,10 @@ 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(

View File

@@ -3,13 +3,14 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints.*
import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility
import app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints.GetMessagingCertFingerprint
import app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints.GetReqistrationCertFingerprint
@Name("spoof-cert-patch")
@Description("Spoofs the X-Android-Cert header.")
@@ -21,7 +22,7 @@ class FirebaseGetCertPatch : BytecodePatch(
GetMessagingCertFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val spoofedInstruction =
"""
const-string v0, "0799DDF0414D3B3475E88743C91C0676793ED450"

View File

@@ -2,14 +2,10 @@ 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.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
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(

View File

@@ -3,13 +3,13 @@ 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.data.BytecodeContext
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.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.warnwetter.misc.firebasegetcert.patch.FirebaseGetCertPatch
import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility
import app.revanced.patches.warnwetter.misc.promocode.fingerprints.PromoCodeUnlockFingerprint
@@ -30,7 +30,7 @@ class PromoCodeUnlockPatch : BytecodePatch(
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
val method = PromoCodeUnlockFingerprint.result!!.mutableMethod
method.addInstructions(
0,

View File

@@ -5,7 +5,7 @@ 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", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -1,12 +1,8 @@
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
@@ -16,21 +12,6 @@ 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 {

View File

@@ -4,33 +4,32 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.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.patcher.util.smali.ExternalLabel
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.ad.general.resource.patch.GeneralResourceAdsPatch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
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.builder.instruction.BuilderInstruction10x
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
@@ -38,10 +37,9 @@ 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([ResourceMappingResourcePatch::class, IntegrationsPatch::class, SettingsPatch::class])
@DependsOn([ResourceMappingResourcePatch::class, IntegrationsPatch::class, SettingsPatch::class, GeneralResourceAdsPatch::class])
@Name("general-ads")
@Description("Removes general ads.")
@GeneralAdsCompatibility
@@ -70,7 +68,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
"LoggingProperties are not in proto format"
)
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
SwitchPreference(
"revanced_home_ads_removal",
@@ -96,7 +94,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
SwitchPreference(
"revanced_adremover_community_posts_removal",
StringResource("revanced_adremover_community_posts_enabled_title", "Remove community posts"),
true,
false,
StringResource("revanced_adremover_community_posts_enabled_summary_on", "Community posts are hidden"),
StringResource("revanced_adremover_community_posts_enabled_summary_off", "Community posts are shown")
),
@@ -107,13 +105,6 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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"),
@@ -170,13 +161,6 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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"),
@@ -201,7 +185,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
)
// iterating through all classes is expensive
for (classDef in data.classes) {
for (classDef in context.classes) {
var mutableClass: MutableClass? = null
method@ for (method in classDef.methods) {
@@ -223,7 +207,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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 (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
@@ -240,7 +224,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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 (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
@@ -255,7 +239,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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 (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
@@ -270,7 +254,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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 (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
@@ -290,7 +274,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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 (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
@@ -312,7 +296,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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 (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
@@ -329,72 +313,54 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
}
stringReferences[2] -> { // Litho ads
// create proxied method.
val proxy = data.proxy(classDef)
val proxiedClass = proxy.resolve()
val proxy = context.proxy(classDef)
val proxiedClass = proxy.mutableClass
// 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!!
?: return PatchResultError("Could not find required Litho method to patch.")
// create and add getTemplateName method
val getTemplateMethod =
proxiedClass.createGetTemplateNameMethod(lithoMethodImplementation)
proxiedClass.addMethod(getTemplateMethod)
val instructionWithNeededDescriptor =
lithoMethod.implementation!!.instructions.indexOfFirst {
it.opcode == Opcode.INVOKE_STATIC_RANGE
}
val lithoInstructions = lithoMethodImplementation.instructions
val thisType = proxiedClass.type
val templateNameParameterType = getTemplateMethod.parameterTypes.first()
// get required descriptors
val createEmptyComponentDescriptor =
lithoMethod.instruction(instructionWithNeededDescriptor)
.toDescriptor<MethodReference>()
val emptyComponentFieldDescriptor =
lithoMethod.instruction(instructionWithNeededDescriptor + 2)
.toDescriptor<FieldReference>()
// 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>()
val pathBuilderAnchorFingerprint = object : MethodFingerprint(
opcodes = listOf(
Opcode.CONST_16,
Opcode.INVOKE_VIRTUAL,
Opcode.IPUT_OBJECT
)
) {}
// create label
val lithoRemoveLabel = lithoMethodImplementation.newLabelForIndex(0)
val pathBuilderScanResult = pathBuilderAnchorFingerprint.also {
it.resolve(context, lithoMethod, classDef)
}.result!!.scanResult.patternScanResult!!
// create branch instructions
val ifEqzFirstInstruction =
BuilderInstruction21t(Opcode.IF_EQZ, 0, lithoRemoveLabel)
val ifEqzSecondInstruction =
BuilderInstruction21t(Opcode.IF_EQZ, 1, lithoRemoveLabel)
val clobberedRegister =
(lithoMethod.instruction(pathBuilderScanResult.startIndex) as OneRegisterInstruction).registerA
// 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,
val insertIndex = pathBuilderScanResult.endIndex + 1
lithoMethod.addInstructions(
insertIndex, // right after setting the component.pathBuilder field,
"""
invoke-static {v5, v2}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
move-result v$clobberedRegister
if-eqz v$clobberedRegister, :not_an_ad
move-object/from16 v2, p1
invoke-static {v2}, $createEmptyComponentDescriptor
move-result-object v0
iget-object v0, v0, $emptyComponentFieldDescriptor
return-object v0
""",
listOf(ExternalLabel("not_an_ad", lithoMethod.instruction(insertIndex)))
)
}
}
@@ -414,142 +380,4 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
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,55 @@
package app.revanced.patches.youtube.ad.general.resource.patch
import app.revanced.extensions.doRecursively
import app.revanced.extensions.startsWithAny
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import org.w3c.dom.Element
@DependsOn(dependencies = [FixLocaleConfigErrorPatch::class])
@Name("general-resource-ads")
@Description("Patch to remove general ads in resources.")
@GeneralAdsCompatibility
@Version("0.0.1")
class GeneralResourceAdsPatch : ResourcePatch {
// list of resource file names which need to be hidden
private val resourceFileNames = arrayOf(
"compact_promoted_",
"promoted_video_",
)
// the attributes to change the value of
private val replacements = arrayOf(
"height",
"width",
"marginTop",
)
override fun execute(context: ResourceContext): PatchResult {
context.forEach {
if (!it.name.startsWithAny(*resourceFileNames)) return@forEach
// for each file in the "layouts" directory replace all necessary attributes content
context.xmlEditor[it.absolutePath].use { editor ->
editor.file.doRecursively { node ->
replacements.forEach replacement@{ replacement ->
if (node !is Element) return@replacement
node.getAttributeNode("android:layout_$replacement")?.let { attribute ->
attribute.textContent = "1.0dip"
}
}
}
}
}
return PatchResultSuccess()
}
}

View File

@@ -5,7 +5,7 @@ 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", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@@ -4,13 +4,11 @@ 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")

View File

@@ -4,13 +4,11 @@ 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-parent-fingerprint")
@MatchingMethod("Liff;", "lE")
@FuzzyPatternScanMethod(2)
@HideInfocardSuggestionsCompatibility
@Version("0.0.1")

View File

@@ -3,15 +3,15 @@ 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.data.BytecodeContext
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.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
@@ -32,7 +32,7 @@ class HideInfocardSuggestionsPatch : BytecodePatch(
HideInfocardSuggestionsParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
SwitchPreference(
"revanced_info_cards_enabled",
@@ -47,7 +47,7 @@ class HideInfocardSuggestionsPatch : BytecodePatch(
?: return PatchResultError("Parent fingerprint not resolved!")
HideInfocardSuggestionsFingerprint.resolve(data, parentResult.classDef)
HideInfocardSuggestionsFingerprint.resolve(context, parentResult.classDef)
val result = HideInfocardSuggestionsFingerprint.result
?: return PatchResultError("Required parent method could not be found.")

View File

@@ -5,7 +5,7 @@ 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", "17.33.42", "17.34.35", "17.34.36", "17.36.37")
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36")
)]
)
@Target(AnnotationTarget.CLASS)

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