Compare commits

...

25 Commits

Author SHA1 Message Date
semantic-release-bot
018bf78e85 chore(release): 2.174.0-dev.27 [skip ci]
# [2.174.0-dev.27](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.26...v2.174.0-dev.27) (2023-05-14)

### Bug Fixes

* **youtube/video-speed:** add compatibility annotation ([#2156](https://github.com/revanced/revanced-patches/issues/2156)) ([1a72c9b](1a72c9b6b0))
2023-05-14 23:09:19 +00:00
LisoUseInAIKyrios
1a72c9b6b0 fix(youtube/video-speed): add compatibility annotation (#2156) 2023-05-15 03:07:36 +04:00
semantic-release-bot
d72c68e3a0 chore(release): 2.174.0-dev.26 [skip ci]
# [2.174.0-dev.26](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.25...v2.174.0-dev.26) (2023-05-14)

### Bug Fixes

* **youtube/return-youtube-dislikes:** fix temporarily frozen video after opening a shorts ([#2126](https://github.com/revanced/revanced-patches/issues/2126)) ([074279a](074279ad3d))
2023-05-14 07:30:53 +00:00
LisoUseInAIKyrios
074279ad3d fix(youtube/return-youtube-dislikes): fix temporarily frozen video after opening a shorts (#2126)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-14 11:29:07 +04:00
semantic-release-bot
1b8a1ef5b1 chore(release): 2.174.0-dev.25 [skip ci]
# [2.174.0-dev.25](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.24...v2.174.0-dev.25) (2023-05-14)
2023-05-14 00:05:28 +00:00
oSumAtrIX
3c324bfe3d build(revanced-patcher): bump version 2023-05-14 02:02:43 +02:00
badawoll
386d687ca1 refactor: migrate to changes from ReVanced Patcher 2023-05-14 02:02:43 +02:00
semantic-release-bot
8399eaa288 chore(release): 2.174.0-dev.24 [skip ci]
# [2.174.0-dev.24](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.23...v2.174.0-dev.24) (2023-05-13)

### Features

* **twitch/auto-claim-channel-points:** use correct casing for "Channel Points" ([#2138](https://github.com/revanced/revanced-patches/issues/2138)) ([6346054](63460542d0))
2023-05-13 13:36:29 +00:00
redphx
63460542d0 feat(twitch/auto-claim-channel-points): use correct casing for "Channel Points" (#2138) 2023-05-13 15:34:00 +02:00
semantic-release-bot
ba52570ad6 chore(release): 2.174.0-dev.23 [skip ci]
# [2.174.0-dev.23](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.22...v2.174.0-dev.23) (2023-05-13)

### Bug Fixes

* **youtube/custom-video-speed:** add missing class for `video-speeds` patch ([#2137](https://github.com/revanced/revanced-patches/issues/2137)) ([bb30371](bb303713bd))
2023-05-13 12:37:19 +00:00
johnconner122
bb303713bd fix(youtube/custom-video-speed): add missing class for video-speeds patch (#2137)
This has been caused by a recent merge conflict resolution.

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-13 14:35:21 +02:00
semantic-release-bot
1541e73e92 chore(release): 2.174.0-dev.22 [skip ci]
# [2.174.0-dev.22](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.21...v2.174.0-dev.22) (2023-05-12)

### Features

* **youtube:** move video settings to `Video` settings category ([#2010](https://github.com/revanced/revanced-patches/issues/2010)) ([1d707b0](1d707b07b4))
2023-05-12 23:34:57 +00:00
johnconner122
1d707b07b4 feat(youtube): move video settings to Video settings category (#2010)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-13 01:32:41 +02:00
semantic-release-bot
79e36e2b74 chore(release): 2.174.0-dev.21 [skip ci]
# [2.174.0-dev.21](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.20...v2.174.0-dev.21) (2023-05-12)

### Features

* **twitch:** add `auto-claim-channel-points` patch ([#2131](https://github.com/revanced/revanced-patches/issues/2131)) ([46552a5](46552a5ab8))
2023-05-12 23:22:07 +00:00
redphx
46552a5ab8 feat(twitch): add auto-claim-channel-points patch (#2131)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-13 01:19:33 +02:00
semantic-release-bot
529e90d232 chore(release): 2.174.0-dev.20 [skip ci]
# [2.174.0-dev.20](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.19...v2.174.0-dev.20) (2023-05-12)

### Features

* **youtube:** add `hide-filter-bar` patch ([c72fd1e](c72fd1e2fc))
2023-05-12 23:06:33 +00:00
oSumAtrIX
c72fd1e2fc feat(youtube): add hide-filter-bar patch 2023-05-13 01:03:48 +02:00
semantic-release-bot
48965ace7e chore(release): 2.174.0-dev.19 [skip ci]
# [2.174.0-dev.19](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.18...v2.174.0-dev.19) (2023-05-11)

### Features

* **youtube/video-speed:** change custom video speeds inside app settings ([#2114](https://github.com/revanced/revanced-patches/issues/2114)) ([08f1702](08f1702b18))
2023-05-11 06:27:32 +00:00
LisoUseInAIKyrios
08f1702b18 feat(youtube/video-speed): change custom video speeds inside app settings (#2114) 2023-05-11 10:25:21 +04:00
semantic-release-bot
45784eceee chore(release): 2.174.0-dev.18 [skip ci]
# [2.174.0-dev.18](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.17...v2.174.0-dev.18) (2023-05-11)

### Bug Fixes

* **youtube/theme:** apply custom seekbar color to video thumbnails ([#2085](https://github.com/revanced/revanced-patches/issues/2085)) ([f891aa9](f891aa937c))
2023-05-11 06:24:29 +00:00
LisoUseInAIKyrios
f891aa937c fix(youtube/theme): apply custom seekbar color to video thumbnails (#2085) 2023-05-11 10:22:37 +04:00
LisoUseInAIKyrios
aa493c4f67 chore: fix merge 2023-05-09 21:08:12 +04:00
semantic-release-bot
a83e0dc257 chore(release): 2.174.0-dev.17 [skip ci]
# [2.174.0-dev.17](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.16...v2.174.0-dev.17) (2023-05-09)

### Bug Fixes

* **youtube/remember-video-quality:** fix default video quality/speed being applied when resuming app. ([#2112](https://github.com/revanced/revanced-patches/issues/2112)) ([5ea4d3c](5ea4d3c2a6))
2023-05-09 15:53:20 +00:00
LisoUseInAIKyrios
5ea4d3c2a6 fix(youtube/remember-video-quality): fix default video quality/speed being applied when resuming app. (#2112) 2023-05-09 19:51:13 +04:00
oSumAtrIX
f4ae7fd9d7 build: use Java SDK 17 for building 2023-05-09 07:13:14 +02:00
171 changed files with 1115 additions and 673 deletions

View File

@@ -26,7 +26,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Setup Node.js

View File

@@ -1,3 +1,75 @@
# [2.174.0-dev.27](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.26...v2.174.0-dev.27) (2023-05-14)
### Bug Fixes
* **youtube/video-speed:** add compatibility annotation ([#2156](https://github.com/revanced/revanced-patches/issues/2156)) ([ffa2e5d](https://github.com/revanced/revanced-patches/commit/ffa2e5d7eb0b90bb5c7a6854bab4caf9f810d917))
# [2.174.0-dev.26](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.25...v2.174.0-dev.26) (2023-05-14)
### Bug Fixes
* **youtube/return-youtube-dislikes:** fix temporarily frozen video after opening a shorts ([#2126](https://github.com/revanced/revanced-patches/issues/2126)) ([e0877e3](https://github.com/revanced/revanced-patches/commit/e0877e33814ba396e64e18a577064aa5be952413))
# [2.174.0-dev.25](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.24...v2.174.0-dev.25) (2023-05-14)
# [2.174.0-dev.24](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.23...v2.174.0-dev.24) (2023-05-13)
### Features
* **twitch/auto-claim-channel-points:** use correct casing for "Channel Points" ([#2138](https://github.com/revanced/revanced-patches/issues/2138)) ([76a3bf2](https://github.com/revanced/revanced-patches/commit/76a3bf23b5e5591ae635e612af07cbbd78d49f53))
# [2.174.0-dev.23](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.22...v2.174.0-dev.23) (2023-05-13)
### Bug Fixes
* **youtube/custom-video-speed:** add missing class for `video-speeds` patch ([#2137](https://github.com/revanced/revanced-patches/issues/2137)) ([758ef42](https://github.com/revanced/revanced-patches/commit/758ef42f9cd36d665b1737b67bcdde22d3e3eb98))
# [2.174.0-dev.22](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.21...v2.174.0-dev.22) (2023-05-12)
### Features
* **youtube:** move video settings to `Video` settings category ([#2010](https://github.com/revanced/revanced-patches/issues/2010)) ([f4b9180](https://github.com/revanced/revanced-patches/commit/f4b918075a70d1a4ed9ac7e9c1f0e0acd1c77404))
# [2.174.0-dev.21](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.20...v2.174.0-dev.21) (2023-05-12)
### Features
* **twitch:** add `auto-claim-channel-points` patch ([#2131](https://github.com/revanced/revanced-patches/issues/2131)) ([80fb670](https://github.com/revanced/revanced-patches/commit/80fb6701b52a8c6c6bada5546dffe3438f0e4879))
# [2.174.0-dev.20](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.19...v2.174.0-dev.20) (2023-05-12)
### Features
* **youtube:** add `hide-filter-bar` patch ([6cc5f61](https://github.com/revanced/revanced-patches/commit/6cc5f61e0712fe25cd45b137773decaf4b9bb582))
# [2.174.0-dev.19](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.18...v2.174.0-dev.19) (2023-05-11)
### Features
* **youtube/video-speed:** change custom video speeds inside app settings ([#2114](https://github.com/revanced/revanced-patches/issues/2114)) ([d97815a](https://github.com/revanced/revanced-patches/commit/d97815af18e645fd0fa087db0174bcc2a771ec72))
# [2.174.0-dev.18](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.17...v2.174.0-dev.18) (2023-05-11)
### Bug Fixes
* **youtube/theme:** apply custom seekbar color to video thumbnails ([#2085](https://github.com/revanced/revanced-patches/issues/2085)) ([d497027](https://github.com/revanced/revanced-patches/commit/d4970273ad10f62cd9455ef9b847c686147f7dca))
# [2.174.0-dev.17](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.16...v2.174.0-dev.17) (2023-05-09)
### Bug Fixes
* **youtube/remember-video-quality:** fix default video quality/speed being applied when resuming app. ([#2112](https://github.com/revanced/revanced-patches/issues/2112)) ([f68a41c](https://github.com/revanced/revanced-patches/commit/f68a41ce9f9a78818d3f28b069e70b8c66125f53))
# [2.174.0-dev.16](https://github.com/revanced/revanced-patches/compare/v2.174.0-dev.15...v2.174.0-dev.16) (2023-05-08)

View File

@@ -15,7 +15,6 @@ The official ReVanced Patches.
| `copy-video-url` | Adds buttons in player to copy video links. | 18.16.37 |
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.16.37 |
| `custom-video-speed` | Adds more video speed options. | 18.16.37 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.16.37 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.16.37 |
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.16.37 |
@@ -34,6 +33,7 @@ The official ReVanced Patches.
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.16.37 |
| `hide-email-address` | Hides the email address in the account switcher. | 18.16.37 |
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.16.37 |
| `hide-filter-bar` | Hides the filter bar in video feeds. | 18.16.37 |
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.16.37 |
| `hide-get-premium` | Hides advertisement for YouTube Premium under the video player. | 18.16.37 |
| `hide-info-cards` | Hides info cards in videos. | 18.16.37 |
@@ -49,7 +49,6 @@ The official ReVanced Patches.
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.16.37 |
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.16.37 |
| `premium-heading` | Shows premium branding on the home screen. | all |
| `remember-playback-speed` | Adds the ability to remember the playback speed you chose in the video playback speed flyout. | 18.16.37 |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.16.37 |
| `remove-player-button-background` | Removes the background from the video player buttons. | 18.16.37 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.16.37 |
@@ -58,9 +57,9 @@ The official ReVanced Patches.
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.16.37 |
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.16.37 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.16.37 |
| `theme` | Applies a custom theme. | all |
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.16.37 |
| `video-ads` | Removes ads in the video player. | 18.16.37 |
| `video-speed` | Adds custom video speeds and ability to remember the playback speed you chose in the video playback speed flyout. | 18.16.37 |
| `wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.16.37 |
</details>
@@ -119,6 +118,7 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `auto-claim-channel-points` | Automatically claim Channel Points. | all |
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 14.6.1 |
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
| `block-video-ads` | Blocks video ads in streams and VODs. | 14.6.1 |
@@ -313,30 +313,6 @@ The official ReVanced Patches.
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
</details>
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
</details>
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | 4.6377 |
</details>
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
<details>
@@ -345,6 +321,14 @@ The official ReVanced Patches.
| `unlock-pro` | Unlocks pro features. | all |
</details>
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
<details>
@@ -353,7 +337,7 @@ The official ReVanced Patches.
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -361,6 +345,22 @@ The official ReVanced Patches.
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | 4.6377 |
</details>
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
</details>
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
<details>

View File

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

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.174.0-dev.16
version = 2.174.0-dev.27

File diff suppressed because one or more lines are too long

View File

@@ -11,5 +11,8 @@ object ProUnlockFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT,
Opcode.IF_EQZ
),
customFingerprint = { it.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;" && it.name == "lambda\$existPurchase\$0" }
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;"
&& methodDef.name == "lambda\$existPurchase\$0"
}
)

View File

@@ -3,5 +3,7 @@ package app.revanced.patches.citra.misc.premium.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PremiumUnlockFingerprint : MethodFingerprint(
customFingerprint = { it.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && it.name == "isPremiumActive" }
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && methodDef.name == "isPremiumActive"
}
)

View File

@@ -7,7 +7,7 @@ object BootStateFingerprint : MethodFingerprint(
"Z",
access = AccessFlags.PUBLIC.value,
strings = listOf("Boot state of device: %s"),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/AttestationHelper;")
}
)

View File

@@ -7,7 +7,7 @@ object BootloaderDetectionFingerprint : MethodFingerprint(
"Z",
access = AccessFlags.PUBLIC.value,
strings = listOf("Creation of attestation key succeeded", "Creation of attestation key failed"),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/AttestationHelper;")
}
)

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object RootDetectionFingerprint : MethodFingerprint(
"L",
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lat/gv/bmf/bmf2go/tools/utils/z;"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PrimaryAdsFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
}
)

View File

@@ -4,5 +4,5 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CheckProFingerprint : MethodFingerprint(
"Z",
customFingerprint = { it.definingClass.endsWith("IPSPurchaseRepository;")}
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
)

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
object RootDetectionFingerprint : MethodFingerprint(
"V",
access = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
}
)

View File

@@ -7,7 +7,7 @@ object SpoofSignatureFingerprint : MethodFingerprint(
"L",
parameters = listOf("L"),
access = AccessFlags.PRIVATE.value,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey"
}
)

View File

@@ -4,6 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.Method
abstract class MediaAdFingerprint(
@@ -11,7 +12,7 @@ abstract class MediaAdFingerprint(
access: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters: Iterable<String>? = listOf(),
opcodes: Iterable<Opcode>?,
customFingerprint: ((methodDef: Method) -> Boolean)? = null
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null
) : MethodFingerprint(
returnType,
access,

View File

@@ -14,7 +14,7 @@ object PaidPartnershipAdFingerprint : MediaAdFingerprint(
Opcode.IPUT_BOOLEAN,
Opcode.IPUT_BOOLEAN
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("ClipsEditMetadataController;")
}
) {

View File

@@ -11,8 +11,8 @@ object LoadInboxAdsFingerprint : MethodFingerprint(
"inbox_ads_fetch_start"
),
access = AccessFlags.PUBLIC or AccessFlags.STATIC,
customFingerprint = {
it.definingClass == "Lcom/facebook/messaging/business/inboxads/plugins/inboxads/itemsupplier/InboxAdsItemSupplierImplementation;"
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lcom/facebook/messaging/business/inboxads/plugins/inboxads/itemsupplier/InboxAdsItemSupplierImplementation;"
}
)

View File

@@ -13,7 +13,7 @@ object UnlockProFingerprint : MethodFingerprint(
Opcode.IGET_BOOLEAN,
Opcode.RETURN
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("MainActivity;")
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.nyx.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CheckProFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
}
)

View File

@@ -8,10 +8,10 @@ import org.jf.dexlib2.Opcode
object CheckSignatureFingerprint : MethodFingerprint(
returnType = "V",
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = {
(it.definingClass == "Lcom/microblink/photomath/main/activity/LauncherActivity;" ||
it.definingClass == "Lcom/microblink/photomath/PhotoMath;") &&
it.name == "onCreate"
customFingerprint = { methodDef, _ ->
(methodDef.definingClass == "Lcom/microblink/photomath/main/activity/LauncherActivity;" ||
methodDef.definingClass == "Lcom/microblink/photomath/PhotoMath;") &&
methodDef.name == "onCreate"
},
strings = listOf(
"currentSignature"

View File

@@ -11,6 +11,6 @@ object IsPlusUnlockedFingerprint : MethodFingerprint(
"genius"
),
customFingerprint = {
methodDef -> methodDef.definingClass.endsWith("/User;")
methodDef, _ -> methodDef.definingClass.endsWith("/User;")
}
)

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PremiumIconFingerprint : MethodFingerprint(
"Z",
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
}
)

View File

@@ -4,5 +4,5 @@ package app.revanced.patches.shared.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SeekbarOnDrawFingerprint : MethodFingerprint(
customFingerprint = { it.name == "onDraw" }
customFingerprint = { methodDef, _ -> methodDef.name == "onDraw" }
)

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.shared.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object WatchWhileActivityFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
}
)

View File

@@ -10,6 +10,7 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.Method
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
@@ -30,7 +31,7 @@ abstract class AbstractIntegrationsPatch(
parameters: Iterable<String>? = null,
opcodes: Iterable<Opcode?>? = null,
strings: Iterable<String>? = null,
customFingerprint: ((methodDef: Method) -> Boolean)? = null,
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null,
private val contextRegisterResolver: (Method) -> Int = object : RegisterResolver {}
) : MethodFingerprint(
returnType,

View File

@@ -13,5 +13,5 @@ object CanScrollVerticallyFingerprint : MethodFingerprint(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
),
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
)

View File

@@ -1,6 +1,8 @@
package app.revanced.patches.shared.settings.preference.impl
enum class InputType(val type: String) {
STRING("text"),
STRING("text"), // TODO: rename to "TEXT"
TEXT_CAP_CHARACTERS("textCapCharacters"),
TEXT_MULTI_LINE("textMultiLine"),
NUMBER("number"),
}

View File

@@ -18,7 +18,7 @@ object DisableCaptureRestrictionAudioDriverFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.RETURN_OBJECT
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
// Check for method call to AudioAttributes$Builder.setAllowedCapturePolicy Android API
methodDef.implementation?.instructions?.any {
((it as? ReferenceInstruction)?.reference as? MethodReference)?.name == "setAllowedCapturePolicy"

View File

@@ -17,7 +17,7 @@ object PiracyDetectionFingerprint : MethodFingerprint(
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL
),
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.implementation?.instructions?.any {
if (it.opcode != Opcode.NEW_INSTANCE) return@any false

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.ticktick.misc.themeunlock.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CheckLockedThemesFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("Theme;") && methodDef.name == "isLockedTheme"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.ticktick.misc.themeunlock.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SetThemeFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("ThemePreviewActivity;") && methodDef.name == "lambda\$updateUserBtn\$1"
}
)

View File

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

View File

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

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
object FeedApiServiceLIZFingerprint : MethodFingerprint(
access = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.SYNTHETIC,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/FeedApiService;") && methodDef.name == "LIZ"
}
)

View File

@@ -7,7 +7,7 @@ import org.jf.dexlib2.AccessFlags
object ACLCommonShareFingerprint : MethodFingerprint(
"I",
AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
methodDef.name == "getCode"
}

View File

@@ -13,7 +13,7 @@ import org.jf.dexlib2.AccessFlags
object ACLCommonShareFingerprint2 : MethodFingerprint(
"I",
AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
methodDef.name == "getShowType"
}

View File

@@ -13,7 +13,7 @@ import org.jf.dexlib2.AccessFlags
object ACLCommonShareFingerprint3 : MethodFingerprint(
"I",
AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
methodDef.name == "getTranscode"
}

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
object AwemeGetVideoControlFingerprint : MethodFingerprint(
"L",
AccessFlags.PUBLIC.value,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/Aweme;") && methodDef.name == "getVideoControl"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.integrations.fingerprints
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
object InitFingerprint : IntegrationsFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/AwemeHostApplication;") &&
methodDef.name == "onCreate"
}

View File

@@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object MandatoryLoginServiceFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
methodDef.name == "enableForcedLogin"
}

View File

@@ -9,7 +9,7 @@ import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.Dis
@DisableLoginRequirementCompatibility
@Version("0.0.1")
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
methodDef.name == "shouldShowForcedLogin"
}

View File

@@ -8,7 +8,7 @@ object GoogleAuthAvailableFingerprint : MethodFingerprint(
returnType = "Z",
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf(),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleAuth;"
}
)

View File

@@ -8,7 +8,7 @@ object GoogleOneTapAuthAvailableFingerprint : MethodFingerprint(
returnType = "Z",
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf(),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleOneTapAuth;"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object AdPersonalizationActivityOnCreateFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/AdPersonalizationActivity;") &&
methodDef.name == "onCreate"
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SettingsOnViewCreatedFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
methodDef.name == "onViewCreated"
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SettingsStatusLoadFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
methodDef.name == "load"
}

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
abstract class MethodUnlockFingerprint(private val className: String) : MethodFingerprint(
"L",
strings = listOf("binding.addButton"),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/$className;")
}
)

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.twitch.ad.audio.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object AudioAdsPresenterPlayFingerprint : MethodFingerprint(
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.definingClass.endsWith("AudioAdsPlayerPresenter;") && method.name == "playAd"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.embedded.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CreateUsherClientFingerprint : MethodFingerprint(
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.definingClass.endsWith("Ltv/twitch/android/network/OkHttpClientFactory;") && method.name == "buildOkHttpClient"
}
)

View File

@@ -8,7 +8,7 @@ object CheckAdEligibilityLambdaFingerprint : MethodFingerprint(
"L",
AccessFlags.PRIVATE or AccessFlags.FINAL or AccessFlags.STATIC,
listOf("L", "L", "L"),
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.definingClass.endsWith("AdEligibilityFetcher;") &&
method.name.contains("shouldRequestAd")
}

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.twitch.ad.video.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object ContentConfigShowAdsFingerprint : MethodFingerprint(
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.definingClass.endsWith("ContentConfigData;") && method.name == "getShowAds"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.video.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object GetReadyToShowAdFingerprint : MethodFingerprint(
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
}
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.chat.antidelete.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object ChatUtilCreateDeletedSpanFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/ChatUtil\$Companion;") && methodDef.name == "createDeletedSpanFromChatMessageSpan"
}
)

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
object DeletedMessageClickableSpanCtorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;")
}
)

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.twitch.chat.antidelete.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SetHasModAccessFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;") && methodDef.name == "setHasModAccess"
}
)

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.twitch.chat.autoclaim.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app")])
@Target(AnnotationTarget.CLASS)
internal annotation class AutoClaimChannelPointsCompatibility

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.twitch.chat.autoclaim.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CommunityPointsButtonViewDelegateFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("CommunityPointsButtonViewDelegate;")
&& methodDef.name == "showClaimAvailable"
}
)

View File

@@ -0,0 +1,70 @@
package app.revanced.patches.twitch.chat.autoclaim.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.twitch.chat.autoclaim.annotations.AutoClaimChannelPointsCompatibility
import app.revanced.patches.twitch.chat.autoclaim.fingerprints.CommunityPointsButtonViewDelegateFingerprint
import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@Patch
@DependsOn([SettingsPatch::class])
@Name("auto-claim-channel-points")
@Description("Automatically claim Channel Points.")
@AutoClaimChannelPointsCompatibility
@Version("0.0.1")
class AutoClaimChannelPointPatch : BytecodePatch(
listOf(CommunityPointsButtonViewDelegateFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences(
SwitchPreference(
"revanced_auto_claim_channel_points",
StringResource(
"revanced_auto_claim_channel_points",
"Automatically claim Channel Points"
),
true,
StringResource(
"revanced_auto_claim_channel_points_on",
"Channel Points are claimed automatically"
),
StringResource(
"revanced_auto_claim_channel_points_off",
"Channel Points are not claimed automatically"
),
)
)
CommunityPointsButtonViewDelegateFingerprint.result?.mutableMethod?.apply {
val lastIndex = implementation!!.instructions.lastIndex
addInstructions(
lastIndex, // place in front of return-void
"""
invoke-static {}, Lapp/revanced/twitch/patches/AutoClaimChannelPointsPatch;->shouldAutoClaim()Z
move-result v0
if-eqz v0, :auto_claim
# Claim by calling the button's onClick method
iget-object v0, p0, Ltv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate;->buttonLayout:Landroid/view/ViewGroup;
invoke-virtual { v0 }, Landroid/view/View;->callOnClick()Z
""",
listOf(ExternalLabel("auto_claim", instruction(lastIndex)))
)
} ?: return CommunityPointsButtonViewDelegateFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.twitch.debug.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsDebugConfigEnabledFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
}
)

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.twitch.debug.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsOmVerificationEnabledFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
}
)

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.twitch.debug.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object ShouldShowDebugOptionsFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
}
)

View File

@@ -9,7 +9,7 @@ import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.
@IntegrationsCompatibility
@Version("0.0.1")
object InitFingerprint : IntegrationsFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/TwitchApplication;") &&
methodDef.name == "onCreate"
}

View File

@@ -8,7 +8,7 @@ object MenuGroupsOnClickFingerprint : MethodFingerprint(
"V",
AccessFlags.PRIVATE or AccessFlags.STATIC or AccessFlags.FINAL,
listOf("L", "L", "L"),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SettingsMenuViewDelegate;")
&& methodDef.name.contains("render")
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object MenuGroupsUpdatedFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SettingsMenuPresenter\$Event\$MenuGroupsUpdated;")
&& methodDef.name == "<init>"
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SettingsActivityOnCreateFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SettingsActivity;") &&
methodDef.name == "onCreate"
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SettingsMenuItemEnumFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/SettingsMenuItem;") && methodDef.name == "<clinit>"
}
)

View File

@@ -4,6 +4,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
object JsonHookPatchFingerprint : MethodFingerprint(
customFingerprint = { methodDef -> methodDef.name == "<clinit>" },
customFingerprint = { methodDef, _ -> methodDef.name == "<clinit>" },
opcodes = listOf(Opcode.IGET_OBJECT)
)

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitter.misc.hook.json.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object JsonInputStreamFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
if (methodDef.parameterTypes.size == 0) false
else methodDef.parameterTypes.first() == "Ljava/io/InputStream;"
}

View File

@@ -3,5 +3,5 @@ package app.revanced.patches.twitter.misc.hook.json.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object LoganSquareFingerprint : MethodFingerprint(
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("LoganSquare;") }
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("LoganSquare;") }
)

View File

@@ -2,7 +2,7 @@ package app.revanced.patches.warnwetter.misc.promocode.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PromoCodeUnlockFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
}
)

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CheckProFingerprint : MethodFingerprint(
"I",
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("RawUserData;") && methodDef.name == "isPro"
}
)

View File

@@ -9,7 +9,7 @@ object ReelConstructorFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.INVOKE_VIRTUAL
),
customFingerprint = { method ->
customFingerprint = { method, _ ->
method.implementation?.instructions?.any {
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral == GeneralAdsResourcePatch.reelMultipleItemShelfId
} ?: false

View File

@@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.youtube.interaction.copyvideourl.annotation.CopyVideoUrlCompatibility
import app.revanced.patches.youtube.interaction.copyvideourl.resource.patch.CopyVideoUrlResourcePatch
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch
import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch
@Patch
@Name("copy-video-url")

View File

@@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.youtube.interaction.downloads.annotation.DownloadsCompatibility
import app.revanced.patches.youtube.interaction.downloads.resource.patch.DownloadsResourcePatch
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch
import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch
@Patch
@Name("downloads")

View File

@@ -4,7 +4,7 @@ package app.revanced.patches.youtube.interaction.swipecontrols.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" && methodDef.name == "<init>"
}
)

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object LayoutConstructorFingerprint : MethodFingerprint(
strings = listOf("1.0x"),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
}
)

View File

@@ -6,7 +6,7 @@ import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
object InitializeButtonsFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any {
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral ==
ResolvePivotBarFingerprintsPatch.imageOnlyTabResourceId

View File

@@ -14,7 +14,7 @@ object AlbumCardsFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == AlbumCardsResourcePatch.albumCardId

View File

@@ -14,7 +14,7 @@ object BreakingNewsFingerprint : MethodFingerprint(
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == BreakingNewsResourcePatch.horizontalCardListId

View File

@@ -9,7 +9,7 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
object ShortsCommentsButtonFingerprint : MethodFingerprint(
"V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("Z", "Z", "L"),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any {
it.opcode.ordinal == Opcode.CONST.ordinal && (it as WideLiteralInstruction).wideLiteral == CommentsResourcePatch.shortsCommentsButtonId
} == true

View File

@@ -11,7 +11,7 @@ object CrowdfundingBoxFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == CrowdfundingBoxResourcePatch.crowdfundingBoxId

View File

@@ -13,7 +13,7 @@ object LayoutCircleFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutCircle

View File

@@ -13,7 +13,7 @@ object LayoutIconFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutIcon

View File

@@ -13,7 +13,7 @@ object LayoutVideoFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutVideo

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.youtube.layout.hide.filterbar.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37"))])
@Target(AnnotationTarget.CLASS)
internal annotation class HideFilterBar

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch.Companion.filterBarHeightId
import org.jf.dexlib2.Opcode
object FilterBarHeightFingerprint : LiteralOpcodesFingerprint(
opcodes = listOf(
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IPUT
),
filterBarHeightId
)

View File

@@ -0,0 +1,19 @@
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
abstract class LiteralOpcodesFingerprint(opcodes: List<Opcode>, literal: Long) : MethodFingerprint(
opcodes = opcodes,
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
if (instruction.opcode != Opcode.CONST) return@any false
val wideLiteral = (instruction as WideLiteralInstruction).wideLiteral
literal == wideLiteral
} ?: false
}
)

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch.Companion.relatedChipCloudMarginId
import org.jf.dexlib2.Opcode
object RelatedChipCloudFingerprint : LiteralOpcodesFingerprint(
opcodes = listOf(
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT
),
relatedChipCloudMarginId
)

View File

@@ -0,0 +1,15 @@
package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints
import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch.Companion.barContainerHeightId
import org.jf.dexlib2.Opcode
object SearchResultsChipBarFingerprint : LiteralOpcodesFingerprint(
opcodes = listOf(
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT
),
barContainerHeightId
)

View File

@@ -0,0 +1,87 @@
package app.revanced.patches.youtube.layout.hide.filterbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.youtube.layout.hide.filterbar.annotations.HideFilterBar
import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.FilterBarHeightFingerprint
import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.RelatedChipCloudFingerprint
import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.SearchResultsChipBarFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Patch
@Name("hide-filter-bar")
@Description("Hides the filter bar in video feeds.")
@DependsOn([HideFilterBarResourcePatch::class])
@HideFilterBar
@Version("0.0.1")
class HideFilterBarPatch : BytecodePatch(
listOf(
RelatedChipCloudFingerprint,
SearchResultsChipBarFingerprint,
FilterBarHeightFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
FilterBarHeightFingerprint.patch<TwoRegisterInstruction> { register ->
"""
invoke-static { v$register }, $INTEGRATIONS_CLASS_DESCRIPTOR->hideInFeed(I)I
move-result v$register
"""
}
RelatedChipCloudFingerprint.patch<OneRegisterInstruction>(1) { register ->
"invoke-static { v$register }, " +
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideInRelatedVideos(Landroid/view/View;)V"
}
SearchResultsChipBarFingerprint.patch<OneRegisterInstruction>(-1, -2) { register ->
"""
invoke-static { v$register }, $INTEGRATIONS_CLASS_DESCRIPTOR->hideInSearch(I)I
move-result v$register
"""
}
return PatchResultSuccess()
}
private companion object {
const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/HideFilterBarPatch;"
/**
* Patch a [MethodFingerprint] with a given [instructions].
*
* @param RegisterInstruction The type of instruction to get the register from.
* @param insertIndexOffset The offset to add to the end index of the [MethodFingerprint].
* @param hookRegisterOffset The offset to add to the register of the hook.
* @param instructions The instructions to add with the register as a parameter.
*/
private fun <RegisterInstruction: OneRegisterInstruction> MethodFingerprint.patch(
insertIndexOffset: Int = 0,
hookRegisterOffset: Int = 0,
instructions: (Int) -> String
) =
result?.let {
it.mutableMethod.apply {
val endIndex = it.scanResult.patternScanResult!!.endIndex
val insertIndex = endIndex + insertIndexOffset
val register = instruction<RegisterInstruction>(endIndex + hookRegisterOffset).registerA
addInstructions(insertIndex, instructions(register))
}
} ?: throw toErrorResult()
}
}

View File

@@ -0,0 +1,94 @@
package app.revanced.patches.youtube.layout.hide.filterbar.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideFilterBarResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
PreferenceScreen(
"revanced_hide_filter_bar_preference",
StringResource(
"revanced_hide_filter_bar_preference_title",
"Hide filter bar"
),
listOf(
SwitchPreference(
"revanced_hide_filter_bar_feed_in_feed",
StringResource(
"revanced_hide_filter_bar_feed_in_feed_title",
"Hide in feed"
),
false,
StringResource(
"revanced_hide_filter_bar_feed_in_feed_summary_on",
"Hidden in feed"
),
StringResource(
"revanced_hide_filter_bar_feed_in_feed_summary_off",
"Shown in feed"
)
),
SwitchPreference(
"revanced_hide_filter_bar_feed_in_search",
StringResource(
"revanced_hide_filter_bar_feed_in_search_title",
"Hide in search"
),
false,
StringResource(
"revanced_hide_filter_bar_feed_in_search_summary_on",
"Hidden in search"
),
StringResource(
"revanced_hide_filter_bar_feed_in_search_summary_off",
"Shown in search"
)
),
SwitchPreference(
"revanced_hide_filter_bar_feed_in_related_videos",
StringResource(
"revanced_hide_filter_bar_feed_in_related_videos_title",
"Hide in related videos"
),
false,
StringResource(
"revanced_hide_filter_bar_feed_in_related_videos_summary_on",
"Hidden in related videos"
),
StringResource(
"revanced_hide_filter_bar_feed_in_related_videos_summary_off",
"Shown in related videos"
)
),
),
)
)
relatedChipCloudMarginId = "related_chip_cloud_reduced_margins".layoutResourceId("layout")
filterBarHeightId = "filter_bar_height".layoutResourceId()
barContainerHeightId = "bar_container_height".layoutResourceId()
return PatchResultSuccess()
}
internal companion object {
var filterBarHeightId = -1L
var relatedChipCloudMarginId = -1L
var barContainerHeightId = -1L
private fun String.layoutResourceId(type: String = "dimen") =
ResourceMappingPatch.resourceMappings.single { it.type == type && it.name == this }.id
}
}

View File

@@ -11,7 +11,7 @@ object ShowFloatingMicrophoneButtonFingerprint : MethodFingerprint(
Opcode.IF_EQZ,
Opcode.RETURN_VOID
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any {
(it as? WideLiteralInstruction)?.wideLiteral == HideFloatingMicrophoneButtonResourcePatch.fabButtonId
} == true

View File

@@ -10,7 +10,7 @@ object GetPremiumViewFingerprint : MethodFingerprint(
Opcode.INVOKE_VIRTUAL,
Opcode.RETURN_VOID
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/red/presenter/CompactYpcOfferModuleView;"
&& methodDef.name == "onMeasure"
}

View File

@@ -11,7 +11,7 @@ object InfocardsMethodCallFingerprint : MethodFingerprint(
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
(instruction as? WideLiteralInstruction)?.wideLiteral == HideInfocardsResourcePatch.drawerResourceId
} == true

View File

@@ -17,7 +17,7 @@ object HideLoadMoreButtonFingerprint : MethodFingerprint(
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any {
if (it.opcode != Opcode.CONST) return@any false

View File

@@ -15,7 +15,7 @@ object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
Opcode.APUT_OBJECT,
Opcode.CONST,
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any { instruction ->
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEmailAddressResourcePatch.accountSwitcherAccessibilityLabelId

View File

@@ -16,7 +16,7 @@ object CreatePlayerOverviewFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST
),
customFingerprint = { methodDef ->
customFingerprint = { methodDef, _ ->
methodDef.implementation?.instructions?.any {
if (it.opcode != Opcode.CONST) return@any false

View File

@@ -16,11 +16,16 @@ import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.layout.hide.seekbar.annotations.HideSeekbarCompatibility
import app.revanced.patches.youtube.layout.seekbar.bytecode.patch.SeekbarColorBytecodePatch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@DependsOn([
IntegrationsPatch::class,
SettingsPatch::class,
SeekbarColorBytecodePatch::class // Used to hide the seekbar in the feed and watch history
])
@Name("hide-seekbar")
@Description("Hides the seekbar.")
@HideSeekbarCompatibility

View File

@@ -14,5 +14,7 @@ object FullscreenViewAdderParentFingerprint : MethodFingerprint(
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL,
),
customFingerprint = { it.definingClass.endsWith("FullscreenEngagementPanelOverlay;") }
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("FullscreenEngagementPanelOverlay;")
}
)

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