Compare commits

...

40 Commits

Author SHA1 Message Date
semantic-release-bot
ecc131fa4f chore(release): 2.52.0 [skip ci]
# [2.52.0](https://github.com/revanced/revanced-patches/compare/v2.51.3...v2.52.0) (2022-09-08)

### Features

* add deprecated & options to patches.json ([759315b](a4f1d3558e))
2022-09-08 19:43:07 +00:00
Sculas
a4f1d3558e feat: add deprecated & options to patches.json 2022-09-08 21:40:59 +02:00
Sculas
4cbd58721d build: update patcher dependency 2022-09-08 21:10:41 +02:00
semantic-release-bot
7cfe43e666 chore(release): 2.51.3 [skip ci]
## [2.51.3](https://github.com/revanced/revanced-patches/compare/v2.51.2...v2.51.3) (2022-09-08)

### Bug Fixes

* cleanup & trigger release for ThemePatch ([8d25b21](c93d7bc212)), closes [#447](https://github.com/revanced/revanced-patches/issues/447) [revanced/revanced-patcher#99](https://github.com/revanced/revanced-patcher/issues/99)
2022-09-08 16:37:40 +00:00
Sculas
c93d7bc212 fix: cleanup & trigger release for ThemePatch
Closes #447
Closes revanced/revanced-patcher#99
2022-09-08 18:35:08 +02:00
Sculas
c28fd5cf20 Merge remote-tracking branch 'origin/main' into main 2022-09-08 17:06:32 +02:00
Sculas
069f754d51 refactor: set amoled theme default for ThemePatch 2022-09-08 17:06:16 +02:00
semantic-release-bot
cba04cf5a6 chore(release): 2.51.2 [skip ci]
## [2.51.2](https://github.com/revanced/revanced-patches/compare/v2.51.1...v2.51.2) (2022-09-08)
2022-09-08 15:03:32 +00:00
Sculas
5e358c7319 refactor: update to patcher 4.2.2 2022-09-08 17:01:28 +02:00
Sculas
ce69471684 build: update patcher dependency 2022-09-08 16:59:29 +02:00
semantic-release-bot
a0981dda9d chore(release): 2.51.1 [skip ci]
## [2.51.1](https://github.com/revanced/revanced-patches/compare/v2.51.0...v2.51.1) (2022-09-08)

### Bug Fixes

* wrap theme option ([150c173](6073181ee1))
2022-09-08 11:47:28 +00:00
Sculas
6073181ee1 fix: wrap theme option 2022-09-08 13:45:28 +02:00
Sculas
522587321c build: update patcher 2022-09-08 13:45:10 +02:00
semantic-release-bot
b16748794e chore(release): 2.51.0 [skip ci]
# [2.51.0](https://github.com/revanced/revanced-patches/compare/v2.50.8...v2.51.0) (2022-09-08)

### Features

* Theme Patch ([#440](https://github.com/revanced/revanced-patches/issues/440)) ([f3b92ca](01e9a396d6))
2022-09-08 09:57:04 +00:00
Sculas
01e9a396d6 feat: Theme Patch (#440)
* feat: Theme Patch

* refactor: deprecate AmoledPatch

* Update src/main/kotlin/app/revanced/patches/youtube/layout/theme/patch/ThemePatch.kt

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

* refactor: apply requested changes

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-08 11:55:06 +02:00
semantic-release-bot
86fcd4d475 chore(release): 2.50.8 [skip ci]
## [2.50.8](https://github.com/revanced/revanced-patches/compare/v2.50.7...v2.50.8) (2022-09-08)
2022-09-08 09:34:38 +00:00
Sculas
8bbc744114 build: update patcher 2022-09-08 11:32:45 +02:00
semantic-release-bot
d7a4ad76ea chore(release): 2.50.7 [skip ci]
## [2.50.7](https://github.com/revanced/revanced-patches/compare/v2.50.6...v2.50.7) (2022-09-08)
2022-09-08 08:28:01 +00:00
E85Addict
7e6ee73908 build: bump patcher dependency version (#443) 2022-09-08 10:25:56 +02:00
semantic-release-bot
87954a1aaf chore(release): 2.50.6 [skip ci]
## [2.50.6](https://github.com/revanced/revanced-patches/compare/v2.50.5...v2.50.6) (2022-09-07)
2022-09-07 20:39:46 +00:00
Sculas
e5a2ed0f70 refactor: cleanup AmoledPatch 2022-09-07 22:37:53 +02:00
Sculas
2295aaebf4 chore: ignore kotlinc.xml 2022-09-07 22:37:38 +02:00
Sculas
a72bf150c2 build: update patcher 2022-09-07 22:34:36 +02:00
semantic-release-bot
0290cd3d36 chore(release): 2.50.5 [skip ci]
## [2.50.5](https://github.com/revanced/revanced-patches/compare/v2.50.4...v2.50.5) (2022-09-07)
2022-09-07 19:16:38 +00:00
Sculas
e8d61e0c0e refactor: adapt patcher 4.0.0 changes 2022-09-07 21:14:03 +02:00
Sculas
19769d80eb build: update patcher 2022-09-07 21:05:43 +02:00
Sculas
12c16d4644 refactor: cleanup CustomBrandingPatch 2022-09-07 21:03:03 +02:00
Sculas
75f4653c16 build: update patcher 2022-09-06 23:45:54 +02:00
semantic-release-bot
3286d26996 chore(release): 2.50.4 [skip ci]
## [2.50.4](https://github.com/revanced/revanced-patches/compare/v2.50.3...v2.50.4) (2022-09-03)

### Bug Fixes

* don't respect primary color for the download button icon ([#424](https://github.com/revanced/revanced-patches/issues/424)) ([3fa70f4](edbc36e90f))
2022-09-03 03:49:15 +00:00
Tititvoot Pangrit
edbc36e90f fix: don't respect primary color for the download button icon (#424) 2022-09-03 05:46:55 +02:00
semantic-release-bot
7ad2be7f27 chore(release): 2.50.3 [skip ci]
## [2.50.3](https://github.com/revanced/revanced-patches/compare/v2.50.2...v2.50.3) (2022-09-01)

### Bug Fixes

* partial ad blockage in `tiktok-ads` patch ([#420](https://github.com/revanced/revanced-patches/issues/420)) ([bc6d192](1702322671))
2022-09-01 17:13:54 +00:00
d4rkk3y
1702322671 fix: partial ad blockage in tiktok-ads patch (#420) 2022-09-01 19:12:16 +02:00
semantic-release-bot
9c9bfbd593 chore(release): 2.50.2 [skip ci]
## [2.50.2](https://github.com/revanced/revanced-patches/compare/v2.50.1...v2.50.2) (2022-08-31)

### Bug Fixes

* wrong dependency version ([1e63a57](3df662a39c))
2022-08-31 18:44:22 +00:00
oSumAtrIX
3df662a39c fix: wrong dependency version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-08-31 20:42:18 +02:00
oSumAtrIX
572c110a6e refactor: make use of named arguments 2022-08-31 20:38:38 +02:00
oSumAtrIX
0be9f00915 build: bump patcher dependency version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-08-31 20:36:57 +02:00
semantic-release-bot
0b6f643ff3 chore(release): 2.50.1 [skip ci]
## [2.50.1](https://github.com/revanced/revanced-patches/compare/v2.50.0...v2.50.1) (2022-08-31)

### Bug Fixes

* resolve fingerprint in `premium-icon-reddit` patch ([#413](https://github.com/revanced/revanced-patches/issues/413)) ([60ec2c6](1989d53938))
2022-08-31 16:04:43 +00:00
Technikte
1989d53938 fix: resolve fingerprint in premium-icon-reddit patch (#413) 2022-08-31 18:03:03 +02:00
semantic-release-bot
ac1acf10e6 chore(release): 2.50.0 [skip ci]
# [2.50.0](https://github.com/revanced/revanced-patches/compare/v2.49.0...v2.50.0) (2022-08-31)

### Features

* `tiktok-download` and `tiktok-seekbar` patch ([#405](https://github.com/revanced/revanced-patches/issues/405)) ([f36e000](0ad686da21))
2022-08-31 15:59:52 +00:00
d4rkk3y
0ad686da21 feat: tiktok-download and tiktok-seekbar patch (#405) 2022-08-31 17:57:51 +02:00
112 changed files with 767 additions and 481 deletions

1
.idea/.gitignore generated vendored
View File

@@ -6,3 +6,4 @@
/dataSources.local.xml /dataSources.local.xml
# Editor-based HTTP Client requests # Editor-based HTTP Client requests
/httpRequests/ /httpRequests/
/kotlinc.xml

View File

@@ -1,3 +1,76 @@
# [2.52.0](https://github.com/revanced/revanced-patches/compare/v2.51.3...v2.52.0) (2022-09-08)
### Features
* add deprecated & options to patches.json ([759315b](https://github.com/revanced/revanced-patches/commit/759315be1b23a6b3655fc87b56a8974ebac648cc))
## [2.51.3](https://github.com/revanced/revanced-patches/compare/v2.51.2...v2.51.3) (2022-09-08)
### Bug Fixes
* cleanup & trigger release for ThemePatch ([8d25b21](https://github.com/revanced/revanced-patches/commit/8d25b214e297797092432b5fe1a4ede1f42115c8)), closes [#447](https://github.com/revanced/revanced-patches/issues/447) [revanced/revanced-patcher#99](https://github.com/revanced/revanced-patcher/issues/99)
## [2.51.2](https://github.com/revanced/revanced-patches/compare/v2.51.1...v2.51.2) (2022-09-08)
## [2.51.1](https://github.com/revanced/revanced-patches/compare/v2.51.0...v2.51.1) (2022-09-08)
### Bug Fixes
* wrap theme option ([150c173](https://github.com/revanced/revanced-patches/commit/150c173adce31d9984d6feca694b472649233056))
# [2.51.0](https://github.com/revanced/revanced-patches/compare/v2.50.8...v2.51.0) (2022-09-08)
### Features
* Theme Patch ([#440](https://github.com/revanced/revanced-patches/issues/440)) ([f3b92ca](https://github.com/revanced/revanced-patches/commit/f3b92cab5a057ce605b6d9e75e3b99161bf1422c))
## [2.50.8](https://github.com/revanced/revanced-patches/compare/v2.50.7...v2.50.8) (2022-09-08)
## [2.50.7](https://github.com/revanced/revanced-patches/compare/v2.50.6...v2.50.7) (2022-09-08)
## [2.50.6](https://github.com/revanced/revanced-patches/compare/v2.50.5...v2.50.6) (2022-09-07)
## [2.50.5](https://github.com/revanced/revanced-patches/compare/v2.50.4...v2.50.5) (2022-09-07)
## [2.50.4](https://github.com/revanced/revanced-patches/compare/v2.50.3...v2.50.4) (2022-09-03)
### Bug Fixes
* don't respect primary color for the download button icon ([#424](https://github.com/revanced/revanced-patches/issues/424)) ([3fa70f4](https://github.com/revanced/revanced-patches/commit/3fa70f48a206c56f6ca8aed88baed722e76281e2))
## [2.50.3](https://github.com/revanced/revanced-patches/compare/v2.50.2...v2.50.3) (2022-09-01)
### Bug Fixes
* partial ad blockage in `tiktok-ads` patch ([#420](https://github.com/revanced/revanced-patches/issues/420)) ([bc6d192](https://github.com/revanced/revanced-patches/commit/bc6d19205940e3b4b228a9b5de627a2260abd00e))
## [2.50.2](https://github.com/revanced/revanced-patches/compare/v2.50.1...v2.50.2) (2022-08-31)
### Bug Fixes
* wrong dependency version ([1e63a57](https://github.com/revanced/revanced-patches/commit/1e63a57b86475670442e6a24a7f24c02dabee239))
## [2.50.1](https://github.com/revanced/revanced-patches/compare/v2.50.0...v2.50.1) (2022-08-31)
### Bug Fixes
* resolve fingerprint in `premium-icon-reddit` patch ([#413](https://github.com/revanced/revanced-patches/issues/413)) ([60ec2c6](https://github.com/revanced/revanced-patches/commit/60ec2c6f8a29cfc36313617a92e976f01213ce00))
# [2.50.0](https://github.com/revanced/revanced-patches/compare/v2.49.0...v2.50.0) (2022-08-31)
### Features
* `tiktok-download` and `tiktok-seekbar` patch ([#405](https://github.com/revanced/revanced-patches/issues/405)) ([f36e000](https://github.com/revanced/revanced-patches/commit/f36e0007c52f4e925a3a2370cdb51bd45ee00a1b))
# [2.49.0](https://github.com/revanced/revanced-patches/compare/v2.48.2...v2.49.0) (2022-08-31) # [2.49.0](https://github.com/revanced/revanced-patches/compare/v2.48.2...v2.49.0) (2022-08-31)

View File

@@ -12,16 +12,23 @@ This section explains the JSON format for the [patches.json](patches.json) file.
The file contains an array of objects, each object representing a patch. The object contains the following properties: The file contains an array of objects, each object representing a patch. The object contains the following properties:
| key | description | | key | description |
|-------------------------------|------------------------------------------------------------------------------------------------------------------| |-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | The name of the patch. | | `name` | The name of the patch. |
| `description` | The description of the patch. | | `description` | The description of the patch. |
| `version` | The version of the patch. | | `version` | The version of the patch. |
| `excluded` | Whether a patch is excluded by default. If `true`, the patch must never be included by default. | | `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
| `dependencies` | An array of dependencies, which are patch names. | | `deprecated` | Whether the patch is deprecated. |
| `compatiblePackages` | An array of packages compatible with this patch. | | `options` | An array of options for this patch. |
| `compatiblePackages.name` | The name of the package. | | `options.key` | The key of the option. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. | | `options.title` | The title of the option. |
| `options.description` | The description of the option. |
| `options.required` | Whether the option is required. |
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
| `dependencies` | An array of dependencies, which are patch names. |
| `compatiblePackages` | An array of packages compatible with this patch. |
| `compatiblePackages.name` | The name of the package. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
Example: Example:
@@ -32,6 +39,8 @@ Example:
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.", "description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"deprecated": false,
"options": [],
"dependencies": [ "dependencies": [
"integrations", "integrations",
"video-id-hook" "video-id-hook"
@@ -46,24 +55,67 @@ Example:
"17.27.39", "17.27.39",
"17.28.34", "17.28.34",
"17.29.34", "17.29.34",
"17.32.35" "17.32.35",
"17.33.42"
] ]
} }
] ]
}, },
{ {
"name": "client-spoof", "name": "theme",
"description": "Spoofs the YouTube or Vanced client to prevent playback issues.", "description": "Enables a custom theme.",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"dependencies": [], "deprecated": false,
"options": [
{
"key": "theme",
"title": "Theme",
"description": "Select a theme.",
"required": true,
"choices": [
"Amoled"
]
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [ "compatiblePackages": [
{ {
"name": "com.google.android.youtube", "name": "com.google.android.youtube",
"versions": [] "versions": []
}
]
},
{
"name": "custom-branding",
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
"version": "0.0.1",
"excluded": false,
"deprecated": false,
"options": [
{
"key": "appName",
"title": "Application Name",
"description": "The name of the application it will show on your home screen.",
"required": true,
"choices": null
}, },
{ {
"name": "com.vanced.android.youtube", "key": "appIconPath",
"title": "Application Icon Path",
"description": "A path to the icon of the application.",
"required": false,
"choices": null
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": [] "versions": []
} }
] ]

View File

@@ -59,6 +59,8 @@ The official Patch bundle provided by ReVanced and the community.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `tiktok-download` | Remove restrictions on downloads video. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-ads` | Removes ads from TikTok. | all | | `tiktok-ads` | Removes ads from TikTok. | all |
</details> </details>
@@ -79,6 +81,7 @@ The official Patch bundle provided by ReVanced and the community.
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all | | `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.33.42 | | `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.33.42 |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.33.42 | | `old-quality-layout` | Enables the original quality flyout menu. | 17.33.42 |
| `theme` | Enables a custom theme. | all |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.33.42 | | `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.33.42 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.33.42 | | `hide-watermark` | Hides creator's watermarks on videos. | 17.33.42 |
| `sponsorblock` | Integrate SponsorBlock. | 17.33.42 | | `sponsorblock` | Integrate SponsorBlock. | 17.33.42 |
@@ -107,16 +110,23 @@ This section explains the JSON format for the [patches.json](patches.json) file.
The file contains an array of objects, each object representing a patch. The object contains the following properties: The file contains an array of objects, each object representing a patch. The object contains the following properties:
| key | description | | key | description |
|-------------------------------|------------------------------------------------------------------------------------------------------------------| |-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | The name of the patch. | | `name` | The name of the patch. |
| `description` | The description of the patch. | | `description` | The description of the patch. |
| `version` | The version of the patch. | | `version` | The version of the patch. |
| `excluded` | Whether a patch is excluded by default. If `true`, the patch must never be included by default. | | `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
| `dependencies` | An array of dependencies, which are patch names. | | `deprecated` | Whether the patch is deprecated. |
| `compatiblePackages` | An array of packages compatible with this patch. | | `options` | An array of options for this patch. |
| `compatiblePackages.name` | The name of the package. | | `options.key` | The key of the option. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. | | `options.title` | The title of the option. |
| `options.description` | The description of the option. |
| `options.required` | Whether the option is required. |
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
| `dependencies` | An array of dependencies, which are patch names. |
| `compatiblePackages` | An array of packages compatible with this patch. |
| `compatiblePackages.name` | The name of the package. |
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
Example: Example:
@@ -127,6 +137,8 @@ Example:
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.", "description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"deprecated": false,
"options": [],
"dependencies": [ "dependencies": [
"integrations", "integrations",
"video-id-hook" "video-id-hook"
@@ -141,24 +153,67 @@ Example:
"17.27.39", "17.27.39",
"17.28.34", "17.28.34",
"17.29.34", "17.29.34",
"17.32.35" "17.32.35",
"17.33.42"
] ]
} }
] ]
}, },
{ {
"name": "client-spoof", "name": "theme",
"description": "Spoofs the YouTube or Vanced client to prevent playback issues.", "description": "Enables a custom theme.",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"dependencies": [], "deprecated": false,
"options": [
{
"key": "theme",
"title": "Theme",
"description": "Select a theme.",
"required": true,
"choices": [
"Amoled"
]
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [ "compatiblePackages": [
{ {
"name": "com.google.android.youtube", "name": "com.google.android.youtube",
"versions": [] "versions": []
}
]
},
{
"name": "custom-branding",
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
"version": "0.0.1",
"excluded": false,
"deprecated": false,
"options": [
{
"key": "appName",
"title": "Application Name",
"description": "The name of the application it will show on your home screen.",
"required": true,
"choices": null
}, },
{ {
"name": "com.vanced.android.youtube", "key": "appIconPath",
"title": "Application Icon Path",
"description": "A path to the icon of the application.",
"required": false,
"choices": null
}
],
"dependencies": [
"locale-config-fix"
],
"compatiblePackages": [
{
"name": "com.google.android.youtube",
"versions": [] "versions": []
} }
] ]

View File

@@ -20,9 +20,7 @@ repositories {
} }
dependencies { dependencies {
implementation(kotlin("stdlib")) implementation("app.revanced:revanced-patcher:4.2.3")
implementation("app.revanced:revanced-patcher:3.3.3")
implementation("app.revanced:multidexlib2:2.5.2.r2") implementation("app.revanced:multidexlib2:2.5.2.r2")
// Required for meta // Required for meta

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official kotlin.code.style = official
version = 2.49.0 version = 2.52.0

File diff suppressed because one or more lines are too long

View File

@@ -3,14 +3,17 @@ package app.revanced.meta.json
import app.revanced.meta.Bundle import app.revanced.meta.Bundle
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.dependencies import app.revanced.patcher.extensions.PatchExtensions.dependencies
import app.revanced.patcher.extensions.PatchExtensions.deprecated
import app.revanced.patcher.extensions.PatchExtensions.description import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.include import app.revanced.patcher.extensions.PatchExtensions.include
import app.revanced.patcher.extensions.PatchExtensions.options
import app.revanced.patcher.extensions.PatchExtensions.patchName import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.extensions.PatchExtensions.version import app.revanced.patcher.extensions.PatchExtensions.version
import com.google.gson.Gson import app.revanced.patcher.patch.PatchOption
import com.google.gson.GsonBuilder
import java.io.File import java.io.File
private val gson = Gson() private val gson = GsonBuilder().serializeNulls().create()
fun generateJson(bundle: Bundle) { fun generateJson(bundle: Bundle) {
val patches = bundle.map { val patches = bundle.map {
@@ -19,6 +22,20 @@ fun generateJson(bundle: Bundle) {
it.description ?: "This patch has no description.", it.description ?: "This patch has no description.",
it.version ?: "0.0.0", it.version ?: "0.0.0",
!it.include, !it.include,
it.deprecated != null,
it.options?.map { option ->
Option(
option.key,
option.title,
option.description,
option.required,
option.let { lo ->
if (lo is PatchOption.ListOption<*>) {
lo.options.toMutableList().toTypedArray()
} else null
}
)
}?.toTypedArray() ?: emptyArray(),
it.dependencies?.map { dep -> it.dependencies?.map { dep ->
dep.java.patchName dep.java.patchName
}?.toTypedArray() ?: emptyArray(), }?.toTypedArray() ?: emptyArray(),

View File

@@ -7,6 +7,8 @@ data class JsonPatch(
val description: String, val description: String,
val version: String, val version: String,
val excluded: Boolean, val excluded: Boolean,
val deprecated: Boolean,
val options: Array<Option>,
val dependencies: Array<String>, val dependencies: Array<String>,
val compatiblePackages: Array<CompatiblePackage>, val compatiblePackages: Array<CompatiblePackage>,
) )
@@ -14,4 +16,12 @@ data class JsonPatch(
data class CompatiblePackage( data class CompatiblePackage(
val name: String, val name: String,
val versions: Array<String>, val versions: Array<String>,
)
data class Option(
val key: String,
val title: String,
val description: String,
val required: Boolean,
val choices: Array<*>?,
) )

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.music.audio.codecs.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@@ -19,7 +19,7 @@ import org.jf.dexlib2.Opcode
@CodecsUnlockCompatibility @CodecsUnlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object CodecsLockFingerprint : MethodFingerprint( object CodecsLockFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, null, listOf( "L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
Opcode.INVOKE_DIRECT, Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT, Opcode.MOVE_RESULT,
@@ -35,5 +35,5 @@ object CodecsLockFingerprint : MethodFingerprint(
Opcode.INVOKE_DIRECT, Opcode.INVOKE_DIRECT,
Opcode.RETURN_OBJECT Opcode.RETURN_OBJECT
), ),
listOf("eac3_supported") strings = listOf("eac3_supported")
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-context-fetch-fingerprint") @Name("cast-context-fetch-fingerprint")
@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object CastContextFetchFingerprint : MethodFingerprint( object CastContextFetchFingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("Error fetching CastContext.")
listOf("Error fetching CastContext.")
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-module-fingerprint") @Name("cast-module-fingerprint")
@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object CastDynamiteModuleFingerprint : MethodFingerprint( object CastDynamiteModuleFingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-context-fetch-fingerprint") @Name("cast-context-fetch-fingerprint")
@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object CastDynamiteModuleV2Fingerprint : MethodFingerprint( object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("Failed to load module via V2: ")
listOf("Failed to load module via V2: ")
) )

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@@ -17,5 +17,14 @@ import org.jf.dexlib2.AccessFlags
@MusicMicroGPatchCompatibility @MusicMicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object GooglePlayUtilityFingerprint : MethodFingerprint( object GooglePlayUtilityFingerprint : MethodFingerprint(
"I", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null, listOf("This should never happen.", "MetadataValueReader", "GooglePlayServicesUtil", "com.android.vending", "android.hardware.type.embedded") "I",
AccessFlags.PUBLIC or AccessFlags.STATIC,
listOf("L", "I"),
strings = listOf(
"This should never happen.",
"MetadataValueReader",
"GooglePlayServicesUtil",
"com.android.vending",
"android.hardware.type.embedded"
)
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
@Name("google-play-prime-fingerprint") @Name("google-play-prime-fingerprint")
@@ -15,5 +15,5 @@ import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompat
@MusicMicroGPatchCompatibility @MusicMicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object PrimeFingerprint : MethodFingerprint( object PrimeFingerprint : MethodFingerprint(
null, null, null, null, listOf("com.google.android.GoogleCamera", "com.android.vending") strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
) )

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@@ -17,5 +17,8 @@ import org.jf.dexlib2.AccessFlags
@MusicMicroGPatchCompatibility @MusicMicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object ServiceCheckFingerprint : MethodFingerprint( object ServiceCheckFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null, listOf("Google Play Services not available") "V",
AccessFlags.PUBLIC or AccessFlags.STATIC,
listOf("L", "I"),
strings = listOf("Google Play Services not available")
) )

View File

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

View File

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

View File

@@ -2,8 +2,8 @@ package app.revanced.patches.reddit.layout.premiumicon.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility
@Name("premium-icon-fingerprint") @Name("premium-icon-fingerprint")
@@ -14,11 +14,7 @@ import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCom
@Version("0.0.1") @Version("0.0.1")
object PremiumIconFingerprint : MethodFingerprint( object PremiumIconFingerprint : MethodFingerprint(
"Z", "Z",
null, customFingerprint = { methodDef ->
null,
null,
null,
{ methodDef ->
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber" methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
} }
) )

View File

@@ -17,7 +17,11 @@ import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFi
@Description("Unlocking Premium Icons in reddit app.") @Description("Unlocking Premium Icons in reddit app.")
@PremiumIconCompatibility @PremiumIconCompatibility
@Version("0.0.1") @Version("0.0.1")
class PremiumIconPatch : BytecodePatch() { class PremiumIconPatch : BytecodePatch(
listOf(
PremiumIconFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult { override fun execute(data: BytecodeData): PatchResult {
val method = PremiumIconFingerprint.result!!.mutableMethod val method = PremiumIconFingerprint.result!!.mutableMethod
method.addInstructions( method.addInstructions(

View File

@@ -5,8 +5,8 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[ [
Package("com.ss.android.ugc.trill", arrayOf()), Package("com.ss.android.ugc.trill"),
Package("com.zhiliaoapp.musically", arrayOf()) Package("com.zhiliaoapp.musically")
] ]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -0,0 +1,21 @@
package app.revanced.patches.tiktok.ad.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
@Name("convert-help-v2-feeditemlist-fingerprint")
@MatchingMethod(
"Lbeancopy/ConvertHelp;",
"com${'$'}ss${'$'}ugc${'$'}aweme${'$'}proto${'$'}aweme_v2_feed_response${'$'}${'$'}com${'$'}ss${'$'}android${'$'}ugc${'$'}aweme${'$'}feed${'$'}model${'$'}FeedItemList",
)
@TiktokAdsCompatibility
@Version("0.0.1")
object ConvertHelpFeedItemListFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/ConvertHelp;") &&
methodDef.name.endsWith("${'$'}FeedItemList")
}
)

View File

@@ -14,7 +14,7 @@ import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
@TiktokAdsCompatibility @TiktokAdsCompatibility
@Version("0.0.1") @Version("0.0.1")
object FeedItemListCloneFingerprint : MethodFingerprint( object FeedItemListCloneFingerprint : MethodFingerprint(
null, null, null, null,null, { methodDef -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone" methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
} }
) )

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-code")
@MatchingMethod("ACLCommonShare", "getCode")
@DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint : MethodFingerprint(
"I",
AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
methodDef.name == "getCode"
}
)

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-show-type")
@MatchingMethod("ACLCommonShare", "getShowType")
@DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint2 : MethodFingerprint(
"I",
AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
methodDef.name == "getShowType"
}
)

View File

@@ -0,0 +1,22 @@
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
@Name("acl-common-share-get-transcode")
@MatchingMethod("ACLCommonShare", "getTranscode")
@DownloadsCompatibility
@Version("0.0.1")
object ACLCommonShareFingerprint3 : MethodFingerprint(
"I",
AccessFlags.PUBLIC or AccessFlags.FINAL,
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
methodDef.name == "getTranscode"
}
)

View File

@@ -0,0 +1,56 @@
package app.revanced.patches.tiktok.interaction.downloads.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.extensions.replaceInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.*
@Patch
@Name("tiktok-download")
@Description("Remove restrictions on downloads video.")
@DownloadsCompatibility
@Version("0.0.1")
class DownloadsPatch : BytecodePatch(
listOf(
ACLCommonShareFingerprint,
ACLCommonShareFingerprint2,
ACLCommonShareFingerprint3
)
) {
override fun execute(data: BytecodeData): PatchResult {
val method1 = ACLCommonShareFingerprint.result!!.mutableMethod
method1.replaceInstructions(
0,
"""
const/4 v0, 0x0
return v0
"""
)
val method2 = ACLCommonShareFingerprint2.result!!.mutableMethod
method2.replaceInstructions(
0,
"""
const/4 v0, 0x2
return v0
"""
)
//Download videos without watermark.
val method3 = ACLCommonShareFingerprint3.result!!.mutableMethod
method3.replaceInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

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

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.interaction.seekbar.annotations.SeekbarCompatibility
import org.jf.dexlib2.AccessFlags
@Name("aweme-get-video-control")
@MatchingMethod("Aweme", "getVideoControl")
@SeekbarCompatibility
@Version("0.0.1")
object AwemeGetVideoControlFingerprint : MethodFingerprint(
"L",
AccessFlags.PUBLIC.value,
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/Aweme;") && methodDef.name == "getVideoControl"
}
)

View File

@@ -0,0 +1,47 @@
package app.revanced.patches.tiktok.interaction.seekbar.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.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.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.tiktok.interaction.seekbar.annotations.SeekbarCompatibility
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.*
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
import org.jf.dexlib2.builder.instruction.BuilderInstruction22c
@Patch
@Name("tiktok-seekbar")
@Description("Show progress bar for all video.")
@SeekbarCompatibility
@Version("0.0.1")
class TiktokSeekbarPatch : BytecodePatch(
listOf(
AwemeGetVideoControlFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
//Get VideoControl FieldReference
val videoControl = data.findClass { it.type.endsWith("/VideoControl;") }
?: return PatchResultError("Can not find target class")
val fieldList = videoControl.immutableClass.fields.associateBy { field -> field.name }
val method = AwemeGetVideoControlFingerprint.result!!.mutableMethod
val implementation = method.implementation!!
implementation.addInstructions(
1, listOf(
BuilderInstruction11n(Opcode.CONST_4, 1, 1),
BuilderInstruction22c(Opcode.IPUT, 1, 0, fieldList["showProgressBar"]!!),
BuilderInstruction22c(Opcode.IPUT, 1, 0, fieldList["draftProgressBar"]!!)
)
)
return PatchResultSuccess()
}
}

View File

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

View File

@@ -12,7 +12,7 @@ import org.jf.dexlib2.Opcode
@TimelineAdsCompatibility @TimelineAdsCompatibility
@Version("0.0.1") @Version("0.0.1")
object TimelineTweetJsonParserFingerprint : MethodFingerprint( object TimelineTweetJsonParserFingerprint : MethodFingerprint(
null, null, null, listOf( opcodes = listOf(
Opcode.IPUT_OBJECT, Opcode.IPUT_OBJECT,
Opcode.GOTO, Opcode.GOTO,
Opcode.SGET_OBJECT, Opcode.SGET_OBJECT,
@@ -21,6 +21,6 @@ object TimelineTweetJsonParserFingerprint : MethodFingerprint(
Opcode.CHECK_CAST, Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT, Opcode.IPUT_OBJECT,
Opcode.RETURN_VOID, Opcode.RETURN_VOID,
), listOf("tweetPromotedMetadata", "promotedMetadata", "hasModeratedReplies", "conversationAnnotation"), ), strings = listOf("tweetPromotedMetadata", "promotedMetadata", "hasModeratedReplies", "conversationAnnotation"),
{ methodDef -> methodDef.name == "parseField" } customFingerprint = { methodDef -> methodDef.name == "parseField" }
) )

View File

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

View File

@@ -14,10 +14,7 @@ import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.Firebase
@Version("0.0.1") @Version("0.0.1")
object GetMessagingCertFingerprint : MethodFingerprint( object GetMessagingCertFingerprint : MethodFingerprint(
"Ljava/lang/String;", "Ljava/lang/String;",
null, strings = listOf(
null,
null,
listOf(
"ContentValues", "ContentValues",
"Could not get fingerprint hash for package: ", "Could not get fingerprint hash for package: ",
"No such package: " "No such package: "

View File

@@ -14,10 +14,7 @@ import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.Firebase
@Version("0.0.1") @Version("0.0.1")
object GetReqistrationCertFingerprint : MethodFingerprint( object GetReqistrationCertFingerprint : MethodFingerprint(
"Ljava/lang/String;", "Ljava/lang/String;",
null, strings = listOf(
null,
null,
listOf(
"FirebaseRemoteConfig", "FirebaseRemoteConfig",
"Could not get fingerprint hash for package: ", "Could not get fingerprint hash for package: ",
"No such package: " "No such package: "

View File

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

View File

@@ -2,8 +2,8 @@ package app.revanced.patches.warnwetter.misc.promocode.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility
@Name("promo-code-unlock-fingerprint") @Name("promo-code-unlock-fingerprint")
@@ -13,12 +13,7 @@ import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnloc
@PromoCodeUnlockCompatibility @PromoCodeUnlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object PromoCodeUnlockFingerprint : MethodFingerprint( object PromoCodeUnlockFingerprint : MethodFingerprint(
null, customFingerprint = { methodDef ->
null,
null,
null,
null,
{ methodDef ->
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid" methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
} }
) )

View File

@@ -17,8 +17,5 @@ import org.jf.dexlib2.AccessFlags
object HideInfocardSuggestionsFingerprint : MethodFingerprint( object HideInfocardSuggestionsFingerprint : MethodFingerprint(
"Ljava/lang/Boolean;", "Ljava/lang/Boolean;",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
null, strings = listOf("vibrator")
null,
listOf("vibrator"),
null
) )

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@@ -17,8 +17,5 @@ import org.jf.dexlib2.AccessFlags
object HideInfocardSuggestionsParentFingerprint : MethodFingerprint( object HideInfocardSuggestionsParentFingerprint : MethodFingerprint(
"Ljava/lang/String;", "Ljava/lang/String;",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf(), strings = listOf("player_overlay_info_card_teaser"),
null,
listOf("player_overlay_info_card_teaser"),
null
) )

View File

@@ -17,5 +17,5 @@ import org.jf.dexlib2.AccessFlags
@VideoAdsCompatibility @VideoAdsCompatibility
@Version("0.0.1") @Version("0.0.1")
object ShowVideoAdsFingerprint : MethodFingerprint( object ShowVideoAdsFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), null "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z")
) )

View File

@@ -15,7 +15,7 @@ import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeCo
@SwipeControlsCompatibility @SwipeControlsCompatibility
@Version("0.0.1") @Version("0.0.1")
object SwipeControlsHostActivityFingerprint : MethodFingerprint( object SwipeControlsHostActivityFingerprint : MethodFingerprint(
null, null, null, null, null, { methodDef -> customFingerprint = { methodDef ->
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" && methodDef.name == "<init>" methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" && methodDef.name == "<init>"
} }
) )

View File

@@ -15,7 +15,7 @@ import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeCo
@SwipeControlsCompatibility @SwipeControlsCompatibility
@Version("0.0.1") @Version("0.0.1")
object WatchWhileActivityFingerprint : MethodFingerprint( object WatchWhileActivityFingerprint : MethodFingerprint(
null, null, null, null, null, { methodDef -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>" methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
} }
) )

View File

@@ -92,8 +92,6 @@ class SwipeControlsResourcePatch : ResourcePatch() {
) )
) )
val resourcesDir = "swipecontrols"
data.copyResources( data.copyResources(
"swipecontrols", "swipecontrols",
ResourceUtils.ResourceGroup( ResourceUtils.ResourceGroup(

View File

@@ -3,11 +3,7 @@ package app.revanced.patches.youtube.layout.amoled.annotations
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility([Package("com.google.android.youtube")])
[Package(
"com.google.android.youtube", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class AmoledCompatibility internal annotation class AmoledCompatibility

View File

@@ -2,17 +2,16 @@ package app.revanced.patches.youtube.layout.amoled.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.PatchDeprecated
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult 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.DependsOn
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.amoled.annotations.AmoledCompatibility import app.revanced.patches.youtube.layout.amoled.annotations.AmoledCompatibility
import app.revanced.patches.youtube.layout.theme.patch.ThemePatch
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import org.w3c.dom.Element
import java.io.File
@Patch @Patch
@DependsOn([FixLocaleConfigErrorPatch::class]) @DependsOn([FixLocaleConfigErrorPatch::class])
@@ -20,24 +19,10 @@ import java.io.File
@Description("Enables pure black theme.") @Description("Enables pure black theme.")
@AmoledCompatibility @AmoledCompatibility
@Version("0.0.1") @Version("0.0.1")
@PatchDeprecated("Theme patch already includes the Amoled theme.", ThemePatch::class)
class AmoledPatch : ResourcePatch() { class AmoledPatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult { override fun execute(data: ResourceData): PatchResult {
data.xmlEditor["res${File.separator}values${File.separator}colors.xml"].use { editor -> ThemePatch.theme = ThemePatch.Themes.Amoled.name
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element return ThemePatch().execute(data)
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

@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.autoplaybutton.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or 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.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayButtonCompatibility import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayButtonCompatibility
@@ -19,8 +18,7 @@ import org.jf.dexlib2.Opcode
object AutoNavInformerFingerprint : MethodFingerprint( object AutoNavInformerFingerprint : MethodFingerprint(
"Z", "Z",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
null, opcodes = listOf(
listOf(
Opcode.IGET_OBJECT, Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE, Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT, Opcode.MOVE_RESULT_OBJECT,
@@ -28,6 +26,5 @@ object AutoNavInformerFingerprint : MethodFingerprint(
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT, Opcode.MOVE_RESULT,
), ),
null, customFingerprint = { it.definingClass.endsWith("WillAutonavInformer;") }
{ it.definingClass.endsWith("WillAutonavInformer;") }
) )

View File

@@ -13,8 +13,8 @@ import app.revanced.patches.youtube.layout.autoplaybutton.annotations.AutoplayBu
@AutoplayButtonCompatibility @AutoplayButtonCompatibility
@Version("0.0.1") @Version("0.0.1")
object LayoutConstructorFingerprint : MethodFingerprint( object LayoutConstructorFingerprint : MethodFingerprint(
null, null, null, null, listOf("1.0x"), strings = listOf("1.0x"),
{ methodDef -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("YouTubeControlsOverlay;") methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
} }
) )

View File

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

View File

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

View File

@@ -10,7 +10,6 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import java.io.ByteArrayOutputStream
import java.io.File import java.io.File
import java.io.FileInputStream import java.io.FileInputStream
import java.io.InputStream import java.io.InputStream
@@ -42,27 +41,18 @@ class CustomBrandingPatch : ResourcePatch() {
"hdpi" to 72, "hdpi" to 72,
"mdpi" to 48 "mdpi" to 48
).forEach { (iconDirectory, size) -> ).forEach { (iconDirectory, size) ->
iconNames.forEach iconLoop@{ iconName -> iconNames.forEach { iconName ->
val iconFile = getIconStream("branding/$size/$iconName.png") val iconFile = getIconStream("branding/$size/$iconName.png")
?: return PatchResultError("The icon $iconName can not be found.") ?: return PatchResultError("The icon $iconName can not be found.")
val outputStream = ByteArrayOutputStream()
iconFile.use { input ->
outputStream.use { output ->
input.copyTo(output)
}
}
Files.write( Files.write(
resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(), resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(),
outputStream.toByteArray() iconFile.readBytes()
) )
} }
} }
// Name branding // Name branding
val appName: String by options[keyAppName]
val manifest = data["AndroidManifest.xml"] val manifest = data["AndroidManifest.xml"]
manifest.writeText( manifest.writeText(
manifest.readText() manifest.readText()
@@ -75,24 +65,7 @@ class CustomBrandingPatch : ResourcePatch() {
return PatchResultSuccess() return PatchResultSuccess()
} }
override val options = PatchOptions(
PatchOption.StringOption(
key = keyAppName,
default = "YouTube ReVanced",
title = "Application Name",
description = "The name of the application it will show on your home screen.",
required = true
),
PatchOption.StringOption(
key = keyAppIconPath,
default = null,
title = "Application Icon Path",
description = "A path to the icon of the application."
)
)
private fun getIconStream(iconPath: String): InputStream? { private fun getIconStream(iconPath: String): InputStream? {
val appIconPath: String? by options[keyAppIconPath]
if (appIconPath == null) { if (appIconPath == null) {
return this.javaClass.classLoader.getResourceAsStream(iconPath) return this.javaClass.classLoader.getResourceAsStream(iconPath)
} }
@@ -101,8 +74,24 @@ class CustomBrandingPatch : ResourcePatch() {
return FileInputStream(file) return FileInputStream(file)
} }
private companion object { companion object : OptionsContainer() {
private const val keyAppName = "appName" private var appName: String? by option(
private const val keyAppIconPath = "appIconPath" PatchOption.StringOption(
key = "appName",
default = "YouTube ReVanced",
title = "Application Name",
description = "The name of the application it will show on your home screen.",
required = true
)
)
private var appIconPath: String? by option(
PatchOption.StringOption(
key = "appIconPath",
default = null,
title = "Application Icon Path",
description = "A path to the icon of the application."
)
)
} }
} }

View File

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

View File

@@ -16,10 +16,7 @@ import org.jf.dexlib2.Opcode
@ShortsButtonCompatibility @ShortsButtonCompatibility
@Version("0.0.1") @Version("0.0.1")
object FullscreenViewAdderFingerprint : MethodFingerprint( object FullscreenViewAdderFingerprint : MethodFingerprint(
null, opcodes = listOf(
null,
null,
listOf(
Opcode.IGET_BOOLEAN Opcode.IGET_BOOLEAN
) )
) )

View File

@@ -16,10 +16,8 @@ import org.jf.dexlib2.Opcode
@ShortsButtonCompatibility @ShortsButtonCompatibility
@Version("0.0.1") @Version("0.0.1")
object FullscreenViewAdderParentFingerprint : MethodFingerprint( object FullscreenViewAdderParentFingerprint : MethodFingerprint(
null, parameters = listOf("L", "L"),
null, opcodes = listOf(
listOf("L", "L"),
listOf(
Opcode.GOTO, Opcode.GOTO,
Opcode.IGET_BOOLEAN, Opcode.IGET_BOOLEAN,
Opcode.IF_EQ, Opcode.IF_EQ,
@@ -27,6 +25,5 @@ object FullscreenViewAdderParentFingerprint : MethodFingerprint(
Opcode.CONST_4, Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,
), ),
null, customFingerprint = { it.definingClass.endsWith("FullscreenEngagementPanelOverlay;") }
{ it.definingClass.endsWith("FullscreenEngagementPanelOverlay;") }
) )

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.youtube.layout.reels.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@@ -17,6 +17,6 @@ import org.jf.dexlib2.AccessFlags
@HideReelsCompatibility @HideReelsCompatibility
@Version("0.0.1") @Version("0.0.1")
object HideReelsFingerprint : MethodFingerprint( object HideReelsFingerprint : MethodFingerprint(
null, AccessFlags.PROTECTED or AccessFlags.FINAL, listOf("L", "L"), null, access = AccessFlags.PROTECTED or AccessFlags.FINAL, parameters = listOf("L", "L"),
listOf("multiReelDismissalCallback", "reelItemRenderers", "reelDismissalInfo") strings = listOf("multiReelDismissalCallback", "reelItemRenderers", "reelDismissalInfo")
) )

View File

@@ -19,7 +19,5 @@ import org.jf.dexlib2.AccessFlags
object DislikeFingerprint : MethodFingerprint( object DislikeFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR, AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR,
null, strings = listOf("like/dislike")
null,
listOf("like/dislike")
) )

View File

@@ -19,7 +19,5 @@ import org.jf.dexlib2.AccessFlags
object LikeFingerprint : MethodFingerprint( object LikeFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR, AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR,
null, strings = listOf("like/like")
null,
listOf("like/like")
) )

View File

@@ -19,7 +19,5 @@ import org.jf.dexlib2.AccessFlags
object RemoveLikeFingerprint : MethodFingerprint( object RemoveLikeFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR, AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR,
null, strings = listOf("like/removelike")
null,
listOf("like/removelike")
) )

View File

@@ -15,9 +15,5 @@ import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.Retu
@ReturnYouTubeDislikeCompatibility @ReturnYouTubeDislikeCompatibility
@Version("0.0.1") @Version("0.0.1")
object TextComponentSpecParentFingerprint : MethodFingerprint( object TextComponentSpecParentFingerprint : MethodFingerprint(
null, strings = listOf("TextComponentSpec: No converter for extension: ")
null,
null,
null,
listOf("TextComponentSpec: No converter for extension: ")
) )

View File

@@ -15,7 +15,6 @@ import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlock
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object CreateVideoPlayerSeekbarFingerprint : MethodFingerprint( object CreateVideoPlayerSeekbarFingerprint : MethodFingerprint(
"V", null, null, "V",
null, strings = listOf("timed_markers_width")
listOf("timed_markers_width")
) )

View File

@@ -17,8 +17,5 @@ import org.jf.dexlib2.util.MethodUtil
@Version("0.0.1") @Version("0.0.1")
object NextGenWatchLayoutFingerprint : MethodFingerprint( object NextGenWatchLayoutFingerprint : MethodFingerprint(
"V", // constructors return void, in favour of speed of matching, this fingerprint has been added "V", // constructors return void, in favour of speed of matching, this fingerprint has been added
null,
null,
null,
customFingerprint = { methodDef -> MethodUtil.isConstructor(methodDef) && methodDef.parameterTypes.size == 3 && methodDef.definingClass.endsWith("NextGenWatchLayout;") } customFingerprint = { methodDef -> MethodUtil.isConstructor(methodDef) && methodDef.parameterTypes.size == 3 && methodDef.definingClass.endsWith("NextGenWatchLayout;") }
) )

View File

@@ -16,7 +16,6 @@ import org.jf.dexlib2.Opcode
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object PlayerControllerSetTimeReferenceFingerprint : MethodFingerprint( object PlayerControllerSetTimeReferenceFingerprint : MethodFingerprint(
null, null, null, opcodes = listOf(Opcode.INVOKE_DIRECT_RANGE, Opcode.IGET_OBJECT),
listOf(Opcode.INVOKE_DIRECT_RANGE, Opcode.IGET_OBJECT), strings = listOf("Media progress reported outside media playback: ")
listOf("Media progress reported outside media playback: ")
) )

View File

@@ -15,8 +15,6 @@ import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlock
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object PlayerInitFingerprint : MethodFingerprint( object PlayerInitFingerprint : MethodFingerprint(
null, null, null,
null,
strings = listOf( strings = listOf(
"playVideo called on player response with no videoStreamingData." "playVideo called on player response with no videoStreamingData."
), ),

View File

@@ -15,8 +15,6 @@ import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlock
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object PlayerOverlaysLayoutInitFingerprint : MethodFingerprint( object PlayerOverlaysLayoutInitFingerprint : MethodFingerprint(
null, null, null,
null, customFingerprint = { methodDef -> methodDef.returnType.endsWith("YouTubePlayerOverlaysLayout;") }
null,
{ methodDef -> methodDef.returnType.endsWith("YouTubePlayerOverlaysLayout;") }
) )

View File

@@ -18,11 +18,7 @@ import org.jf.dexlib2.iface.reference.MethodReference
@Version("0.0.1") @Version("0.0.1")
object RectangleFieldInvalidatorFingerprint : MethodFingerprint( object RectangleFieldInvalidatorFingerprint : MethodFingerprint(
"V", "V",
null, customFingerprint = custom@{ methodDef ->
null,
null,
null,
custom@{ methodDef ->
val instructions = methodDef.implementation?.instructions!! val instructions = methodDef.implementation?.instructions!!
val instructionCount = instructions.count() val instructionCount = instructions.count()

View File

@@ -15,9 +15,5 @@ import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlock
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object SeekFingerprint : MethodFingerprint( object SeekFingerprint : MethodFingerprint(
null, strings = listOf("Attempting to seek during an ad")
null,
null,
null,
listOf("Attempting to seek during an ad")
) )

View File

@@ -16,8 +16,7 @@ import org.jf.dexlib2.Opcode
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object VideoLengthFingerprint : MethodFingerprint( object VideoLengthFingerprint : MethodFingerprint(
null, null, null, opcodes = listOf(
listOf(
Opcode.MOVE_RESULT_WIDE, Opcode.MOVE_RESULT_WIDE,
Opcode.CMP_LONG, Opcode.CMP_LONG,
Opcode.IF_LEZ, Opcode.IF_LEZ,

View File

@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlock
@SponsorBlockCompatibility @SponsorBlockCompatibility
@Version("0.0.1") @Version("0.0.1")
object VideoTimeFingerprint : MethodFingerprint( object VideoTimeFingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("MedialibPlayerTimeInfo{currentPositionMillis=")
listOf("MedialibPlayerTimeInfo{currentPositionMillis=")
) )

View File

@@ -16,6 +16,6 @@ import org.jf.dexlib2.Opcode
@TabletMiniPlayerCompatibility @TabletMiniPlayerCompatibility
@Version("0.0.1") @Version("0.0.1")
object MiniPlayerOverrideFingerprint : MethodFingerprint( object MiniPlayerOverrideFingerprint : MethodFingerprint(
"Z", AccessFlags.STATIC or AccessFlags.PUBLIC ,null, "Z", AccessFlags.STATIC or AccessFlags.PUBLIC,
listOf(Opcode.RETURN), // anchor to insert the instruction opcodes = listOf(Opcode.RETURN), // anchor to insert the instruction
) )

View File

@@ -16,6 +16,6 @@ import org.jf.dexlib2.Opcode
@TabletMiniPlayerCompatibility @TabletMiniPlayerCompatibility
@Version("0.0.1") @Version("0.0.1")
object MiniPlayerOverrideNoContextFingerprint : MethodFingerprint( object MiniPlayerOverrideNoContextFingerprint : MethodFingerprint(
"Z", AccessFlags.FINAL or AccessFlags.PRIVATE ,null, "Z", AccessFlags.FINAL or AccessFlags.PRIVATE,
listOf(Opcode.RETURN), // anchor to insert the instruction opcodes = listOf(Opcode.RETURN), // anchor to insert the instruction
) )

View File

@@ -32,6 +32,5 @@ object MiniPlayerResponseModelSizeCheckFingerprint : MethodFingerprint(
Opcode.INVOKE_STATIC, Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT, Opcode.MOVE_RESULT,
Opcode.IF_NEZ, Opcode.IF_NEZ,
), )
null
) )

View File

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

View File

@@ -0,0 +1,67 @@
package app.revanced.patches.youtube.layout.theme.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import org.w3c.dom.Element
@Patch
@DependsOn([FixLocaleConfigErrorPatch::class])
@Name("theme")
@Description("Enables a custom theme.")
@ThemeCompatibility
@Version("0.0.1")
class ThemePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val theme = Themes.of(theme!!) ?: return PatchResultError("Theme '$theme' not found.")
data.xmlEditor["res/values/colors.xml"].use { editor ->
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
for (i in 0 until resourcesNode.childNodes.length) {
val node = resourcesNode.childNodes.item(i) as? Element ?: continue
node.textContent = theme.apply(node.getAttribute("name")) ?: continue
}
}
return PatchResultSuccess()
}
companion object : OptionsContainer() {
var theme: String? by option(
PatchOption.StringListOption(
key = "theme",
default = Themes.Amoled.name,
options = Themes.names,
title = "Theme",
description = "Select a theme.",
required = true
)
)
}
enum class Themes(val apply: (String) -> String?) {
Amoled({ attr ->
when (attr) {
"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 -> null
}
});
companion object {
val names = values().map { it.name }
fun of(name: String) = values().firstOrNull { it.name == name }
}
}
}

View File

@@ -17,5 +17,5 @@ import org.jf.dexlib2.AccessFlags
@HideWatermarkCompatibility @HideWatermarkCompatibility
@Version("0.0.1") @Version("0.0.1")
object HideWatermarkFingerprint : MethodFingerprint ( object HideWatermarkFingerprint : MethodFingerprint (
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L"), null ,null, null "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L")
) )

View File

@@ -17,5 +17,5 @@ import org.jf.dexlib2.AccessFlags
@HideWatermarkCompatibility @HideWatermarkCompatibility
@Version("0.0.1") @Version("0.0.1")
object HideWatermarkParentFingerprint : MethodFingerprint ( object HideWatermarkParentFingerprint : MethodFingerprint (
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, null, null, listOf("player_overlay_in_video_programming"), null "L", AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("player_overlay_in_video_programming")
) )

View File

@@ -6,7 +6,6 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@@ -18,31 +17,7 @@ import org.jf.dexlib2.Opcode
@DirectPatternScanMethod @DirectPatternScanMethod
@WideSearchbarCompatibility @WideSearchbarCompatibility
@Version("0.0.1") @Version("0.0.1")
/*
This finds the following method:
public final View i(akrl akrlVar, adpd adpdVar) {
}
Method we search for is located in smali now.
See:
.method public final i(Lakrl;Ladpd;)Landroid/view/View;
iget-object v0, p0, Ljkg;->a:Landroid/app/Activity;
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
iget-object v1, p0, Ljkg;->g:Ljis;
const/4 v2, 0x0
invoke-interface {v1, v2}, Ljis;->h(Z)V
iget-object p1, p1, Lakrl;->f:Lahnq;
if-nez p1, :cond_12
sget-object p1, Lahnq;->a:Lahnq;
:cond_12
iget-object v1, p0, Ljkg;->x:Ltxm;
invoke-static {v1}, Lfbn;->aF(Ltxm;)Z //THIS IS WHAT WE SEARCH FOR (Method fbn.aF)
move-result v1
*/
object WideSearchbarOneFingerprint : MethodFingerprint( object WideSearchbarOneFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L"), listOf(Opcode.IF_NEZ, Opcode.SGET_OBJECT, Opcode.IGET_OBJECT, Opcode.INVOKE_STATIC), "L", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L"),
null, null listOf(Opcode.IF_NEZ, Opcode.SGET_OBJECT, Opcode.IGET_OBJECT, Opcode.INVOKE_STATIC)
) )

View File

@@ -3,10 +3,9 @@ package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@@ -17,31 +16,7 @@ import org.jf.dexlib2.AccessFlags
@FuzzyPatternScanMethod(3) @FuzzyPatternScanMethod(3)
@WideSearchbarCompatibility @WideSearchbarCompatibility
@Version("0.0.1") @Version("0.0.1")
/*
* This finds the following method:
private final void l(PaneDescriptor paneDescriptor) {
Class cls = null;
ahat f = paneDescriptor != null ? paneDescriptor.f() : null;
if (paneDescriptor != null) {
cls = paneDescriptor.a;
}
ftu k = k();
if ((k == null || !k.bk()) && ((!frx.k(f) && !((Boolean) aqer.S(this.n).X(new fac(this, f, 19)).K(irx.i).aH(false)).booleanValue()) || (f != null && f.qA(ReelWatchEndpointOuterClass$ReelWatchEndpoint.reelWatchEndpoint)))) {
String j = frx.j(f);
if ((j != null && ("FEhistory".equals(j) || "FEmy_videos".equals(j) || "FEpurchases".equals(j) || j.startsWith("VL"))) || cls == this.I.E() || cls == this.G.a) {
this.F = 3;
return;
} else {
this.F = 2;
return;
}
}
this.F = 1;
}
*/
object WideSearchbarOneParentFingerprint : MethodFingerprint( object WideSearchbarOneParentFingerprint : MethodFingerprint(
"V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("L"), null, "V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("L"),
listOf("FEhistory", "FEmy_videos", "FEpurchases") strings = listOf("FEhistory", "FEmy_videos", "FEpurchases")
) )

View File

@@ -6,7 +6,6 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@@ -18,32 +17,8 @@ import org.jf.dexlib2.Opcode
@DirectPatternScanMethod @DirectPatternScanMethod
@WideSearchbarCompatibility @WideSearchbarCompatibility
@Version("0.0.1") @Version("0.0.1")
/*
public static jis h(Context context, txm txmVar, uag uagVar, txp txpVar) {
return fbn.aB(txmVar) ? new jhx(context, txmVar, uagVar, txpVar) : jis.d;
}
Method we search for is located in smali now.
See:
.method public static h(Landroid/content/Context;Ltxm;Luag;Ltxp;)Ljis;
invoke-static {p1}, Lfbn;->aB(Ltxm;)Z //this is the method we want to change. fbn.aB
move-result v0
if-eqz v0, :cond_c
new-instance v0, Ljhx;
invoke-direct {v0, p0, p1, p2, p3}, Ljhx;-><init>(Landroid/content/Context;Ltxm;Luag;Ltxp;)V
goto :goto_e
:cond_c
sget-object v0, Ljis;->d:Ljis;
:goto_e
return-object v0
.end method
*/
object WideSearchbarTwoFingerprint : MethodFingerprint( object WideSearchbarTwoFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, null, listOf( "L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
Opcode.INVOKE_STATIC, Opcode.MOVE_RESULT, Opcode.IF_EQZ, Opcode.NEW_INSTANCE Opcode.INVOKE_STATIC, Opcode.MOVE_RESULT, Opcode.IF_EQZ, Opcode.NEW_INSTANCE
), )
null, null
) )

View File

@@ -14,19 +14,7 @@ import org.jf.dexlib2.AccessFlags
) )
@WideSearchbarCompatibility @WideSearchbarCompatibility
@Version("0.0.1") @Version("0.0.1")
/*
This finds following method:
public static ies i(br brVar) {
bp f = brVar.getSupportFragmentManager().f("VIDEO_QUALITIES_QUICK_MENU_BOTTOM_SHEET_FRAGMENT");
if (f != null) {
return (kga) f;
}
return new kga();
}
*/
object WideSearchbarTwoParentFingerprint : MethodFingerprint( object WideSearchbarTwoParentFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), null, "L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"),
listOf("VIDEO_QUALITIES_QUICK_MENU_BOTTOM_SHEET_FRAGMENT") strings = listOf("VIDEO_QUALITIES_QUICK_MENU_BOTTOM_SHEET_FRAGMENT")
) )

View File

@@ -26,7 +26,5 @@ object AutoRepeatFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf(), listOf(),
null,
null,
customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 && methodDef.annotations.isEmpty()} customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 && methodDef.annotations.isEmpty()}
) )

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.youtube.misc.autorepeat.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
@@ -16,20 +16,11 @@ import org.jf.dexlib2.AccessFlags
@FuzzyPatternScanMethod(2) @FuzzyPatternScanMethod(2)
@AutoRepeatCompatibility @AutoRepeatCompatibility
@Version("0.0.1") @Version("0.0.1")
//This Fingerprints finds the play() method needed to be called when AutoRepeatPatch.shouldAutoRepeat() == true
/*
public final void E() {
Stuff happens
String str = "play() called when the player wasn't loaded.";
String str2 = "play() blocked because Background Playability failed";
Stuff happens again
}
*/
object AutoRepeatParentFingerprint : MethodFingerprint( object AutoRepeatParentFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
null, strings = listOf(
null, "play() called when the player wasn't loaded.",
listOf("play() called when the player wasn't loaded.", "play() blocked because Background Playability failed"), "play() blocked because Background Playability failed"
null )
) )

View File

@@ -5,8 +5,8 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[ [
Package("com.google.android.youtube", arrayOf()), Package("com.google.android.youtube"),
Package("com.vanced.android.youtube", arrayOf()) Package("com.vanced.android.youtube")
] ]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -12,9 +12,7 @@ import org.jf.dexlib2.Opcode
@DirectPatternScanMethod @DirectPatternScanMethod
@Version("0.0.1") @Version("0.0.1")
object UserAgentHeaderBuilderFingerprint : MethodFingerprint( object UserAgentHeaderBuilderFingerprint : MethodFingerprint(
null, parameters = listOf("L", "L", "L"),
null, opcodes = listOf(Opcode.MOVE_RESULT_OBJECT, Opcode.INVOKE_VIRTUAL),
listOf("L", "L", "L"), strings = listOf("(Linux; U; Android "),
listOf(Opcode.MOVE_RESULT_OBJECT, Opcode.INVOKE_VIRTUAL),
listOf("(Linux; U; Android "),
) )

View File

@@ -12,7 +12,6 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.misc.clientspoof.annotations.ClientSpoofCompatibility import app.revanced.patches.youtube.misc.clientspoof.annotations.ClientSpoofCompatibility
import app.revanced.patches.youtube.misc.clientspoof.fingerprints.UserAgentHeaderBuilderFingerprint import app.revanced.patches.youtube.misc.clientspoof.fingerprints.UserAgentHeaderBuilderFingerprint
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch @Patch

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.youtube.misc.customplaybackspeed.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility import app.revanced.patches.youtube.misc.customplaybackspeed.annotations.CustomPlaybackSpeedCompatibility
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@@ -20,8 +20,7 @@ import org.jf.dexlib2.Opcode
object SpeedArrayGeneratorFingerprint : MethodFingerprint( object SpeedArrayGeneratorFingerprint : MethodFingerprint(
"[L", "[L",
AccessFlags.PUBLIC or AccessFlags.STATIC, AccessFlags.PUBLIC or AccessFlags.STATIC,
null, opcodes = listOf(
listOf(
Opcode.IF_NEZ, Opcode.IF_NEZ,
Opcode.SGET_OBJECT, Opcode.SGET_OBJECT,
Opcode.GOTO, Opcode.GOTO,
@@ -29,5 +28,5 @@ object SpeedArrayGeneratorFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT, Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT, Opcode.IGET_OBJECT,
), ),
listOf("0.0#") strings = listOf("0.0#")
) )

View File

@@ -3,11 +3,7 @@ package app.revanced.patches.youtube.misc.enabledebugging.annotations
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility([Package("com.google.android.youtube")])
[Package(
"com.google.android.youtube", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class EnableDebuggingCompatibility internal annotation class EnableDebuggingCompatibility

View File

@@ -32,7 +32,6 @@ object HDRBrightnessFingerprintYEL : MethodFingerprint(
Opcode.IGET_OBJECT, Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL Opcode.INVOKE_VIRTUAL
), ),
null,
customFingerprint = { methodDef -> customFingerprint = { methodDef ->
methodDef.implementation!!.instructions.any { methodDef.implementation!!.instructions.any {
((it as? ReferenceInstruction)?.reference as? FieldReference)?.let { field -> ((it as? ReferenceInstruction)?.reference as? FieldReference)?.let { field ->

View File

@@ -16,8 +16,8 @@ import org.jf.dexlib2.Opcode
@HDRBrightnessCompatibility @HDRBrightnessCompatibility
@Version("0.0.1") @Version("0.0.1")
object HDRBrightnessFingerprintYJK : MethodFingerprint( object HDRBrightnessFingerprintYJK : MethodFingerprint(
"V", null, null, "V",
listOf( opcodes = listOf(
Opcode.SGET_OBJECT, Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT, Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,
@@ -27,5 +27,5 @@ object HDRBrightnessFingerprintYJK : MethodFingerprint(
Opcode.IGET_OBJECT, Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL Opcode.INVOKE_VIRTUAL
), ),
listOf("c.SettingNotFound;", "screen_brightness", "android.mediaview"), strings = listOf("c.SettingNotFound;", "screen_brightness", "android.mediaview"),
) )

View File

@@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility
@Name("init-fingerprint") @Name("init-fingerprint")
@@ -13,6 +13,5 @@ import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCo
@IntegrationsCompatibility @IntegrationsCompatibility
@Version("0.0.1") @Version("0.0.1")
object InitFingerprint : MethodFingerprint( object InitFingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("Application creation")
listOf("Application creation")
) )

View File

@@ -3,11 +3,7 @@ package app.revanced.patches.youtube.misc.manifest.annotations
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility([Package("com.google.android.youtube")])
[Package(
"com.google.android.youtube", arrayOf()
)]
)
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class FixLocaleConfigErrorCompatibility internal annotation class FixLocaleConfigErrorCompatibility

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.youtube.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-context-fetch-fingerprint") @Name("cast-context-fetch-fingerprint")
@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object CastContextFetchFingerprint : MethodFingerprint( object CastContextFetchFingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("Error fetching CastContext.")
listOf("Error fetching CastContext.")
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.youtube.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-module-fingerprint") @Name("cast-module-fingerprint")
@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object CastDynamiteModuleFingerprint : MethodFingerprint( object CastDynamiteModuleFingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.youtube.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("cast-context-fetch-fingerprint") @Name("cast-context-fetch-fingerprint")
@@ -15,6 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object CastDynamiteModuleV2Fingerprint : MethodFingerprint( object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
null, null, null, null, strings = listOf("Failed to load module via V2: ")
listOf("Failed to load module via V2: ")
) )

View File

@@ -17,5 +17,8 @@ import org.jf.dexlib2.AccessFlags
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object GooglePlayUtilityFingerprint : MethodFingerprint( object GooglePlayUtilityFingerprint : MethodFingerprint(
"I", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L"), null, listOf("This should never happen.", "MetadataValueReader", "com.google.android.gms") "I",
AccessFlags.PUBLIC or AccessFlags.STATIC,
listOf("L", "L"),
strings = listOf("This should never happen.", "MetadataValueReader", "com.google.android.gms")
) )

View File

@@ -17,5 +17,6 @@ import org.jf.dexlib2.AccessFlags
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object IntegrityCheckFingerprint : MethodFingerprint( object IntegrityCheckFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L"), null, listOf("This should never happen.", "GooglePlayServicesUtil", "Google Play Store signature invalid.") "L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L"),
strings = listOf("This should never happen.", "GooglePlayServicesUtil", "Google Play Store signature invalid.")
) )

View File

@@ -2,9 +2,9 @@ package app.revanced.patches.youtube.misc.microg.fingerprints
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version 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.DirectPatternScanMethod
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
@Name("google-play-prime-fingerprint") @Name("google-play-prime-fingerprint")
@@ -15,5 +15,5 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object PrimeFingerprint : MethodFingerprint( object PrimeFingerprint : MethodFingerprint(
null, null, null, null, listOf("com.google.android.GoogleCamera", "com.android.vending") strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
) )

View File

@@ -17,6 +17,6 @@ import org.jf.dexlib2.AccessFlags
@MicroGPatchCompatibility @MicroGPatchCompatibility
@Version("0.0.1") @Version("0.0.1")
object ServiceCheckFingerprint : MethodFingerprint( object ServiceCheckFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null "V", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"),
, listOf("Google Play Services not available", "GooglePlayServices not available due to error ") strings = listOf("Google Play Services not available", "GooglePlayServices not available due to error ")
) )

View File

@@ -29,6 +29,5 @@ object MinimizedPlaybackKidsFingerprint : MethodFingerprint(
Opcode.IGET, Opcode.IGET,
Opcode.INVOKE_STATIC Opcode.INVOKE_STATIC
), ),
null, customFingerprint = { it.definingClass.endsWith("MinimizedPlaybackPolicyController;") }
{ it.definingClass.endsWith("MinimizedPlaybackPolicyController;") }
) )

View File

@@ -20,8 +20,7 @@ import org.jf.dexlib2.Opcode
object MinimizedPlaybackSettingsFingerprint : MethodFingerprint( object MinimizedPlaybackSettingsFingerprint : MethodFingerprint(
"L", "L",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
null, opcodes = listOf(
listOf(
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT, Opcode.MOVE_RESULT,
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,

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