Compare commits

...

266 Commits

Author SHA1 Message Date
semantic-release-bot
902754363c chore(release): 2.6.0-dev.2 [skip ci]
# [2.6.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.6.0-dev.1...v2.6.0-dev.2) (2022-07-02)

### Bug Fixes

* remove refreshing home screen not working ([42def27](42def27fa5))
2022-07-02 22:41:07 +00:00
oSumAtrIX
42def27fa5 fix: remove refreshing home screen not working 2022-07-03 00:39:27 +02:00
oSumAtrIX
7986c57a6f refactor: add package for fingerprints 2022-07-02 16:15:48 +02:00
semantic-release-bot
3de6790e9f chore(release): 2.6.0-dev.1 [skip ci]
# [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02)

### Features

* migrate to breaking changes of patcher ([c95c241](c95c241887))
2022-07-02 02:24:43 +00:00
oSumAtrIX
c95c241887 feat: migrate to breaking changes of patcher 2022-07-02 04:21:48 +02:00
semantic-release-bot
0f05fbfad9 chore(release): 2.5.1-dev.1 [skip ci]
## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30)

### Bug Fixes

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

### Features

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

### Features

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

### Bug Fixes

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

### Features

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

### Features

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

* add HideWatermark patch

* add hidewatermark patch

* fix bug

* use latest patcher version

* Fix sig name

* update to fingerprints

* make cleaner patch

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

### Bug Fixes

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

### Code Refactoring

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

### BREAKING CHANGES

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Reverts

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Performance Improvements

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

### Bug Fixes

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

### Features

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

### Features

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

* fix: d8 path

* fix: path

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

### Bug Fixes

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

### Code Refactoring

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

### Features

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

### BREAKING CHANGES

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

### Features

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

### Bug Fixes

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

### Bug Fixes

* spelling mistake ([eb97257](eb97257c41))

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

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

### Features

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

### BREAKING CHANGES

* signature of patches was changed
* signature of patches was changed
2022-03-22 21:26:34 +00:00
Lucaskyy
bf2b2ae791 feat: use supplier instead of KClass
BREAKING CHANGE: signature of patches was changed
2022-03-22 22:24:56 +01:00
Lucaskyy
9e1dac57e7 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	src/main/kotlin/app/revanced/patches/Index.kt
2022-03-22 22:23:57 +01:00
Lucaskyy
790c84a00e feat: use supplier instead of KClass
BREAKING CHANGE: signature of patches was changed
2022-03-22 22:22:46 +01:00
126 changed files with 4528 additions and 341 deletions

View File

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

5
.gitignore vendored
View File

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

2
.idea/misc.xml generated
View File

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

View File

@@ -20,6 +20,18 @@
]
}
],
"@semantic-release/github"
[
"@semantic-release/github",
{
"assets": [
{
"path": "build/libs/*.jar"
},
{
"path": "build/libs/*.dex"
}
]
}
]
]
}

View File

