mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 13:47:42 +02:00
chore(YouTube): remove outated patches
This commit is contained in:
@ -5,8 +5,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.BottomUIContainerBooleanFingerprint
|
|
||||||
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.BottomUIContainerIntegerFingerprint
|
|
||||||
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonPositionFingerprint
|
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonPositionFingerprint
|
||||||
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonViewStubFingerprint
|
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonViewStubFingerprint
|
||||||
import app.revanced.util.getTargetIndexOrThrow
|
import app.revanced.util.getTargetIndexOrThrow
|
||||||
@ -19,8 +17,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
)
|
)
|
||||||
object CfBottomUIPatch : BytecodePatch(
|
object CfBottomUIPatch : BytecodePatch(
|
||||||
setOf(
|
setOf(
|
||||||
BottomUIContainerBooleanFingerprint,
|
|
||||||
BottomUIContainerIntegerFingerprint,
|
|
||||||
FullscreenButtonPositionFingerprint,
|
FullscreenButtonPositionFingerprint,
|
||||||
FullscreenButtonViewStubFingerprint
|
FullscreenButtonViewStubFingerprint
|
||||||
)
|
)
|
||||||
@ -32,8 +28,6 @@ object CfBottomUIPatch : BytecodePatch(
|
|||||||
* Therefore, this patch only applies to versions that can resolve this fingerprint.
|
* Therefore, this patch only applies to versions that can resolve this fingerprint.
|
||||||
*/
|
*/
|
||||||
mapOf(
|
mapOf(
|
||||||
BottomUIContainerBooleanFingerprint to 45637647,
|
|
||||||
BottomUIContainerIntegerFingerprint to 45637647,
|
|
||||||
FullscreenButtonViewStubFingerprint to 45617294,
|
FullscreenButtonViewStubFingerprint to 45617294,
|
||||||
FullscreenButtonPositionFingerprint to 45627640
|
FullscreenButtonPositionFingerprint to 45627640
|
||||||
).forEach { (fingerprint, literalValue) ->
|
).forEach { (fingerprint, literalValue) ->
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.utils.fix.bottomui.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.util.fingerprint.LiteralValueFingerprint
|
|
||||||
|
|
||||||
internal object BottomUIContainerBooleanFingerprint : LiteralValueFingerprint(
|
|
||||||
returnType = "Z",
|
|
||||||
literalSupplier = { 45637647 }
|
|
||||||
)
|
|
@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.utils.fix.bottomui.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.util.fingerprint.LiteralValueFingerprint
|
|
||||||
|
|
||||||
internal object BottomUIContainerIntegerFingerprint : LiteralValueFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
literalSupplier = { 45637647 }
|
|
||||||
)
|
|
@ -1,44 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.utils.fix.litho
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.youtube.utils.fix.litho.fingerprints.ObfuscationConfigFingerprint
|
|
||||||
import app.revanced.util.getTargetIndexOrThrow
|
|
||||||
import app.revanced.util.getWideLiteralInstructionIndex
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
description = "Fix the issue where ConversionContext is obfuscating. "
|
|
||||||
+ "When ConversionContext is obfuscated, most patches are broken because the litho components can no longer be identified."
|
|
||||||
)
|
|
||||||
object ConversionContextObfuscationPatch : BytecodePatch(
|
|
||||||
setOf(ObfuscationConfigFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* I found a boolean value on YouTube 19.19.39 that obfuscates ConversionContext,
|
|
||||||
* but I'm not sure if this is for testing purposes only.
|
|
||||||
*/
|
|
||||||
ObfuscationConfigFingerprint.result?.let {
|
|
||||||
it.mutableMethod.apply {
|
|
||||||
val targetIndex =
|
|
||||||
getTargetIndexOrThrow(
|
|
||||||
getWideLiteralInstructionIndex(45631264),
|
|
||||||
Opcode.MOVE_RESULT
|
|
||||||
)
|
|
||||||
val targetRegister = getInstruction<OneRegisterInstruction>(targetIndex).registerA
|
|
||||||
|
|
||||||
addInstruction(
|
|
||||||
targetIndex + 1,
|
|
||||||
"const/4 v$targetRegister, 0x0"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.utils.fix.litho.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.util.fingerprint.LiteralValueFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This fingerprint is compatible with YouTube v19.19.39+
|
|
||||||
*/
|
|
||||||
internal object ObfuscationConfigFingerprint : LiteralValueFingerprint(
|
|
||||||
returnType = "Z",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
literalSupplier = { 45631264 }
|
|
||||||
)
|
|
@ -6,7 +6,6 @@ import app.revanced.patches.shared.elements.StringsElementsUtils.removeStringsEl
|
|||||||
import app.revanced.patches.shared.mapping.ResourceMappingPatch
|
import app.revanced.patches.shared.mapping.ResourceMappingPatch
|
||||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||||
import app.revanced.patches.youtube.utils.fix.cairo.CairoSettingsPatch
|
import app.revanced.patches.youtube.utils.fix.cairo.CairoSettingsPatch
|
||||||
import app.revanced.patches.youtube.utils.fix.litho.ConversionContextObfuscationPatch
|
|
||||||
import app.revanced.patches.youtube.utils.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.utils.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
|
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
|
||||||
@ -36,8 +35,6 @@ object SettingsPatch : BaseResourcePatch(
|
|||||||
SharedResourceIdPatch::class,
|
SharedResourceIdPatch::class,
|
||||||
SettingsBytecodePatch::class,
|
SettingsBytecodePatch::class,
|
||||||
CairoSettingsPatch::class,
|
CairoSettingsPatch::class,
|
||||||
// Add dependency to the settings patch as a limitation of patch implementation.
|
|
||||||
ConversionContextObfuscationPatch::class,
|
|
||||||
),
|
),
|
||||||
compatiblePackages = COMPATIBLE_PACKAGE,
|
compatiblePackages = COMPATIBLE_PACKAGE,
|
||||||
requiresIntegrations = true
|
requiresIntegrations = true
|
||||||
|
Reference in New Issue
Block a user