mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 18:03:55 +01:00
Compare commits
5 Commits
v2.194.0
...
v2.195.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49b47fa772 | ||
|
|
daf125a863 | ||
|
|
9121e0519b | ||
|
|
b352f48cb1 | ||
|
|
51844222c8 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
||||
# [2.195.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.194.1-dev.1...v2.195.0-dev.1) (2023-10-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Theme:** Disable gradient loading screen ([90d5877](https://github.com/ReVanced/revanced-patches/commit/90d5877950095b7abacdca979bc7ad709192eee2))
|
||||
|
||||
## [2.194.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.194.0...v2.194.1-dev.1) (2023-10-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube - Hide layout components:** Hide new channel watermark component ([cbfd569](https://github.com/ReVanced/revanced-patches/commit/cbfd5691d31ed144eac1d23de918ab5a6a905dfa))
|
||||
|
||||
# [2.194.0](https://github.com/ReVanced/revanced-patches/compare/v2.193.0...v2.194.0) (2023-10-12)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 2.194.0
|
||||
version = 2.195.0-dev.1
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,7 +7,6 @@ import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||
@@ -58,38 +57,38 @@ fun MutableMethod.injectHideViewCall(
|
||||
)
|
||||
|
||||
/**
|
||||
* Find the index of the first constant instruction with the id of the given resource name.
|
||||
* Find the index of the first instruction with the id of the given resource name.
|
||||
*
|
||||
* @param resourceName the name of the resource to find the id for.
|
||||
* @return the index of the first constant instruction with the id of the given resource name, or -1 if not found.
|
||||
* @return the index of the first instruction with the id of the given resource name, or -1 if not found.
|
||||
*/
|
||||
fun Method.findIndexForIdResource(resourceName: String): Int {
|
||||
fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single {
|
||||
it.type == "id" && it.name == resourceName
|
||||
}.id
|
||||
|
||||
return indexOfFirstConstantInstructionValue(getIdResourceId(resourceName))
|
||||
return indexOfFirstWideLiteralInstructionValue(getIdResourceId(resourceName))
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the index of the first constant instruction with the given value.
|
||||
* Find the index of the first wide literal instruction with the given value.
|
||||
*
|
||||
* @return the first constant instruction with the value, or -1 if not found.
|
||||
* @return the first literal instruction with the value, or -1 if not found.
|
||||
*/
|
||||
fun Method.indexOfFirstConstantInstructionValue(constantValue: Long) = implementation?.let {
|
||||
fun Method.indexOfFirstWideLiteralInstructionValue(literal: Long) = implementation?.let {
|
||||
it.instructions.indexOfFirst { instruction ->
|
||||
instruction.opcode == Opcode.CONST && (instruction as WideLiteralInstruction).wideLiteral == constantValue
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == literal
|
||||
}
|
||||
} ?: -1
|
||||
|
||||
|
||||
/**
|
||||
* Check if the method contains a constant with the given value.
|
||||
* Check if the method contains a literal with the given value.
|
||||
*
|
||||
* @return if the method contains a constant with the given value.
|
||||
* @return if the method contains a literal with the given value.
|
||||
*/
|
||||
fun Method.containsConstantInstructionValue(constantValue: Long) =
|
||||
indexOfFirstConstantInstructionValue(constantValue) >= 0
|
||||
fun Method.containsWideLiteralInstructionValue(literal: Long) =
|
||||
indexOfFirstWideLiteralInstructionValue(literal) >= 0
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,12 @@ package app.revanced.patches.youtube.layout.hide.general
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
@@ -14,6 +17,8 @@ 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.TextPreference
|
||||
import app.revanced.patches.youtube.layout.hide.general.fingerprints.ParseElementFromBufferFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.general.fingerprints.PlayerOverlayFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.general.fingerprints.ShowWatermarkFingerprint
|
||||
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
|
||||
@@ -39,7 +44,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideLayoutComponentsPatch : BytecodePatch(
|
||||
setOf(ParseElementFromBufferFingerprint)
|
||||
setOf(ParseElementFromBufferFingerprint, PlayerOverlayFingerprint)
|
||||
) {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/components/LayoutComponentsFilter;"
|
||||
@@ -58,7 +63,15 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
||||
StringResource("revanced_hide_join_membership_button_summary_on", "Button is hidden"),
|
||||
StringResource("revanced_hide_join_membership_button_summary_off", "Button is shown")
|
||||
),
|
||||
|
||||
SwitchPreference(
|
||||
"revanced_hide_channel_watermark_title",
|
||||
StringResource(
|
||||
"revanced_hide_channel_watermark_title",
|
||||
"Hide channel watermark in video player"
|
||||
),
|
||||
StringResource("revanced_hide_channel_watermark_title_summary_on", "Watermark is hidden"),
|
||||
StringResource("revanced_hide_channel_watermark_title_summary_off", "Watermark is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_notify_me_button",
|
||||
StringResource("revanced_hide_notify_me_button_title", "Hide \\\'Notify me\\\' button"),
|
||||
@@ -316,5 +329,24 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
||||
} ?: throw ParseElementFromBufferFingerprint.exception
|
||||
|
||||
// endregion
|
||||
|
||||
// region Watermark (legacy code for old versions of YouTube)
|
||||
|
||||
ShowWatermarkFingerprint.also {
|
||||
it.resolve(context, PlayerOverlayFingerprint.result?.classDef ?: throw PlayerOverlayFingerprint.exception)
|
||||
}.result?.mutableMethod?.apply {
|
||||
val index = implementation!!.instructions.size - 5
|
||||
|
||||
removeInstruction(index)
|
||||
addInstructions(
|
||||
index,
|
||||
"""
|
||||
invoke-static {}, $FILTER_CLASS_DESCRIPTOR->showWatermark()Z
|
||||
move-result p2
|
||||
"""
|
||||
)
|
||||
} ?: throw ShowWatermarkFingerprint.exception
|
||||
|
||||
// endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.revanced.patches.youtube.layout.hide.watermark.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.general.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object HideWatermarkParentFingerprint : MethodFingerprint (
|
||||
object PlayerOverlayFingerprint : MethodFingerprint (
|
||||
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("player_overlay_in_video_programming")
|
||||
)
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.revanced.patches.youtube.layout.hide.watermark.fingerprints
|
||||
package app.revanced.patches.youtube.layout.hide.general.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object HideWatermarkFingerprint : MethodFingerprint (
|
||||
object ShowWatermarkFingerprint : MethodFingerprint (
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L")
|
||||
)
|
||||
@@ -1,68 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.hide.watermark
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.hide.watermark.fingerprints.HideWatermarkFingerprint
|
||||
import app.revanced.patches.youtube.layout.hide.watermark.fingerprints.HideWatermarkParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
|
||||
@Patch(
|
||||
name = "Hide watermark",
|
||||
description = "Hides creator's watermarks on videos.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube",
|
||||
[
|
||||
"18.16.37",
|
||||
"18.19.35",
|
||||
"18.20.39",
|
||||
"18.23.35",
|
||||
"18.29.38",
|
||||
"18.32.39",
|
||||
"18.37.36",
|
||||
"18.38.44"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideWatermarkPatch : BytecodePatch(
|
||||
setOf(HideWatermarkParentFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_video_watermark",
|
||||
StringResource("revanced_hide_video_watermark_title", "Hide creator watermark on videos"),
|
||||
StringResource("revanced_hide_video_watermark_summary_on", "Watermark is hidden"),
|
||||
StringResource("revanced_hide_video_watermark_summary_off", "Watermark is shown")
|
||||
)
|
||||
)
|
||||
|
||||
HideWatermarkFingerprint.resolve(context, HideWatermarkParentFingerprint.result!!.classDef)
|
||||
val result = HideWatermarkFingerprint.result
|
||||
?: throw PatchException("Required parent method could not be found.")
|
||||
|
||||
val method = result.mutableMethod
|
||||
val line = method.implementation!!.instructions.size - 5
|
||||
|
||||
method.removeInstruction(line)
|
||||
method.addInstructions(
|
||||
line,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/integrations/patches/BrandingWaterMarkPatch;->isBrandingWatermarkShown()Z
|
||||
move-result p2
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.player.overlay
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.extensions.indexOfFirstConstantInstructionValue
|
||||
import app.revanced.extensions.indexOfFirstWideLiteralInstructionValue
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
@@ -27,7 +27,7 @@ object CustomPlayerOverlayOpacityPatch : BytecodePatch(setOf(CreatePlayerOvervie
|
||||
CreatePlayerOverviewFingerprint.result?.let { result ->
|
||||
result.mutableMethod.apply {
|
||||
val viewRegisterIndex =
|
||||
indexOfFirstConstantInstructionValue(CustomPlayerOverlayOpacityResourcePatch.scrimOverlayId) + 3
|
||||
indexOfFirstWideLiteralInstructionValue(CustomPlayerOverlayOpacityResourcePatch.scrimOverlayId) + 3
|
||||
val viewRegister =
|
||||
getInstruction<OneRegisterInstruction>(viewRegisterIndex).registerA
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.player.overlay.fingerprints
|
||||
|
||||
import app.revanced.extensions.containsConstantInstructionValue
|
||||
import app.revanced.extensions.containsWideLiteralInstructionValue
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.player.overlay.CustomPlayerOverlayOpacityResourcePatch
|
||||
@@ -17,6 +17,6 @@ object CreatePlayerOverviewFingerprint : MethodFingerprint(
|
||||
Opcode.CHECK_CAST
|
||||
),
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.containsConstantInstructionValue(CustomPlayerOverlayOpacityResourcePatch.scrimOverlayId)
|
||||
methodDef.containsWideLiteralInstructionValue(CustomPlayerOverlayOpacityResourcePatch.scrimOverlayId)
|
||||
}
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.extensions.indexOfFirstConstantInstructionValue
|
||||
import app.revanced.extensions.indexOfFirstWideLiteralInstructionValue
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
@@ -30,7 +30,7 @@ object SeekbarColorBytecodePatch : BytecodePatch(
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
fun MutableMethod.addColorChangeInstructions(resourceId: Long) {
|
||||
val registerIndex = indexOfFirstConstantInstructionValue(resourceId) + 2
|
||||
val registerIndex = indexOfFirstWideLiteralInstructionValue(resourceId) + 2
|
||||
val colorRegister = getInstruction<OneRegisterInstruction>(registerIndex).registerA
|
||||
addInstructions(
|
||||
registerIndex + 1,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar.fingerprints
|
||||
|
||||
import app.revanced.extensions.containsConstantInstructionValue
|
||||
import app.revanced.extensions.containsWideLiteralInstructionValue
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.seekbar.SeekbarColorResourcePatch
|
||||
@@ -9,7 +9,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
object PlayerSeekbarColorFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
customFingerprint = { method, _ ->
|
||||
method.containsConstantInstructionValue(SeekbarColorResourcePatch.inlineTimeBarColorizedBarPlayedColorDarkId)
|
||||
&& method.containsConstantInstructionValue(SeekbarColorResourcePatch.inlineTimeBarPlayedNotHighlightedColorId)
|
||||
method.containsWideLiteralInstructionValue(SeekbarColorResourcePatch.inlineTimeBarColorizedBarPlayedColorDarkId)
|
||||
&& method.containsWideLiteralInstructionValue(SeekbarColorResourcePatch.inlineTimeBarPlayedNotHighlightedColorId)
|
||||
}
|
||||
)
|
||||
@@ -1,24 +1,50 @@
|
||||
package app.revanced.patches.youtube.layout.theme
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.extensions.indexOfFirstWideLiteralInstructionValue
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.patch.options.types.StringPatchOption.Companion.stringPatchOption
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.seekbar.SeekbarColorBytecodePatch
|
||||
import app.revanced.patches.youtube.layout.theme.fingerprints.UseGradientLoadingScreenFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch(
|
||||
name = "Theme",
|
||||
description = "Applies a custom theme.",
|
||||
dependencies = [LithoColorHookPatch::class, SeekbarColorBytecodePatch::class, ThemeResourcePatch::class],
|
||||
dependencies = [
|
||||
LithoColorHookPatch::class,
|
||||
SeekbarColorBytecodePatch::class,
|
||||
ThemeResourcePatch::class,
|
||||
IntegrationsPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.google.android.youtube")
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube",
|
||||
[
|
||||
"18.37.36",
|
||||
"18.38.44 "
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ThemeBytecodePatch : BytecodePatch() {
|
||||
object ThemeBytecodePatch : BytecodePatch(
|
||||
setOf(UseGradientLoadingScreenFingerprint)
|
||||
) {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/theme/ThemeLithoComponentsPatch;"
|
||||
"Lapp/revanced/integrations/patches/theme/ThemePatch;"
|
||||
|
||||
internal const val GRADIENT_LOADING_SCREEN_AB_CONSTANT = 45412406L
|
||||
|
||||
internal val darkThemeBackgroundColor by stringPatchOption(
|
||||
key = "darkThemeBackgroundColor",
|
||||
@@ -35,6 +61,34 @@ object ThemeBytecodePatch : BytecodePatch() {
|
||||
)
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_gradient_loading_screen",
|
||||
StringResource("revanced_gradient_loading_screen_title", "Enable gradient loading screen"),
|
||||
StringResource(
|
||||
"revanced_gradient_loading_screen_summary_on",
|
||||
"Loading screen will have a gradient background"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_gradient_loading_screen_summary_off",
|
||||
"Loading screen will have a solid background"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
UseGradientLoadingScreenFingerprint.result?.mutableMethod?.apply {
|
||||
val isEnabledIndex = indexOfFirstWideLiteralInstructionValue(GRADIENT_LOADING_SCREEN_AB_CONSTANT) + 3
|
||||
val isEnabledRegister = getInstruction<OneRegisterInstruction>(isEnabledIndex - 1).registerA
|
||||
|
||||
addInstructions(
|
||||
isEnabledIndex,
|
||||
"""
|
||||
invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->gradientLoadingScreenEnabled()Z
|
||||
move-result v$isEnabledRegister
|
||||
"""
|
||||
)
|
||||
} ?: throw UseGradientLoadingScreenFingerprint.exception
|
||||
|
||||
LithoColorHookPatch.lithoColorOverrideHook(INTEGRATIONS_CLASS_DESCRIPTOR, "getValue")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.youtube.layout.theme.fingerprints
|
||||
|
||||
import app.revanced.patches.youtube.layout.theme.ThemeBytecodePatch.GRADIENT_LOADING_SCREEN_AB_CONSTANT
|
||||
import app.revanced.util.patch.LiteralValueFingerprint
|
||||
|
||||
object UseGradientLoadingScreenFingerprint : LiteralValueFingerprint(
|
||||
literalSupplier = { GRADIENT_LOADING_SCREEN_AB_CONSTANT }
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.youtube.misc.fix.playback.fingerprints
|
||||
|
||||
import app.revanced.extensions.containsConstantInstructionValue
|
||||
import app.revanced.extensions.containsWideLiteralInstructionValue
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -18,6 +18,6 @@ object PlayerResponseModelImplFingerprint : MethodFingerprint(
|
||||
customFingerprint = handler@{ methodDef, _ ->
|
||||
if (!methodDef.definingClass.endsWith("/PlayerResponseModelImpl;")) return@handler false
|
||||
|
||||
methodDef.containsConstantInstructionValue(55735497)
|
||||
methodDef.containsWideLiteralInstructionValue(55735497)
|
||||
}
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.util.patch
|
||||
|
||||
import app.revanced.extensions.containsConstantInstructionValue
|
||||
import app.revanced.extensions.containsWideLiteralInstructionValue
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@@ -19,6 +19,6 @@ abstract class LiteralValueFingerprint(
|
||||
opcodes = opcodes,
|
||||
strings = strings,
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.containsConstantInstructionValue(literalSupplier())
|
||||
methodDef.containsWideLiteralInstructionValue(literalSupplier())
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user