mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-27 20:51:03 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cba04cf5a6 | ||
|
|
5e358c7319 | ||
|
|
ce69471684 | ||
|
|
a0981dda9d | ||
|
|
6073181ee1 | ||
|
|
522587321c | ||
|
|
b16748794e | ||
|
|
01e9a396d6 | ||
|
|
86fcd4d475 | ||
|
|
8bbc744114 | ||
|
|
d7a4ad76ea | ||
|
|
7e6ee73908 | ||
|
|
87954a1aaf | ||
|
|
e5a2ed0f70 | ||
|
|
2295aaebf4 | ||
|
|
a72bf150c2 | ||
|
|
0290cd3d36 | ||
|
|
e8d61e0c0e | ||
|
|
19769d80eb | ||
|
|
12c16d4644 | ||
|
|
75f4653c16 | ||
|
|
3286d26996 | ||
|
|
edbc36e90f | ||
|
|
7ad2be7f27 | ||
|
|
1702322671 | ||
|
|
9c9bfbd593 | ||
|
|
3df662a39c | ||
|
|
572c110a6e | ||
|
|
0be9f00915 | ||
|
|
0b6f643ff3 | ||
|
|
1989d53938 | ||
|
|
ac1acf10e6 | ||
|
|
0ad686da21 | ||
|
|
e734b2231a | ||
|
|
efe06d1cdc | ||
|
|
a0f9013fab | ||
|
|
93dcd542d5 | ||
|
|
3bac23f577 | ||
|
|
febcf60efb |
1
.idea/.gitignore
generated
vendored
1
.idea/.gitignore
generated
vendored
@@ -6,3 +6,4 @@
|
|||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
# Editor-based HTTP Client requests
|
# Editor-based HTTP Client requests
|
||||||
/httpRequests/
|
/httpRequests/
|
||||||
|
/kotlinc.xml
|
||||||
|
|||||||
80
CHANGELOG.md
80
CHANGELOG.md
@@ -1,3 +1,83 @@
|
|||||||
|
## [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)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* bump YouTube Music patches to v5.22.54 ([#409](https://github.com/revanced/revanced-patches/issues/409)) ([859176e](https://github.com/revanced/revanced-patches/commit/859176e3ece415243ba887424513a961fe4a5ad8))
|
||||||
|
|
||||||
|
## [2.48.2](https://github.com/revanced/revanced-patches/compare/v2.48.1...v2.48.2) (2022-08-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* do not constrain `amoled` patch to versions ([#408](https://github.com/revanced/revanced-patches/issues/408)) ([4af1714](https://github.com/revanced/revanced-patches/commit/4af1714dae4da40fe7488e8b734da91c978f1bdf))
|
||||||
|
|
||||||
|
## [2.48.1](https://github.com/revanced/revanced-patches/compare/v2.48.0...v2.48.1) (2022-08-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* don't overwrite register in `compact-header` patch ([#406](https://github.com/revanced/revanced-patches/issues/406)) ([3da8ab5](https://github.com/revanced/revanced-patches/commit/3da8ab5702f5c2a0384ce85fcb3df3b837cdc90e))
|
||||||
|
|
||||||
# [2.48.0](https://github.com/revanced/revanced-patches/compare/v2.47.0...v2.48.0) (2022-08-30)
|
# [2.48.0](https://github.com/revanced/revanced-patches/compare/v2.47.0...v2.48.0) (2022-08-30)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
25
README.md
25
README.md
@@ -34,16 +34,16 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.21.52 |
|
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.22.54 |
|
||||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.21.52 |
|
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.22.54 |
|
||||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.21.52 |
|
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.22.54 |
|
||||||
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.21.52 |
|
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.22.54 |
|
||||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.21.52 |
|
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.22.54 |
|
||||||
| `background-play` | Enables playing music in the background. | 5.21.52 |
|
| `background-play` | Enables playing music in the background. | 5.22.54 |
|
||||||
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.21.52 |
|
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.22.54 |
|
||||||
| `music-video-ads` | Removes ads in the music player. | 5.21.52 |
|
| `music-video-ads` | Removes ads in the music player. | 5.22.54 |
|
||||||
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.21.52 |
|
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.22.54 |
|
||||||
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.21.52 |
|
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.22.54 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `de.dwd.warnapp`
|
### 📦 `de.dwd.warnapp`
|
||||||
@@ -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>
|
||||||
|
|
||||||
@@ -70,7 +72,7 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.33.42 |
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.33.42 |
|
||||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.33.42 |
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.33.42 |
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.33.42 |
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.33.42 |
|
||||||
| `amoled` | Enables pure black theme. | 17.33.42 |
|
| `amoled` | Enables pure black theme. | all |
|
||||||
| `disable-create-button` | Hides the create button in the navigation bar. | 17.33.42 |
|
| `disable-create-button` | Hides the create button in the navigation bar. | 17.33.42 |
|
||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.33.42 |
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.33.42 |
|
||||||
@@ -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 |
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation("app.revanced:revanced-patcher:4.2.2")
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.48.0
|
version = 2.51.2
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -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")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ class CompactHeaderPatch : BytecodePatch(
|
|||||||
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
insertIndex, """
|
insertIndex, """
|
||||||
const/16 v0, 0x8
|
const/16 v2, 0x8
|
||||||
invoke-virtual {v${register}, v0}, Landroid/view/View;->setVisibility(I)V
|
invoke-virtual {v${register}, v2}, Landroid/view/View;->setVisibility(I)V
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
*/
|
*/
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -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.")
|
|
||||||
)
|
)
|
||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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: ")
|
|
||||||
)
|
)
|
||||||
@@ -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"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52")
|
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -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(
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -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.")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -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()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -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()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -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" }
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
@@ -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: "
|
||||||
|
|||||||
@@ -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: "
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -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
|
|
||||||
)
|
)
|
||||||
@@ -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
|
|
||||||
)
|
)
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
@@ -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>"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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>"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -92,8 +92,6 @@ class SwipeControlsResourcePatch : ResourcePatch() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val resourcesDir = "swipecontrols"
|
|
||||||
|
|
||||||
data.copyResources(
|
data.copyResources(
|
||||||
"swipecontrols",
|
"swipecontrols",
|
||||||
ResourceUtils.ResourceGroup(
|
ResourceUtils.ResourceGroup(
|
||||||
|
|||||||
@@ -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("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
|
||||||
)]
|
|
||||||
)
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
internal annotation class AmoledCompatibility
|
internal annotation class AmoledCompatibility
|
||||||
|
|||||||
@@ -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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;") }
|
|
||||||
)
|
)
|
||||||
@@ -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;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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."
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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;") }
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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")
|
||||||
)
|
)
|
||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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: ")
|
|
||||||
)
|
)
|
||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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;") }
|
||||||
)
|
)
|
||||||
@@ -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: ")
|
|
||||||
)
|
)
|
||||||
@@ -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."
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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;") }
|
|
||||||
)
|
)
|
||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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,
|
||||||
|
|||||||
@@ -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=")
|
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
)
|
)
|
||||||
@@ -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
|
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
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 = null,
|
||||||
|
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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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)
|
||||||
)
|
)
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
@@ -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
|
|
||||||
)
|
)
|
||||||
@@ -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")
|
||||||
)
|
)
|
||||||
@@ -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()}
|
||||||
)
|
)
|
||||||
@@ -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
|
)
|
||||||
)
|
)
|
||||||
@@ -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)
|
||||||
|
|||||||
@@ -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 "),
|
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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#")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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 ->
|
||||||
|
|||||||
@@ -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"),
|
||||||
)
|
)
|
||||||
@@ -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")
|
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
@@ -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.")
|
|
||||||
)
|
)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user