mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-24 03:01:03 +00:00
Compare commits
2 Commits
v2.196.1-d
...
v2.196.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c38ffb45fb | ||
|
|
f933d2c537 |
83
CHANGELOG.md
83
CHANGELOG.md
@@ -1,86 +1,3 @@
|
|||||||
## [2.196.1-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.5...v2.196.1-dev.6) (2023-11-11)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **YouTube - Client spoof:** Fix low resolution precise seeking thumbnails ([#3249](https://github.com/ReVanced/revanced-patches/issues/3249)) ([0cb41ef](https://github.com/ReVanced/revanced-patches/commit/0cb41efa067d74b873167718b25893cb2e1dd240))
|
|
||||||
|
|
||||||
## [2.196.1-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.4...v2.196.1-dev.5) (2023-11-10)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **Remove screenshot restriction:** Improve reliability ([#2938](https://github.com/ReVanced/revanced-patches/issues/2938)) ([6b7cb7b](https://github.com/ReVanced/revanced-patches/commit/6b7cb7bd38348dbe4a56385356df6ed97e81c319))
|
|
||||||
|
|
||||||
## [2.196.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.3...v2.196.1-dev.4) (2023-11-09)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **YouTube - SponsorBlock:** Rename "Preview/Recap" category to "Preview/Recap/Hook" ([#3245](https://github.com/ReVanced/revanced-patches/issues/3245)) ([2cd2453](https://github.com/ReVanced/revanced-patches/commit/2cd2453658622f369b6449d5c8c33326384c2679))
|
|
||||||
|
|
||||||
## [2.196.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.2...v2.196.1-dev.3) (2023-11-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **Nyx Music Plaer - Unlock pro:** Constrain to last working version ([96d24a3](https://github.com/ReVanced/revanced-patches/commit/96d24a3e2ef6bd323aa44a05aaf122683898e90a))
|
|
||||||
|
|
||||||
## [2.196.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.1...v2.196.1-dev.2) (2023-11-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **YouTube:** Rename `Restore old seekbar thumbnails` and `Restore old quality menu` ([#3235](https://github.com/ReVanced/revanced-patches/issues/3235)) ([7e3ffc8](https://github.com/ReVanced/revanced-patches/commit/7e3ffc88631da47a032cb29a4a30fd8f5679542d))
|
|
||||||
|
|
||||||
## [2.196.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.196.0...v2.196.1-dev.1) (2023-11-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **YouTube - Theme:** Use consistent patch option descriptions ([#3231](https://github.com/ReVanced/revanced-patches/issues/3231)) ([c84a940](https://github.com/ReVanced/revanced-patches/commit/c84a94075ecba11e826f0b311283ef530563fe93))
|
|
||||||
|
|
||||||
# [2.196.0](https://github.com/ReVanced/revanced-patches/compare/v2.195.0...v2.196.0) (2023-11-04)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **YouTube - Announcements:** Do not end descriptions with punctuation ([17e414d](https://github.com/ReVanced/revanced-patches/commit/17e414d32b41b66441382d123aa4c16c2547f2c9))
|
|
||||||
* **YouTube - Custom branding:** Set default values for patch options ([2ba31f1](https://github.com/ReVanced/revanced-patches/commit/2ba31f13012284f4ae9d556cbaa01dc128f193df))
|
|
||||||
* **YouTube - Player flyout menu:** Restore functionality ([#3163](https://github.com/ReVanced/revanced-patches/issues/3163)) ([b5e63c1](https://github.com/ReVanced/revanced-patches/commit/b5e63c11ab21a89e912dd41e307631f479e0ba96))
|
|
||||||
* **YouTube - ReturnYouTubeDislike:** Fix RYD prefetching home feed Shorts ([#3195](https://github.com/ReVanced/revanced-patches/issues/3195)) ([f3726fe](https://github.com/ReVanced/revanced-patches/commit/f3726fefb9a80cccbf12f3ec455d1720b385782e))
|
|
||||||
* **YouTube - Theme:** Fix patch error ([e6fe646](https://github.com/ReVanced/revanced-patches/commit/e6fe646a7f2ade5f24c0142ad44032ccaf2cc9d0))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **Digitales Amt:** Bump compatibility to `3.0.2` ([#3217](https://github.com/ReVanced/revanced-patches/issues/3217)) ([79a1571](https://github.com/ReVanced/revanced-patches/commit/79a1571dd674d0cdaae7d00da74b59376ef1550b))
|
|
||||||
* **ID Austria:** Constrain compatibility to last working version ([#3196](https://github.com/ReVanced/revanced-patches/issues/3196)) ([79a2416](https://github.com/ReVanced/revanced-patches/commit/79a24164193460acf1b7bac43abdfa2604b02679))
|
|
||||||
* **Sony Headphones Connect - Remove notification badge:** Constrain to last working version ([4a7d189](https://github.com/ReVanced/revanced-patches/commit/4a7d18962d85382f358de774d5b2bcc3ab7f4a1a))
|
|
||||||
* **YouTube - Announcements:** Clarify announcements origin ([03bb7d3](https://github.com/ReVanced/revanced-patches/commit/03bb7d3cff419c5214cf5bc0e5298e612b678d98))
|
|
||||||
* **YouTube - Announcements:** Clarify announcements origin in patch description ([#3175](https://github.com/ReVanced/revanced-patches/issues/3175)) ([0a04500](https://github.com/ReVanced/revanced-patches/commit/0a0450075a6af913de0c8b414103e491e5ff8e72))
|
|
||||||
* **YouTube - Client spoof:** Update current video id ([9937b8f](https://github.com/ReVanced/revanced-patches/commit/9937b8fc7e7df6c850073da6faeeb70f82977cd1))
|
|
||||||
* **YouTube - Disable precise seeking gesture:** Use better patch name ([88cce59](https://github.com/ReVanced/revanced-patches/commit/88cce592adde46bc2811596772c03d275352be4b))
|
|
||||||
* **YouTube - Hide layout components:** Hide video quality menu footer ([0f9e6e7](https://github.com/ReVanced/revanced-patches/commit/0f9e6e751fe4822c92afd7176e6be67d1afe566f))
|
|
||||||
* **YouTube - Theme:** Add set of light and dark themes to chose from ([cf6006c](https://github.com/ReVanced/revanced-patches/commit/cf6006cc83909b60acaad374ddaac5de902eb604))
|
|
||||||
* **YouTube - Theme:** Improve patch option descriptions ([5d3008a](https://github.com/ReVanced/revanced-patches/commit/5d3008a5afa8961a04ce09782574a4c19343951b))
|
|
||||||
* **YouTube:** Add `Disable fullscreen ambient mode` patch ([2a5514a](https://github.com/ReVanced/revanced-patches/commit/2a5514a6b3df076d5bc2cdc4459df30bca18f396))
|
|
||||||
* **YouTube:** Add `Disable suggested video end screen` patch ([09f1684](https://github.com/ReVanced/revanced-patches/commit/09f168406c36fb71e12c6c1875a765a86ec2b4f9))
|
|
||||||
* **YouTube:** Add `Enable old seekbar thumbnails` patch ([e97e0e6](https://github.com/ReVanced/revanced-patches/commit/e97e0e6631f64e12b8d45d8cacbc059d5fc72e0c))
|
|
||||||
|
|
||||||
|
|
||||||
### Reverts
|
|
||||||
|
|
||||||
* Revert "fix(YouTube - Minimized playback): Fix pip incorrectly showing for Short playback (#3170)" ([4179b16](https://github.com/ReVanced/revanced-patches/commit/4179b166bbdfbe98cc368f4a7ad17419e1b469a9)), closes [#3170](https://github.com/ReVanced/revanced-patches/issues/3170)
|
|
||||||
|
|
||||||
# [2.196.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.13...v2.196.0-dev.14) (2023-11-04)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **Digitales Amt:** Bump compatibility to `3.0.2` ([#3217](https://github.com/ReVanced/revanced-patches/issues/3217)) ([79a1571](https://github.com/ReVanced/revanced-patches/commit/79a1571dd674d0cdaae7d00da74b59376ef1550b))
|
|
||||||
* **Sony Headphones Connect - Remove notification badge:** Constrain to last working version ([4a7d189](https://github.com/ReVanced/revanced-patches/commit/4a7d18962d85382f358de774d5b2bcc3ab7f4a1a))
|
|
||||||
|
|
||||||
# [2.196.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.13...v2.196.0-dev.14) (2023-11-04)
|
# [2.196.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.13...v2.196.0-dev.14) (2023-11-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.196.1-dev.6
|
version = 2.196.0-dev.14
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,19 +1,14 @@
|
|||||||
package app.revanced.patches.all.screenshot.removerestriction
|
package app.revanced.patches.all.screenshot.removerestriction
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||||
import app.revanced.util.patch.IMethodCall
|
import app.revanced.util.patch.IMethodCall
|
||||||
import app.revanced.util.patch.Instruction35cInfo
|
import app.revanced.util.patch.Instruction35cInfo
|
||||||
import app.revanced.util.patch.filterMapInstruction35c
|
import app.revanced.util.patch.filterMapInstruction35c
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Remove screenshot restriction",
|
name = "Remove screenshot restriction",
|
||||||
@@ -27,11 +22,6 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
|
|||||||
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
super.execute(context)
|
|
||||||
ModifyLayoutParamsFlags().execute(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun filterMap(
|
override fun filterMap(
|
||||||
classDef: ClassDef,
|
classDef: ClassDef,
|
||||||
method: Method,
|
method: Method,
|
||||||
@@ -56,12 +46,6 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
|
|||||||
override val methodParams: Array<String>,
|
override val methodParams: Array<String>,
|
||||||
override val returnType: String
|
override val returnType: String
|
||||||
): IMethodCall {
|
): IMethodCall {
|
||||||
AddFlags(
|
|
||||||
"Landroid/view/Window;",
|
|
||||||
"addFlags",
|
|
||||||
arrayOf("I"),
|
|
||||||
"V",
|
|
||||||
),
|
|
||||||
SetFlags(
|
SetFlags(
|
||||||
"Landroid/view/Window;",
|
"Landroid/view/Window;",
|
||||||
"setFlags",
|
"setFlags",
|
||||||
@@ -70,37 +54,3 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ModifyLayoutParamsFlags : AbstractTransformInstructionsPatch<Pair<Instruction22c, Int>>() {
|
|
||||||
override fun filterMap(
|
|
||||||
classDef: ClassDef,
|
|
||||||
method: Method,
|
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
): Pair<Instruction22c, Int>? {
|
|
||||||
if (instruction.opcode != Opcode.IPUT) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
val instruction22c = instruction as Instruction22c
|
|
||||||
val fieldReference = instruction22c.reference as FieldReference
|
|
||||||
|
|
||||||
if (fieldReference.definingClass != "Landroid/view/WindowManager\$LayoutParams;"
|
|
||||||
|| fieldReference.name != "flags"
|
|
||||||
|| fieldReference.type != "I") {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return Pair(instruction22c, instructionIndex)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun transform(mutableMethod: MutableMethod, entry: Pair<Instruction22c, Int>) {
|
|
||||||
val (instruction, index) = entry
|
|
||||||
val register = instruction.registerA
|
|
||||||
|
|
||||||
mutableMethod.addInstructions(
|
|
||||||
index,
|
|
||||||
"and-int/lit16 v$register, v$register, -0x2001"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Unlock pro",
|
name = "Unlock pro",
|
||||||
compatiblePackages = [CompatiblePackage("com.awedea.nyx", ["2.2.7"])]
|
compatiblePackages = [CompatiblePackage("com.awedea.nyx")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object UnlockProPatch : BytecodePatch(setOf(CheckProFingerprint)) {
|
object UnlockProPatch : BytecodePatch(setOf(CheckProFingerprint)) {
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.youtube.layout.seekbar.fingerprints.FullscreenSeekbarThumbnailsFingerprint
|
import app.revanced.patches.youtube.layout.seekbar.fingerprints.EnableNewSeekbarThumbnailsFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Restore old seekbar thumbnails",
|
name = "Enable old seekbar thumbnails",
|
||||||
description = "Restores the old seekbar thumbnails that appear above the seekbar instead of fullscreen thumbnails.",
|
description = "Enables the old seekbar thumbnails that appear above the seekbar instead of in fullscreen.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -27,38 +27,38 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RestoreOldSeekbarThumbnailsPatch : BytecodePatch(
|
object EnableOldSeekbarThumbnailsPatch : BytecodePatch(
|
||||||
setOf(FullscreenSeekbarThumbnailsFingerprint)
|
setOf(EnableNewSeekbarThumbnailsFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/RestoreOldSeekbarThumbnailsPatch;"
|
"Lapp/revanced/integrations/patches/EnableOldSeekbarThumbnailsPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_restore_old_seekbar_thumbnails",
|
"revanced_enable_old_seekbar_thumbnails",
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_restore_old_seekbar_thumbnails_title",
|
"revanced_enable_old_seekbar_thumbnails_title",
|
||||||
"Restore old seekbar thumbnails"
|
"Enable old seekbar thumbnails"
|
||||||
),
|
),
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_restore_old_seekbar_thumbnails_summary_on",
|
"revanced_enable_old_seekbar_thumbnails_summary_on",
|
||||||
"Seekbar thumbnails will appear above the seekbar"
|
"Seekbar thumbnails will appear above the seekbar"
|
||||||
),
|
),
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_restore_old_seekbar_thumbnails_summary_off",
|
"revanced_enable_old_seekbar_thumbnails_summary_off",
|
||||||
"Seekbar thumbnails will appear in fullscreen"
|
"Seekbar thumbnails will appear in fullscreen"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
FullscreenSeekbarThumbnailsFingerprint.result?.mutableMethod?.apply {
|
EnableNewSeekbarThumbnailsFingerprint.result?.mutableMethod?.apply {
|
||||||
val moveResultIndex = getInstructions().lastIndex - 1
|
val moveResultIndex = getInstructions().lastIndex - 1
|
||||||
|
|
||||||
addInstruction(
|
addInstruction(
|
||||||
moveResultIndex,
|
moveResultIndex,
|
||||||
"invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->useFullscreenSeekbarThumbnails()Z"
|
"invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->enableOldSeekbarThumbnails()Z"
|
||||||
)
|
)
|
||||||
} ?: throw FullscreenSeekbarThumbnailsFingerprint.exception
|
} ?: throw EnableNewSeekbarThumbnailsFingerprint.exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
|||||||
import app.revanced.util.patch.LiteralValueFingerprint
|
import app.revanced.util.patch.LiteralValueFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object FullscreenSeekbarThumbnailsFingerprint : LiteralValueFingerprint(
|
object EnableNewSeekbarThumbnailsFingerprint : LiteralValueFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters = emptyList(),
|
parameters = emptyList(),
|
||||||
@@ -82,7 +82,7 @@ object ThemeBytecodePatch : BytecodePatch(
|
|||||||
"Light red" to "#FFFFD6D6"
|
"Light red" to "#FFFFD6D6"
|
||||||
),
|
),
|
||||||
title = "Light theme background color",
|
title = "Light theme background color",
|
||||||
description = "Can be a hex color (#AARRGGBB) or a color resource reference.",
|
description = "Can be a hex color or a color resource reference.",
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
||||||
import app.revanced.patches.youtube.video.playerresponse.PlayerResponseMethodHookPatch
|
import app.revanced.patches.youtube.video.playerresponse.PlayerResponseMethodHookPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
description = "Spoofs the signature to prevent playback issues.",
|
description = "Spoofs the signature to prevent playback issues.",
|
||||||
@@ -27,19 +26,14 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
PlayerTypeHookPatch::class,
|
PlayerTypeHookPatch::class,
|
||||||
PlayerResponseMethodHookPatch::class,
|
PlayerResponseMethodHookPatch::class,
|
||||||
VideoInformationPatch::class,
|
VideoInformationPatch::class,
|
||||||
SpoofSignatureResourcePatch::class
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
object SpoofSignaturePatch : BytecodePatch(
|
object SpoofSignaturePatch : BytecodePatch(
|
||||||
setOf(
|
setOf(
|
||||||
PlayerResponseModelImplGeneralFingerprint,
|
PlayerResponseModelImplFingerprint,
|
||||||
PlayerResponseModelImplLiveStreamFingerprint,
|
|
||||||
PlayerResponseModelImplRecommendedLevel,
|
|
||||||
StoryboardRendererSpecFingerprint,
|
|
||||||
StoryboardRendererDecoderSpecFingerprint,
|
|
||||||
StoryboardRendererDecoderRecommendedLevelFingerprint,
|
|
||||||
StoryboardThumbnailParentFingerprint,
|
StoryboardThumbnailParentFingerprint,
|
||||||
ScrubbedPreviewLayoutFingerprint,
|
StoryboardRendererSpecFingerprint,
|
||||||
|
StoryboardRendererInitFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
@@ -89,18 +83,6 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
"App signature not spoofed for feed videos\\n\\n"
|
"App signature not spoofed for feed videos\\n\\n"
|
||||||
+ "Feed videos will play for less than 1 minute before encountering playback issues"
|
+ "Feed videos will play for less than 1 minute before encountering playback issues"
|
||||||
)
|
)
|
||||||
),
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_spoof_storyboard",
|
|
||||||
StringResource("revanced_spoof_storyboard_title", "Spoof storyboard"),
|
|
||||||
StringResource("revanced_spoof_storyboard_summary_on", "Storyboard spoofed"),
|
|
||||||
StringResource(
|
|
||||||
"revanced_spoof_storyboard_summary_off",
|
|
||||||
"Storyboard not spoofed\\n\\n"
|
|
||||||
+ "Side effects include:\\n"
|
|
||||||
+ "• No ambient mode\\n"
|
|
||||||
+ "• Seekbar thumbnails are hidden"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -112,8 +94,7 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Force the seekbar time and chapters to always show up.
|
// Force the seekbar time and chapters to always show up.
|
||||||
// This is used if the storyboard spec fetch fails, for viewing paid videos,
|
// This is used only if the storyboard spec fetch fails, or when viewing paid videos.
|
||||||
// or if storyboard spoofing is turned off.
|
|
||||||
StoryboardThumbnailParentFingerprint.result?.classDef?.let { classDef ->
|
StoryboardThumbnailParentFingerprint.result?.classDef?.let { classDef ->
|
||||||
StoryboardThumbnailFingerprint.also {
|
StoryboardThumbnailFingerprint.also {
|
||||||
it.resolve(
|
it.resolve(
|
||||||
@@ -143,74 +124,23 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
} ?: throw StoryboardThumbnailFingerprint.exception
|
} ?: throw StoryboardThumbnailFingerprint.exception
|
||||||
}
|
}
|
||||||
|
|
||||||
// If storyboard spoofing is turned off, then hide the empty seekbar thumbnail view.
|
|
||||||
ScrubbedPreviewLayoutFingerprint.result?.apply {
|
|
||||||
val endIndex = scanResult.patternScanResult!!.endIndex
|
|
||||||
mutableMethod.apply {
|
|
||||||
val imageViewFieldName = getInstruction<ReferenceInstruction>(endIndex).reference
|
|
||||||
addInstructions(
|
|
||||||
implementation!!.instructions.lastIndex,
|
|
||||||
"""
|
|
||||||
iget-object v0, p0, $imageViewFieldName # copy imageview field to a register
|
|
||||||
invoke-static {v0}, $INTEGRATIONS_CLASS_DESCRIPTOR->seekbarImageViewCreated(Landroid/widget/ImageView;)V
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} ?: throw ScrubbedPreviewLayoutFingerprint.exception
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook StoryBoard renderer url
|
* Hook StoryBoard renderer url
|
||||||
*/
|
*/
|
||||||
arrayOf(
|
PlayerResponseModelImplFingerprint.result?.let {
|
||||||
PlayerResponseModelImplGeneralFingerprint,
|
it.mutableMethod.apply {
|
||||||
PlayerResponseModelImplLiveStreamFingerprint
|
val getStoryBoardIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
).forEach { fingerprint ->
|
val getStoryBoardRegister = getInstruction<OneRegisterInstruction>(getStoryBoardIndex).registerA
|
||||||
fingerprint.result?.let {
|
|
||||||
it.mutableMethod.apply {
|
|
||||||
val getStoryBoardIndex = it.scanResult.patternScanResult!!.endIndex
|
|
||||||
val getStoryBoardRegister =
|
|
||||||
getInstruction<OneRegisterInstruction>(getStoryBoardIndex).registerA
|
|
||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
getStoryBoardIndex,
|
getStoryBoardIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static { v$getStoryBoardRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getStoryboardRendererSpec(Ljava/lang/String;)Ljava/lang/String;
|
invoke-static { v$getStoryBoardRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getStoryboardRendererSpec(Ljava/lang/String;)Ljava/lang/String;
|
||||||
move-result-object v$getStoryBoardRegister
|
move-result-object v$getStoryBoardRegister
|
||||||
"""
|
"""
|
||||||
)
|
|
||||||
}
|
|
||||||
} ?: throw fingerprint.exception
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hook recommended seekbar thumbnails quality level.
|
|
||||||
StoryboardRendererDecoderRecommendedLevelFingerprint.result?.let {
|
|
||||||
val moveOriginalRecommendedValueIndex = it.scanResult.patternScanResult!!.endIndex
|
|
||||||
val originalValueRegister = it.mutableMethod
|
|
||||||
.getInstruction<OneRegisterInstruction>(moveOriginalRecommendedValueIndex).registerA
|
|
||||||
|
|
||||||
it.mutableMethod.addInstructions(
|
|
||||||
moveOriginalRecommendedValueIndex + 1, """
|
|
||||||
invoke-static { v$originalValueRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getRecommendedLevel(I)I
|
|
||||||
move-result v$originalValueRegister
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
} ?: throw StoryboardRendererDecoderRecommendedLevelFingerprint.exception
|
|
||||||
|
|
||||||
// Hook the recommended precise seeking thumbnails quality level.
|
|
||||||
PlayerResponseModelImplRecommendedLevel.result?.let {
|
|
||||||
it.mutableMethod.apply {
|
|
||||||
val moveOriginalRecommendedValueIndex = it.scanResult.patternScanResult!!.endIndex
|
|
||||||
val originalValueRegister =
|
|
||||||
getInstruction<OneRegisterInstruction>(moveOriginalRecommendedValueIndex).registerA
|
|
||||||
|
|
||||||
addInstructions(
|
|
||||||
moveOriginalRecommendedValueIndex, """
|
|
||||||
invoke-static { v$originalValueRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getRecommendedLevel(I)I
|
|
||||||
move-result v$originalValueRegister
|
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: throw PlayerResponseModelImplRecommendedLevel.exception
|
} ?: throw PlayerResponseModelImplFingerprint.exception
|
||||||
|
|
||||||
StoryboardRendererSpecFingerprint.result?.let {
|
StoryboardRendererSpecFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
@@ -228,18 +158,22 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
} ?: throw StoryboardRendererSpecFingerprint.exception
|
} ?: throw StoryboardRendererSpecFingerprint.exception
|
||||||
|
|
||||||
// Hook the seekbar thumbnail decoder and use a NULL spec for live streams.
|
// Hook recommended value
|
||||||
StoryboardRendererDecoderSpecFingerprint.result?.let {
|
StoryboardRendererInitFingerprint.result?.let {
|
||||||
val storyBoardUrlIndex = it.scanResult.patternScanResult!!.startIndex + 1
|
val moveOriginalRecommendedValueIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
val storyboardUrlRegister =
|
|
||||||
it.mutableMethod.getInstruction<OneRegisterInstruction>(storyBoardUrlIndex).registerA
|
|
||||||
|
|
||||||
it.mutableMethod.addInstructions(
|
val originalValueRegister = it.mutableMethod
|
||||||
storyBoardUrlIndex + 1, """
|
.getInstruction<OneRegisterInstruction>(moveOriginalRecommendedValueIndex).registerA
|
||||||
invoke-static { v$storyboardUrlRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getStoryboardDecoderRendererSpec(Ljava/lang/String;)Ljava/lang/String;
|
|
||||||
move-result-object v$storyboardUrlRegister
|
it.mutableMethod.apply {
|
||||||
"""
|
addInstructions(
|
||||||
)
|
moveOriginalRecommendedValueIndex + 1,
|
||||||
} ?: throw StoryboardRendererDecoderSpecFingerprint.exception
|
"""
|
||||||
|
invoke-static { v$originalValueRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getRecommendedLevel(I)I
|
||||||
|
move-result v$originalValueRegister
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: throw StoryboardRendererInitFingerprint.exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|
||||||
|
|
||||||
@Patch(dependencies = [SettingsPatch::class, ResourceMappingPatch::class])
|
|
||||||
object SpoofSignatureResourcePatch : ResourcePatch() {
|
|
||||||
internal var scrubbedPreviewThumbnailResourceId: Long = -1
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
scrubbedPreviewThumbnailResourceId = ResourceMappingPatch.resourceMappings.single {
|
|
||||||
it.type == "id" && it.name == "thumbnail"
|
|
||||||
}.id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object PlayerResponseModelImplGeneralFingerprint : MethodFingerprint(
|
object PlayerResponseModelImplFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/String;",
|
returnType = "Ljava/lang/String;",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters = emptyList(),
|
parameters = emptyList(),
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.extensions.containsWideLiteralInstructionValue
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object PlayerResponseModelImplLiveStreamFingerprint : MethodFingerprint(
|
|
||||||
returnType = "Ljava/lang/String;",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
parameters = emptyList(),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.RETURN_OBJECT,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.RETURN_OBJECT
|
|
||||||
),
|
|
||||||
customFingerprint = handler@{ methodDef, _ ->
|
|
||||||
if (!methodDef.definingClass.endsWith("/PlayerResponseModelImpl;")) return@handler false
|
|
||||||
|
|
||||||
methodDef.containsWideLiteralInstructionValue(70276274)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.extensions.containsWideLiteralInstructionValue
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object PlayerResponseModelImplRecommendedLevel : MethodFingerprint(
|
|
||||||
returnType = "I",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
parameters = emptyList(),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IGET,
|
|
||||||
Opcode.RETURN
|
|
||||||
),
|
|
||||||
customFingerprint = handler@{ methodDef, _ ->
|
|
||||||
if (!methodDef.definingClass.endsWith("/PlayerResponseModelImpl;")) return@handler false
|
|
||||||
|
|
||||||
methodDef.containsWideLiteralInstructionValue(55735497)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patches.youtube.misc.fix.playback.SpoofSignatureResourcePatch
|
|
||||||
import app.revanced.util.patch.LiteralValueFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object ScrubbedPreviewLayoutFingerprint : LiteralValueFingerprint(
|
|
||||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
|
||||||
returnType = "V",
|
|
||||||
parameters = listOf("Landroid/content/Context;", "Landroid/util/AttributeSet;", "I", "I"),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.CONST,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CHECK_CAST,
|
|
||||||
Opcode.IPUT_OBJECT, // preview imageview
|
|
||||||
),
|
|
||||||
// This resource is used in ~ 40 different locations, but this method has a distinct list of parameters to match to.
|
|
||||||
literalSupplier = { SpoofSignatureResourcePatch.scrubbedPreviewThumbnailResourceId }
|
|
||||||
)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolves to the same method as [StoryboardRendererDecoderSpecFingerprint].
|
|
||||||
*/
|
|
||||||
object StoryboardRendererDecoderRecommendedLevelFingerprint : MethodFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
parameters = listOf("Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.IPUT_OBJECT,
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
|
||||||
Opcode.MOVE_RESULT
|
|
||||||
),
|
|
||||||
strings = listOf("#-1#")
|
|
||||||
)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolves to the same method as [StoryboardRendererDecoderRecommendedLevelFingerprint].
|
|
||||||
*/
|
|
||||||
object StoryboardRendererDecoderSpecFingerprint : MethodFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
parameters = listOf("Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.INVOKE_INTERFACE, // First instruction of the method.
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.IF_NEZ,
|
|
||||||
),
|
|
||||||
strings = listOf("#-1#")
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object StoryboardRendererInitFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf("#-1#"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -13,11 +13,11 @@ import app.revanced.patches.youtube.video.videoqualitymenu.fingerprints.VideoQua
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Restore old video quality menu",
|
name = "Old video quality menu",
|
||||||
description = "Restores the old video quality with advanced video quality options.",
|
description = "Shows the old video quality with the advanced video quality options instead of the new one.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
RestoreOldVideoQualityMenuResourcePatch::class,
|
OldVideoQualityMenuResourcePatch::class,
|
||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
RecyclerViewTreeHookPatch::class
|
RecyclerViewTreeHookPatch::class
|
||||||
],
|
],
|
||||||
@@ -36,14 +36,14 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RestoreOldVideoQualityMenuPatch : BytecodePatch(
|
object OldVideoQualityMenuPatch : BytecodePatch(
|
||||||
setOf(VideoQualityMenuViewInflateFingerprint)
|
setOf(VideoQualityMenuViewInflateFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/VideoQualityMenuFilterPatch;"
|
"Lapp/revanced/integrations/patches/components/VideoQualityMenuFilterPatch;"
|
||||||
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/playback/quality/RestoreOldVideoQualityMenuPatch;"
|
"Lapp/revanced/integrations/patches/playback/quality/OldVideoQualityMenuPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// region Patch for the old type of the video quality menu.
|
// region Patch for the old type of the video quality menu.
|
||||||
@@ -12,16 +12,16 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
@Patch(
|
@Patch(
|
||||||
dependencies = [SettingsPatch::class, ResourceMappingPatch::class]
|
dependencies = [SettingsPatch::class, ResourceMappingPatch::class]
|
||||||
)
|
)
|
||||||
object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() {
|
object OldVideoQualityMenuResourcePatch : ResourcePatch() {
|
||||||
internal var videoQualityBottomSheetListFragmentTitle = -1L
|
internal var videoQualityBottomSheetListFragmentTitle = -1L
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
|
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_restore_old_video_quality_menu",
|
"revanced_show_old_video_quality_menu",
|
||||||
StringResource("revanced_restore_old_video_quality_menu_title", "Restore old video quality menu"),
|
StringResource("revanced_show_old_video_quality_menu_title", "Show old video quality menu"),
|
||||||
StringResource("revanced_restore_old_video_quality_menu_summary_on", "Old video quality menu is shown"),
|
StringResource("revanced_show_old_video_quality_menu_summary_on", "Old video quality menu is shown"),
|
||||||
StringResource("revanced_restore_old_video_quality_menu_summary_off", "Old video quality menu is not shown")
|
StringResource("revanced_show_old_video_quality_menu_summary_off", "New video quality menu is hidden")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.video.videoqualitymenu.fingerprints
|
package app.revanced.patches.youtube.video.videoqualitymenu.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patches.youtube.video.videoqualitymenu.RestoreOldVideoQualityMenuResourcePatch
|
import app.revanced.patches.youtube.video.videoqualitymenu.OldVideoQualityMenuResourcePatch
|
||||||
import app.revanced.util.patch.LiteralValueFingerprint
|
import app.revanced.util.patch.LiteralValueFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
@@ -26,5 +26,5 @@ object VideoQualityMenuViewInflateFingerprint : LiteralValueFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST
|
Opcode.CHECK_CAST
|
||||||
),
|
),
|
||||||
literalSupplier = { RestoreOldVideoQualityMenuResourcePatch.videoQualityBottomSheetListFragmentTitle }
|
literalSupplier = { OldVideoQualityMenuResourcePatch.videoQualityBottomSheetListFragmentTitle }
|
||||||
)
|
)
|
||||||
@@ -67,7 +67,6 @@ inline fun <reified E> fromMethodReference(methodReference: MethodReference)
|
|||||||
search.definedClassName == methodReference.definingClass
|
search.definedClassName == methodReference.definingClass
|
||||||
&& search.methodName == methodReference.name
|
&& search.methodName == methodReference.name
|
||||||
&& methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams)
|
&& methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams)
|
||||||
&& search.returnType == methodReference.returnType
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <reified E> filterMapInstruction35c(
|
inline fun <reified E> filterMapInstruction35c(
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<string name="sb_segments_intro_sum">An interval without actual content. Could be a pause, static frame, or repeating animation. Does not include transitions containing information</string>
|
<string name="sb_segments_intro_sum">An interval without actual content. Could be a pause, static frame, or repeating animation. Does not include transitions containing information</string>
|
||||||
<string name="sb_segments_outro">Endcards/Credits</string>
|
<string name="sb_segments_outro">Endcards/Credits</string>
|
||||||
<string name="sb_segments_outro_sum">Credits or when the YouTube endcards appear. Not for conclusions with information</string>
|
<string name="sb_segments_outro_sum">Credits or when the YouTube endcards appear. Not for conclusions with information</string>
|
||||||
<string name="sb_segments_preview">Preview/Recap/Hook</string>
|
<string name="sb_segments_preview">Preview/Recap</string>
|
||||||
<string name="sb_segments_preview_sum">Collection of clips that show what is coming up or what happened in the video or in other videos of a series, where all information is repeated elsewhere</string>
|
<string name="sb_segments_preview_sum">Collection of clips that show what is coming up or what happened in the video or in other videos of a series, where all information is repeated elsewhere</string>
|
||||||
<string name="sb_segments_filler">Filler Tangent/Jokes</string>
|
<string name="sb_segments_filler">Filler Tangent/Jokes</string>
|
||||||
<string name="sb_segments_filler_sum">Tangential scenes added only for filler or humor that are not required to understand the main content of the video. Does not include segments providing context or background details</string>
|
<string name="sb_segments_filler_sum">Tangential scenes added only for filler or humor that are not required to understand the main content of the video. Does not include segments providing context or background details</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user