mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
cleanup
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.ads.general.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -12,12 +13,12 @@ import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.ads.general.bytecode.fingerprints.ComponentContextParserFingerprint
|
||||
import app.revanced.patches.youtube.ads.general.bytecode.fingerprints.EmptyComponentBuilderFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.shared.util.bytecode.BytecodeHelper
|
||||
import app.revanced.shared.util.integrations.Constants.ADS_PATH
|
||||
import app.revanced.util.bytecode.BytecodeHelper
|
||||
import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21s
|
||||
import org.jf.dexlib2.iface.instruction.Instruction
|
||||
@ -38,7 +39,7 @@ class GeneralAdsBytecodePatch : BytecodePatch(
|
||||
ComponentContextParserFingerprint.result?.let { result ->
|
||||
val builderMethodIndex = EmptyComponentBuilderFingerprint
|
||||
.also { it.resolve(context, result.mutableMethod, result.mutableClass) }
|
||||
.let { it.result!!.scanResult.patternScanResult!!.startIndex }
|
||||
.let { it.result?.scanResult?.patternScanResult?.startIndex?: return EmptyComponentBuilderFingerprint.toErrorResult() }
|
||||
|
||||
val emptyComponentFieldIndex = builderMethodIndex + 2
|
||||
|
||||
@ -76,7 +77,7 @@ class GeneralAdsBytecodePatch : BytecodePatch(
|
||||
listOf(ExternalLabel("not_an_ad", instruction(insertHookIndex)))
|
||||
)
|
||||
}
|
||||
} ?: return PatchResultError("Could not find the method to hook.")
|
||||
} ?: return ComponentContextParserFingerprint.toErrorResult()
|
||||
|
||||
BytecodeHelper.patchStatus(context, "GeneralAds")
|
||||
|
||||
|
@ -1,21 +1,21 @@
|
||||
package app.revanced.patches.youtube.ads.general.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.shared.util.integrations.Constants.ADS_PATH
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.*
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
package app.revanced.patches.youtube.ads.general.resource.patch
|
||||
|
||||
import app.revanced.extensions.doRecursively
|
||||
import app.revanced.extensions.startsWithAny
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.ads.general.bytecode.patch.GeneralAdsBytecodePatch
|
||||
import app.revanced.patches.youtube.ads.general.bytecode.patch.GeneralAdsSecondaryBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.doRecursively
|
||||
import app.revanced.shared.extensions.startsWithAny
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
|
@ -3,14 +3,14 @@ package app.revanced.patches.youtube.ads.video.bytecode.patch
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.patches.videoads.GeneralVideoAdsPatch
|
||||
import app.revanced.shared.util.bytecode.BytecodeHelper
|
||||
import app.revanced.shared.util.integrations.Constants.ADS_PATH
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.videoads.GeneralVideoAdsPatch
|
||||
import app.revanced.util.bytecode.BytecodeHelper
|
||||
import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
|
||||
@DependsOn(
|
||||
[
|
||||
@ -22,14 +22,16 @@ import app.revanced.shared.util.integrations.Constants.ADS_PATH
|
||||
@Version("0.0.1")
|
||||
class VideoAdsBytecodePatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val INTEGRATIONS_CLASS_DESCRIPTOR = "$ADS_PATH/HideVideoAdsPatch;->hideVideoAds()Z"
|
||||
|
||||
GeneralVideoAdsPatch.injectLegacyAds(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
|
||||
GeneralVideoAdsPatch.injectMainstreamAds(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
|
||||
BytecodeHelper.patchStatus(context, "VideoAds")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$ADS_PATH/HideVideoAdsPatch;->hideVideoAds()Z"
|
||||
}
|
||||
}
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.ads.video.bytecode.patch.VideoAdsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-video-ads")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.button.autorepeat.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,11 +11,10 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.button.autorepeat.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.UTILS_PATH
|
||||
import app.revanced.shared.util.integrations.Constants.VIDEO_PATH
|
||||
import app.revanced.util.integrations.Constants.UTILS_PATH
|
||||
import app.revanced.util.integrations.Constants.VIDEO_PATH
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("always-autorepeat")
|
||||
|
@ -7,10 +7,10 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.videoid.mainstream.patch.MainstreamVideoIdPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.integrations.Constants.BUTTON_PATH
|
||||
import app.revanced.util.integrations.Constants.BUTTON_PATH
|
||||
|
||||
@Name("overlay-buttons-bytecode-patch")
|
||||
@DependsOn(
|
||||
@ -23,18 +23,13 @@ import app.revanced.shared.util.integrations.Constants.BUTTON_PATH
|
||||
@Version("0.0.1")
|
||||
class OverlayButtonsBytecodePatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val AutoRepeat = "$BUTTON_PATH/AutoRepeat;"
|
||||
val Copy = "$BUTTON_PATH/Copy;"
|
||||
val CopyWithTimeStamp = "$BUTTON_PATH/CopyWithTimeStamp;"
|
||||
val Download = "$BUTTON_PATH/Download;"
|
||||
val Whitelists = "$BUTTON_PATH/Whitelists;"
|
||||
|
||||
arrayOf(
|
||||
Download,
|
||||
AutoRepeat,
|
||||
CopyWithTimeStamp,
|
||||
Copy,
|
||||
Whitelists
|
||||
"$BUTTON_PATH/Download;",
|
||||
"$BUTTON_PATH/AutoRepeat;",
|
||||
"$BUTTON_PATH/CopyWithTimeStamp;",
|
||||
"$BUTTON_PATH/Copy;",
|
||||
"$BUTTON_PATH/Whitelists;"
|
||||
).forEach { descriptor ->
|
||||
PlayerControlsBytecodePatch.initializeControl(descriptor)
|
||||
PlayerControlsBytecodePatch.injectVisibility(descriptor)
|
||||
|
@ -4,21 +4,21 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patches.youtube.button.overlaybuttons.bytecode.patch.OverlayButtonsBytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.options.PatchOptions
|
||||
import app.revanced.patches.youtube.button.autorepeat.patch.AutoRepeatPatch
|
||||
import app.revanced.patches.youtube.button.overlaybuttons.bytecode.patch.OverlayButtonsBytecodePatch
|
||||
import app.revanced.patches.youtube.button.whitelist.patch.WhitelistPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.patches.options.PatchOptions
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.shared.util.resources.ResourceUtils
|
||||
import app.revanced.shared.util.resources.ResourceUtils.copyResources
|
||||
import app.revanced.shared.util.resources.ResourceUtils.copyXmlNode
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceUtils
|
||||
import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
|
||||
@Patch
|
||||
@Name("overlay-buttons")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.button.whitelist.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,10 +11,9 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patcher.util.smali.toInstructions
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.button.whitelist.fingerprint.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.VIDEO_PATH
|
||||
import app.revanced.util.integrations.Constants.VIDEO_PATH
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.extended.forcevp9.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -12,11 +13,10 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.LayoutSwitchFingerprint
|
||||
import app.revanced.patches.youtube.extended.forcevp9.bytecode.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.LayoutSwitchFingerprint
|
||||
import app.revanced.shared.util.integrations.Constants.EXTENDED_PATH
|
||||
import app.revanced.util.integrations.Constants.EXTENDED_PATH
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.dexbacked.reference.DexBackedFieldReference
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.extended.forcevp9.bytecode.patch.ForceVP9CodecBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("force-vp9-codec")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.extended.layoutswitch.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,10 +8,9 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.LayoutSwitchFingerprint
|
||||
import app.revanced.shared.util.integrations.Constants.EXTENDED_PATH
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.LayoutSwitchFingerprint
|
||||
import app.revanced.util.integrations.Constants.EXTENDED_PATH
|
||||
|
||||
@Name("layout-switch-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.extended.layoutswitch.bytecode.patch.LayoutSwitchBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("layout-switch")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.extended.oldlayout.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,10 +8,9 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.extended.oldlayout.bytecode.fingerprints.OldLayoutFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.EXTENDED_PATH
|
||||
import app.revanced.util.integrations.Constants.EXTENDED_PATH
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("enable-old-layout-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.extended.oldlayout.bytecode.patch.OldLayoutBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("enable-old-layout")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-button-container")
|
||||
|
@ -9,10 +9,10 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.ads.general.bytecode.patch.GeneralAdsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-comment-component")
|
||||
|
@ -9,10 +9,10 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-flyout-panel")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,10 +8,9 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.bytecode.fingerprints.QualityMenuViewInflateFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.FLYOUTPANEL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.FLYOUTPANEL_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
|
||||
@Name("enable-old-quality-layout-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.bytecode.patch.OldQualityLayoutBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("enable-old-quality-layout")
|
||||
|
@ -1,5 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.fullscreen.endscreenoverlay.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,11 +11,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.shared.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
||||
|
@ -9,10 +9,10 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreen.endscreenoverlay.bytecode.patch.HideEndscreenOverlayBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-endscreen-overlay")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,10 +10,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.bytecode.fingerprints.ScrubbingLabelFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.bytecode.patch.HideFilmstripOverlayBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-filmstrip-overlay")
|
||||
|
@ -1,16 +1,16 @@
|
||||
package app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,11 +11,10 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint
|
||||
import app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.bytecode.fingerprints.FullscreenViewAdderFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.LayoutConstructorFingerprint
|
||||
import app.revanced.shared.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
|
@ -4,16 +4,16 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.bytecode.patch.HideFullscreenPanelsBytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.bytecode.patch.FullscreenButtonContainerBytecodePatch
|
||||
import app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.bytecode.patch.HideFullscreenPanelsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-fullscreen-panels")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.fullscreen.hapticfeedback.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -11,10 +12,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreen.hapticfeedback.bytecode.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("disable-haptic-feedback-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.fullscreen.hapticfeedback.bytecode.patch.HapticFeedBackBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("disable-haptic-feedback")
|
||||
|
@ -0,0 +1,16 @@
|
||||
package app.revanced.patches.youtube.layout.general.autocaptions.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object StartVideoInformerFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.RETURN_VOID
|
||||
),
|
||||
strings = listOf("pc")
|
||||
)
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.autocaptions.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,12 +11,10 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.layout.general.autocaptions.bytecode.fingerprints.SubtitleTrackFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.shared.fingerprints.StartVideoInformerFingerprint
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.autocaptions.bytecode.fingerprints.*
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
|
||||
@Name("hide-auto-captions-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.autocaptions.bytecode.patch.AutoCaptionsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-auto-captions")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.autopopuppanels.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,10 +10,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.autopopuppanels.bytecode.fingerprints.EngagementPanelControllerFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
|
||||
@Name("hide-auto-player-popup-panels-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.autopopuppanels.bytecode.patch.PlayerPopupPanelsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-auto-player-popup-panels")
|
||||
|
@ -1,16 +1,16 @@
|
||||
package app.revanced.patches.youtube.layout.general.crowdfundingbox.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.crowdfundingbox.bytecode.patch.CrowdfundingBoxBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-crowdfunding-box")
|
||||
|
@ -1,5 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.general.headerswitch.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,10 +9,8 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.headerswitch.bytecode.patch.HeaderSwitchBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("header-switch")
|
||||
|
@ -1,5 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -8,10 +10,8 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import org.jf.dexlib2.iface.instruction.Instruction
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@ -33,10 +33,8 @@ class MixPlaylistsBytecodePatch : BytecodePatch(
|
||||
arrayOf(
|
||||
CreateMixPlaylistFingerprint,
|
||||
SecondCreateMixPlaylistFingerprint
|
||||
).map {
|
||||
it.result ?: return it.toErrorResult()
|
||||
}.forEach {
|
||||
it.addHook()
|
||||
).forEach {
|
||||
it.result?.addHook() ?: return it.toErrorResult()
|
||||
}
|
||||
|
||||
arrayOf(
|
||||
|
@ -4,16 +4,16 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.patch.MixPlaylistsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-mix-playlists")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.personalinformation.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -8,10 +9,9 @@ import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.personalinformation.bytecode.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("hide-email-address-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.personalinformation.bytecode.patch.HideEmailAddressBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-email-address")
|
||||
|
@ -15,9 +15,9 @@ object PivotBarFingerprint : MethodFingerprint(
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.RETURN_OBJECT
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" &&
|
||||
methodDef.implementation?.instructions?.any {
|
||||
customFingerprint = {
|
||||
it.definingClass == "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" &&
|
||||
it.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.imageWithTextTabId
|
||||
} == true
|
||||
|
@ -1,20 +1,20 @@
|
||||
package app.revanced.patches.youtube.layout.general.pivotbar.createbutton.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.bytecode.fingerprints.*
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.bytecode.fingerprints.PivotBarFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.shared.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.shared.util.pivotbar.InjectionUtils.injectHook
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.util.pivotbar.InjectionUtils.injectHook
|
||||
import org.jf.dexlib2.dexbacked.reference.DexBackedMethodReference
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
|
||||
@ -47,8 +47,8 @@ class CreateButtonRemoverBytecodePatch : BytecodePatch(
|
||||
val fieldReference = (instruction as? ReferenceInstruction)?.reference as? DexBackedMethodReference
|
||||
fieldReference?.let { it.definingClass == createRef.definingClass && it.name == createRef.name } == true
|
||||
}.forEach { instruction ->
|
||||
if (!isSeondary) {
|
||||
isSeondary = true;
|
||||
if (foundIndex == 0) {
|
||||
foundIndex++
|
||||
return@forEach
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ class CreateButtonRemoverBytecodePatch : BytecodePatch(
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
return PatchResultError("Could not find the method to hook.")
|
||||
return PivotBarCreateButtonViewFingerprint.toErrorResult()
|
||||
}
|
||||
} ?: return PivotBarCreateButtonViewFingerprint.toErrorResult()
|
||||
}
|
||||
@ -73,6 +73,6 @@ class CreateButtonRemoverBytecodePatch : BytecodePatch(
|
||||
|
||||
lateinit var createRef: DexBackedMethodReference
|
||||
|
||||
var isSeondary: Boolean = false
|
||||
var foundIndex: Int = 0
|
||||
}
|
||||
}
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.bytecode.patch.CreateButtonRemoverBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-create-button")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,20 +8,22 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.bytecode.fingerprints.PivotBarEnumFingerprint
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.bytecode.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.PivotBarFingerprint
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.shared.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.shared.util.pivotbar.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||
import app.revanced.util.pivotbar.InjectionUtils.injectHook
|
||||
|
||||
@Name("hide-shorts-button")
|
||||
@DependsOn([SharedResourcdIdPatch::class])
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.1")
|
||||
class ShortsButtonRemoverBytecodePatch : BytecodePatch(
|
||||
listOf(PivotBarFingerprint)
|
||||
listOf(PivotBarCreateButtonViewFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
@ -28,7 +31,7 @@ class ShortsButtonRemoverBytecodePatch : BytecodePatch(
|
||||
* Resolve fingerprints
|
||||
*/
|
||||
|
||||
PivotBarFingerprint.result?.let { parentResult ->
|
||||
PivotBarCreateButtonViewFingerprint.result?.let { parentResult ->
|
||||
with (
|
||||
arrayOf(
|
||||
PivotBarEnumFingerprint,
|
||||
@ -57,7 +60,7 @@ class ShortsButtonRemoverBytecodePatch : BytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
} ?: return PivotBarFingerprint.toErrorResult()
|
||||
} ?: return PivotBarCreateButtonViewFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.bytecode.patch.ShortsButtonRemoverBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-shorts-button")
|
||||
|
@ -1,22 +1,22 @@
|
||||
package app.revanced.patches.youtube.layout.general.shortscomponent.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.bytecode.BytecodeHelper
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.util.bytecode.BytecodeHelper
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@Name("hide-shorts-component-bytecode-patch")
|
||||
@DependsOn([ResourceMappingPatch::class])
|
||||
|
@ -4,16 +4,16 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.shortscomponent.bytecode.patch.ShortsComponentBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-shorts-component")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.snackbar.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,10 +10,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.snackbar.bytecode.fingerprints.HideSnackbarFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
|
||||
@Name("hide-snackbar-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.snackbar.bytecode.patch.HideSnackbarBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-snackbar")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.startupshortsreset.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,10 +10,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.startupshortsreset.bytecode.fingerprints.UserWasInShortsFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("hide-startup-shorts-player-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.startupshortsreset.bytecode.patch.HideShortsOnStartupBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-startup-shorts-player")
|
||||
|
@ -1,16 +1,16 @@
|
||||
package app.revanced.patches.youtube.layout.general.stories.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.stories.bytecode.patch.HideStoriesBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-stories")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.tabletminiplayer.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -11,11 +12,10 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.tabletminiplayer.bytecode.fingerprints.*
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("enable-tablet-miniplayer-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.tabletminiplayer.bytecode.patch.TabletMiniPlayerBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("enable-tablet-miniplayer")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,10 +11,9 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||
|
||||
@Name("enable-wide-searchbar-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.patch.WideSearchbarBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("enable-wide-searchbar")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.player.autoplaybutton.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,11 +10,10 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.LayoutConstructorFingerprint
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.shared.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.Instruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.autoplaybutton.bytecode.patch.HideAutoplayButtonBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-autoplay-button")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.player.captionsbutton.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,10 +8,9 @@ import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.shared.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.SubtitleButtonControllerFingerprint
|
||||
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@Name("hide-captions-button-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.captionsbutton.bytecode.patch.HideCaptionsButtonBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-player-captions-button")
|
||||
|
@ -7,8 +7,8 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
||||
|
||||
@Name("hide-cast-button-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.castbutton.bytecode.patch.HideCastButtonBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-cast-button")
|
||||
|
@ -14,9 +14,9 @@ object LayoutCircleFingerprint : MethodFingerprint(
|
||||
Opcode.CHECK_CAST,
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutCircle
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutCircle
|
||||
} == true
|
||||
}
|
||||
)
|
@ -14,9 +14,9 @@ object LayoutIconFingerprint : MethodFingerprint(
|
||||
Opcode.CHECK_CAST,
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutIcon
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutIcon
|
||||
} == true
|
||||
}
|
||||
)
|
@ -14,9 +14,9 @@ object LayoutVideoFingerprint : MethodFingerprint(
|
||||
Opcode.CHECK_CAST,
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutVideo
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutVideo
|
||||
} == true
|
||||
}
|
||||
)
|
@ -1,16 +1,17 @@
|
||||
package app.revanced.patches.youtube.layout.player.endscreencards.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.endscreencards.bytecode.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
|
||||
@Name("hide-endscreen-cards-bytecode-patch")
|
||||
@ -25,17 +26,21 @@ class HideEndscreenCardsBytecodePatch : BytecodePatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
fun MethodFingerprint.injectHideCalls() {
|
||||
val layoutResult = result!!
|
||||
val layoutMethod = layoutResult.mutableMethod
|
||||
|
||||
val checkCastIndex = layoutResult.scanResult.patternScanResult!!.endIndex
|
||||
val viewRegister = (layoutMethod.instruction(checkCastIndex) as Instruction21c).registerA
|
||||
|
||||
layoutMethod.implementation!!.injectHideCall(checkCastIndex + 1, viewRegister, "layout/PlayerLayoutPatch", "hideEndscreen")
|
||||
fun MethodFingerprintResult.injectHideCalls() {
|
||||
val index = this.scanResult.patternScanResult!!.endIndex
|
||||
with (this.mutableMethod) {
|
||||
val register = (this.instruction(index) as Instruction21c).registerA
|
||||
this.implementation!!.injectHideCall(index + 1, register, "layout/PlayerLayoutPatch", "hideEndscreen")
|
||||
}
|
||||
}
|
||||
|
||||
listOf(LayoutCircleFingerprint, LayoutIconFingerprint, LayoutVideoFingerprint).forEach(MethodFingerprint::injectHideCalls)
|
||||
listOf(
|
||||
LayoutCircleFingerprint,
|
||||
LayoutIconFingerprint,
|
||||
LayoutVideoFingerprint
|
||||
).forEach {
|
||||
it.result?.injectHideCalls() ?: return it.toErrorResult()
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.endscreencards.bytecode.patch.HideEndscreenCardsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-endscreen-cards")
|
||||
|
@ -4,7 +4,7 @@ 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.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
@Name("infocards-incognito-fingerprint")
|
||||
|
@ -4,7 +4,7 @@ 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.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
@Name("infocards-incognito-parent-fingerprint")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.player.infocards.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -8,11 +9,10 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.infocards.bytecode.fingerprints.InfocardsIncognitoFingerprint
|
||||
import app.revanced.patches.youtube.layout.player.infocards.bytecode.fingerprints.InfocardsIncognitoParentFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
||||
|
||||
@Name("hide-info-cards-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.infocards.bytecode.patch.HideInfoCardsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-info-cards")
|
||||
|
@ -9,10 +9,10 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.playerbutton.patch.PlayerButtonPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.patches.playerbutton.PlayerButtonPatch
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-live-chat-button")
|
||||
|
@ -9,10 +9,10 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.playerbutton.patch.PlayerButtonPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.patches.playerbutton.PlayerButtonPatch
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-next-prev-button")
|
||||
|
@ -1,5 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.player.playeroverlayfilter.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -9,10 +11,8 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.playeroverlayfilter.bytecode.patch.PlayerOverlayFilterBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-player-overlay-filter")
|
||||
|
@ -1,16 +1,16 @@
|
||||
package app.revanced.patches.youtube.layout.player.suggestactions.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.injectHideCall
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.injectHideCall
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.suggestactions.bytecode.patch.SuggestedActionsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-suggested-actions")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.player.watermark.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,11 +11,10 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.watermark.bytecode.fingerprints.HideWatermarkFingerprint
|
||||
import app.revanced.patches.youtube.layout.player.watermark.bytecode.fingerprints.HideWatermarkParentFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Name("hide-channel-watermark-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.player.watermark.bytecode.patch.HideChannelWatermarkBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-channel-watermark")
|
||||
|
@ -1,5 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar.customseekbarcolor.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.extensions.toResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,11 +9,9 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.findMutableMethodOf
|
||||
import app.revanced.shared.extensions.toResult
|
||||
import app.revanced.shared.patches.mapping.ResourceMappingPatch
|
||||
import app.revanced.shared.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.seekbar.customseekbarcolor.bytecode.patch.CustomSeekbarColorBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("custom-seekbar-color")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar.seekbartapping.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,12 +11,10 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.bytecode.fingerprints.SeekbarTappingFingerprint
|
||||
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.bytecode.fingerprints.SeekbarTappingParentFingerprint
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.bytecode.fingerprints.*
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.Method
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction11n
|
||||
@ -27,7 +26,8 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
@Version("0.0.1")
|
||||
class SeekbarTappingBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
SeekbarTappingParentFingerprint, SeekbarTappingFingerprint
|
||||
SeekbarTappingParentFingerprint,
|
||||
SeekbarTappingFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.bytecode.patch.SeekbarTappingBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("enable-seekbar-tapping")
|
||||
|
@ -11,9 +11,9 @@ object TimeCounterParentFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.timebarColorLabelId
|
||||
methodDef.implementation?.instructions?.any {
|
||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.timebarColorLabelId
|
||||
} == true
|
||||
}
|
||||
)
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.seekbar.timeandseekbar.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -11,13 +12,12 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.seekbar.timeandseekbar.bytecode.fingerprints.TimeCounterFingerprint
|
||||
import app.revanced.patches.youtube.layout.seekbar.timeandseekbar.bytecode.fingerprints.TimeCounterParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.patches.timebar.HookTimebarPatch
|
||||
import app.revanced.shared.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||
import app.revanced.patches.youtube.misc.timebar.patch.HookTimebarPatch
|
||||
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||
|
||||
@DependsOn([HookTimebarPatch::class, SharedResourcdIdPatch::class])
|
||||
@Name("hide-time-and-seekbar-bytecode-patch")
|
||||
@ -31,19 +31,18 @@ class HideTimeAndSeekbarBytecodePatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
TimeCounterParentFingerprint.result?.let { parentResult ->
|
||||
TimeCounterFingerprint.also { it.resolve(context, parentResult.classDef) }.result?.let { counterResult ->
|
||||
TimeCounterFingerprint.also { it.resolve(context, parentResult.classDef) }.result?.mutableMethod?.let { method ->
|
||||
listOf(
|
||||
HookTimebarPatch.SetTimbarFingerprintResult,
|
||||
counterResult
|
||||
HookTimebarPatch.setTimebarMethod,
|
||||
method
|
||||
).forEach {
|
||||
val method = it.mutableMethod
|
||||
method.addInstructions(
|
||||
it.addInstructions(
|
||||
0, """
|
||||
invoke-static {}, $SEEKBAR_LAYOUT->hideTimeAndSeekbar()Z
|
||||
move-result v0
|
||||
if-eqz v0, :hide_time_and_seekbar
|
||||
return-void
|
||||
""", listOf(ExternalLabel("hide_time_and_seekbar", method.instruction(0)))
|
||||
""", listOf(ExternalLabel("hide_time_and_seekbar", it.instruction(0)))
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.seekbar.timeandseekbar.bytecode.patch.HideTimeAndSeekbarBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("hide-time-and-seekbar")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.IconHelper
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.IconHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch(false)
|
||||
@Name("custom-branding-icon-afn-blue")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.IconHelper
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.IconHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("custom-branding-icon-afn-red")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.IconHelper
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.IconHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch(false)
|
||||
@Name("custom-branding-icon-revancify")
|
||||
|
@ -1,19 +1,19 @@
|
||||
package app.revanced.patches.youtube.misc.branding.name.patch
|
||||
|
||||
import app.revanced.extensions.startsWithAny
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.options.PatchOptions
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.startsWithAny
|
||||
import app.revanced.shared.patches.options.PatchOptions
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.misc.clientspoof.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -8,10 +9,9 @@ import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.clientspoof.bytecode.fingerprints.UserAgentHeaderBuilderFingerprint
|
||||
import app.revanced.patches.youtube.misc.microg.shared.Constants.PACKAGE_NAME
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
|
||||
@Name("client-spoof-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.clientspoof.bytecode.patch.ClientSpoofBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("client-spoof")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.misc.doublebacktoclose.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -11,14 +12,10 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.misc.doublebacktoclose.fingerprint.OnBackPressedFingerprint
|
||||
import app.revanced.patches.youtube.misc.doublebacktoclose.fingerprint.ScrollPositionFingerprint
|
||||
import app.revanced.patches.youtube.misc.doublebacktoclose.fingerprint.ScrollTopFingerprint
|
||||
import app.revanced.patches.youtube.misc.doublebacktoclose.fingerprint.ScrollTopParentFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.patches.gestures.PredictiveBackGesturePatch
|
||||
import app.revanced.shared.util.integrations.Constants.UTILS_PATH
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.shared.patch.gestures.PredictiveBackGesturePatch
|
||||
import app.revanced.patches.youtube.misc.doublebacktoclose.fingerprint.*
|
||||
import app.revanced.util.integrations.Constants.UTILS_PATH
|
||||
|
||||
@Name("double-back-to-close")
|
||||
@DependsOn([PredictiveBackGesturePatch::class])
|
||||
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.youtube.misc.externalbrowser.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -7,10 +8,9 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.externalbrowser.bytecode.fingerprints.*
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.util.integrations.Constants.MISC_PATH
|
||||
import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
|
||||
@Name("enable-external-browser-bytecode-patch")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.externalbrowser.bytecode.patch.ExternalBrowserBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
|
||||
@Patch
|
||||
@Name("enable-external-browser")
|
||||
|
@ -4,15 +4,15 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
import app.revanced.util.resources.ResourceHelper
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.StandardCopyOption
|
||||
import kotlin.io.path.exists
|
||||
@ -47,9 +47,9 @@ class PremiumHeadingPatch : ResourcePatch {
|
||||
}
|
||||
}
|
||||
|
||||
val revancedprefs = context["res/xml/revanced_prefs.xml"]
|
||||
revancedprefs.writeText(
|
||||
revancedprefs.readText()
|
||||
val prefs = context["res/xml/revanced_prefs.xml"]
|
||||
prefs.writeText(
|
||||
prefs.readText()
|
||||
.replace(
|
||||
"<SwitchPreference android:title=\"@string/revanced_override_premium_header_title\" android:key=\"revanced_override_premium_header\" android:defaultValue=\"false\" android:summaryOn=\"@string/revanced_override_premium_header_summary_on\" android:summaryOff=\"@string/revanced_override_premium_header_summary_off\" />",
|
||||
""
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
||||
|
||||
import app.revanced.shared.patches.integrations.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||
import app.revanced.patches.shared.patch.integrations.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||
|
||||
object InitFingerprint : IntegrationsFingerprint(
|
||||
strings = listOf("Application creation"),
|
||||
strings = listOf("Application.onCreate")
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user