mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-06 09:34:37 +02:00
cleanup
This commit is contained in:
parent
584fcef9b2
commit
8a23742991
@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.blacknavbar.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -19,7 +19,7 @@ object TabLayoutFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.colorGreyLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.colorGreyLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.music.layout.blacknavbar.fingerprints.TabLayoutFingerprint
|
import app.revanced.patches.music.layout.blacknavbar.fingerprints.TabLayoutFingerprint
|
||||||
import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
||||||
@ -27,7 +27,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
MusicSettingsPatch::class,
|
MusicSettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeMusicCompatibility
|
@YouTubeMusicCompatibility
|
||||||
|
@ -66,7 +66,7 @@ class CompactHeaderPatch : BytecodePatch() {
|
|||||||
|
|
||||||
MusicSettingsPatch.addMusicPreference("navigation", "revanced_hide_compact_header", "true")
|
MusicSettingsPatch.addMusicPreference("navigation", "revanced_hide_compact_header", "true")
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.shuffle.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -22,7 +22,7 @@ object ShuffleClassFingerprint : MethodFingerprint(
|
|||||||
methodDef.name == "<init>" &&
|
methodDef.name == "<init>" &&
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.disabledIconLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.disabledIconLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ import app.revanced.patcher.util.smali.toInstructions
|
|||||||
import app.revanced.patches.music.layout.shuffle.fingerprints.MusicPlaybackControlsFingerprint
|
import app.revanced.patches.music.layout.shuffle.fingerprints.MusicPlaybackControlsFingerprint
|
||||||
import app.revanced.patches.music.layout.shuffle.fingerprints.ShuffleClassFingerprint
|
import app.revanced.patches.music.layout.shuffle.fingerprints.ShuffleClassFingerprint
|
||||||
import app.revanced.patches.music.layout.shuffle.fingerprints.ShuffleClassReferenceFingerprint
|
import app.revanced.patches.music.layout.shuffle.fingerprints.ShuffleClassReferenceFingerprint
|
||||||
import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
||||||
@ -38,7 +38,7 @@ import org.jf.dexlib2.immutable.ImmutableMethodParameter
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
MusicSettingsPatch::class,
|
MusicSettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeMusicCompatibility
|
@YouTubeMusicCompatibility
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.tabletmode.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -19,7 +19,7 @@ object TabletLayoutFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.isTabletLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.isTabletLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -12,7 +12,7 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.layout.tabletmode.fingerprints.TabletLayoutFingerprint
|
import app.revanced.patches.music.layout.tabletmode.fingerprints.TabletLayoutFingerprint
|
||||||
import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
||||||
@ -23,7 +23,7 @@ import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
MusicSettingsPatch::class,
|
MusicSettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeMusicCompatibility
|
@YouTubeMusicCompatibility
|
||||||
|
@ -14,7 +14,7 @@ import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
|||||||
@DependsOn([ResourceMappingPatch::class])
|
@DependsOn([ResourceMappingPatch::class])
|
||||||
@YouTubeMusicCompatibility
|
@YouTubeMusicCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SharedResourcdIdPatch : ResourcePatch {
|
class SharedResourceIdPatch : ResourcePatch {
|
||||||
internal companion object {
|
internal companion object {
|
||||||
var colorGreyLabelId: Long = -1
|
var colorGreyLabelId: Long = -1
|
||||||
var disabledIconLabelId: Long = -1
|
var disabledIconLabelId: Long = -1
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.shared.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -13,7 +13,7 @@ object PivotBarCreateButtonViewFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.imageOnlyTabId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.imageOnlyTabId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -56,7 +56,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() {
|
|||||||
|
|
||||||
val viewRegister = (invokeInstruction as Instruction35c).registerC
|
val viewRegister = (invokeInstruction as Instruction35c).registerC
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAdAttributionView")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAdAttributionView")
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[1] -> { // breaking news
|
resourceIds[1] -> { // breaking news
|
||||||
@ -68,7 +68,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() {
|
|||||||
|
|
||||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideBreakingNewsShelf")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideBreakingNewsShelf")
|
||||||
patchSuccessArray[1] = true;
|
patchSuccessArray[1] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[2] -> { // album cards
|
resourceIds[2] -> { // album cards
|
||||||
@ -80,7 +80,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() {
|
|||||||
|
|
||||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAlbumCards")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAlbumCards")
|
||||||
patchSuccessArray[2] = true;
|
patchSuccessArray[2] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[3], resourceIds[4] -> { // paid content banner
|
resourceIds[3], resourceIds[4] -> { // paid content banner
|
||||||
@ -94,8 +94,8 @@ class GeneralAdsBytecodePatch : BytecodePatch() {
|
|||||||
|
|
||||||
mutableMethod.addInjectCall(insertIndex, dummyRegister, viewRegister, "hidePaidContentBanner")
|
mutableMethod.addInjectCall(insertIndex, dummyRegister, viewRegister, "hidePaidContentBanner")
|
||||||
|
|
||||||
patchSuccessArray[3] = true;
|
patchSuccessArray[3] = true
|
||||||
patchSuccessArray[4] = true;
|
patchSuccessArray[4] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[5] -> { // info panel
|
resourceIds[5] -> { // info panel
|
||||||
@ -109,7 +109,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() {
|
|||||||
|
|
||||||
mutableMethod.addInjectCall(insertIndex + 7, dummyRegister, viewRegister, "hideInfoPanel")
|
mutableMethod.addInjectCall(insertIndex + 7, dummyRegister, viewRegister, "hideInfoPanel")
|
||||||
|
|
||||||
patchSuccessArray[5] = true;
|
patchSuccessArray[5] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.etc.tooltip.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -14,7 +14,7 @@ object TooltipContentViewFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.tooltipLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.tooltipLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.etc.tooltip.fingerprints.TooltipContentViewFingerprint
|
import app.revanced.patches.youtube.layout.etc.tooltip.fingerprints.TooltipContentViewFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@ -22,7 +22,7 @@ import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerprints
|
package app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ object QualityMenuViewInflateFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.videoqualityfragmentLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.videoQualityFragmentLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerprints.*
|
import app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch
|
import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch
|
||||||
import app.revanced.util.integrations.Constants.FLYOUT_PANEL_LAYOUT
|
import app.revanced.util.integrations.Constants.FLYOUT_PANEL_LAYOUT
|
||||||
@ -28,7 +28,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
[
|
[
|
||||||
LegacyVideoIdPatch::class,
|
LegacyVideoIdPatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -66,7 +66,7 @@ class HideEndscreenOverlayPatch : BytecodePatch() {
|
|||||||
""", listOf(ExternalLabel("on", mutableMethod.instruction(insertIndex)))
|
""", listOf(ExternalLabel("on", mutableMethod.instruction(insertIndex)))
|
||||||
)
|
)
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.fingerprints
|
package app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ object ScrubbingLabelFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.scrubbingLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.scrubbingLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -45,7 +45,7 @@ class HideFullscreenButtonContainerBytecodePatch : BytecodePatch() {
|
|||||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/FullscreenLayoutPatch", "hideFullscreenButtonContainer")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/FullscreenLayoutPatch", "hideFullscreenButtonContainer")
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints
|
package app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ object CrowdfundingBoxFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.donationCompanionResourceId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.donationCompanionResourceId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints.CrowdfundingBoxFingerprint
|
import app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints.CrowdfundingBoxFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints
|
package app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ object FloatingMicrophoneFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.fabLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.fabLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints.FloatingMicrophoneFingerprint
|
import app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints.FloatingMicrophoneFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -61,7 +61,7 @@ class HeaderSwitchPatch : BytecodePatch() {
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.personalinformation.fingerprints
|
package app.revanced.patches.youtube.layout.general.personalinformation.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any { it ->
|
methodDef.implementation?.instructions?.any { it ->
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.accountSwitcherAccessibilityLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.accountSwitcherAccessibilityLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.general.pivotbar.createbutton.finger
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -19,7 +19,7 @@ object PivotBarFingerprint : MethodFingerprint(
|
|||||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" &&
|
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" &&
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.imageWithTextTabId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.imageWithTextTabId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||||
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.fingerprints.PivotBarFingerprint
|
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.fingerprints.PivotBarFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||||
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||||
@ -27,7 +27,7 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -15,7 +15,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
|||||||
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint
|
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint
|
||||||
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
|
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||||
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||||
@ -27,7 +27,7 @@ import app.revanced.util.pivotbar.InjectionUtils.injectHook
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -64,7 +64,7 @@ class ShortsComponentPatch : BytecodePatch() {
|
|||||||
val viewRegister = (instructions.elementAt(index + 3) as OneRegisterInstruction).registerA
|
val viewRegister = (instructions.elementAt(index + 3) as OneRegisterInstruction).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(index + 4, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerCommentsButton")
|
mutableMethod.implementation!!.injectHideCall(index + 4, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerCommentsButton")
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[1] -> { // shorts player remix
|
resourceIds[1] -> { // shorts player remix
|
||||||
@ -77,7 +77,7 @@ class ShortsComponentPatch : BytecodePatch() {
|
|||||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(index - 1, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerRemixButton")
|
mutableMethod.implementation!!.injectHideCall(index - 1, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerRemixButton")
|
||||||
|
|
||||||
patchSuccessArray[1] = true;
|
patchSuccessArray[1] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[2] -> { // shorts player subscriptions banner
|
resourceIds[2] -> { // shorts player subscriptions banner
|
||||||
@ -90,7 +90,7 @@ class ShortsComponentPatch : BytecodePatch() {
|
|||||||
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
val viewRegister = (invokeInstruction as Instruction21c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerSubscriptionsButton")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerSubscriptionsButton")
|
||||||
|
|
||||||
patchSuccessArray[2] = true;
|
patchSuccessArray[2] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@ class HideStoriesPatch : BytecodePatch() {
|
|||||||
val viewRegister = (iPutInstruction as Instruction22c).registerA
|
val viewRegister = (iPutInstruction as Instruction22c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideStoriesShelf")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideStoriesShelf")
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
patchSuccessArray[1] = true;
|
patchSuccessArray[1] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprint
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
@ -13,7 +13,7 @@ object MiniPlayerDimensionsCalculatorFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.floatybarQueueLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.floatyBarQueueLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -17,7 +17,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprints.*
|
import app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -29,7 +29,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
@ -105,7 +105,7 @@ class TabletMiniPlayerPatch : BytecodePatch(
|
|||||||
val parameterRegister = (instruction as OneRegisterInstruction).registerA
|
val parameterRegister = (instruction as OneRegisterInstruction).registerA
|
||||||
this.insertOverride(index, parameterRegister)
|
this.insertOverride(index, parameterRegister)
|
||||||
this.insertOverride(insertInstructions.size - 1, parameterRegister)
|
this.insertOverride(insertInstructions.size - 1, parameterRegister)
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints
|
package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ object LayoutCircleFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutCircle
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.layoutCircle
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints
|
package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ object LayoutIconFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutIcon
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.layoutIcon
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints
|
package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ object LayoutVideoFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutVideo
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.layoutVideo
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.player.endscreencards.fingerprints.*
|
import app.revanced.patches.youtube.layout.player.endscreencards.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.layout.player.infocards.fingerprints
|
package app.revanced.patches.youtube.layout.player.infocards.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("infocards-incognito-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object InfocardsIncognitoFingerprint : MethodFingerprint(
|
object InfocardsIncognitoFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/Boolean;",
|
returnType = "L",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
strings = listOf("vibrator")
|
strings = listOf("vibrator")
|
||||||
)
|
)
|
@ -1,17 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.layout.player.infocards.fingerprints
|
package app.revanced.patches.youtube.layout.player.infocards.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("infocards-incognito-parent-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object InfocardsIncognitoParentFingerprint : MethodFingerprint(
|
object InfocardsIncognitoParentFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/String;",
|
returnType = "L",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
strings = listOf("player_overlay_info_card_teaser"),
|
strings = listOf("player_overlay_info_card_teaser"),
|
||||||
)
|
)
|
@ -72,8 +72,8 @@ class PlayerOverlayFilterPatch : BytecodePatch() {
|
|||||||
""", listOf(ExternalLabel("currentcolor", mutableMethod.instruction(insertIndex + 1)))
|
""", listOf(ExternalLabel("currentcolor", mutableMethod.instruction(insertIndex + 1)))
|
||||||
)
|
)
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
patchSuccessArray[1] = true;
|
patchSuccessArray[1] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ class SuggestedActionsPatch : BytecodePatch() {
|
|||||||
val viewRegister = (iPutInstruction as Instruction22c).registerA
|
val viewRegister = (iPutInstruction as Instruction22c).registerA
|
||||||
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/PlayerLayoutPatch", "hideSuggestedActions")
|
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/PlayerLayoutPatch", "hideSuggestedActions")
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class SeekbarColorPatch : BytecodePatch() {
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
@ -13,7 +13,7 @@ object SeekbarTappingParentFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.accessibilityProgressTimeLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.accessibilityProgressTimeLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -16,7 +16,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
|
|||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingFingerprint
|
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingFingerprint
|
||||||
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingParentFingerprint
|
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -30,7 +30,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints
|
package app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ object TimeStampsContainerFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.timeStampsContainerLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.timeStampsContainerLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints.TimeStampsContainerFingerprint
|
import app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints.TimeStampsContainerFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
|
|||||||
@DependsOn(
|
@DependsOn(
|
||||||
[
|
[
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@ -22,7 +22,7 @@ object MinimizedPlaybackSettingsFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.backgroundCategoryLabelId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.backgroundCategoryLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
|
|||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.*
|
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.MISC_PATH
|
import app.revanced.util.integrations.Constants.MISC_PATH
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
@ -33,7 +33,7 @@ import org.jf.dexlib2.iface.reference.MethodReference
|
|||||||
[
|
[
|
||||||
PlayerTypeHookPatch::class,
|
PlayerTypeHookPatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.misc.playerbutton.fingerprints
|
package app.revanced.patches.youtube.misc.playerbutton.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ object LiveChatFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.liveChatButtonId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.liveChatButtonId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -13,14 +13,14 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.misc.playerbutton.fingerprints.LiveChatFingerprint
|
import app.revanced.patches.youtube.misc.playerbutton.fingerprints.LiveChatFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
||||||
|
|
||||||
@Name("hook-player-button-patch")
|
@Name("hook-player-button-patch")
|
||||||
@DependsOn([SharedResourcdIdPatch::class])
|
@DependsOn([SharedResourceIdPatch::class])
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class PlayerButtonPatch : BytecodePatch(
|
class PlayerButtonPatch : BytecodePatch(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.misc.playercontrols.fingerprints
|
package app.revanced.patches.youtube.misc.playercontrols.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ object BottomControlsInflateFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.bottomUiContainerResourceId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.bottomUiContainerResourceId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.misc.playercontrols.fingerprints
|
package app.revanced.patches.youtube.misc.playercontrols.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ object ControlsLayoutInflateFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.controlsLayoutStubResourceId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.controlsLayoutStubResourceId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -14,11 +14,11 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.misc.playercontrols.fingerprints.*
|
import app.revanced.patches.youtube.misc.playercontrols.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Name("player-controls-bytecode-patch")
|
@Name("player-controls-bytecode-patch")
|
||||||
@DependsOn([SharedResourcdIdPatch::class])
|
@DependsOn([SharedResourceIdPatch::class])
|
||||||
@Description("Manages the code for the player controls of the YouTube player.")
|
@Description("Manages the code for the player controls of the YouTube player.")
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
|
@ -14,18 +14,19 @@ import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
|||||||
@DependsOn([ResourceMappingPatch::class])
|
@DependsOn([ResourceMappingPatch::class])
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SharedResourcdIdPatch : ResourcePatch {
|
class SharedResourceIdPatch : ResourcePatch {
|
||||||
internal companion object {
|
internal companion object {
|
||||||
var accessibilityProgressTimeLabelId: Long = -1
|
var accessibilityProgressTimeLabelId: Long = -1
|
||||||
var accountSwitcherAccessibilityLabelId: Long = -1
|
var accountSwitcherAccessibilityLabelId: Long = -1
|
||||||
var appearanceStringId: Long = -1
|
var appearanceStringId: Long = -1
|
||||||
var backgroundCategoryLabelId: Long = -1
|
var backgroundCategoryLabelId: Long = -1
|
||||||
var bottomUiContainerResourceId: Long = -1
|
var bottomUiContainerResourceId: Long = -1
|
||||||
|
var chapterRepeatOnResourceId: Long = -1
|
||||||
var controlsLayoutStubResourceId: Long = -1
|
var controlsLayoutStubResourceId: Long = -1
|
||||||
var donationCompanionResourceId: Long = -1
|
var donationCompanionResourceId: Long = -1
|
||||||
var emptycolorLabelId: Long = -1
|
var emptyColorLabelId: Long = -1
|
||||||
var fabLabelId: Long = -1
|
var fabLabelId: Long = -1
|
||||||
var floatybarQueueLabelId: Long = -1
|
var floatyBarQueueLabelId: Long = -1
|
||||||
var imageOnlyTabId: Long = -1
|
var imageOnlyTabId: Long = -1
|
||||||
var imageWithTextTabId: Long = -1
|
var imageWithTextTabId: Long = -1
|
||||||
var layoutCircle: Long = -1
|
var layoutCircle: Long = -1
|
||||||
@ -35,7 +36,7 @@ class SharedResourcdIdPatch : ResourcePatch {
|
|||||||
var scrubbingLabelId: Long = -1
|
var scrubbingLabelId: Long = -1
|
||||||
var timeStampsContainerLabelId: Long = -1
|
var timeStampsContainerLabelId: Long = -1
|
||||||
var tooltipLabelId: Long = -1
|
var tooltipLabelId: Long = -1
|
||||||
var videoqualityfragmentLabelId: Long = -1
|
var videoQualityFragmentLabelId: Long = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
@ -49,11 +50,12 @@ class SharedResourcdIdPatch : ResourcePatch {
|
|||||||
appearanceStringId = findSharedResourceId("string", "app_theme_appearance_dark")
|
appearanceStringId = findSharedResourceId("string", "app_theme_appearance_dark")
|
||||||
backgroundCategoryLabelId = findSharedResourceId("string", "pref_background_and_offline_category")
|
backgroundCategoryLabelId = findSharedResourceId("string", "pref_background_and_offline_category")
|
||||||
bottomUiContainerResourceId = findSharedResourceId("id", "bottom_ui_container_stub")
|
bottomUiContainerResourceId = findSharedResourceId("id", "bottom_ui_container_stub")
|
||||||
|
chapterRepeatOnResourceId = findSharedResourceId("string", "chapter_repeat_on")
|
||||||
controlsLayoutStubResourceId = findSharedResourceId("id", "controls_layout_stub")
|
controlsLayoutStubResourceId = findSharedResourceId("id", "controls_layout_stub")
|
||||||
donationCompanionResourceId = findSharedResourceId("layout", "donation_companion")
|
donationCompanionResourceId = findSharedResourceId("layout", "donation_companion")
|
||||||
emptycolorLabelId = findSharedResourceId("color", "inline_time_bar_colorized_bar_empty_color_dark")
|
emptyColorLabelId = findSharedResourceId("color", "inline_time_bar_colorized_bar_empty_color_dark")
|
||||||
fabLabelId = findSharedResourceId("id", "fab")
|
fabLabelId = findSharedResourceId("id", "fab")
|
||||||
floatybarQueueLabelId = findSharedResourceId("string", "floaty_bar_queue_status")
|
floatyBarQueueLabelId = findSharedResourceId("string", "floaty_bar_queue_status")
|
||||||
imageOnlyTabId = findSharedResourceId("layout", "image_only_tab")
|
imageOnlyTabId = findSharedResourceId("layout", "image_only_tab")
|
||||||
imageWithTextTabId = findSharedResourceId("layout", "image_with_text_tab")
|
imageWithTextTabId = findSharedResourceId("layout", "image_with_text_tab")
|
||||||
layoutCircle = findSharedResourceId("layout", "endscreen_element_layout_circle")
|
layoutCircle = findSharedResourceId("layout", "endscreen_element_layout_circle")
|
||||||
@ -63,7 +65,7 @@ class SharedResourcdIdPatch : ResourcePatch {
|
|||||||
scrubbingLabelId = findSharedResourceId("dimen", "vertical_touch_offset_to_enter_fine_scrubbing")
|
scrubbingLabelId = findSharedResourceId("dimen", "vertical_touch_offset_to_enter_fine_scrubbing")
|
||||||
timeStampsContainerLabelId = findSharedResourceId("id", "timestamps_container")
|
timeStampsContainerLabelId = findSharedResourceId("id", "timestamps_container")
|
||||||
tooltipLabelId = findSharedResourceId("layout", "tooltip_content_view")
|
tooltipLabelId = findSharedResourceId("layout", "tooltip_content_view")
|
||||||
videoqualityfragmentLabelId = findSharedResourceId("layout", "video_quality_bottom_sheet_list_fragment_title")
|
videoQualityFragmentLabelId = findSharedResourceId("layout", "video_quality_bottom_sheet_list_fragment_title")
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints
|
package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ object ThemeSetterSystemFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.appearanceStringId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.appearanceStringId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterSystemFingerprint
|
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterSystemFingerprint
|
||||||
import app.revanced.util.bytecode.BytecodeHelper.injectInit
|
import app.revanced.util.bytecode.BytecodeHelper.injectInit
|
||||||
import app.revanced.util.integrations.Constants.INTEGRATIONS_PATH
|
import app.revanced.util.integrations.Constants.INTEGRATIONS_PATH
|
||||||
@ -26,7 +26,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
|||||||
[
|
[
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
ResourceMappingPatch::class,
|
ResourceMappingPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -12,7 +12,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
|||||||
import app.revanced.patches.shared.patch.options.PatchOptions
|
import app.revanced.patches.shared.patch.options.PatchOptions
|
||||||
import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch
|
import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsBytecodePatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsBytecodePatch
|
||||||
import app.revanced.util.resources.ResourceHelper.addPreference
|
import app.revanced.util.resources.ResourceHelper.addPreference
|
||||||
import app.revanced.util.resources.ResourceHelper.addReVancedPreference
|
import app.revanced.util.resources.ResourceHelper.addReVancedPreference
|
||||||
@ -28,7 +28,7 @@ import org.w3c.dom.Element
|
|||||||
[
|
[
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
PatchOptions::class,
|
PatchOptions::class,
|
||||||
SharedResourcdIdPatch::class,
|
SharedResourceIdPatch::class,
|
||||||
SettingsBytecodePatch::class
|
SettingsBytecodePatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.misc.playercontrols.patch.PlayerControlsPatch
|
import app.revanced.patches.youtube.misc.playercontrols.patch.PlayerControlsPatch
|
||||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.sponsorblock.bytecode.fingerprints.*
|
import app.revanced.patches.youtube.misc.sponsorblock.bytecode.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.timebar.patch.HookTimebarPatch
|
import app.revanced.patches.youtube.misc.timebar.patch.HookTimebarPatch
|
||||||
import app.revanced.patches.youtube.misc.videoid.mainstream.patch.MainstreamVideoIdPatch
|
import app.revanced.patches.youtube.misc.videoid.mainstream.patch.MainstreamVideoIdPatch
|
||||||
@ -34,7 +34,7 @@ import org.jf.dexlib2.iface.reference.MethodReference
|
|||||||
MainstreamVideoIdPatch::class,
|
MainstreamVideoIdPatch::class,
|
||||||
PlayerControlsPatch::class,
|
PlayerControlsPatch::class,
|
||||||
PlayerTypeHookPatch::class,
|
PlayerTypeHookPatch::class,
|
||||||
SharedResourcdIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
|
@ -13,6 +13,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
|||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
|
||||||
|
|
||||||
@Name("sponsorblock-secondary-bytecode-patch")
|
@Name("sponsorblock-secondary-bytecode-patch")
|
||||||
@ -41,20 +42,19 @@ class SponsorBlockSecondaryBytecodePatch : BytecodePatch() {
|
|||||||
Opcode.CONST -> {
|
Opcode.CONST -> {
|
||||||
when ((instruction as Instruction31i).wideLiteral) {
|
when ((instruction as Instruction31i).wideLiteral) {
|
||||||
resourceIds[0] -> { // total time
|
resourceIds[0] -> { // total time
|
||||||
val insertIndex = index + 3
|
val targetIndex = index + 2
|
||||||
val invokeInstruction = instructions.elementAt(insertIndex)
|
val targetInstruction = instructions.elementAt(targetIndex)
|
||||||
if (invokeInstruction.opcode != Opcode.IGET_OBJECT) return@forEachIndexed
|
val targetRegister = (targetInstruction as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
|
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
|
||||||
|
|
||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
insertIndex, """
|
targetIndex + 1, """
|
||||||
invoke-static {p1}, Lapp/revanced/integrations/sponsorblock/SponsorBlockUtils;->appendTimeWithoutSegments(Ljava/lang/String;)Ljava/lang/String;
|
invoke-static {v$targetRegister}, Lapp/revanced/integrations/sponsorblock/SponsorBlockUtils;->appendTimeWithoutSegments(Ljava/lang/String;)Ljava/lang/String;
|
||||||
move-result-object p1
|
move-result-object v$targetRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
patchSuccessArray[0] = true;
|
patchSuccessArray[0] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceIds[1] -> { // player overlay
|
resourceIds[1] -> { // player overlay
|
||||||
@ -69,7 +69,7 @@ class SponsorBlockSecondaryBytecodePatch : BytecodePatch() {
|
|||||||
"invoke-static {p0}, Lapp/revanced/integrations/sponsorblock/player/ui/SponsorBlockView;->initialize(Ljava/lang/Object;)V"
|
"invoke-static {p0}, Lapp/revanced/integrations/sponsorblock/player/ui/SponsorBlockView;->initialize(Ljava/lang/Object;)V"
|
||||||
)
|
)
|
||||||
|
|
||||||
patchSuccessArray[1] = true;
|
patchSuccessArray[1] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.youtube.misc.timebar.fingerprints
|
package app.revanced.patches.youtube.misc.timebar.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ object EmptyColorFingerprint : MethodFingerprint(
|
|||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.emptycolorLabelId
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.emptyColorLabelId
|
||||||
} == true
|
} == true
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -11,11 +11,11 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.misc.timebar.fingerprints.*
|
import app.revanced.patches.youtube.misc.timebar.fingerprints.*
|
||||||
|
|
||||||
@Name("hook-timebar-patch")
|
@Name("hook-timebar-patch")
|
||||||
@DependsOn([SharedResourcdIdPatch::class])
|
@DependsOn([SharedResourceIdPatch::class])
|
||||||
@YouTubeCompatibility
|
@YouTubeCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class HookTimebarPatch : BytecodePatch(
|
class HookTimebarPatch : BytecodePatch(
|
||||||
|
@ -15,6 +15,5 @@ object MainstreamVideoIdFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_INTERFACE,
|
Opcode.INVOKE_INTERFACE,
|
||||||
Opcode.MOVE_RESULT_OBJECT
|
Opcode.MOVE_RESULT_OBJECT
|
||||||
),
|
),
|
||||||
null,
|
customFingerprint = { it.definingClass.endsWith("SubtitlesOverlayPresenter;") }
|
||||||
{ it.definingClass.endsWith("SubtitlesOverlayPresenter;") }
|
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user