mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-30 22:21:02 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ea5d87fa2 | ||
|
|
471a3d3263 | ||
|
|
b95fe30c78 | ||
|
|
cb0cf342c0 | ||
|
|
11db0f49c9 | ||
|
|
017ef1fb88 | ||
|
|
0991fbc9e8 | ||
|
|
e1eedc02ab | ||
|
|
9be32e10f6 | ||
|
|
87996f67a8 | ||
|
|
0822383271 | ||
|
|
0934af1ccd | ||
|
|
b3ad6fb8af |
24
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a bug report on patches
|
||||||
|
title: 'problem: `some-patch`'
|
||||||
|
labels: bug
|
||||||
|
assignees: TheJeterLP, oSumAtrIX, Sculas
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 🐞 Issue
|
||||||
|
|
||||||
|
<!-- Describe your issue in detail here -->
|
||||||
|
|
||||||
|
# ⚙ Reproduce
|
||||||
|
|
||||||
|
<!-- Include your environment and steps to reproduce the issue as detailed as possible -->
|
||||||
|
|
||||||
|
# 🛠 Solution
|
||||||
|
|
||||||
|
<!-- If applicable, add a possible solution -->
|
||||||
|
|
||||||
|
# ⚠ Additional context
|
||||||
|
|
||||||
|
<!-- Add any other context about the problem here -->
|
||||||
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest a change to some patch. Do not submit suggestions for patches here.
|
||||||
|
title: 'feat: some feature'
|
||||||
|
labels: feature-request
|
||||||
|
assignees: TheJeterLP, oSumAtrIX, Sculas
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 🐞 Issue
|
||||||
|
|
||||||
|
<!-- Explain here, what the current problem is and why it lead you to request a feature change -->
|
||||||
|
|
||||||
|
# ❗ Solution
|
||||||
|
|
||||||
|
<!-- Explain how your current issue can be solved -->
|
||||||
|
|
||||||
|
# ❓ Motivation
|
||||||
|
|
||||||
|
<!-- Explain why your feature should be considered -->
|
||||||
|
|
||||||
|
# ⚠ Additional context
|
||||||
|
|
||||||
|
<!-- Add any other context or screenshots about the feature request here -->
|
||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew build clean
|
run: ./gradlew build clean generateReadme
|
||||||
- name: Install Android build-tools
|
- name: Install Android build-tools
|
||||||
run: sdkmanager "build-tools;32.0.0"
|
run: sdkmanager "build-tools;32.0.0"
|
||||||
- name: Setup semantic-release
|
- name: Setup semantic-release
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@semantic-release/commit-analyzer",
|
["@semantic-release/commit-analyzer", {
|
||||||
|
"releaseRules": [
|
||||||
|
{"type": "build", "release": "patch"}
|
||||||
|
]
|
||||||
|
}],
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/changelog",
|
"@semantic-release/changelog",
|
||||||
"gradle-semantic-release-plugin",
|
"gradle-semantic-release-plugin",
|
||||||
@@ -15,6 +19,7 @@
|
|||||||
"@semantic-release/git",
|
"@semantic-release/git",
|
||||||
{
|
{
|
||||||
"assets": [
|
"assets": [
|
||||||
|
"README.md",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
"gradle.properties"
|
"gradle.properties"
|
||||||
]
|
]
|
||||||
|
|||||||
29
CHANGELOG.md
29
CHANGELOG.md
@@ -1,3 +1,32 @@
|
|||||||
|
## [2.12.1](https://github.com/revanced/revanced-patches/compare/v2.12.0...v2.12.1) (2022-07-10)
|
||||||
|
|
||||||
|
# [2.12.0](https://github.com/revanced/revanced-patches/compare/v2.11.0...v2.12.0) (2022-07-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* update patches to `17.26.35` ([#142](https://github.com/revanced/revanced-patches/issues/142)) ([b04112c](https://github.com/revanced/revanced-patches/commit/b04112c8562a7b95e7555e894b665913094b33eb))
|
||||||
|
* wording [skip ci] ([ba64d9e](https://github.com/revanced/revanced-patches/commit/ba64d9efc3ee606e9bda30ad7f8017af34b1dc3f))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* issue templates ([b82b0aa](https://github.com/revanced/revanced-patches/commit/b82b0aad88b7ab9d86f1bcc8e007f6a76a9aa1a5))
|
||||||
|
|
||||||
|
# [2.11.0](https://github.com/revanced/revanced-patches/compare/v2.10.2...v2.11.0) (2022-07-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `autorepeat-by-default` patch ([#106](https://github.com/revanced/revanced-patches/issues/106)) ([e0ac9f3](https://github.com/revanced/revanced-patches/commit/e0ac9f385fc360f4dd2451e26676633120356c10))
|
||||||
|
|
||||||
|
## [2.10.2](https://github.com/revanced/revanced-patches/compare/v2.10.1...v2.10.2) (2022-07-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* trigger release on `build` commits ([be8bd1b](https://github.com/revanced/revanced-patches/commit/be8bd1b2a4b91f9763448661a802a5dc4a6b1d1d))
|
||||||
|
|
||||||
## [2.10.1](https://github.com/revanced/revanced-patches/compare/v2.10.0...v2.10.1) (2022-07-08)
|
## [2.10.1](https://github.com/revanced/revanced-patches/compare/v2.10.0...v2.10.1) (2022-07-08)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
8
README-template.md
Normal file
8
README-template.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# ReVanced Patches
|
||||||
|
🧩 Official patches by ReVanced
|
||||||
|
|
||||||
|
# Patch list
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🎯 Target Package | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|:-----------------:|
|
||||||
|
{{ table }}
|
||||||
37
README.md
37
README.md
@@ -1,2 +1,35 @@
|
|||||||
Repo for all ReVanced patches
|
# ReVanced Patches
|
||||||
|
🧩 Official patches by ReVanced
|
||||||
|
|
||||||
|
# Patch list
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🎯 Target Package | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|:-----------------:|
|
||||||
|
|Fenster Swipe Controls|Adds volume and brightness swipe controls.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Seekbar Tapping|Enables tapping on the seekbar of the YouTube player.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|General Ads|Removes general ads in bytecode.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Video Ads|Removes ads in the YouTube video player.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Hide Infocard Suggestions|Hides infocards in videos.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Autorepeat By Default|Enables auto repeating of videos by default.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Custom Branding|Changes the branding of YouTube.|`com.google.android.youtube`|all|
|
||||||
|
|Premium Heading|Shows premium branding on the YouTube home screen.|`com.google.android.youtube`|all|
|
||||||
|
|Minimized Playback|Enables minimized and background playback.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Enable Wide Searchbar|Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Disable Fullscreen Panels|Disables comments panel in fullscreen view.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Old Quality Layout|Enables the original quality flyout menu.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Hide Autoplay Button|Disables the autoplay button.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Disable Create Button|Disables the create button.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Amoled|Enables pure black theme.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Hide Shorts Button|Hides the shorts button.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Hide Cast Button|Hides the cast button.|`com.google.android.youtube`|all|
|
||||||
|
|Hide Watermark|Hides the creator's watermark on videos.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Microg Support|Allows YouTube ReVanced to run without root and under a different package name.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Custom Playback Speed|Allows to change the default playback speed options.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Hdr Max Brightness|Sets brightness to max for HDR videos in fullscreen mode.|`com.google.android.youtube`|17.26.35|
|
||||||
|
|Enable Debugging|Enables app debugging by patching the manifest file.|`com.google.android.youtube`|all|
|
||||||
|
|Background Play|Enables playing music in the background.|`com.google.android.apps.youtube.music`|5.03.50|
|
||||||
|
|Exclusive Audio Playback|Adds the option to play music without video.|`com.google.android.apps.youtube.music`|5.03.50|
|
||||||
|
|Codecs Unlock|Enables more audio codecs. Usually results in better audio quality but may depend on song and device.|`com.google.android.apps.youtube.music`|5.03.50|
|
||||||
|
|Upgrade Button Remover|Removes the upgrade tab from the pivot bar in YouTube music.|`com.google.android.apps.youtube.music`|5.03.50|
|
||||||
|
|TasteBuilder Remover|Removes the "Tell us which artists you like" card from the Home screen. The same functionality can be triggered from the settings anyway.|`com.google.android.apps.youtube.music`|5.03.50|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
|
|
||||||
implementation("app.revanced:revanced-patcher:2.3.0")
|
implementation("app.revanced:revanced-patcher:2.4.0")
|
||||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,12 +49,19 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
register<JavaExec>("generateReadme") {
|
||||||
|
description = "Generate README.md"
|
||||||
|
dependsOn(build)
|
||||||
|
|
||||||
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
|
mainClass.set("app.revanced.patches.meta.readme.Generator")
|
||||||
|
}
|
||||||
// Dummy task to fix the Gradle semantic-release plugin.
|
// Dummy task to fix the Gradle semantic-release plugin.
|
||||||
// Remove this if you forked it to support building only.
|
// Remove this if you forked it to support building only.
|
||||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||||
register<DefaultTask>("publish") {
|
register<DefaultTask>("publish") {
|
||||||
group = "publish"
|
group = "publish"
|
||||||
description = "Dummy task"
|
description = "Dummy task"
|
||||||
dependsOn(named("generateDex"))
|
dependsOn(named("generateDex"), named("generateReadme"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.10.1
|
version = 2.12.1
|
||||||
|
|||||||
41
src/main/kotlin/app/revanced/meta/readme/Generator.kt
Normal file
41
src/main/kotlin/app/revanced/meta/readme/Generator.kt
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
package app.revanced.patches.meta.readme
|
||||||
|
|
||||||
|
import java.io.File
|
||||||
|
import kotlin.io.writeText
|
||||||
|
import kotlin.collections.first
|
||||||
|
import app.revanced.patcher.util.patch.implementation.JarPatchBundle
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||||
|
|
||||||
|
class Generator {
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
val buildDir = File("build/libs/")
|
||||||
|
val buildJar = buildDir.listFiles().first { it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar") }
|
||||||
|
|
||||||
|
val bundle = JarPatchBundle(buildJar.absolutePath).loadPatches()
|
||||||
|
|
||||||
|
val table = StringBuilder()
|
||||||
|
|
||||||
|
for (patch in bundle) {
|
||||||
|
val humanName =
|
||||||
|
patch.patchName.split('-').map { it.replaceFirstChar { it.uppercase() } }.joinToString(" ")
|
||||||
|
|
||||||
|
val compatiblePackage = patch.compatiblePackages?.first()
|
||||||
|
val latestVersion = compatiblePackage?.versions?.maxByOrNull { it.replace(".", "").toInt() } ?: "all"
|
||||||
|
|
||||||
|
table.appendLine("|$humanName|${patch.description}|`${compatiblePackage?.name}`|$latestVersion|")
|
||||||
|
}
|
||||||
|
|
||||||
|
val readMeTemplateFile = File("README-template.md")
|
||||||
|
val readMeTemplate = Template(readMeTemplateFile.readText())
|
||||||
|
|
||||||
|
readMeTemplate.replaceVariable("table", table.toString())
|
||||||
|
|
||||||
|
val readMeFile = File("README.md")
|
||||||
|
readMeFile.writeText(readMeTemplate.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
src/main/kotlin/app/revanced/meta/readme/Template.kt
Normal file
14
src/main/kotlin/app/revanced/meta/readme/Template.kt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.meta.readme
|
||||||
|
|
||||||
|
class Template(val template: String) {
|
||||||
|
val result: StringBuilder = StringBuilder(template)
|
||||||
|
|
||||||
|
fun replaceVariable(name: String, value: String) {
|
||||||
|
val regex = Regex("\\{\\{\\s?$name\\s?\\}\\}")
|
||||||
|
val range = regex.find(result)!!.range
|
||||||
|
|
||||||
|
result.replace(range.start, range.endInclusive + 1, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String = result.toString()
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ import app.revanced.patches.music.premium.backgroundplay.fingerprints.Background
|
|||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("background-play")
|
@Name("background-play")
|
||||||
@Description("Enable playing music in the background.")
|
@Description("Enables playing music in the background.")
|
||||||
@BackgroundPlayCompatibility
|
@BackgroundPlayCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class BackgroundPlayPatch : BytecodePatch(
|
class BackgroundPlayPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -4,10 +4,8 @@ import app.revanced.patcher.annotation.Description
|
|||||||
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.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
import app.revanced.patcher.extensions.removeInstructions
|
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
||||||
import app.revanced.patcher.patch.annotations.Dependencies
|
import app.revanced.patcher.patch.annotations.Dependencies
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
@@ -15,18 +13,12 @@ import app.revanced.patcher.patch.impl.BytecodePatch
|
|||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.util.smali.toBuilderInstruction
|
|
||||||
import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility
|
import app.revanced.patches.youtube.ad.infocardsuggestions.annotations.HideInfocardSuggestionsCompatibility
|
||||||
import app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints.HideInfocardSuggestionsFingerprint
|
import app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints.HideInfocardSuggestionsFingerprint
|
||||||
import app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints.HideInfocardSuggestionsParentFingerprint
|
import app.revanced.patches.youtube.ad.infocardsuggestions.fingerprints.HideInfocardSuggestionsParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
||||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Dependencies(dependencies = [IntegrationsPatch::class])
|
@Dependencies(dependencies = [IntegrationsPatch::class])
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"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")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"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")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.autorepeat.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.24.35", "17.25.34", "17.26.35")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class AutoRepeatCompatibility
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.autorepeat.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
@Name("auto-repeat-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Laamp;", "ae"
|
||||||
|
)
|
||||||
|
@FuzzyPatternScanMethod(2)
|
||||||
|
@AutoRepeatCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
//Finds method:
|
||||||
|
/*
|
||||||
|
public final void ae() {
|
||||||
|
aq(aabj.ENDED);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
object AutoRepeatFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 }
|
||||||
|
)
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.autorepeat.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
@Name("auto-repeat-parent-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Laamp;", "E"
|
||||||
|
)
|
||||||
|
@FuzzyPatternScanMethod(2)
|
||||||
|
@AutoRepeatCompatibility
|
||||||
|
@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(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
listOf("play() called when the player wasn't loaded.", "play() blocked because Background Playability failed"),
|
||||||
|
null
|
||||||
|
)
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.autorepeat.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Dependencies
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.autorepeat.fingerprints.AutoRepeatFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.autorepeat.fingerprints.AutoRepeatParentFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
|
||||||
|
@Patch(include = false)
|
||||||
|
@Dependencies(dependencies = [IntegrationsPatch::class])
|
||||||
|
@Name("autorepeat-by-default")
|
||||||
|
@Description("Enables auto repeating of videos by default.")
|
||||||
|
@AutoRepeatCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class AutoRepeatPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
AutoRepeatParentFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
//Get Result from the ParentFingerprint which is the playMethod we need to get.
|
||||||
|
val parentResult = AutoRepeatParentFingerprint.result
|
||||||
|
?: return PatchResultError("ParentFingerprint did not resolve.")
|
||||||
|
|
||||||
|
//this one needs to be called when app/revanced/integrations/patches/AutoRepeatPatch;->shouldAutoRepeat() returns true
|
||||||
|
val playMethod = parentResult.mutableMethod
|
||||||
|
AutoRepeatFingerprint.resolve(data, parentResult.classDef)
|
||||||
|
//String is: Laamp;->E()V
|
||||||
|
val methodToCall = playMethod.definingClass + "->" + playMethod.name + "()V";
|
||||||
|
|
||||||
|
//This is the method we search for
|
||||||
|
val result = AutoRepeatFingerprint.result
|
||||||
|
?: return PatchResultError("FingerPrint did not resolve.")
|
||||||
|
val method = result.mutableMethod
|
||||||
|
|
||||||
|
//Instructions to add to the smali code
|
||||||
|
val instructions = """
|
||||||
|
invoke-static {}, Lapp/revanced/integrations/patches/AutoRepeatPatch;->shouldAutoRepeat()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :noautorepeat
|
||||||
|
const/4 v0, 0x0
|
||||||
|
invoke-virtual {}, $methodToCall
|
||||||
|
:noautorepeat
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
|
||||||
|
//Get the implementation so we can do a check for null and get instructions size.
|
||||||
|
val implementation = method.implementation
|
||||||
|
?: return PatchResultError("No Method Implementation found!")
|
||||||
|
|
||||||
|
//Since addInstructions needs an index which starts counting at 0 and size starts counting at 1,
|
||||||
|
//we have to remove 1 to get the latest instruction
|
||||||
|
val index = implementation.instructions.size-1
|
||||||
|
|
||||||
|
|
||||||
|
//remove last instruction which is return-void
|
||||||
|
method.removeInstruction(index)
|
||||||
|
// Add our own instructions there
|
||||||
|
method.addInstructions(index, instructions)
|
||||||
|
|
||||||
|
//Everything worked as expected, return Success
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ import kotlin.io.path.exists
|
|||||||
dependencies = [FixLocaleConfigErrorPatch::class]
|
dependencies = [FixLocaleConfigErrorPatch::class]
|
||||||
)
|
)
|
||||||
@Name("premium-heading")
|
@Name("premium-heading")
|
||||||
@Description("Show the premium branding on the the YouTube home screen.")
|
@Description("Shows premium branding on the YouTube home screen.")
|
||||||
@PremiumHeadingCompatibility
|
@PremiumHeadingCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class PremiumHeadingPatch : ResourcePatch() {
|
class PremiumHeadingPatch : ResourcePatch() {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.nio.file.Files
|
|||||||
dependencies = [FixLocaleConfigErrorPatch::class]
|
dependencies = [FixLocaleConfigErrorPatch::class]
|
||||||
)
|
)
|
||||||
@Name("custom-branding")
|
@Name("custom-branding")
|
||||||
@Description("Change the branding of YouTube.")
|
@Description("Changes the branding of YouTube.")
|
||||||
@CustomBrandingCompatibility
|
@CustomBrandingCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class CustomBrandingPatch : ResourcePatch() {
|
class CustomBrandingPatch : ResourcePatch() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"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")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"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")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"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")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone
|
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
|
||||||
@@ -7,6 +7,7 @@ import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMetho
|
|||||||
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.reels.annotations.HideReelsCompatibility
|
||||||
|
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
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ import org.jf.dexlib2.Opcode
|
|||||||
"Ljkg;", "i"
|
"Ljkg;", "i"
|
||||||
)
|
)
|
||||||
@DirectPatternScanMethod
|
@DirectPatternScanMethod
|
||||||
@HideReelsCompatibility
|
@WideSearchbarCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone
|
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
|
||||||
@@ -7,6 +7,7 @@ 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.patches.youtube.layout.reels.annotations.HideReelsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("wide-searchbar-methodone-parent-fingerprint")
|
@Name("wide-searchbar-methodone-parent-fingerprint")
|
||||||
@@ -14,7 +15,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
"Ljkg;", "l"
|
"Ljkg;", "l"
|
||||||
)
|
)
|
||||||
@FuzzyPatternScanMethod(3)
|
@FuzzyPatternScanMethod(3)
|
||||||
@HideReelsCompatibility
|
@WideSearchbarCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo
|
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
|
||||||
@@ -7,6 +7,7 @@ import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMetho
|
|||||||
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.reels.annotations.HideReelsCompatibility
|
||||||
|
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
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ import org.jf.dexlib2.Opcode
|
|||||||
"Lkrf;", "h"
|
"Lkrf;", "h"
|
||||||
)
|
)
|
||||||
@DirectPatternScanMethod
|
@DirectPatternScanMethod
|
||||||
@HideReelsCompatibility
|
@WideSearchbarCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo
|
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
|
||||||
@@ -7,6 +7,7 @@ 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.patches.youtube.layout.reels.annotations.HideReelsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("wide-searchbar-methodtwo-parent-fingerprint")
|
@Name("wide-searchbar-methodtwo-parent-fingerprint")
|
||||||
@@ -14,7 +15,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
"Lkrf;", "i"
|
"Lkrf;", "i"
|
||||||
)
|
)
|
||||||
@FuzzyPatternScanMethod(3)
|
@FuzzyPatternScanMethod(3)
|
||||||
@HideReelsCompatibility
|
@WideSearchbarCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -14,10 +14,10 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone.WideSearchbarOneFingerprint
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarOneFingerprint
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone.WideSearchbarOneParentFingerprint
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarOneParentFingerprint
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo.WideSearchbarTwoFingerprint
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarTwoFingerprint
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo.WideSearchbarTwoParentFingerprint
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarTwoParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
|
||||||
@Patch(include = false)
|
@Patch(include = false)
|
||||||
@@ -39,7 +39,7 @@ class WideSearchbarPatch : BytecodePatch(
|
|||||||
|
|
||||||
//This should be the method aF in class fbn
|
//This should be the method aF in class fbn
|
||||||
val targetMethodOne =
|
val targetMethodOne =
|
||||||
data.toMethodWalker(resultOne!!.method).nextMethod(resultOne!!.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
|
data.toMethodWalker(resultOne!!.method).nextMethod(resultOne.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
|
||||||
|
|
||||||
//Since both methods have the same smali code, inject instructions using a method.
|
//Since both methods have the same smali code, inject instructions using a method.
|
||||||
addInstructions(targetMethodOne)
|
addInstructions(targetMethodOne)
|
||||||
@@ -48,7 +48,7 @@ class WideSearchbarPatch : BytecodePatch(
|
|||||||
|
|
||||||
//This should be the method aB in class fbn
|
//This should be the method aB in class fbn
|
||||||
val targetMethodTwo =
|
val targetMethodTwo =
|
||||||
data.toMethodWalker(resultTwo!!.method).nextMethod(resultTwo!!.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
data.toMethodWalker(resultTwo!!.method).nextMethod(resultTwo.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
||||||
|
|
||||||
//Since both methods have the same smali code, inject instructions using a method.
|
//Since both methods have the same smali code, inject instructions using a method.
|
||||||
addInstructions(targetMethodTwo)
|
addInstructions(targetMethodTwo)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34","17.25.34")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
package app.revanced.patches.youtube.misc.hdrbrightness.patch;
|
package app.revanced.patches.youtube.misc.hdrbrightness.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.Version;
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
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.patcher.util.smali.toBuilderInstruction
|
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility;
|
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.fingerprints.HDRBrightnessFingerprint
|
import app.revanced.patches.youtube.misc.hdrbrightness.fingerprints.HDRBrightnessFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@@ -35,7 +32,7 @@ class HDRBrightnessPatch : BytecodePatch(
|
|||||||
|
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
//Get the index here so we know where to inject our code to override -1.0f
|
//Get the index here, so we know where to inject our code to override -1.0f
|
||||||
val index = method.implementation!!.instructions.indexOfFirst { ((it as? NarrowLiteralInstruction)?.narrowLiteral == (-1.0f).toRawBits()) }
|
val index = method.implementation!!.instructions.indexOfFirst { ((it as? NarrowLiteralInstruction)?.narrowLiteral == (-1.0f).toRawBits()) }
|
||||||
val register = (method.implementation!!.instructions.get(index) as OneRegisterInstruction).registerA
|
val register = (method.implementation!!.instructions.get(index) as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[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")
|
"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")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34","17.24.35","17.25.34")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
Reference in New Issue
Block a user