@@ -1,3 +1,611 @@
# [2.6.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.6.0-dev.1...v2.6.0-dev.2) (2022-07-02)
### Bug Fixes
* remove refreshing home screen not working ([ec7ae90](https://github.com/revanced/revanced-patches/commit/ec7ae900181b6456c692adb3b5bb337e81bc5fea))
# [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02)
### Features
* migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010))
## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30)
### Bug Fixes
* freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b))
* invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048))
# [2.5.0](https://github.com/revanced/revanced-patches/compare/v2.4.0...v2.5.0) (2022-06-30)
### Features
* hide watermark support for 17.25.34 ([#87](https://github.com/revanced/revanced-patches/issues/87)) ([0cdb65b](https://github.com/revanced/revanced-patches/commit/0cdb65bbb3e7b9d75eb393ee87e3718bcd6af4b3))
# [2.4.0](https://github.com/revanced/revanced-patches/compare/v2.3.1...v2.4.0) (2022-06-30)
### Features
* add youtube version 17.25.34 ([#85](https://github.com/revanced/revanced-patches/issues/85)) ([889c9d5](https://github.com/revanced/revanced-patches/commit/889c9d564d16c6e68a52095a4fc8e6d04346c9e9))
## [2.3.1](https://github.com/revanced/revanced-patches/compare/v2.3.0...v2.3.1) (2022-06-30)
### Bug Fixes
* change fingerprint to work on latest youtube ([#80](https://github.com/revanced/revanced-patches/issues/80)) ([4dba323](https://github.com/revanced/revanced-patches/commit/4dba323ddf8980cd2b0908a0de41c4b4dea6b0d7))
# [2.3.0](https://github.com/revanced/revanced-patches/compare/v2.2.0...v2.3.0) (2022-06-30)
### Features
* `disable-autoplay-button` patch ([#79](https://github.com/revanced/revanced-patches/issues/79)) ([0d6fb51](https://github.com/revanced/revanced-patches/commit/0d6fb51e025649aae37e230778ea367482fab0d7))
# [2.2.0](https://github.com/revanced/revanced-patches/compare/v2.1.0...v2.2.0) (2022-06-29)
### Features
* make resource mapping patch aware of types ([#77](https://github.com/revanced/revanced-patches/issues/77)) ([188491a](https://github.com/revanced/revanced-patches/commit/188491a707abccc1164413f075d8a66c145a1455))
# [2.1.0](https://github.com/revanced/revanced-patches/compare/v2.0.3...v2.1.0) (2022-06-28)
### Features
* `custom-playback-speed` patch ([#50](https://github.com/revanced/revanced-patches/issues/50)) ([224254b](https://github.com/revanced/revanced-patches/commit/224254bcce2b394bbfd2549089f0204ce4ed4a89))
## [2.0.3](https://github.com/revanced/revanced-patches/compare/v2.0.2...v2.0.3) (2022-06-27)
### Bug Fixes
* check if resource files exist ([ba1f3af](https://github.com/revanced/revanced-patches/commit/ba1f3af99be58edc44ed1b8f1875508d5034efd8))
## [2.0.2](https://github.com/revanced/revanced-patches/compare/v2.0.1...v2.0.2) (2022-06-27)
### Bug Fixes
* some more refactoring of integrations, add hide-watermark patch ([#63](https://github.com/revanced/revanced-patches/issues/63)) ([feb09c5](https://github.com/revanced/revanced-patches/commit/feb09c56f475e2537a67d3636b08737848158a8e))
## [2.0.1](https://github.com/revanced/revanced-patches/compare/v2.0.0...v2.0.1) (2022-06-26)
### Bug Fixes
* invalid string in strings list ([f08b53b](https://github.com/revanced/revanced-patches/commit/f08b53b07d93bd8ac6e7da376ea6e6023e53076e))
* migrate to new `proxy` api ([db32ffe](https://github.com/revanced/revanced-patches/commit/db32ffe56a8e73177bef724ee10eda9a28b367b8))
# [2.0.0](https://github.com/revanced/revanced-patches/compare/v1.11.0...v2.0.0) (2022-06-26)
### Code Refactoring
* migrate from `Signature` to `Fingerprint` ([084078e](https://github.com/revanced/revanced-patches/commit/084078e7f1852ccd2045e3fa8aedc25a7fd5faa8))
### BREAKING CHANGES
* Not backwards compatible, since a lot of classes where renamed.
# [1.11.0](https://github.com/revanced/revanced-patches/compare/v1.10.5...v1.11.0) (2022-06-26)
### Features
* add youtube version 17.24.35 ([ec626cc](https://github.com/revanced/revanced-patches/commit/ec626ccfa2bcf14b722d08110382de009a1c12b4))
* add youtube version 17.24.35 ([adc60a6](https://github.com/revanced/revanced-patches/commit/adc60a6fa09f6a21800ba51b8ca888d11a17e870))
## [1.10.5](https://github.com/revanced/revanced-patches/compare/v1.10.4...v1.10.5) (2022-06-25)
### Bug Fixes
* put back proper variable ([#61](https://github.com/revanced/revanced-patches/issues/61)) ([d26c423](https://github.com/revanced/revanced-patches/commit/d26c4233031fd418eb37c8f05e9bc1857e0572e6))
## [1.10.4](https://github.com/revanced/revanced-patches/compare/v1.10.3...v1.10.4) (2022-06-23)
### Bug Fixes
* missing brackets at inlining ([8936c8a](https://github.com/revanced/revanced-patches/commit/8936c8aaedb56817cda5eec5f4a8c32f433862aa))
## [1.10.3](https://github.com/revanced/revanced-patches/compare/v1.10.2...v1.10.3) (2022-06-23)
### Bug Fixes
* get create button view register by more reliable means ([#59](https://github.com/revanced/revanced-patches/issues/59)) ([6ab821e](https://github.com/revanced/revanced-patches/commit/6ab821e377176f4e9f1b7ec2b58a924fa40299db))
## [1.10.2](https://github.com/revanced/revanced-patches/compare/v1.10.1...v1.10.2) (2022-06-23)
### Bug Fixes
* `disable-create-button` not working with prebuilt jar file ([#55](https://github.com/revanced/revanced-patches/issues/55)) ([78be64a](https://github.com/revanced/revanced-patches/commit/78be64accc2023281c0c376849cdb0213622dc5c))
## [1.10.1](https://github.com/revanced/revanced-patches/compare/v1.10.0...v1.10.1) (2022-06-23)
### Bug Fixes
* patcher not propagating dexlib ([980c486](https://github.com/revanced/revanced-patches/commit/980c48673259496d793bc7f864ad355188dcf7b6))
* update patcher version ([e3d0bb7](https://github.com/revanced/revanced-patches/commit/e3d0bb7ee1923ea996cf637267c62d233a74c7fa))
# [1.10.0](https://github.com/revanced/revanced-patches/compare/v1.9.1...v1.10.0) (2022-06-23)
### Features
* add compatibility for YouTube v17.23.36 and v17.24.34 ([1812bc3](https://github.com/revanced/revanced-patches/commit/1812bc39e0e88f1ab02ae8127e9000780eedf49c))
## [1.9.1](https://github.com/revanced/revanced-patches/compare/v1.9.0...v1.9.1) (2022-06-21)
### Bug Fixes
* update patcher version ([5f54bc9](https://github.com/revanced/revanced-patches/commit/5f54bc9aa8fd8b83448141a9b05746e3e977369d))
# [1.9.0](https://github.com/revanced/revanced-patches/compare/v1.8.2...v1.9.0) (2022-06-21)
### Features
* use `install` mode by default ([c2b2993](https://github.com/revanced/revanced-patches/commit/c2b299336a984d66a2d066e5ebe9c4f9bee5c2aa))
## [1.8.2](https://github.com/revanced/revanced-patches/compare/v1.8.1...v1.8.2) (2022-06-20)
### Bug Fixes
* migrate to breaking changes from patcher ([2c0a419](https://github.com/revanced/revanced-patches/commit/2c0a4196fed2fbdcd454ed882b720898d3050c51))
* old usage of `toInstructions` extension method ([65ddd52](https://github.com/revanced/revanced-patches/commit/65ddd522dca19e0590d9cb6fdb2d85ad7b98481e))
## [1.8.1](https://github.com/revanced/revanced-patches/compare/v1.8.0...v1.8.1) (2022-06-20)
### Bug Fixes
* add execute permission to `./gradlew` file ([ff7a560](https://github.com/revanced/revanced-patches/commit/ff7a5602f68428111fea6c60cbea694592039ef1))
# [1.8.0](https://github.com/revanced/revanced-patches/compare/v1.7.0...v1.8.0) (2022-06-20)
### Features
* bump compatibility of patches for Youtube to v17.23.35 ([3748d05](https://github.com/revanced/revanced-patches/commit/3748d0533e62a8871ab2202ce9b61170a90dae62))
# [1.7.0](https://github.com/revanced/revanced-patches/compare/v1.6.4...v1.7.0) (2022-06-20)
### Features
* `disable-fullscreen-panels` patch ([3bf0561](https://github.com/revanced/revanced-patches/commit/3bf056163500b006d1a20c5f3a3e0c92fec13bd8))
## [1.6.4](https://github.com/revanced/revanced-patches/compare/v1.6.3...v1.6.4) (2022-06-19)
### Bug Fixes
* update patcher version ([#35](https://github.com/revanced/revanced-patches/issues/35)) ([1a379df](https://github.com/revanced/revanced-patches/commit/1a379dfd974b9f92d4bd0d5d7a4711eb6d1060b3)), closes [#34](https://github.com/revanced/revanced-patches/issues/34)
## [1.6.3](https://github.com/revanced/revanced-patches/compare/v1.6.2...v1.6.3) (2022-06-16)
### Bug Fixes
* wrong dex path ([170fbbb](https://github.com/revanced/revanced-patches/commit/170fbbb99e4a2dbe3e0febe44d07a692aa9d7224))
## [1.6.2](https://github.com/revanced/revanced-patches/compare/v1.6.1...v1.6.2) (2022-06-16)
### Bug Fixes
* broken gradle task ([91483a8](https://github.com/revanced/revanced-patches/commit/91483a8fbf92559d079dc52f846f5f871f5d6b5c))
## [1.6.1](https://github.com/revanced/revanced-patches/compare/v1.6.0...v1.6.1) (2022-06-16)
### Bug Fixes
* broken gradle task ([4d07961](https://github.com/revanced/revanced-patches/commit/4d07961c8afd24da7f8879d11419147f2e100f05))
# [1.6.0](https://github.com/revanced/revanced-patches/compare/v1.5.3...v1.6.0) (2022-06-16)
### Bug Fixes
* broken gradle task ([28e3f55](https://github.com/revanced/revanced-patches/commit/28e3f554ea6a7144416523fe48ce7adbb613b263))
### Features
* generate dex files using gradle task ([c34c1be](https://github.com/revanced/revanced-patches/commit/c34c1be21f50b4f720a7cd81e0dfe5ef6330caab))
## [1.5.3](https://github.com/revanced/revanced-patches/compare/v1.5.2...v1.5.3) (2022-06-16)
### Bug Fixes
* forgot about this ([7102a25](https://github.com/revanced/revanced-patches/commit/7102a25dc618f19b324b01870d23f5418f375b2a))
## [1.5.2](https://github.com/revanced/revanced-patches/compare/v1.5.1...v1.5.2) (2022-06-16)
### Bug Fixes
* dummy task for Gradle semantic-release plugin ([f6a8911](https://github.com/revanced/revanced-patches/commit/f6a8911906dfe52fcdb685daf7a02d6d0052cba9))
* releases ([30d5c9a](https://github.com/revanced/revanced-patches/commit/30d5c9a67ccf88ca6ac00d0a9f2a2e330f8092dd))
## [1.5.1](https://github.com/revanced/revanced-patches/compare/v1.5.0...v1.5.1) (2022-06-16)
### Reverts
* Revert "Changed app name to ReVanced (#21)" (#24) ([70a48c5](https://github.com/revanced/revanced-patches/commit/70a48c5f35cd236612352a1dbbf50487625e6e96)), closes [#21](https://github.com/revanced/revanced-patches/issues/21) [#24](https://github.com/revanced/revanced-patches/issues/24)
# [1.5.0](https://github.com/revanced/revanced-patches/compare/v1.4.0...v1.5.0) (2022-06-15)
### Bug Fixes
* sync version ([6170e36](https://github.com/revanced/revanced-patches/commit/6170e3689d9c8998be94a8464352af620cccd11b))
### Features
* `hide-cast-button` patch ([2cd531e](https://github.com/revanced/revanced-patches/commit/2cd531eb5a334f3cf91cba4556f07e863cd9ec1b))
# [1.4.0](https://github.com/revanced/revanced-patches/compare/v1.3.1...v1.4.0) (2022-06-15)
### Bug Fixes
* add size `48px` for `custom-branding` patch ([f81872b](https://github.com/revanced/revanced-patches/commit/f81872b8e41da215517fdb59364130d8ce681607))
### Features
* `premium-heading` patch ([78913bf](https://github.com/revanced/revanced-patches/commit/78913bf1e80f5b91d0dee506fdfe3f875e8e6988))
## [1.3.1](https://github.com/revanced/revanced-patches/compare/v1.3.0...v1.3.1) (2022-06-15)
### Bug Fixes
* `custom-branding` patch failing to get resources ([efb6d4c](https://github.com/revanced/revanced-patches/commit/efb6d4c2be515185fc9bd29c40ce202f0d684cee))
# [1.3.0](https://github.com/revanced/revanced-patches/compare/v1.2.2...v1.3.0) (2022-06-14)
### Features
* `custom-branding` patch ([0d65ea8](https://github.com/revanced/revanced-patches/commit/0d65ea8cdb0e02287f6be6855cd3d28823a61e70))
## [1.2.2](https://github.com/revanced/revanced-patches/compare/v1.2.1...v1.2.2) (2022-06-13)
### Bug Fixes
* environment variable not found in gradle build script ([0da15fb](https://github.com/revanced/revanced-patches/commit/0da15fb0effac0566d080d7b85e9fbe46c3dd34d))
## [1.2.1](https://github.com/revanced/revanced-patches/compare/v1.2.0...v1.2.1) (2022-06-12)
### Performance Improvements
* fix high battery consumption due to chromecast not working with `microg` ([dd8b01a](https://github.com/revanced/revanced-patches/commit/dd8b01a5c5d75b00ea4d04ce35bc43942c1b0409))
# [1.2.0](https://github.com/revanced/revanced-patches/compare/v1.1.0...v1.2.0) (2022-06-11)
### Bug Fixes
* migrate to `include` annotation ([110bbf1](https://github.com/revanced/revanced-patches/commit/110bbf143a9cec8dce1f0416cff40f8d93055e96))
### Features
* `microg-patch` ([48bbd57](https://github.com/revanced/revanced-patches/commit/48bbd574a52c8bf6834b26facfe7384b830f944a))
* updated all patches to support v17.22.36 of `com.android.google.youtube` ([e12dc11](https://github.com/revanced/revanced-patches/commit/e12dc11b670c2b0c414741616e0a646e8421e418))
# [1.1.0](https://github.com/revanced/revanced-patches/compare/v1.0.0...v1.1.0) (2022-06-11)
### Features
* generate & upload dex files ([#18](https://github.com/revanced/revanced-patches/issues/18)) ([e6f5355](https://github.com/revanced/revanced-patches/commit/e6f53553a98c164c4eb926fb273358ed506e00a4))
# 1.0.0 (2022-06-05)
### Bug Fixes
* `create-button-signature` ([a173f6e](https://github.com/revanced/revanced-patches/commit/a173f6e5a7e65943657e2072e8a72a4a680e5277))
* `enable-seekbar-tapping` patch ([52fd726](https://github.com/revanced/revanced-patches/commit/52fd726d9b0d2efbd0f9742fc84ad01ccdcff168))
* `Index` in wrong package ([2f9360f](https://github.com/revanced/revanced-patches/commit/2f9360f57cc8415564534fbbd8bd5e2a83a1b629))
* `minimized-playback` & `old-quality-layout` wrong opcodes ([b45d175](https://github.com/revanced/revanced-patches/commit/b45d175c6f1ece6da894ab16128c2644d262c9c7))
* `minimized-playback` patch ([55677a4](https://github.com/revanced/revanced-patches/commit/55677a44ff965c0b92c3f1d771bd68c12c142ad4))
* `SignatureChecker` not handling nullable field `methodMetadata` ([17bcf78](https://github.com/revanced/revanced-patches/commit/17bcf786a85ccf1f7d9f5a66a044a3c26def09bb))
* accidentally removed code in refactor ([0077e26](https://github.com/revanced/revanced-patches/commit/0077e26d23cc112b671a41614a55348fac2c88ca))
* add missing `trimIndent()` to string literals ([76d3c71](https://github.com/revanced/revanced-patches/commit/76d3c71b67edebd79f2cdb1bb28e4d2969d72223))
* add missing opcode for `create-button-method` ([0a398ef](https://github.com/revanced/revanced-patches/commit/0a398ef364f91a0dd9608df1a036a2515476ccf2))
* attempt on all patches ([3395d69](https://github.com/revanced/revanced-patches/commit/3395d69747103a4bdf314297aa0bfa6ef6a0fc36))
* breaking changes by `revanced-patcher` dependency ([e12e484](https://github.com/revanced/revanced-patches/commit/e12e484e3796c5c9c8505b677838cdf8432f2e79))
* breaking changes by `revanced-patcher` dependency ([7e485b4](https://github.com/revanced/revanced-patches/commit/7e485b4ffe204d724809aeb9bd9f693a35ded94d))
* breaking changes of the patcher ([1a49bbd](https://github.com/revanced/revanced-patches/commit/1a49bbdbc4ff6f427934259536218e161908b449))
* breaking patcher changes ([50f9cc5](https://github.com/revanced/revanced-patches/commit/50f9cc52acfd5bc23330ecd23d8d85678a9d3eee))
* breaking patcher changes ([cbb9e2c](https://github.com/revanced/revanced-patches/commit/cbb9e2cd1fa829e1d1dd92dbd40131b11ae6a05b))
* breaking patcher changes ([581d1b0](https://github.com/revanced/revanced-patches/commit/581d1b0ca7d15adcdb1ab6116ef035acfe701757))
* bugfixes in `microg` ([a43b33b](https://github.com/revanced/revanced-patches/commit/a43b33bdbb2b36e0a8f991fa11dfeeec34de01f9))
* clean after building ([a2df3fb](https://github.com/revanced/revanced-patches/commit/a2df3fbc9761b07f3010542fa8684ade00e4dc91))
* disable `hide-suggestions-patch` patch until fixed ([99099ea](https://github.com/revanced/revanced-patches/commit/99099ea0bc12f5f25896967db642442df69d0c4f))
* incorrect endIndex (fixed in Patcher) ([424788e](https://github.com/revanced/revanced-patches/commit/424788edd777110cdaff97500556d18628f33385))
* loop in `amoled` patch ([c4c86b6](https://github.com/revanced/revanced-patches/commit/c4c86b65fd8b2463c1d86ad2e46ec9f08e60d47c))
* migrate patches to latest patcher api changes ([8a0ee03](https://github.com/revanced/revanced-patches/commit/8a0ee03a71cf4a000c9a7246d0e64ed8291a5127))
* missing extension method `doRecursively` ([e9c9460](https://github.com/revanced/revanced-patches/commit/e9c946008ee912652d288e515b83b52ae2d239d8))
* modified opcode for `show-video-ads-constructor` ([a0dcea3](https://github.com/revanced/revanced-patches/commit/a0dcea3a13f68cae449dfaf445b542e339c83ff0))
* multiple bugs in patches ([e37201d](https://github.com/revanced/revanced-patches/commit/e37201d0ceef474696857a0d8845950c888194d0))
* name for `IntegrationsPatch` ([e46ef02](https://github.com/revanced/revanced-patches/commit/e46ef02302825d62b57912b2747a25f858036bb7))
* print instruction index of warning ([9e29aee](https://github.com/revanced/revanced-patches/commit/9e29aeeeff222412f6c45cf7e4879f8ec53ca6ee))
* publish releases ([83916f9](https://github.com/revanced/revanced-patches/commit/83916f96d27989dcbb35c0ba6ef326a16b470501))
* remove `HideSuggestionsPatch` from `Index` ([f32e474](https://github.com/revanced/revanced-patches/commit/f32e4747b512c675b807ff5eebfd0b8e66173fba))
* remove unused patches ([d12e92a](https://github.com/revanced/revanced-patches/commit/d12e92aead677fefa9dcb48748d783225b65fab1))
* signature checker with changes of patcher ([e82459d](https://github.com/revanced/revanced-patches/commit/e82459d37759e1a5a860d3e7fcdf69d95b06858e))
* spelling mistake ([52f9147](https://github.com/revanced/revanced-patches/commit/52f9147ee8d591f786397d174dc02a141d9250a9))
* tests failing ([102793f](https://github.com/revanced/revanced-patches/commit/102793f24f8bf7c7fd254968b29d65da7b2b962f))
* update `HomeAdsPatch` ([62f1801](https://github.com/revanced/revanced-patches/commit/62f1801e9cbee53c0be3413c245161bd941e4aec))
* update patches ([91b8ec8](https://github.com/revanced/revanced-patches/commit/91b8ec81f33417798546c32db708fe09ada3930c))
* use the latest version of patcher dependency ([fe4a439](https://github.com/revanced/revanced-patches/commit/fe4a439cb2bc5e385ae13e8e155f25bb15e74633))
* version in package metadata of music ([b299205](https://github.com/revanced/revanced-patches/commit/b299205aa7cde82f1f55fc598de3ff8d80b8bcb0))
* **VideoAds:** remove `istore1` opcode ([dc4ec57](https://github.com/revanced/revanced-patches/commit/dc4ec574414c5df959efa0ca8f1cd39a812fedf8))
* write while reading resources and remove checking for "." in resource extensions ([7bc6094](https://github.com/revanced/revanced-patches/commit/7bc60943cb2350e89dac091ec9c98c5effd0b8a9))
* wrong access flag in signature for `Create button patch` ([9fbb89d](https://github.com/revanced/revanced-patches/commit/9fbb89d05336a256a0759eea6095e073946c45e5))
* wrong annotation and signature in patches ([a0fdee8](https://github.com/revanced/revanced-patches/commit/a0fdee81a6d6773603520e7c3040ae8637642d58))
* wrong opcode for `create-button-method` ([3214650](https://github.com/revanced/revanced-patches/commit/32146506f139aebc44cd5faffb7706b8b9c21c3d))
* wrong opcode pattern for `create-button-method` ([f4d8a85](https://github.com/revanced/revanced-patches/commit/f4d8a8525bc64b90748b21979d463977a21dcd85))
* wrong opcode pattern for `enable-seekbar-tapping-signature` ([1d83395](https://github.com/revanced/revanced-patches/commit/1d833957ed3e01188770c85e3d84e483419bd797))
* wrong opcode pattern for signature in `Hide suggestions patch` ([535aee0](https://github.com/revanced/revanced-patches/commit/535aee08408b990c80f5966c13fa84666a8b35d0))
* wrong patches in `upgrade-tab-remover` ([5182290](https://github.com/revanced/revanced-patches/commit/518229031ceca049ad790f7b77b19405d39f0ce1))
* wrong signature for `hide-reels-signature` ([2d9ff2a](https://github.com/revanced/revanced-patches/commit/2d9ff2af0a991d7721f3741187716a3b08bb4029))
* wrong signatures for patch `Old Quality Layout Patch` ([823e503](https://github.com/revanced/revanced-patches/commit/823e503d84037bdf27b09f17e63383f963c76854))
* wrong versions of patches ([a112b22](https://github.com/revanced/revanced-patches/commit/a112b22ce6e685204caab6f95f511e26ef95806b))
### Code Refactoring
* Rename `net.revanced` to `app.revanced` ([68ea89f](https://github.com/revanced/revanced-patches/commit/68ea89f15e9ea077df0d0ac20a40b735bb5ae26c))
### Features
* `Dependencies` annotation ([85806bb](https://github.com/revanced/revanced-patches/commit/85806bb355e342ecb33d4ee1e76f9edf89b2c2ee))
* `GeneralBytecodeAds` and `GeneralResourceAds` patch ([f99bbef](https://github.com/revanced/revanced-patches/commit/f99bbef4c911ac2492166c7a3792ea11ffceffab))
* `hide-shorts-button` patch ([88352ee](https://github.com/revanced/revanced-patches/commit/88352ee6ecd23faa4a7fd9f7495e67fa1d3e33bd))
* `tastebuilder-remover` for music ([a6aeca3](https://github.com/revanced/revanced-patches/commit/a6aeca31bd80b8c4a8acd071e22faca6e136bdb0))
* Add (WIP) Signature Checker ([ae4c7b2](https://github.com/revanced/revanced-patches/commit/ae4c7b29f211c461de460f97f3a8656e795adafb))
* add `amoled` patch ([d61bac4](https://github.com/revanced/revanced-patches/commit/d61bac4f8243d0ef72ca91c7c1d5facd858d515e))
* add home ads patch ([36cddd1](https://github.com/revanced/revanced-patches/commit/36cddd1488683e19e2b927e34c80a4f0f3cace35))
* add patches compatibility to the newest version ([799401d](https://github.com/revanced/revanced-patches/commit/799401ddf99da0aaa5f52c39d3d3d4061370fd75))
* add publishing to package registry ([b475e09](https://github.com/revanced/revanced-patches/commit/b475e09577db4dda7bbb45dbf170d78772834a6d))
* add semantic-release ([d60f1d0](https://github.com/revanced/revanced-patches/commit/d60f1d06798d312b158b71691ecc87e828dccbc1))
* added `codecs-unlock` patch ([e5fd7ce](https://github.com/revanced/revanced-patches/commit/e5fd7cece94b1ff5342178f59b29576db806e0f6))
* begin `MicroG Patch` ([91474ba](https://github.com/revanced/revanced-patches/commit/91474ba07376c13e7a71685dfd8b6e6913ed5ee9))
* display metadata for each signature in `SignatureChecker` ([736a71f](https://github.com/revanced/revanced-patches/commit/736a71fac21a32dbb1eef9c3a9f0d3005e7d9ca0))
* get required register dynamically ([0924ca2](https://github.com/revanced/revanced-patches/commit/0924ca2ad30ae865dcc0fd484cb0da517e827352))
* Initial commit ([bee5f2f](https://github.com/revanced/revanced-patches/commit/bee5f2faed882271ed059b0435e6e1aa91f93dbd))
* integrations patch ([19c0b0d](https://github.com/revanced/revanced-patches/commit/19c0b0d194bb97c7248ea7a9b081176961653b9d))
* migrate to dalvik patches ([e088c67](https://github.com/revanced/revanced-patches/commit/e088c671081bcf75586ccc1c4bdbed9366e93874))
* MinimizedPlayback, CreateButtonRemover ([cc08c6c](https://github.com/revanced/revanced-patches/commit/cc08c6c3d38879dd4672ec671631b34aa2e3cc77))
* OldQualityLayout, HideSuggestions, HideReels, EnableSeekbarTapping ([04a7cff](https://github.com/revanced/revanced-patches/commit/04a7cfff20d2734b1c92713de4e7e08a3b93ee85))
* Patches for YouTube Music ([b60c9d3](https://github.com/revanced/revanced-patches/commit/b60c9d33b611bb4d5b55bb419652bc14b0309792))
* remove obsolete patch `Hide suggestions patch` ([e65c6f2](https://github.com/revanced/revanced-patches/commit/e65c6f240ed23a54271d20a90fc57ec65cafc02d))
* update MicroG patch to latest version ([c24f806](https://github.com/revanced/revanced-patches/commit/c24f8063a04f89aea2d2f7087a435738de7dfeae))
* update patches to latest version ([bad25de](https://github.com/revanced/revanced-patches/commit/bad25dec1d73137f8b7a1bf4daaceb2279b4d48c))
* use supplier instead of KClass ([08af6e5](https://github.com/revanced/revanced-patches/commit/08af6e54af79ef9ef4fb3372a348ce9b6fba4d20))
* use supplier instead of KClass ([91aa019](https://github.com/revanced/revanced-patches/commit/91aa019f8d3d87fbf7affeb7abc2b02ba87af5c3))
### BREAKING CHANGES
* signature of patches was changed
* signature of patches was changed
* Package name was changed from "net.revanced" to "app.revanced"
# [1.0.0-dev.16](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.15...v1.0.0-dev.16) (2022-06-05)
### Features
* add patches compatibility to the newest version ([799401d](https://github.com/revanced/revanced-patches/commit/799401ddf99da0aaa5f52c39d3d3d4061370fd75))
# [1.0.0-dev.15](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.14...v1.0.0-dev.15) (2022-06-05)
### Bug Fixes
* remove unused patches ([d12e92a](https://github.com/revanced/revanced-patches/commit/d12e92aead677fefa9dcb48748d783225b65fab1))
# [1.0.0-dev.14](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.13...v1.0.0-dev.14) (2022-06-04)
### Bug Fixes
* spelling mistake ([52f9147](https://github.com/revanced/revanced-patches/commit/52f9147ee8d591f786397d174dc02a141d9250a9))
### Features
* `Dependencies` annotation ([85806bb](https://github.com/revanced/revanced-patches/commit/85806bb355e342ecb33d4ee1e76f9edf89b2c2ee))
* `GeneralBytecodeAds` and `GeneralResourceAds` patch ([f99bbef](https://github.com/revanced/revanced-patches/commit/f99bbef4c911ac2492166c7a3792ea11ffceffab))
# [1.0.0-dev.13](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.12...v1.0.0-dev.13) (2022-05-31)
### Bug Fixes
* migrate patches to latest patcher api changes ([8a0ee03](https://github.com/revanced/revanced-patches/commit/8a0ee03a71cf4a000c9a7246d0e64ed8291a5127))
* missing extension method `doRecursively` ([e9c9460](https://github.com/revanced/revanced-patches/commit/e9c946008ee912652d288e515b83b52ae2d239d8))
# [1.0.0-dev.12](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.11...v1.0.0-dev.12) (2022-05-28)
### Bug Fixes
* wrong annotation and signature in patches ([a0fdee8](https://github.com/revanced/revanced-patches/commit/a0fdee81a6d6773603520e7c3040ae8637642d58))
# [1.0.0-dev.11](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.10...v1.0.0-dev.11) (2022-05-26)
### Bug Fixes
* breaking changes by `revanced-patcher` dependency ([7e485b4](https://github.com/revanced/revanced-patches/commit/7e485b4ffe204d724809aeb9bd9f693a35ded94d))
* breaking patcher changes ([50f9cc5](https://github.com/revanced/revanced-patches/commit/50f9cc52acfd5bc23330ecd23d8d85678a9d3eee))
* breaking patcher changes ([cbb9e2c](https://github.com/revanced/revanced-patches/commit/cbb9e2cd1fa829e1d1dd92dbd40131b11ae6a05b))
* bugfixes in `microg` ([a43b33b](https://github.com/revanced/revanced-patches/commit/a43b33bdbb2b36e0a8f991fa11dfeeec34de01f9))
* write while reading resources and remove checking for "." in resource extensions ([7bc6094](https://github.com/revanced/revanced-patches/commit/7bc60943cb2350e89dac091ec9c98c5effd0b8a9))
### Features
* begin `MicroG Patch` ([91474ba](https://github.com/revanced/revanced-patches/commit/91474ba07376c13e7a71685dfd8b6e6913ed5ee9))
* update MicroG patch to latest version ([c24f806](https://github.com/revanced/revanced-patches/commit/c24f8063a04f89aea2d2f7087a435738de7dfeae))
# [1.0.0-dev.11](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.10...v1.0.0-dev.11) (2022-05-26)
### Bug Fixes
* breaking changes by `revanced-patcher` dependency ([7e485b4](https://github.com/revanced/revanced-patches/commit/7e485b4ffe204d724809aeb9bd9f693a35ded94d))
* breaking patcher changes ([50f9cc5](https://github.com/revanced/revanced-patches/commit/50f9cc52acfd5bc23330ecd23d8d85678a9d3eee))
* breaking patcher changes ([cbb9e2c](https://github.com/revanced/revanced-patches/commit/cbb9e2cd1fa829e1d1dd92dbd40131b11ae6a05b))
* bugfixes in `microg` ([a43b33b](https://github.com/revanced/revanced-patches/commit/a43b33bdbb2b36e0a8f991fa11dfeeec34de01f9))
* write while reading resources and remove checking for "." in resource extensions ([7bc6094](https://github.com/revanced/revanced-patches/commit/7bc60943cb2350e89dac091ec9c98c5effd0b8a9))
### Features
* begin `MicroG Patch` ([91474ba](https://github.com/revanced/revanced-patches/commit/91474ba07376c13e7a71685dfd8b6e6913ed5ee9))
* update MicroG patch to latest version ([c24f806](https://github.com/revanced/revanced-patches/commit/c24f8063a04f89aea2d2f7087a435738de7dfeae))
# [1.0.0-dev.10](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.9...v1.0.0-dev.10) (2022-05-22)
### Bug Fixes
* `create-button-signature` ([a173f6e](https://github.com/revanced/revanced-patches/commit/a173f6e5a7e65943657e2072e8a72a4a680e5277))
* breaking changes by `revanced-patcher` dependency ([e12e484](https://github.com/revanced/revanced-patches/commit/e12e484e3796c5c9c8505b677838cdf8432f2e79))
* loop in `amoled` patch ([c4c86b6](https://github.com/revanced/revanced-patches/commit/c4c86b65fd8b2463c1d86ad2e46ec9f08e60d47c))
### Features
* add `amoled` patch ([d61bac4](https://github.com/revanced/revanced-patches/commit/d61bac4f8243d0ef72ca91c7c1d5facd858d515e))
* update patches to latest version ([bad25de](https://github.com/revanced/revanced-patches/commit/bad25dec1d73137f8b7a1bf4daaceb2279b4d48c))
# [1.0.0-dev.9](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.8...v1.0.0-dev.9) (2022-05-13)
### Bug Fixes
* clean after building ([a2df3fb](https://github.com/revanced/revanced-patches/commit/a2df3fbc9761b07f3010542fa8684ade00e4dc91))
# [1.0.0-dev.8](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.7...v1.0.0-dev.8) (2022-05-13)
### Bug Fixes
* publish releases ([83916f9](https://github.com/revanced/revanced-patches/commit/83916f96d27989dcbb35c0ba6ef326a16b470501))
# [1.0.0-dev.7](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.6...v1.0.0-dev.7) (2022-05-07)
### Bug Fixes
* use the latest version of patcher dependency ([fe4a439](https://github.com/revanced/revanced-patches/commit/fe4a439cb2bc5e385ae13e8e155f25bb15e74633))
# [1.0.0-dev.6](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.5...v1.0.0-dev.6) (2022-05-07)
### Bug Fixes
* update patches ([91b8ec8](https://github.com/revanced/revanced-patches/commit/91b8ec81f33417798546c32db708fe09ada3930c))
# [1.0.0-dev.5](https://github.com/revanced/revanced-patches/compare/v1.0.0-dev.4...v1.0.0-dev.5) (2022-05-07)
### Bug Fixes
* `enable-seekbar-tapping` patch ([52fd726](https://github.com/revanced/revanced-patches/commit/52fd726d9b0d2efbd0f9742fc84ad01ccdcff168))
* `Index` in wrong package ([2f9360f](https://github.com/revanced/revanced-patches/commit/2f9360f57cc8415564534fbbd8bd5e2a83a1b629))
* `minimized-playback` & `old-quality-layout` wrong opcodes ([b45d175](https://github.com/revanced/revanced-patches/commit/b45d175c6f1ece6da894ab16128c2644d262c9c7))
* `minimized-playback` patch ([55677a4](https://github.com/revanced/revanced-patches/commit/55677a44ff965c0b92c3f1d771bd68c12c142ad4))
* `SignatureChecker` not handling nullable field `methodMetadata` ([17bcf78](https://github.com/revanced/revanced-patches/commit/17bcf786a85ccf1f7d9f5a66a044a3c26def09bb))
* accidentally removed code in refactor ([0077e26](https://github.com/revanced/revanced-patches/commit/0077e26d23cc112b671a41614a55348fac2c88ca))
* add missing `trimIndent()` to string literals ([76d3c71](https://github.com/revanced/revanced-patches/commit/76d3c71b67edebd79f2cdb1bb28e4d2969d72223))
* add missing opcode for `create-button-method` ([0a398ef](https://github.com/revanced/revanced-patches/commit/0a398ef364f91a0dd9608df1a036a2515476ccf2))
* attempt on all patches ([3395d69](https://github.com/revanced/revanced-patches/commit/3395d69747103a4bdf314297aa0bfa6ef6a0fc36))
* breaking changes of the patcher ([1a49bbd](https://github.com/revanced/revanced-patches/commit/1a49bbdbc4ff6f427934259536218e161908b449))
* breaking patcher changes ([581d1b0](https://github.com/revanced/revanced-patches/commit/581d1b0ca7d15adcdb1ab6116ef035acfe701757))
* disable `hide-suggestions-patch` patch until fixed ([99099ea](https://github.com/revanced/revanced-patches/commit/99099ea0bc12f5f25896967db642442df69d0c4f))
* incorrect endIndex (fixed in Patcher) ([424788e](https://github.com/revanced/revanced-patches/commit/424788edd777110cdaff97500556d18628f33385))
* modified opcode for `show-video-ads-constructor` ([a0dcea3](https://github.com/revanced/revanced-patches/commit/a0dcea3a13f68cae449dfaf445b542e339c83ff0))
* multiple bugs in patches ([e37201d](https://github.com/revanced/revanced-patches/commit/e37201d0ceef474696857a0d8845950c888194d0))
* name for `IntegrationsPatch` ([e46ef02](https://github.com/revanced/revanced-patches/commit/e46ef02302825d62b57912b2747a25f858036bb7))
* print instruction index of warning ([9e29aee](https://github.com/revanced/revanced-patches/commit/9e29aeeeff222412f6c45cf7e4879f8ec53ca6ee))
* remove `HideSuggestionsPatch` from `Index` ([f32e474](https://github.com/revanced/revanced-patches/commit/f32e4747b512c675b807ff5eebfd0b8e66173fba))
* signature checker with changes of patcher ([e82459d](https://github.com/revanced/revanced-patches/commit/e82459d37759e1a5a860d3e7fcdf69d95b06858e))
* tests failing ([102793f](https://github.com/revanced/revanced-patches/commit/102793f24f8bf7c7fd254968b29d65da7b2b962f))
* update `HomeAdsPatch` ([62f1801](https://github.com/revanced/revanced-patches/commit/62f1801e9cbee53c0be3413c245161bd941e4aec))
* version in package metadata of music ([b299205](https://github.com/revanced/revanced-patches/commit/b299205aa7cde82f1f55fc598de3ff8d80b8bcb0))
* **VideoAds:** remove `istore1` opcode ([dc4ec57](https://github.com/revanced/revanced-patches/commit/dc4ec574414c5df959efa0ca8f1cd39a812fedf8))
* wrong access flag in signature for `Create button patch` ([9fbb89d](https://github.com/revanced/revanced-patches/commit/9fbb89d05336a256a0759eea6095e073946c45e5))
* wrong opcode for `create-button-method` ([3214650](https://github.com/revanced/revanced-patches/commit/32146506f139aebc44cd5faffb7706b8b9c21c3d))
* wrong opcode pattern for `create-button-method` ([f4d8a85](https://github.com/revanced/revanced-patches/commit/f4d8a8525bc64b90748b21979d463977a21dcd85))
* wrong opcode pattern for `enable-seekbar-tapping-signature` ([1d83395](https://github.com/revanced/revanced-patches/commit/1d833957ed3e01188770c85e3d84e483419bd797))
* wrong opcode pattern for signature in `Hide suggestions patch` ([535aee0](https://github.com/revanced/revanced-patches/commit/535aee08408b990c80f5966c13fa84666a8b35d0))
* wrong patches in `upgrade-tab-remover` ([5182290](https://github.com/revanced/revanced-patches/commit/518229031ceca049ad790f7b77b19405d39f0ce1))
* wrong signature for `hide-reels-signature` ([2d9ff2a](https://github.com/revanced/revanced-patches/commit/2d9ff2af0a991d7721f3741187716a3b08bb4029))
* wrong signatures for patch `Old Quality Layout Patch` ([823e503](https://github.com/revanced/revanced-patches/commit/823e503d84037bdf27b09f17e63383f963c76854))
* wrong versions of patches ([a112b22](https://github.com/revanced/revanced-patches/commit/a112b22ce6e685204caab6f95f511e26ef95806b))
### Features
* `hide-shorts-button` patch ([88352ee](https://github.com/revanced/revanced-patches/commit/88352ee6ecd23faa4a7fd9f7495e67fa1d3e33bd))
* `tastebuilder-remover` for music ([a6aeca3](https://github.com/revanced/revanced-patches/commit/a6aeca31bd80b8c4a8acd071e22faca6e136bdb0))
* Add (WIP) Signature Checker ([ae4c7b2](https://github.com/revanced/revanced-patches/commit/ae4c7b29f211c461de460f97f3a8656e795adafb))
* add home ads patch ([36cddd1](https://github.com/revanced/revanced-patches/commit/36cddd1488683e19e2b927e34c80a4f0f3cace35))
* added `codecs-unlock` patch ([e5fd7ce](https://github.com/revanced/revanced-patches/commit/e5fd7cece94b1ff5342178f59b29576db806e0f6))
* display metadata for each signature in `SignatureChecker` ([736a71f](https://github.com/revanced/revanced-patches/commit/736a71fac21a32dbb1eef9c3a9f0d3005e7d9ca0))
* get required register dynamically ([0924ca2](https://github.com/revanced/revanced-patches/commit/0924ca2ad30ae865dcc0fd484cb0da517e827352))
* integrations patch ([19c0b0d](https://github.com/revanced/revanced-patches/commit/19c0b0d194bb97c7248ea7a9b081176961653b9d))
* migrate to dalvik patches ([e088c67](https://github.com/revanced/revanced-patches/commit/e088c671081bcf75586ccc1c4bdbed9366e93874))
* Patches for YouTube Music ([b60c9d3](https://github.com/revanced/revanced-patches/commit/b60c9d33b611bb4d5b55bb419652bc14b0309792))
* remove obsolete patch `Hide suggestions patch` ([e65c6f2](https://github.com/revanced/revanced-patches/commit/e65c6f240ed23a54271d20a90fc57ec65cafc02d))
# [1.0.0-dev.4](https://github.com/ReVancedTeam/revanced-patches/compare/v1.0.0-dev.3...v1.0.0-dev.4) (2022-03-22)
### Features
* use supplier instead of KClass ([08af6e5](https://github.com/ReVancedTeam/revanced-patches/commit/08af6e54af79ef9ef4fb3372a348ce9b6fba4d20))
* use supplier instead of KClass ([91aa019](https://github.com/ReVancedTeam/revanced-patches/commit/91aa019f8d3d87fbf7affeb7abc2b02ba87af5c3))
### BREAKING CHANGES
* signature of patches was changed
* signature of patches was changed
# [1.0.0-dev.3](https://github.com/ReVancedTeam/revanced-patches/compare/v1.0.0-dev.2...v1.0.0-dev.3) (2022-03-21)

View File

@@ -1,2 +1 @@
# revanced-patches
Repo for all ReVanced patches
Repo for all ReVanced patches

View File

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

View File

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

View File

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

0
gradlew vendored Normal file → Executable file
View File

View File

@@ -0,0 +1,36 @@
package app.revanced.extensions
import app.revanced.patcher.util.smali.toInstruction
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.w3c.dom.Node
internal fun MutableMethodImplementation.injectHideCall(
index: Int,
register: Int
) {
this.addInstruction(
index,
"invoke-static { v$register }, Lapp/revanced/integrations/patches/HideHomeAdsPatch;->HideHomeAds(Landroid/view/View;)V".toInstruction()
)
}
internal fun Node.doRecursively(action: (Node) -> Unit) {
action(this)
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
}
internal fun String.startsWithAny(vararg prefixes: String): Boolean {
for (prefix in prefixes)
if (this.startsWith(prefix))
return true
return false
}
internal fun String.equalsAny(vararg other: String): Boolean {
for (_other in other)
if (this == _other)
return true
return false
}

View File

@@ -1,27 +0,0 @@
package app.revanced.patches
import app.revanced.patcher.patch.Patch
import app.revanced.patches.ad.VideoAds
import app.revanced.patches.interaction.EnableSeekbarTapping
import app.revanced.patches.layout.*
import kotlin.reflect.KClass
/**
* Index contains all the patches and should be imported when using this library.
*/
@Suppress("Unused")
object Index {
/**
* Array of patches.
* New patches should be added to the array.
*/
val patches: Array<KClass<out Patch>> = arrayOf(
VideoAds::class,
MinimizedPlayback::class,
CreateButtonRemover::class,
HideReels::class,
HideSuggestions::class,
OldQualityLayout::class,
EnableSeekbarTapping::class
)
}

View File

@@ -1,41 +0,0 @@
package app.revanced.patches.ad
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.signature.Signature
import app.revanced.patcher.writer.ASMWriter.insertAt
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.VarInsnNode
class VideoAds : Patch("VideoAds") {
override fun execute(cache: Cache): PatchResult {
val showVideoAdsMethodData = cache.methods["show-video-ads"].findParentMethod(
Signature(
"method",
Type.VOID_TYPE,
Opcodes.ACC_PUBLIC or Opcodes.ACC_FINAL,
arrayOf(Type.BOOLEAN_TYPE),
null
)
) ?: return PatchResultError("Could not find required method to patch")
showVideoAdsMethodData.method.instructions.insertAt(
0,
VarInsnNode(Opcodes.ISTORE, 1),
MethodInsnNode(
Opcodes.INVOKESTATIC,
"fi/vanced/libraries/youtube/whitelisting/Whitelist",
"shouldShowAds",
Type.getMethodDescriptor(Type.BOOLEAN_TYPE)
)
)
return PatchResultSuccess()
}
}

View File

@@ -1,49 +0,0 @@
package app.revanced.patches.interaction
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.writer.ASMWriter.insertAt
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.*
class EnableSeekbarTapping : Patch("enable-seekbar-tapping") {
override fun execute(cache: Cache): PatchResult {
val patchData = cache.methods["enable-seekbar-tapping"]
val methodOPatchData = cache.methods["enable-seekbar-tapping-method-o"]
val methodPPatchData = cache.methods["enable-seekbar-tapping-method-p"]
val elseLabel = LabelNode()
patchData.method.instructions.insertAt(
patchData.scanData.endIndex,
InsnNode(Opcodes.ACONST_NULL),
MethodInsnNode(
Opcodes.INVOKESTATIC,
"fi/razerman/youtube/preferences/BooleanPreferences",
"isTapSeekingEnabled",
"()Z"
),
JumpInsnNode(Opcodes.IFEQ, elseLabel),
VarInsnNode(Opcodes.ALOAD, 0),
VarInsnNode(Opcodes.ILOAD, 6),
MethodInsnNode(
Opcodes.INVOKEVIRTUAL,
methodOPatchData.declaringClass.name,
methodOPatchData.method.name,
"(I)V"
),
VarInsnNode(Opcodes.ALOAD, 0),
VarInsnNode(Opcodes.ILOAD, 6),
MethodInsnNode(
Opcodes.INVOKEVIRTUAL,
methodPPatchData.declaringClass.name,
methodPPatchData.method.name,
"(I)V"
),
elseLabel
)
return PatchResultSuccess()
}
}

View File

@@ -1,32 +0,0 @@
package app.revanced.patches.layout
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.writer.ASMWriter.insertAt
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.VarInsnNode
class CreateButtonRemover : Patch("create-button-remover") {
override fun execute(cache: Cache): PatchResult {
val patchData = cache.methods["create-button-patch"]
patchData.method.instructions.insertAt(
patchData.scanData.endIndex - 1,
VarInsnNode(
Opcodes.ALOAD,
6
),
MethodInsnNode(
Opcodes.INVOKESTATIC,
"fi/razerman/youtube/XAdRemover",
"hideCreateButton",
"(Landroid/view/View;)V"
)
)
return PatchResultSuccess()
}
}

View File

@@ -1,29 +0,0 @@
package app.revanced.patches.layout
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.writer.ASMWriter.insertAt
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.VarInsnNode
class HideReels : Patch("hide-reels") {
override fun execute(cache: Cache): PatchResult {
val patchData = cache.methods["hide-reel-patch"]
patchData.method.instructions.insertAt(
patchData.scanData.endIndex + 1,
VarInsnNode(Opcodes.ALOAD, 18),
MethodInsnNode(
Opcodes.INVOKESTATIC,
"fi/razerman/youtube/XAdRemover",
"HideReels",
"(Landroid/view/View;)V"
)
)
return PatchResultSuccess()
}
}

View File

@@ -1,52 +0,0 @@
package app.revanced.patches.layout
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.signature.Signature
import app.revanced.patcher.writer.ASMWriter.insertAt
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.VarInsnNode
class HideSuggestions : Patch("hide-suggestions") {
override fun execute(cache: Cache): PatchResult {
val method = cache.methods["hide-suggestions-patch"].findParentMethod(
Signature(
"hide-suggestions-method",
Type.VOID_TYPE,
Opcodes.ACC_PUBLIC or Opcodes.ACC_FINAL,
arrayOf(Type.BOOLEAN_TYPE),
arrayOf(
Opcodes.ALOAD,
Opcodes.ILOAD,
Opcodes.PUTFIELD,
Opcodes.ALOAD,
Opcodes.GETFIELD
)
)
) ?: return PatchResultError("Parent method hide-suggestions-method has not been found")
method.method.instructions.insertAt(
0,
VarInsnNode(Opcodes.ILOAD, 1),
MethodInsnNode(
Opcodes.INVOKESTATIC,
"java/lang/Boolean",
"valueOf",
"(Z)Ljava/lang/Boolean"
),
MethodInsnNode(
Opcodes.INVOKESTATIC,
"fi/razerman/youtube/XAdRemover",
"HideReels",
"(Landroid/view/View;)V"
)
)
return PatchResultSuccess()
}
}

View File

@@ -1,13 +0,0 @@
package app.revanced.patches.layout
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
class MinimizedPlayback : Patch("minimized-playback") {
override fun execute(cache: Cache): PatchResult {
cache.methods["minimized-playback-manager"].method.instructions.clear()
return PatchResultSuccess()
}
}

View File

@@ -1,52 +0,0 @@
package app.revanced.patches.layout
import app.revanced.patcher.cache.Cache
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.signature.Signature
import app.revanced.patcher.util.ExtraTypes
import app.revanced.patcher.writer.ASMWriter.insertAt
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.JumpInsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.VarInsnNode
class OldQualityLayout : Patch("old-quality-restore") {
override fun execute(cache: Cache): PatchResult {
val method = cache.methods["old-quality-patch"].findParentMethod(
Signature(
"old-quality-patch-method",
ExtraTypes.Any,
Opcodes.ACC_PUBLIC or Opcodes.ACC_FINAL,
arrayOf(),
arrayOf(
Opcodes.ALOAD,
Opcodes.GETFIELD,
Opcodes.ISTORE,
Opcodes.ICONST_3,
Opcodes.ISTORE
)
)
) ?: return PatchResultError("Parent method old-quality-patch-method has not been found")
method.method.instructions.insertAt(
0,
MethodInsnNode(
Opcodes.INVOKESTATIC,
"fi/razerman/youtube/XGlobals",
"useOldStyleQualitySettings",
"()Z"
),
VarInsnNode(Opcodes.ISTORE, 1),
VarInsnNode(Opcodes.ILOAD, 1),
JumpInsnNode(
Opcodes.IFNE,
(method.method.instructions[method.scanData.endIndex + 3] as JumpInsnNode).label
),
)
return PatchResultSuccess()
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,45 @@
package app.revanced.patches.music.audio.codecs.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.data.impl.toMethodWalker
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.util.smali.toInstruction
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint
@Patch
@Name("codecs-unlock")
@Description("Enables more audio codecs. Usually results in better audio quality but may depend on song and device.")
@CodecsUnlockCompatibility
@Version("0.0.1")
class CodecsUnlockPatch : BytecodePatch(
listOf(
CodecsLockFingerprint, AllCodecsReferenceFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
var result = CodecsLockFingerprint.result!!
val implementation = result.mutableMethod.implementation!!
val instructionIndex = result.patternScanResult!!.startIndex
result = AllCodecsReferenceFingerprint.result!!
val codecMethod =
data.toMethodWalker(result.method).nextMethod(result.patternScanResult!!.startIndex).getMethod()
implementation.replaceInstruction(
instructionIndex,
"invoke-static {}, ${codecMethod.definingClass}->${codecMethod.name}()Ljava/util/Set;".toInstruction()
)
return PatchResultSuccess()
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,426 @@
package app.revanced.patches.youtube.ad.general.bytecode.patch
import app.revanced.extensions.injectHideCall
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patcher.util.smali.toInstructions
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.addMethod
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.findMutableMethodOf
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.insertBlocks
import app.revanced.patches.youtube.ad.general.bytecode.extensions.MethodExtensions.toDescriptor
import app.revanced.patches.youtube.ad.general.bytecode.utils.MethodUtils.createMutableMethod
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.jf.dexlib2.builder.instruction.*
import org.jf.dexlib2.iface.MethodImplementation
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
import org.jf.dexlib2.iface.reference.FieldReference
import org.jf.dexlib2.iface.reference.MethodReference
import org.jf.dexlib2.iface.reference.StringReference
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
@Patch
@Dependencies(
dependencies = [ResourceIdMappingProviderResourcePatch::class, IntegrationsPatch::class]
)
@Name("general-ads")
@Description("Patch to remove general ads in bytecode.")
@GeneralAdsCompatibility
@Version("0.0.1")
class GeneralBytecodeAdsPatch : BytecodePatch(
listOf()
) {
// a constant used by litho
private val lithoConstant = 0xaed2868
// list of resource names to get the id of
private val resourceIds = arrayOf(
"ad_attribution",
"reel_multiple_items_shelf",
"info_cards_drawer_header",
"endscreen_element_layout_video",
"endscreen_element_layout_circle",
"endscreen_element_layout_icon",
"promoted_video_item_land",
"promoted_video_item_full_bleed",
).map { name ->
ResourceIdMappingProviderResourcePatch.resourceMappings.first { it.name == name }.id
}
private val stringReferences = arrayOf(
"Claiming to use more elements than provided",
"loadVideo() called on LocalDirector in wrong state",
"LoggingProperties are not in proto format"
)
override fun execute(data: BytecodeData): PatchResult {
// iterating through all classes is expensive
for (classDef in data.classes) {
var mutableClass: MutableClass? = null
method@ for (method in classDef.methods) {
var mutableMethod: MutableMethod? = null
if (method.implementation == null) continue@method
val instructions = method.implementation!!.instructions
instructions.forEachIndexed { index, instruction ->
when (instruction.opcode) {
Opcode.CONST -> {
// TODO: find a way to de-duplicate code.
// The issue is we need to save mutableClass and mutableMethod to the existing fields
when ((instruction as Instruction31i).wideLiteral) {
resourceIds[0] -> { // general ads
// and is followed by an instruction with the mnemonic INVOKE_VIRTUAL
val insertIndex = index + 1
val invokeInstruction = instructions.elementAt(insertIndex)
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// insert hide call to hide the view corresponding to the resource
val viewRegister = (invokeInstruction as Instruction35c).registerC
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
}
resourceIds[1] -> { // reel ads
// and is followed by an instruction at insertIndex with the mnemonic IPUT_OBJECT
val insertIndex = index + 4
val iPutInstruction = instructions.elementAt(insertIndex)
if (iPutInstruction.opcode != Opcode.IPUT_OBJECT) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
val viewRegister = (iPutInstruction as Instruction22c).registerA
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
}
resourceIds[2] -> { // info cards ads
// and is followed by an instruction with the mnemonic INVOKE_VIRTUAL
val removeIndex = index - 1
val invokeInstruction = instructions.elementAt(removeIndex)
if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
mutableMethod!!.implementation!!.removeInstruction(removeIndex)
}
resourceIds[3], resourceIds[4], resourceIds[5] -> { // end screen ads
// and is followed by an instruction with the mnemonic IPUT_OBJECT
val insertIndex = index + 7
val invokeInstruction = instructions.elementAt(insertIndex)
if (invokeInstruction.opcode != Opcode.IPUT_OBJECT) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// TODO: dynamically get registers
mutableMethod!!.addInstructions(
insertIndex, """
const/16 v1, 0x8
invoke-virtual {v0,v1}, Landroid/widget/FrameLayout;->setVisibility(I)V
"""
)
}
resourceIds[6] -> {
// and is followed by an instruction with the mnemonic INVOKE_DIRECT
val insertIndex = index + 3
val invokeInstruction = instructions.elementAt(insertIndex)
if (invokeInstruction.opcode != Opcode.INVOKE_DIRECT) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// insert hide call to hide the view corresponding to the resource
val viewRegister = (invokeInstruction as Instruction35c).registerE
mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister)
}
resourceIds[7] -> {
// TODO, go to class, hide the inflated view
}
}
}
Opcode.CONST_STRING -> {
when (((instruction as Instruction21c).reference as StringReference).string) {
stringReferences[0] -> {
val stringInstruction = instructions.elementAt(3)
if (stringInstruction.opcode == Opcode.CONST_STRING) return@forEachIndexed
// create proxied method, make sure to not re-resolve() the current class
if (mutableClass == null) mutableClass = data.proxy(classDef).resolve()
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
// return the method
val insertIndex = 1 // after super constructor
mutableMethod!!.implementation!!.addInstruction(
insertIndex, BuilderInstruction10x(Opcode.RETURN_VOID)
)
}
stringReferences[1] -> {
// TODO: migrate video ads patch to here if necessary
}
stringReferences[2] -> { // Litho ads
// create proxied method.
val proxy = data.proxy(classDef)
val mutableClass = proxy.resolve()
// add getIsEmpty method
mutableClass.addGetIsEmptyMethod()
// get required method to patch and get references from
val lithoMethod = getLithoMethod(mutableClass)
?: return PatchResultError("Could not find required litho method to patch.")
val lithoMethodImplementation = lithoMethod.implementation!!
// create and add getTemplateName method
val getTemplateMethod =
mutableClass.createGetTemplateNameMethod(lithoMethodImplementation)
mutableClass.addMethod(getTemplateMethod)
val lithoInstructions = lithoMethodImplementation.instructions
val thisType = mutableClass.type
val templateNameParameterType = getTemplateMethod.parameterTypes.first()
// get reference descriptors
val indexOfReference1 = lithoInstructions.indexOfFirst {
it.opcode == Opcode.INVOKE_STATIC_RANGE
}
val descriptor1 =
lithoInstructions.elementAt(indexOfReference1).toDescriptor<MethodReference>()
val descriptor2 = lithoInstructions.elementAt(indexOfReference1 + 2)
.toDescriptor<FieldReference>()
// create label
val lithoRemoveLabel = lithoMethodImplementation.newLabelForIndex(0)
// create branch instructions
val ifEqzFirstInstruction =
BuilderInstruction21t(Opcode.IF_EQZ, 0, lithoRemoveLabel)
val ifEqzSecondInstruction =
BuilderInstruction21t(Opcode.IF_EQZ, 1, lithoRemoveLabel)
// create blocks
val block1 = """
invoke-static/range {p3}, $thisType->getTemplateName($templateNameParameterType)Ljava/lang/String;
move-result-object v0
""".toInstructions(lithoMethod)
val block2 = """
move-object/from16 v1, p3
iget-object v2, v1, $templateNameParameterType->b:Ljava/nio/ByteBuffer;
invoke-static {v0, v2}, Lapp/revanced/integrations/patches/GeneralBytecodeAdsPatch;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z
move-result v1
""".toInstructions(lithoMethod)
val block3 = """
move-object/from16 v2, p1
invoke-static {v2}, $descriptor1
move-result-object v0
iget-object v0, v0, $descriptor2
return-object v0
""".toInstructions(lithoMethod)
// insert blocks and branch instructions
lithoMethodImplementation.insertBlocks(
0,
block1,
listOf(ifEqzFirstInstruction),
block2,
listOf(ifEqzSecondInstruction),
block3,
)
}
}
}
else -> return@forEachIndexed
}
}
}
}
return PatchResultSuccess()
}
private fun getLithoMethod(mutableClass: MutableClass) = mutableClass.methods.firstOrNull {
it.implementation?.instructions?.any { instruction ->
instruction.opcode == Opcode.CONST && (instruction as Instruction31i).narrowLiteral == lithoConstant
} ?: false
}
private fun MutableClass.addGetIsEmptyMethod() {
val getIsEmptyImplementation = MutableMethodImplementation(1)
// create target instructions
val firstTargetInstruction = BuilderInstruction11n(Opcode.CONST_4, 0, 1)
val secondTargetInstruction = BuilderInstruction11n(Opcode.CONST_4, 0, 0)
// add instructions to the instruction list
getIsEmptyImplementation.addInstructions(
0, listOf(
// BuilderInstruction21t(Opcode.IF_EQZ, 0, first),
BuilderInstruction35c(
Opcode.INVOKE_VIRTUAL,
1,
0,
0,
0,
0,
0,
ImmutableMethodReference("Ljava/lang/String;", "isEmpty", null, "Z")
),
BuilderInstruction11x(Opcode.MOVE_RESULT, 0),
// BuilderInstruction21t(Opcode.IF_EQZ, 0, second),
// BuilderInstruction10t(Opcode.GOTO, first),
secondTargetInstruction,
BuilderInstruction11x(Opcode.RETURN, 0),
firstTargetInstruction,
BuilderInstruction11x(Opcode.RETURN, 0),
)
)
val getIsEmptyInstructions = getIsEmptyImplementation.instructions
// create labels for the target instructions
val firstLabel =
getIsEmptyImplementation.newLabelForIndex(getIsEmptyInstructions.indexOf(firstTargetInstruction))
val secondLabel =
getIsEmptyImplementation.newLabelForIndex(getIsEmptyInstructions.indexOf(secondTargetInstruction))
// create branch instructions to the labels
val ifEqzFirstInstruction = BuilderInstruction21t(Opcode.IF_EQZ, 0, firstLabel)
val ifEqzSecondInstruction = BuilderInstruction21t(Opcode.IF_EQZ, 0, secondLabel)
val gotoInstruction = BuilderInstruction10t(Opcode.GOTO, firstLabel)
// insert remaining branch instructions, order of adding those instructions is important
getIsEmptyImplementation.addInstructions(
2, listOf(
ifEqzSecondInstruction, gotoInstruction
)
)
getIsEmptyImplementation.addInstruction(
0, ifEqzFirstInstruction
)
this.addMethod(
createMutableMethod(
this.type, "getIsEmpty", "Z", "Ljava/lang/String;", getIsEmptyImplementation
)
)
}
private fun MutableClass.createGetTemplateNameMethod(lithoMethodImplementation: MethodImplementation): MutableMethod {
var counter = 1
val descriptors = buildList {
for (instruction in lithoMethodImplementation.instructions) {
if (instruction !is ReferenceInstruction) continue
if (counter++ > 4) break
add(instruction.toDescriptor<MethodReference>())
}
}
val getTemplateNameImplementation = MutableMethodImplementation(2)
// create code blocks
val block1 = """
invoke-virtual {p0}, ${descriptors[0]}
move-result-object p0
const v0, $lithoConstant
invoke-static {p0, v0}, ${descriptors[1]}
move-result-object p0
""".toInstructions()
val block2 = """
invoke-static {p0}, ${descriptors[2]}
move-result-object p0
invoke-virtual {p0}, ${descriptors[3]}
move-result-object v0
invoke-static {v0}, ${this.type}->getIsEmpty(Ljava/lang/String;)Z
move-result v0
""".toInstructions()
val block3 = """
invoke-virtual {p0}, ${descriptors[3]}
move-result-object p0
return-object p0
""".toInstructions()
// create target instruction
val targetInstruction = BuilderInstruction11n(Opcode.CONST_4, 1, 0)
// and remaining instruction
val returnInstruction = BuilderInstruction11x(Opcode.RETURN_OBJECT, 1)
// insert blocks and instructions
getTemplateNameImplementation.insertBlocks(
0,
block1,
block2,
block3,
listOf(
targetInstruction, returnInstruction
),
)
// create label for target instruction
val targetInstructionLabel =
getTemplateNameImplementation.newLabelForIndex(getTemplateNameImplementation.instructions.size - 2)
// create branch instructions to the label
val ifEqzInstruction = BuilderInstruction21t(Opcode.IF_EQZ, 1, targetInstructionLabel)
val ifNezInstruction = BuilderInstruction21t(Opcode.IF_NEZ, 0, targetInstructionLabel)
// insert branch instructions
getTemplateNameImplementation.addInstruction(
block1.size, ifEqzInstruction
)
getTemplateNameImplementation.addInstruction(
block1.size + block2.size + 1, ifNezInstruction
)
// create the method
return createMutableMethod(
this.type,
"getTemplateName",
"Ljava/lang/String;",
descriptors[0].split("->")[0], // a bit weird to get the type this way,
getTemplateNameImplementation
)
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,43 @@
package app.revanced.patches.youtube.ad.video.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
import app.revanced.patches.youtube.ad.video.fingerprints.ShowVideoAdsConstructorFingerprint
import app.revanced.patches.youtube.ad.video.fingerprints.ShowVideoAdsFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class])
@Name("video-ads")
@Description("Patch to remove ads in the YouTube video player.")
@VideoAdsCompatibility
@Version("0.0.1")
class VideoAdsPatch : BytecodePatch(
listOf(
ShowVideoAdsConstructorFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
ShowVideoAdsFingerprint.resolve(data, ShowVideoAdsConstructorFingerprint.result!!.classDef)
// Override the parameter by calling shouldShowAds and setting the parameter to the result
ShowVideoAdsFingerprint.result!!.mutableMethod.addInstructions(
0, """
invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z
move-result v1
"""
)
return PatchResultSuccess()
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,95 @@
package app.revanced.patches.youtube.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.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.interaction.seekbar.annotation.SeekbarTappingCompatibility
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingParentFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.formats.Instruction11n
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class])
@Name("seekbar-tapping")
@Description("Enable tapping on the seekbar of the YouTube player.")
@SeekbarTappingCompatibility
@Version("0.0.1")
class EnableSeekbarTappingPatch : BytecodePatch(
listOf(
SeekbarTappingParentFingerprint, SeekbarTappingFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
var result = SeekbarTappingParentFingerprint.result!!
val tapSeekMethods = mutableMapOf<String, Method>()
// find the methods which tap the seekbar
for (it in result.classDef.methods) {
if (it.implementation == null) continue
val instructions = it.implementation!!.instructions
// here we make sure we actually find the method because it has more then 7 instructions
if (instructions.count() < 7) continue
// we know that the 7th instruction has the opcode CONST_4
val instruction = instructions.elementAt(6)
if (instruction.opcode != Opcode.CONST_4) continue
// the literal for this instruction has to be either 1 or 2
val literal = (instruction as Instruction11n).narrowLiteral
// method founds
if (literal == 1) tapSeekMethods["P"] = it
if (literal == 2) tapSeekMethods["O"] = it
}
// replace map because we don't need the upper one anymore
result = SeekbarTappingFingerprint.result!!
val implementation = result.mutableMethod.implementation!!
// if tap-seeking is enabled, do not invoke the two methods below
val pMethod = tapSeekMethods["P"]!!
val oMethod = tapSeekMethods["O"]!!
// get the required register
val instruction = implementation.instructions[result.patternScanResult!!.endIndex]
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return PatchResultError("Could not find the correct register")
val register = (instruction as Instruction35c).registerC
// the instructions are written in reverse order.
result.mutableMethod.addInstructions(
result.patternScanResult!!.endIndex + 1, """
invoke-virtual { v$register, v2 }, ${oMethod.definingClass}->${oMethod.name}(I)V
invoke-virtual { v$register, v2 }, ${pMethod.definingClass}->${pMethod.name}(I)V
"""
)
// if tap-seeking is disabled, do not invoke the two methods above by jumping to the else label
val elseLabel = implementation.newLabelForIndex(result.patternScanResult!!.endIndex + 1)
implementation.addInstruction(
result.patternScanResult!!.endIndex + 1, BuilderInstruction21t(Opcode.IF_EQZ, 0, elseLabel)
)
result.mutableMethod.addInstructions(
result.patternScanResult!!.endIndex + 1, """
invoke-static { }, Lapp/revanced/integrations/patches/SeekbarTappingPatch;->isTapSeekingEnabled()Z
move-result v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.amoled.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class AmoledCompatibility

View File

@@ -0,0 +1,47 @@
package app.revanced.patches.youtube.layout.amoled.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.amoled.annotations.AmoledCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import org.w3c.dom.Element
import java.io.File
@Patch
@Dependencies(
dependencies = [
FixLocaleConfigErrorPatch::class
]
)
@Name("amoled")
@Description("Enables pure black theme.")
@AmoledCompatibility
@Version("0.0.1")
class AmoledPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
data.xmlEditor["res${File.separator}values${File.separator}colors.xml"].use { editor ->
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
for (i in 0 until resourcesNode.childNodes.length) {
val node = resourcesNode.childNodes.item(i)
if (node !is Element) continue
val element = resourcesNode.childNodes.item(i) as Element
element.textContent = when (element.getAttribute("name")) {
"yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4", "yt_status_bar_background_dark" -> "@android:color/black"
"yt_selected_nav_label_dark" -> "#ffdf0000"
else -> continue
}
}
}
return PatchResultSuccess()
}
}

View File

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

View File

@@ -0,0 +1,34 @@
package app.revanced.patches.youtube.layout.autoplaybutton.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayButtonCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("autonav-informer-fingerprint")
@MatchingMethod(
"LWillAutonavInformer;", "k"
)
@FuzzyPatternScanMethod(2)
@AutoplayButtonCompatibility
@Version("0.0.1")
object AutonavInformerFingerprint : MethodFingerprint(
"Z",
AccessFlags.PUBLIC or AccessFlags.FINAL,
null,
listOf(
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
),
null,
{ it.definingClass.endsWith("WillAutonavInformer;") }
)

View File

@@ -0,0 +1,32 @@
package app.revanced.patches.youtube.layout.autoplaybutton.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayButtonCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("layout-constructor-fingerprint")
@MatchingMethod(
"LYouTubeControlsOverlay;", "F"
)
@FuzzyPatternScanMethod(2)
@AutoplayButtonCompatibility
@Version("0.0.1")
object LayoutConstructorFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
null,
listOf(
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.INVOKE_VIRTUAL,
),
listOf("1.0x")
)

View File

@@ -0,0 +1,61 @@
package app.revanced.patches.youtube.layout.autoplaybutton.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.removeInstructions
import app.revanced.patcher.extensions.replaceInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayButtonCompatibility
import app.revanced.patches.youtube.layout.autoplaybutton.fingerprints.AutonavInformerFingerprint
import app.revanced.patches.youtube.layout.autoplaybutton.fingerprints.LayoutConstructorFingerprint
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
@Patch
@Dependencies(dependencies = [ResourceIdMappingProviderResourcePatch::class])
@Name("hide-autoplay-button")
@Description("Disable the autoplay button.")
@AutoplayButtonCompatibility
@Version("0.0.1")
class HideAutoplayButton : BytecodePatch(
listOf(
LayoutConstructorFingerprint, AutonavInformerFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val layoutGenMethod = LayoutConstructorFingerprint.result!!.mutableMethod
val autonavToggle =
ResourceIdMappingProviderResourcePatch.resourceMappings.first { it.type == "id" && it.name == "autonav_toggle" }
val autonavPreviewStub =
ResourceIdMappingProviderResourcePatch.resourceMappings.first { it.type == "id" && it.name == "autonav_preview_stub" }
val autonavToggleConstIndex =
layoutGenMethod.implementation!!.instructions.indexOfFirst { (it as? WideLiteralInstruction)?.wideLiteral == autonavToggle.id }
val autonavPreviewStubConstIndex =
layoutGenMethod.implementation!!.instructions.indexOfFirst { (it as? WideLiteralInstruction)?.wideLiteral == autonavPreviewStub.id }
//remove adding autoplay button to the layout
layoutGenMethod.removeInstructions(autonavToggleConstIndex, 5)
layoutGenMethod.removeInstructions(autonavPreviewStubConstIndex, 5)
val autonavInformerMethod = AutonavInformerFingerprint.result!!.mutableMethod
//force disable autoplay since it's hard to do without the button
autonavInformerMethod.replaceInstructions(
0,
"""
const/4 v0, 0x0
return v0
"""
)
return PatchResultSuccess()
}
}

View File

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

View File

@@ -0,0 +1,53 @@
package app.revanced.patches.youtube.layout.branding.header.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.branding.header.annotations.PremiumHeadingCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import java.nio.file.Files
import java.nio.file.StandardCopyOption
import kotlin.io.path.exists
@Patch
@Dependencies(
dependencies = [FixLocaleConfigErrorPatch::class]
)
@Name("premium-heading")
@Description("Show the premium branding on the the YouTube home screen.")
@PremiumHeadingCompatibility
@Version("0.0.1")
class PremiumHeadingPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val resDirectory = data["res"]
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
val (original, replacement) = "yt_premium_wordmark_header" to "yt_wordmark_header"
val modes = arrayOf("light", "dark")
arrayOf("xxxhdpi", "xxhdpi", "xhdpi", "hdpi", "mdpi").forEach { size ->
val headingDirectory = resDirectory.resolve("drawable-$size")
modes.forEach {mode ->
val fromPath = headingDirectory.resolve("${original}_$mode.png").toPath()
val toPath = headingDirectory.resolve("${replacement}_$mode.png").toPath()
if (!fromPath.exists())
return PatchResultError("The file $fromPath does not exist in the resources. Therefore, this patch can not succeed.")
Files.copy(
fromPath,
toPath,
StandardCopyOption.REPLACE_EXISTING
)
}
}
return PatchResultSuccess()
}
}

View File

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

View File

@@ -0,0 +1,56 @@
package app.revanced.patches.youtube.layout.branding.icon.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import java.nio.file.Files
@Patch
@Dependencies(
dependencies = [FixLocaleConfigErrorPatch::class]
)
@Name("custom-branding")
@Description("Change the branding of YouTube.")
@CustomBrandingCompatibility
@Version("0.0.1")
class CustomBrandingPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val resDirectory = data["res"]
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
val iconNames = arrayOf(
"adaptiveproduct_youtube_background_color_108",
"adaptiveproduct_youtube_foreground_color_108",
"ic_launcher",
"ic_launcher_round"
)
mapOf(
"xxxhdpi" to 192,
"xxhdpi" to 144,
"xhdpi" to 96,
"hdpi" to 72,
"mdpi" to 48
).forEach { (iconDirectory, size) ->
iconNames.forEach iconLoop@{ iconName ->
val iconFile = this.javaClass.classLoader.getResourceAsStream("branding/$size/$iconName.png")
?: return PatchResultError("The icon $iconName can not be found.")
Files.write(
resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(), iconFile.readAllBytes()
)
}
}
return PatchResultSuccess()
}
}

View File

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

View File

@@ -0,0 +1,42 @@
package app.revanced.patches.youtube.layout.castbutton.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.youtube.layout.castbutton.annotations.CastButtonCompatibility
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class])
@Name("hide-cast-button")
@Description("Patch to hide the cast button.")
@CastButtonCompatibility
@Version("0.0.1")
class HideCastButtonPatch : BytecodePatch(listOf()) {
override fun execute(data: BytecodeData): PatchResult {
data.classes.forEach { classDef ->
classDef.methods.forEach { method ->
if (classDef.type.endsWith("MediaRouteButton;") && method.name == "setVisibility") {
val setVisibilityMethod =
data.proxy(classDef).resolve().methods.first { it.name == "setVisibility" }
setVisibilityMethod.addInstructions(
0, """
invoke-static {p1}, Lapp/revanced/integrations/patches/HideCastButtonPatch;->getCastButtonOverrideV2(I)I
move-result p1
"""
)
}
}
}
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.createbutton.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class CreateButtonCompatibility

View File

@@ -0,0 +1,57 @@
package app.revanced.patches.youtube.layout.createbutton.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.layout.createbutton.annotations.CreateButtonCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("create-button-fingerprint")
@MatchingMethod(
"Lknw", "z"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@CreateButtonCompatibility
@Version("0.0.1")
object CreateButtonFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("Z"),
listOf(
Opcode.IGET,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.CONST,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
)
)

View File

@@ -0,0 +1,66 @@
package app.revanced.patches.youtube.layout.createbutton.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.layout.createbutton.annotations.CreateButtonCompatibility
import app.revanced.patches.youtube.layout.createbutton.fingerprints.CreateButtonFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
import org.jf.dexlib2.iface.reference.MethodReference
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class, ResourceIdMappingProviderResourcePatch::class])
@Name("disable-create-button")
@Description("Disable the create button.")
@CreateButtonCompatibility
@Version("0.0.1")
class CreateButtonRemoverPatch : BytecodePatch(
listOf(
CreateButtonFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val result = CreateButtonFingerprint.result!!
// Get the required register which holds the view object we need to pass to the method hideCreateButton
val implementation = result.mutableMethod.implementation!!
val imageOnlyLayout =
ResourceIdMappingProviderResourcePatch.resourceMappings.first { it.type == "layout" && it.name == "image_only_tab" }
val imageOnlyLayoutConstIndex =
implementation.instructions.indexOfFirst { (it as? WideLiteralInstruction)?.wideLiteral == imageOnlyLayout.id }
val (instructionIndex, instruction) = implementation.instructions.drop(imageOnlyLayoutConstIndex).withIndex()
.first {
(((it.value as? ReferenceInstruction)?.reference) as? MethodReference)?.definingClass?.contains("PivotBar")
?: false
}
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return PatchResultError("Could not find the correct instruction")
val moveResultIndex = imageOnlyLayoutConstIndex + instructionIndex + 1
val moveResultInstruction = implementation.instructions[moveResultIndex] as OneRegisterInstruction
// Hide the button view via proxy by passing it to the hideCreateButton method
result.mutableMethod.addInstruction(
moveResultIndex + 1,
"invoke-static { v${moveResultInstruction.registerA} }, Lapp/revanced/integrations/patches/HideCreateButtonPatch;->hideCreateButton(Landroid/view/View;)V"
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.fullscreenpanels.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class FullscreenPanelsCompatibility

View File

@@ -0,0 +1,32 @@
package app.revanced.patches.youtube.layout.fullscreenpanels.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
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.layout.shorts.button.annotations.ShortsButtonCompatibility
import org.jf.dexlib2.Opcode
@Name("fullscreen-view-adder-fingerprint")
@MatchingMethod(
"LFullscreenEngagementPanelOverlay;", "e"
)
@FuzzyPatternScanMethod(2)
@ShortsButtonCompatibility
@Version("0.0.1")
object FullscreenViewAdderFingerprint : MethodFingerprint(
null,
null,
listOf("L", "L"),
listOf(
Opcode.GOTO,
Opcode.IGET_BOOLEAN,
Opcode.IF_EQ,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL,
),
null,
{ it.definingClass.endsWith("FullscreenEngagementPanelOverlay;") }
)

View File

@@ -0,0 +1,51 @@
package app.revanced.patches.youtube.layout.fullscreenpanels.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.extensions.removeInstruction
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.youtube.layout.fullscreenpanels.annotations.FullscreenPanelsCompatibility
import app.revanced.patches.youtube.layout.fullscreenpanels.fingerprints.FullscreenViewAdderFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.MethodReference
@Patch
@Name("disable-fullscreen-panels")
@Description("Disable comments panel in fullscreen view.")
@FullscreenPanelsCompatibility
@Version("0.0.1")
class FullscreenPanelsRemovalPatch : BytecodePatch(
listOf(
FullscreenViewAdderFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val method = FullscreenViewAdderFingerprint.result?.mutableMethod!!
val implementation = method.implementation!!
val (visibilityCallIndex, visibilityCall) =
implementation.instructions.withIndex()
.first { ((it.value as? ReferenceInstruction)?.reference as? MethodReference)?.name == ("setVisibility") }
val gotoIndex =
implementation.instructions.subList(0, visibilityCallIndex).indexOfLast { it.opcode == Opcode.GOTO }
//force the if
method.removeInstruction(gotoIndex)
val visibilityIntRegister = (visibilityCall as FiveRegisterInstruction).registerD
//set the visibility to GONE
method.addInstruction(visibilityCallIndex - 1, "const/16 v$visibilityIntRegister, 0x8")
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.minimizedplayback.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class MinimizedPlaybackCompatibility

View File

@@ -0,0 +1,51 @@
package app.revanced.patches.youtube.layout.minimizedplayback.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("minimized-playback-manager-fingerprint")
@MatchingMethod(
"Lyuf", "n"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MinimizedPlaybackCompatibility
@Version("0.0.1")
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
"Z",
AccessFlags.PUBLIC or AccessFlags.STATIC,
listOf("L"),
listOf(
Opcode.CONST_4,
Opcode.IF_EQZ,
Opcode.IGET,
Opcode.AND_INT_LIT16,
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET,
Opcode.CONST,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET,
Opcode.IF_NE,
Opcode.IGET_OBJECT,
Opcode.CHECK_CAST,
Opcode.GOTO,
Opcode.SGET_OBJECT,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.IF_EQZ,
Opcode.IGET_BOOLEAN,
Opcode.IF_EQZ
)
)

View File

@@ -0,0 +1,37 @@
package app.revanced.patches.youtube.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.extensions.addInstructions
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.youtube.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
import app.revanced.patches.youtube.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
@Patch
@Name("minimized-playback")
@Description("Enable minimized and background playback.")
@MinimizedPlaybackCompatibility
@Version("0.0.1")
class MinimizedPlaybackPatch : BytecodePatch(
listOf(
MinimizedPlaybackManagerFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
// Instead of removing all instructions like Vanced,
// we return the method at the beginning instead
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstructions(
0, """
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.oldqualitylayout.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class OldQualityLayoutCompatibility

View File

@@ -0,0 +1,29 @@
package app.revanced.patches.youtube.layout.oldqualitylayout.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.oldqualitylayout.annotations.OldQualityLayoutCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("old-quality-fingerprint")
@MatchingMethod(definingClass = "Libh")
@FuzzyPatternScanMethod(2)
@OldQualityLayoutCompatibility
@Version("0.0.1")
object OldQualityFingerprint : MethodFingerprint(
"L", AccessFlags.FINAL or AccessFlags.PRIVATE, listOf("Z"), listOf(
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.IGET_OBJECT,
Opcode.GOTO,
Opcode.IGET_OBJECT,
)
)

View File

@@ -0,0 +1,50 @@
package app.revanced.patches.youtube.layout.oldqualitylayout.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.layout.oldqualitylayout.annotations.OldQualityLayoutCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("old-quality-parent-method-fingerprint")
@MatchingMethod(
"Libh", "<init>"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@OldQualityLayoutCompatibility
@Version("0.0.1")
object OldQualityParentFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L", "L", "L", "L", "L", "L", "L"),
listOf(
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET_BOOLEAN,
Opcode.CONST_4,
Opcode.CONST_4,
Opcode.CONST_4,
)
)

View File

@@ -0,0 +1,54 @@
package app.revanced.patches.youtube.layout.oldqualitylayout.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.layout.oldqualitylayout.annotations.OldQualityLayoutCompatibility
import app.revanced.patches.youtube.layout.oldqualitylayout.fingerprints.OldQualityFingerprint
import app.revanced.patches.youtube.layout.oldqualitylayout.fingerprints.OldQualityParentFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class])
@Name("old-quality-layout")
@Description("Enable the original quality flyout menu.")
@OldQualityLayoutCompatibility
@Version("0.0.1")
class OldQualityLayoutPatch : BytecodePatch(
listOf(
OldQualityParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
OldQualityFingerprint.resolve(data, OldQualityParentFingerprint.result!!.classDef)
val result = OldQualityFingerprint.result
?: return PatchResultError("Required parent method could not be found.")
val implementation = result.mutableMethod.implementation!!
// if useOldStyleQualitySettings == true, jump over all instructions
val jmpInstruction = BuilderInstruction21t(
Opcode.IF_NEZ, 0, implementation.instructions[result.patternScanResult!!.endIndex].location.labels.first()
)
implementation.addInstruction(5, jmpInstruction)
result.mutableMethod.addInstructions(
0, """
invoke-static { }, Lapp/revanced/integrations/patches/OldStyleQualityPatch;->useOldStyleQualitySettings()Z
move-result v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.reels.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class HideReelsCompatibility

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.youtube.layout.reels.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("hide-reels-fingerprint")
@MatchingMethod(
"Ljvy", "<init>"
)
@FuzzyPatternScanMethod(3) // FIXME: Test this threshold and find the best value.
@HideReelsCompatibility
@Version("0.0.1")
object HideReelsFingerprint : MethodFingerprint(
null, AccessFlags.PROTECTED or AccessFlags.FINAL, listOf("L", "L"), null,
listOf("multiReelDismissalCallback", "reelItemRenderers", "reelDismissalInfo")
)

View File

@@ -0,0 +1,36 @@
package app.revanced.patches.youtube.layout.reels.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
import app.revanced.patches.youtube.layout.reels.fingerprints.HideReelsFingerprint
//@Patch TODO: this is currently in the general-bytecode-ads patch due to the integrations having a preference for including reels or not. Move it here.
@Name("hide-reels")
@Description("Hide reels on the page.")
@HideReelsCompatibility
@Version("0.0.1")
class HideReelsPatch : BytecodePatch(
listOf(
HideReelsFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val result = HideReelsFingerprint.result!!
// HideReel will hide the reel view before it is being used,
// so we pass the view to the HideReel method
result.mutableMethod.addInstruction(
result.patternScanResult!!.endIndex,
"invoke-static { v2 }, Lapp/revanced/integrations/patches/HideReelsPatch;->HideReel(Landroid/view/View;)V"
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.shorts.button.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class ShortsButtonCompatibility

View File

@@ -0,0 +1,45 @@
package app.revanced.patches.youtube.layout.shorts.button.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("pivotbar-buttons-tabenum-fingerprint")
@MatchingMethod(
"Lknw;", "z"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@ShortsButtonCompatibility
@Version("0.0.1")
object PivotBarButtonTabEnumFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("Z"),
listOf(
Opcode.CHECK_CAST,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IGET_OBJECT,
Opcode.CHECK_CAST,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IGET,
Opcode.INVOKE_STATIC, // SomeEnum.fromValue(tabOrdinal)
Opcode.MOVE_RESULT_OBJECT
)
)

View File

@@ -0,0 +1,49 @@
package app.revanced.patches.youtube.layout.shorts.button.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("pivotbar-buttons-view-fingerprint")
@MatchingMethod(
"Lknw;", "z"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@ShortsButtonCompatibility
@Version("0.0.1")
object PivotBarButtonsViewFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("Z"),
listOf(
Opcode.NEW_INSTANCE, // new StateListDrawable()
Opcode.INVOKE_DIRECT,
Opcode.NEW_ARRAY,
Opcode.CONST,
Opcode.CONST_16,
Opcode.APUT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.MOVE,
Opcode.MOVE_OBJECT,
Opcode.INVOKE_VIRTUAL_RANGE, // pivotBar.getView(drawable, tabName, z, i, map, akebVar, optional)
Opcode.MOVE_RESULT_OBJECT,
)
)

View File

@@ -0,0 +1,57 @@
package app.revanced.patches.youtube.layout.shorts.button.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
import app.revanced.patches.youtube.layout.shorts.button.fingerprints.PivotBarButtonTabEnumFingerprint
import app.revanced.patches.youtube.layout.shorts.button.fingerprints.PivotBarButtonsViewFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class])
@Name("hide-shorts-button")
@Description("Hide the shorts button.")
@ShortsButtonCompatibility
@Version("0.0.1")
class ShortsButtonRemoverPatch : BytecodePatch(
listOf(
PivotBarButtonTabEnumFingerprint, PivotBarButtonsViewFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val tabEnumResult = PivotBarButtonTabEnumFingerprint.result!!
val tabEnumImplementation = tabEnumResult.mutableMethod.implementation!!
val moveEnumInstruction = tabEnumImplementation.instructions[tabEnumResult.patternScanResult!!.endIndex]
val enumRegister = (moveEnumInstruction as OneRegisterInstruction).registerA
val buttonsViewResult = PivotBarButtonsViewFingerprint.result!!
val buttonsViewImplementation = buttonsViewResult.mutableMethod.implementation!!
val moveViewInstruction = buttonsViewImplementation.instructions[buttonsViewResult.patternScanResult!!.endIndex]
val viewRegister = (moveViewInstruction as OneRegisterInstruction).registerA
// Save the tab enum in XGlobals to avoid smali/register workarounds
tabEnumResult.mutableMethod.addInstruction(
tabEnumResult.patternScanResult!!.endIndex + 1,
"sput-object v$enumRegister, Lapp/revanced/integrations/patches/HideShortsButtonPatch;->lastPivotTab:Ljava/lang/Enum;"
)
// Hide the button view via proxy by passing it to the hideShortsButton method
// It only hides it if the last tab name is "TAB_SHORTS"
buttonsViewResult.mutableMethod.addInstruction(
buttonsViewResult.patternScanResult!!.endIndex + 2,
"invoke-static { v$viewRegister }, Lapp/revanced/integrations/patches/HideShortsButtonPatch;->hideShortsButton(Landroid/view/View;)V"
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.watermark.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class HideWatermarkCompatibility

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.youtube.layout.watermark.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.watermark.annotations.HideWatermarkCompatibility
import org.jf.dexlib2.AccessFlags
@Name("hide-watermark-signature")
@MatchingMethod(
"Ljvy;", "<init>"
)
@FuzzyPatternScanMethod(3)
@HideWatermarkCompatibility
@Version("0.0.1")
object HideWatermarkFingerprint : MethodFingerprint (
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L"), null ,null, null
)

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.youtube.layout.watermark.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.watermark.annotations.HideWatermarkCompatibility
import org.jf.dexlib2.AccessFlags
@Name("hide-watermark-parent-signature")
@MatchingMethod(
"Ljvy;", "<init>"
)
@FuzzyPatternScanMethod(3)
@HideWatermarkCompatibility
@Version("0.0.1")
object HideWatermarkParentFingerprint : MethodFingerprint (
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, null, null, listOf("player_overlay_in_video_programming"), null
)

View File

@@ -0,0 +1,51 @@
package app.revanced.patches.youtube.layout.watermark.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.removeInstruction
import app.revanced.patcher.extensions.removeInstructions
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.layout.watermark.annotations.HideWatermarkCompatibility
import app.revanced.patches.youtube.layout.watermark.fingerprints.HideWatermarkParentFingerprint
import app.revanced.patches.youtube.layout.watermark.fingerprints.HideWatermarkFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
@Patch
@Dependencies(dependencies = [IntegrationsPatch::class])
@Name("hide-watermark")
@Description("Hide Watermark on the page.")
@HideWatermarkCompatibility
@Version("0.0.1")
class HideWatermarkPatch : BytecodePatch(
listOf(
HideWatermarkParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
HideWatermarkFingerprint.resolve(data, HideWatermarkParentFingerprint.result!!.classDef)
val result = HideWatermarkFingerprint.result
?: return PatchResultError("Required parent method could not be found.")
val method = result.mutableMethod
val line = method.implementation!!.instructions.size - 5
method.removeInstruction(line)
method.addInstructions(
line, """
invoke-static {}, Lapp/revanced/integrations/patches/BrandingWaterMarkPatch;->isBrandingWatermarkShown()Z
move-result p2
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.misc.customplaybackspeed.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.24.34","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class CustomPlaybackSpeedCompatibility

View File

@@ -0,0 +1,33 @@
package app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("speed-array-generator-fingerprint")
@MatchingMethod(
"Lzdj;", "d"
)
@FuzzyPatternScanMethod(2)
@CustomPlaybackSpeedCompatibility
@Version("0.0.1")
object SpeedArrayGeneratorFingerprint : MethodFingerprint(
"[L",
AccessFlags.PUBLIC or AccessFlags.STATIC,
null,
listOf(
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.GOTO,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
),
listOf("0.0#")
)

View File

@@ -0,0 +1,34 @@
package app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("speed-limiter-fingerprint")
@MatchingMethod(
"Lxgy;", "y"
)
@FuzzyPatternScanMethod(2)
@CustomPlaybackSpeedCompatibility
@Version("0.0.1")
object SpeedLimiterFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("F"),
listOf(
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.CONST_HIGH16,
Opcode.GOTO,
Opcode.CONST_HIGH16,
Opcode.CONST_HIGH16,
Opcode.INVOKE_STATIC,
),
)

View File

@@ -0,0 +1,110 @@
package app.revanced.patches.youtube.misc.customplaybackspeed.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.SpeedArrayGeneratorFingerprint
import app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints.SpeedLimiterFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.FieldReference
import org.jf.dexlib2.iface.reference.MethodReference
@Patch
@Name("custom-playback-speed")
@Description("Allows to change the default playback speed options.")
@Dependencies(dependencies = [IntegrationsPatch::class])
@CustomPlaybackSpeedCompatibility
@Version("0.0.1")
class CustomPlaybackSpeedPatch : BytecodePatch(
listOf(
SpeedArrayGeneratorFingerprint, SpeedLimiterFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
val arrayGenMethod = SpeedArrayGeneratorFingerprint.result?.mutableMethod!!
val arrayGenMethodImpl = arrayGenMethod.implementation!!
val sizeCallIndex = arrayGenMethodImpl.instructions
.indexOfFirst { ((it as? ReferenceInstruction)?.reference as? MethodReference)?.name == "size" }
if (sizeCallIndex == -1) return PatchResultError("Couldn't find call to size()")
val sizeCallResultRegister =
(arrayGenMethodImpl.instructions.elementAt(sizeCallIndex + 1) as OneRegisterInstruction).registerA
arrayGenMethod.replaceInstruction(
sizeCallIndex + 1,
"const/4 v$sizeCallResultRegister, 0x0"
)
val (arrayLengthConstIndex, arrayLengthConst) = arrayGenMethodImpl.instructions.withIndex()
.first { (it.value as? NarrowLiteralInstruction)?.narrowLiteral == 7 }
val arrayLengthConstDestination = (arrayLengthConst as OneRegisterInstruction).registerA
val videoSpeedsArrayType = "Lapp/revanced/integrations/videoplayer/videosettings/VideoSpeed;->videoSpeeds:[F"
arrayGenMethod.addInstructions(
arrayLengthConstIndex + 1,
"""
sget-object v$arrayLengthConstDestination, $videoSpeedsArrayType
array-length v$arrayLengthConstDestination, v$arrayLengthConstDestination
"""
)
val (originalArrayFetchIndex, originalArrayFetch) = arrayGenMethodImpl.instructions.withIndex()
.first {
val reference = ((it.value as? ReferenceInstruction)?.reference as? FieldReference)
reference?.definingClass?.contains("PlayerConfigModel") ?: false &&
reference?.type == "[F"
}
val originalArrayFetchDestination = (originalArrayFetch as OneRegisterInstruction).registerA
arrayGenMethod.replaceInstruction(
originalArrayFetchIndex,
"sget-object v$originalArrayFetchDestination, $videoSpeedsArrayType"
)
val limiterMethod = SpeedLimiterFingerprint.result?.mutableMethod!!;
val limiterMethodImpl = limiterMethod.implementation!!
val speedLimitMin = 0.25f
val speedLimitMax = 100f
val (limiterMinConstIndex, limiterMinConst) = limiterMethodImpl.instructions.withIndex()
.first { (it.value as? NarrowLiteralInstruction)?.narrowLiteral == 0.25f.toRawBits() }
val (limiterMaxConstIndex, limiterMaxConst) = limiterMethodImpl.instructions.withIndex()
.first { (it.value as? NarrowLiteralInstruction)?.narrowLiteral == 2.0f.toRawBits() }
val limiterMinConstDestination = (limiterMinConst as OneRegisterInstruction).registerA
val limiterMaxConstDestination = (limiterMaxConst as OneRegisterInstruction).registerA
fun hexFloat(float: Float): String = "0x%08x".format(float.toRawBits())
limiterMethod.replaceInstruction(
limiterMinConstIndex,
"const/high16 v$limiterMinConstDestination, ${hexFloat(speedLimitMin)}"
)
limiterMethod.replaceInstruction(
limiterMaxConstIndex,
"const/high16 v$limiterMaxConstDestination, ${hexFloat(speedLimitMax)}"
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.misc.integrations.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.03.38", "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")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class IntegrationsCompatibility

View File

@@ -0,0 +1,18 @@
package app.revanced.patches.youtube.misc.integrations.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility
@Name("init-fingerprint")
@MatchingMethod(
"Lacuu", "onCreate"
)
@IntegrationsCompatibility
@Version("0.0.1")
object InitFingerprint : MethodFingerprint(
null, null, null, null,
listOf("Application creation")
)

View File

@@ -0,0 +1,68 @@
package app.revanced.patches.youtube.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.extensions.addInstructions
import app.revanced.patcher.extensions.or
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.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
import app.revanced.patcher.util.smali.toInstructions
import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility
import app.revanced.patches.youtube.misc.integrations.fingerprints.InitFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.immutable.ImmutableMethod
import org.jf.dexlib2.immutable.ImmutableMethodImplementation
@Name("integrations")
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
@IntegrationsCompatibility
@Version("0.0.1")
class IntegrationsPatch : BytecodePatch(
listOf(
InitFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
if (data.findClass("Lapp/revanced/integrations/utils/ReVancedUtils") == null)
return PatchResultError("Integrations have not been merged yet. This patch can not succeed without the integrations.")
val result = InitFingerprint.result!!
val method = result.mutableMethod
val implementation = method.implementation!!
val count = implementation.registerCount - 1
method.addInstructions(
0, """
invoke-static {v$count}, Lapp/revanced/integrations/sponsorblock/StringRef;->setContext(Landroid/content/Context;)V
sput-object v$count, Lapp/revanced/integrations/utils/ReVancedUtils;->context:Landroid/content/Context;
"""
)
val classDef = result.mutableClass
classDef.methods.add(
ImmutableMethod(
classDef.type,
"getAppContext",
null,
"Landroid/content/Context;",
AccessFlags.PUBLIC or AccessFlags.STATIC,
null,
null,
ImmutableMethodImplementation(
1, """
invoke-static { }, Lapp/revanced/integrations/utils/ReVancedUtils;->getAppContext()Landroid/content/Context;
move-result-object v0
return-object v0
""".toInstructions(), null, null
)
).toMutable()
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.misc.manifest.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class FixLocaleConfigErrorCompatibility

View File

@@ -0,0 +1,37 @@
package app.revanced.patches.youtube.misc.manifest.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.misc.manifest.annotations.FixLocaleConfigErrorCompatibility
import org.w3c.dom.Element
@Name("locale-config-fix")
@Description("Fix an error when building the resources by patching the manifest file.")
@FixLocaleConfigErrorCompatibility
@Version("0.0.1")
class FixLocaleConfigErrorPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
// create an xml editor instance
data.xmlEditor["AndroidManifest.xml"].use {
// edit the application nodes attribute...
val applicationNode = it
.file
.getElementsByTagName("application")
.item(0) as Element
// by replacing the attributes name
val attribute = "android:localeConfig"
applicationNode.setAttribute("localeConfig", applicationNode.getAttribute(attribute))
applicationNode.removeAttribute("android:localeConfig")
}
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,40 @@
package app.revanced.patches.youtube.misc.mapping.patch
import app.revanced.extensions.doRecursively
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.impl.ResourcePatch
import org.w3c.dom.Element
@Name("resource-id-mapping-provider-resource-patch-dependency")
@Description("This patch acts as a provider/ dependency for resource mappings.")
@Version("0.0.1")
class ResourceIdMappingProviderResourcePatch : ResourcePatch() {
companion object {
internal lateinit var resourceMappings: List<ResourceElement>
private set
}
override fun execute(data: ResourceData): PatchResult {
data.xmlEditor["res/values/public.xml"].use { editor ->
resourceMappings = buildList {
editor.file.documentElement.doRecursively { node ->
if (node !is Element) return@doRecursively
val nameAttribute = node.getAttribute("name")
val typeAttribute = node.getAttribute("type")
if (node.nodeName != "public" || nameAttribute.startsWith("APKTOOL")) return@doRecursively
val id = node.getAttribute("id").substring(2).toLong(16)
add(ResourceElement(typeAttribute, nameAttribute, id))
}
}
}
return PatchResultSuccess()
}
}
data class ResourceElement(val type: String, val name: String, val id: Long)

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.misc.microg.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
)]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class MicroGPatchCompatibility

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,239 @@
package app.revanced.patches.youtube.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("google-play-utility-fingerprint")
@MatchingMethod(
"Llss;", "b"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MicroGPatchCompatibility
@Version("0.0.1")
object GooglePlayUtilityFingerprint : MethodFingerprint(
"I", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L"), listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.GOTO,
Opcode.CONST_STRING,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.CONST_4,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.GOTO,
Opcode.SGET_OBJECT,
Opcode.MONITOR_ENTER,
Opcode.SGET_BOOLEAN,
Opcode.IF_EQZ,
Opcode.MONITOR_EXIT,
Opcode.GOTO,
Opcode.SPUT_BOOLEAN,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.MONITOR_EXIT,
Opcode.GOTO,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.SPUT,
Opcode.GOTO,
Opcode.MOVE_EXCEPTION,
Opcode.CONST_STRING,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MONITOR_EXIT,
Opcode.SGET,
Opcode.IF_EQZ,
Opcode.CONST,
Opcode.IF_NE,
Opcode.GOTO,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.THROW,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.THROW,
Opcode.MOVE_EXCEPTION,
Opcode.MONITOR_EXIT,
Opcode.THROW,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,
Opcode.CONST_4,
Opcode.IF_NEZ,
Opcode.SGET_OBJECT,
Opcode.IF_NEZ,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.SPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.CONST_4,
Opcode.GOTO,
Opcode.CONST_4,
Opcode.INVOKE_STATIC,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_16,
Opcode.IF_EQZ,
Opcode.CONST_STRING,
Opcode.CONST_16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.GOTO,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.CONST_16,
Opcode.GOTO_16,
Opcode.CONST_4,
Opcode.CONST_STRING,
Opcode.CONST_16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.GOTO,
Opcode.IF_EQZ,
Opcode.INVOKE_STATIC,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.GOTO,
Opcode.IF_EQZ,
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,
Opcode.AGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.AGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.GOTO,
Opcode.IGET,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT,
Opcode.IF_GE,
Opcode.IGET,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.INVOKE_VIRTUAL,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.INVOKE_VIRTUAL,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.INVOKE_VIRTUAL,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.CONST_4,
Opcode.GOTO,
Opcode.IGET_OBJECT,
Opcode.IF_NEZ,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.GOTO,
Opcode.MOVE_EXCEPTION,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.GOTO,
Opcode.IGET_BOOLEAN,
Opcode.IF_NEZ,
Opcode.CONST_4,
Opcode.GOTO,
Opcode.RETURN,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.RETURN
), listOf("This should never happen.", "MetadataValueReader", "com.google.android.gms")
)

View File

@@ -0,0 +1,82 @@
package app.revanced.patches.youtube.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("google-play-sig-check-fingerprint")
@MatchingMethod(
"Ldwn;", "d"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@MicroGPatchCompatibility
@Version("0.0.1")
object IntegrityCheckFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L"), listOf(
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_STRING,
Opcode.CONST_STRING,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.CONST_4,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IF_EQ,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET,
Opcode.IGET_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_WIDE,
Opcode.CONST_WIDE,
Opcode.CONST_STRING,
Opcode.CONST_4,
Opcode.CONST_STRING,
Opcode.CONST_4,
Opcode.CMP_LONG,
Opcode.IF_GEZ,
Opcode.CONST_16,
Opcode.GOTO_16,
Opcode.CONST_STRING,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.GOTO,
Opcode.MOVE_EXCEPTION,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.CONST_4,
Opcode.IGET_OBJECT,
Opcode.IF_EQZ,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.CONST,
Opcode.IF_NE,
Opcode.CONST_16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IF_NEZ,
Opcode.CONST_STRING,
Opcode.GOTO,
Opcode.NEW_ARRAY
), listOf("This should never happen.", "GooglePlayServicesUtil", "Google Play Store signature invalid.")
)

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