migrate within
This commit is contained in:
parent
99bfecbc97
commit
d6a437c7b1
36 changed files with 152 additions and 170 deletions
|
|
@ -1,7 +1,5 @@
|
||||||
package app.revanced.patches.shared.layout.theme
|
package app.revanced.patches.shared.layout.theme
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterImmediately
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.fieldAccess
|
import app.revanced.patcher.fieldAccess
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
|
|
@ -28,18 +26,18 @@ internal val BytecodePatchContext.lithoOnBoundsChangeMethod by gettingFirstMetho
|
||||||
definingClass = "this",
|
definingClass = "this",
|
||||||
name = "isStateful",
|
name = "isStateful",
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
location = MatchAfterWithin(5),
|
afterAtMost(5),
|
||||||
),
|
),
|
||||||
|
|
||||||
fieldAccess(
|
fieldAccess(
|
||||||
opcode = Opcode.IGET_OBJECT,
|
opcode = Opcode.IGET_OBJECT,
|
||||||
definingClass = "this",
|
definingClass = "this",
|
||||||
type = "Landroid/graphics/Paint",
|
type = "Landroid/graphics/Paint",
|
||||||
location = MatchAfterWithin(5),
|
afterAtMost(5),
|
||||||
),
|
),
|
||||||
methodCall(
|
methodCall(
|
||||||
smali = "Landroid/graphics/Paint;->setColor(I)V",
|
smali = "Landroid/graphics/Paint;->setColor(I)V",
|
||||||
location = MatchAfterImmediately(),
|
after(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
custom { method, _ ->
|
custom { method, _ ->
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ internal val BytecodePatchContext.nerdsStatsVideoFormatBuilderMethod by gettingF
|
||||||
returnType("Ljava/lang/String;")
|
returnType("Ljava/lang/String;")
|
||||||
parameterTypes("L")
|
parameterTypes("L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("codecs=\""),
|
"codecs=\""(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,6 @@ internal val BytecodePatchContext.offlineVideoEndpointMethod by gettingFirstMeth
|
||||||
"L",
|
"L",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions(
|
||||||
addString("Object is not an offlineable video: "),
|
"Object is not an offlineable video: "(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package app.revanced.patches.youtube.interaction.seekbar
|
package app.revanced.patches.youtube.interaction.seekbar
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterImmediately
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
|
import app.revanced.patcher.after
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.fieldAccess
|
import app.revanced.patcher.fieldAccess
|
||||||
import app.revanced.patcher.firstMethodComposite
|
import app.revanced.patcher.firstMethodComposite
|
||||||
import app.revanced.patcher.firstMutableMethodDeclaratively
|
import app.revanced.patcher.firstMutableMethodDeclaratively
|
||||||
|
|
@ -133,15 +133,15 @@ internal val BytecodePatchContext.seekbarTappingMethod by gettingFirstMethodDecl
|
||||||
Int.MAX_VALUE(),
|
Int.MAX_VALUE(),
|
||||||
|
|
||||||
newInstance("Landroid/graphics/Point;"),
|
newInstance("Landroid/graphics/Point;"),
|
||||||
methodCall(smali = "Landroid/graphics/Point;-><init>(II)V", location = MatchAfterImmediately()),
|
methodCall(smali = "Landroid/graphics/Point;-><init>(II)V", after()),
|
||||||
methodCall(
|
methodCall(
|
||||||
smali = "Lj\$/util/Optional;->of(Ljava/lang/Object;)Lj\$/util/Optional;",
|
smali = "Lj\$/util/Optional;->of(Ljava/lang/Object;)Lj\$/util/Optional;",
|
||||||
location = MatchAfterImmediately(),
|
after(),
|
||||||
),
|
),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
fieldAccess(opcode = Opcode.IPUT_OBJECT, type = "Lj\$/util/Optional;", location = MatchAfterImmediately()),
|
fieldAccess(opcode = Opcode.IPUT_OBJECT, type = "Lj\$/util/Optional;", after()),
|
||||||
|
|
||||||
opcode(Opcode.INVOKE_VIRTUAL, location = MatchAfterWithin(10)),
|
afterAtMost(10, Opcode.INVOKE_VIRTUAL()),
|
||||||
)
|
)
|
||||||
custom { method, _ -> method.name == "onTouchEvent" }
|
custom { method, _ -> method.name == "onTouchEvent" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.layout.buttons.navigation
|
package app.revanced.patches.youtube.layout.buttons.navigation
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterImmediately
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
|
|
@ -16,9 +15,9 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal val BytecodePatchContext.addCreateButtonViewMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.addCreateButtonViewMethod by gettingFirstMethodDeclaratively {
|
||||||
instructions(
|
instructions(
|
||||||
addString("Android Wear"),
|
"Android Wear"(),
|
||||||
Opcode.IF_EQZ(),
|
Opcode.IF_EQZ(),
|
||||||
addString("Android Automotive", location = MatchAfterImmediately()),
|
addString("Android Automotive", after()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.layout.formfactor
|
package app.revanced.patches.youtube.layout.formfactor
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.getInstruction
|
import app.revanced.patcher.extensions.getInstruction
|
||||||
import app.revanced.patcher.fieldAccess
|
import app.revanced.patcher.fieldAccess
|
||||||
|
|
@ -57,7 +56,7 @@ val `Change form factor` by creatingBytecodePatch(
|
||||||
fieldAccess(
|
fieldAccess(
|
||||||
definingClass = formFactorEnumConstructorMethod.originalClassDef.type,
|
definingClass = formFactorEnumConstructorMethod.originalClassDef.type,
|
||||||
type = "I",
|
type = "I",
|
||||||
location = MatchAfterWithin(50),
|
afterAtMost(50),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
package app.revanced.patches.youtube.layout.hide.general
|
package app.revanced.patches.youtube.layout.hide.general
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.StringComparisonType
|
import app.revanced.patcher.StringComparisonType
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
|
import app.revanced.patcher.after
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.checkCast
|
import app.revanced.patcher.checkCast
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.methodCall
|
import app.revanced.patcher.methodCall
|
||||||
import app.revanced.patcher.opcode
|
import app.revanced.patcher.opcode
|
||||||
import app.revanced.patcher.opcodes
|
import app.revanced.patcher.opcodes
|
||||||
|
|
@ -28,7 +30,7 @@ internal val BytecodePatchContext.hideShowMoreButtonMethod by gettingFirstMethod
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.LAYOUT("expand_button_down"),
|
ResourceType.LAYOUT("expand_button_down"),
|
||||||
methodCall(smali = "Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;"),
|
methodCall(smali = "Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,8 +48,8 @@ internal val BytecodePatchContext.parseElementFromBufferMethod by gettingFirstMe
|
||||||
instructions(
|
instructions(
|
||||||
Opcode.IGET_OBJECT(),
|
Opcode.IGET_OBJECT(),
|
||||||
// IGET_BOOLEAN // 20.07+
|
// IGET_BOOLEAN // 20.07+
|
||||||
opcode(Opcode.INVOKE_INTERFACE, location = MatchAfterWithin(1)),
|
afterAtMost(1, Opcode.INVOKE_INTERFACE()),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
|
|
||||||
addString("Failed to parse Element", comparison = StringComparisonType.STARTS_WITH),
|
addString("Failed to parse Element", comparison = StringComparisonType.STARTS_WITH),
|
||||||
)
|
)
|
||||||
|
|
@ -57,7 +59,7 @@ internal val BytecodePatchContext.playerOverlayMethod by gettingFirstMethodDecla
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returnType("L")
|
returnType("L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("player_overlay_in_video_programming"),
|
"player_overlay_in_video_programming"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,8 +143,8 @@ internal val BytecodePatchContext.showFloatingMicrophoneButtonMethod by gettingF
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("fab"),
|
ResourceType.ID("fab"),
|
||||||
checkCast("/FloatingActionButton;", location = MatchAfterWithin(10)),
|
checkCast("/FloatingActionButton;", afterAtMost(10)),
|
||||||
opcode(Opcode.IGET_BOOLEAN, location = MatchAfterWithin(15)),
|
afterAtMost(15, Opcode.IGET_BOOLEAN()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package app.revanced.patches.youtube.layout.hide.infocards
|
package app.revanced.patches.youtube.layout.hide.infocards
|
||||||
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.opcodes
|
import app.revanced.patcher.opcodes
|
||||||
import app.revanced.patcher.parameterTypes
|
import app.revanced.patcher.parameterTypes
|
||||||
import app.revanced.patcher.patch.BytecodePatchContext
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
|
|
@ -17,7 +17,7 @@ internal val BytecodePatchContext.infocardsIncognitoMethod by gettingFirstMethod
|
||||||
returnType("Ljava/lang/Boolean;")
|
returnType("Ljava/lang/Boolean;")
|
||||||
parameterTypes("L", "J")
|
parameterTypes("L", "J")
|
||||||
instructions(
|
instructions(
|
||||||
addString("vibrator"),
|
"vibrator"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ internal val BytecodePatchContext.infocardsIncognitoParentMethod by gettingFirst
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returnType("Ljava/lang/String;")
|
returnType("Ljava/lang/String;")
|
||||||
instructions(
|
instructions(
|
||||||
addString("player_overlay_info_card_teaser"),
|
"player_overlay_info_card_teaser"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
package app.revanced.patches.youtube.layout.hide.shorts
|
package app.revanced.patches.youtube.layout.hide.shorts
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
|
import app.revanced.patcher.after
|
||||||
|
import app.revanced.patcher.at
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
import app.revanced.patcher.invoke
|
import app.revanced.patcher.invoke
|
||||||
|
|
@ -21,7 +22,7 @@ internal val BytecodePatchContext.shortsBottomBarContainerMethod by gettingFirst
|
||||||
returnType("V")
|
returnType("V")
|
||||||
parameterTypes("Landroid/view/View;", "Landroid/os/Bundle;")
|
parameterTypes("Landroid/view/View;", "Landroid/os/Bundle;")
|
||||||
instructions(
|
instructions(
|
||||||
addString("r_pfvc"),
|
"r_pfvc"(),
|
||||||
ResourceType.ID("bottom_bar_container"),
|
ResourceType.ID("bottom_bar_container"),
|
||||||
methodCall(name = "getHeight"),
|
methodCall(name = "getHeight"),
|
||||||
Opcode.MOVE_RESULT(),
|
Opcode.MOVE_RESULT(),
|
||||||
|
|
@ -35,17 +36,17 @@ internal val BytecodePatchContext.renderBottomNavigationBarMethod by gettingFirs
|
||||||
returnType("V")
|
returnType("V")
|
||||||
parameterTypes("Ljava/lang/String;")
|
parameterTypes("Ljava/lang/String;")
|
||||||
instructions(
|
instructions(
|
||||||
opcode(Opcode.IGET_OBJECT, MatchFirst()),
|
Opcode.IGET_OBJECT(),
|
||||||
opcode(Opcode.MONITOR_ENTER, MatchAfterImmediately()),
|
after(Opcode.MONITOR_ENTER()),
|
||||||
opcode(Opcode.IGET_OBJECT, MatchAfterImmediately()),
|
after(Opcode.IGET_OBJECT()),
|
||||||
opcode(Opcode.IF_EQZ, MatchAfterImmediately()),
|
after(Opcode.IF_EQZ()),
|
||||||
opcode(Opcode.INVOKE_INTERFACE, MatchAfterImmediately()),
|
after(Opcode.INVOKE_INTERFACE()),
|
||||||
|
|
||||||
Opcode.MONITOR_EXIT(),
|
Opcode.MONITOR_EXIT(),
|
||||||
opcode(Opcode.RETURN_VOID, MatchAfterImmediately()),
|
after(Opcode.RETURN_VOID()),
|
||||||
opcode(Opcode.MOVE_EXCEPTION, MatchAfterImmediately()),
|
after(Opcode.MOVE_EXCEPTION()),
|
||||||
opcode(Opcode.MONITOR_EXIT, MatchAfterImmediately()),
|
after(Opcode.MONITOR_EXIT()),
|
||||||
opcode(Opcode.THROW, MatchAfterImmediately()),
|
after(Opcode.THROW()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +63,7 @@ internal val BytecodePatchContext.legacyRenderBottomNavigationBarLegacyParentMet
|
||||||
"L",
|
"L",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions(
|
||||||
addString("aa"),
|
"aa"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,7 +83,7 @@ internal val BytecodePatchContext.renderBottomNavigationBarLegacy1941ParentMetho
|
||||||
"L",
|
"L",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions(
|
||||||
addString("aa"),
|
"aa"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +96,7 @@ internal val BytecodePatchContext.renderBottomNavigationBarParentMethod by getti
|
||||||
"I",
|
"I",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions(
|
||||||
addString("RPCAC"),
|
"RPCAC"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +113,7 @@ internal val BytecodePatchContext.setPivotBarVisibilityMethod by gettingFirstMet
|
||||||
internal val BytecodePatchContext.setPivotBarVisibilityParentMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.setPivotBarVisibilityParentMethod by gettingFirstMethodDeclaratively {
|
||||||
parameterTypes("Z")
|
parameterTypes("Z")
|
||||||
instructions(
|
instructions(
|
||||||
addString("FEnotifications_inbox"),
|
"FEnotifications_inbox"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package app.revanced.patches.youtube.layout.hide.time
|
package app.revanced.patches.youtube.layout.hide.time
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
|
import app.revanced.patcher.after
|
||||||
import app.revanced.patcher.fieldAccess
|
import app.revanced.patcher.fieldAccess
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.methodCall
|
import app.revanced.patcher.methodCall
|
||||||
import app.revanced.patcher.opcode
|
import app.revanced.patcher.opcode
|
||||||
import app.revanced.patcher.parameterTypes
|
import app.revanced.patcher.parameterTypes
|
||||||
|
|
@ -22,17 +23,17 @@ internal val BytecodePatchContext.timeCounterMethod by gettingFirstMethodDeclara
|
||||||
methodCall(
|
methodCall(
|
||||||
opcode = Opcode.INVOKE_STATIC,
|
opcode = Opcode.INVOKE_STATIC,
|
||||||
returnType = "Ljava/lang/CharSequence;",
|
returnType = "Ljava/lang/CharSequence;",
|
||||||
location = MatchAfterImmediately(),
|
after(),
|
||||||
),
|
),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
fieldAccess(opcode = Opcode.IGET_WIDE, type = "J", location = MatchAfterImmediately()),
|
fieldAccess(opcode = Opcode.IGET_WIDE, type = "J", after()),
|
||||||
fieldAccess(opcode = Opcode.IGET_WIDE, type = "J", location = MatchAfterImmediately()),
|
fieldAccess(opcode = Opcode.IGET_WIDE, type = "J", after()),
|
||||||
opcode(Opcode.SUB_LONG_2ADDR, location = MatchAfterImmediately()),
|
after(Opcode.SUB_LONG_2ADDR()),
|
||||||
|
|
||||||
methodCall(
|
methodCall(
|
||||||
opcode = Opcode.INVOKE_STATIC,
|
opcode = Opcode.INVOKE_STATIC,
|
||||||
returnType = "Ljava/lang/CharSequence;",
|
returnType = "Ljava/lang/CharSequence;",
|
||||||
location = MatchAfterWithin(5),
|
afterAtMost(5),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
package app.revanced.patches.youtube.layout.miniplayer
|
package app.revanced.patches.youtube.layout.miniplayer
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.checkCast
|
import app.revanced.patcher.checkCast
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
|
@ -52,7 +52,7 @@ internal val BytecodePatchContext.miniplayerModernViewParentMethod by gettingFir
|
||||||
returnType("Ljava/lang/String;")
|
returnType("Ljava/lang/String;")
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
addString("player_overlay_modern_mini_player_controls"),
|
"player_overlay_modern_mini_player_controls"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ internal val BytecodePatchContext.miniplayerModernForwardButtonMethod by getting
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("modern_miniplayer_forward_button"),
|
ResourceType.ID("modern_miniplayer_forward_button"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
afterAtMost(5, Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,7 +121,7 @@ internal val BytecodePatchContext.miniplayerModernOverlayViewMethod by gettingFi
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("scrim_overlay"),
|
ResourceType.ID("scrim_overlay"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
afterAtMost(5, Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -134,7 +134,7 @@ internal val BytecodePatchContext.miniplayerModernRewindButtonMethod by gettingF
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("modern_miniplayer_rewind_button"),
|
ResourceType.ID("modern_miniplayer_rewind_button"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
afterAtMost(5, Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ internal val BytecodePatchContext.miniplayerModernActionButtonMethod by gettingF
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("modern_miniplayer_overlay_action_button"),
|
ResourceType.ID("modern_miniplayer_overlay_action_button"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
afterAtMost(5, Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -164,11 +164,11 @@ internal val BytecodePatchContext.miniplayerOverrideMethod by gettingFirstMethod
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returnType("L")
|
returnType("L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("appName"),
|
"appName"(),
|
||||||
methodCall(
|
methodCall(
|
||||||
parameters = listOf("Landroid/content/Context;"),
|
parameters = listOf("Landroid/content/Context;"),
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
location = MatchAfterWithin(10),
|
afterAtMost(10),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
package app.revanced.patches.youtube.layout.player.fullscreen
|
package app.revanced.patches.youtube.layout.player.fullscreen
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
|
import app.revanced.patcher.after
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.literal
|
import app.revanced.patcher.literal
|
||||||
import app.revanced.patcher.opcode
|
import app.revanced.patcher.opcode
|
||||||
import app.revanced.patcher.opcodes
|
import app.revanced.patcher.opcodes
|
||||||
|
|
@ -22,8 +24,8 @@ internal val BytecodePatchContext.openVideosFullscreenPortraitMethod by gettingF
|
||||||
instructions(
|
instructions(
|
||||||
Opcode.MOVE_RESULT(), // Conditional check to modify.
|
Opcode.MOVE_RESULT(), // Conditional check to modify.
|
||||||
// Open videos fullscreen portrait feature flag.
|
// Open videos fullscreen portrait feature flag.
|
||||||
literal(45666112L, location = MatchAfterWithin(5)), // Cannot be more than 5.
|
literal(45666112L, afterAtMost(5)), // Cannot be more than 5.
|
||||||
opcode(Opcode.MOVE_RESULT, location = MatchAfterWithin(10)),
|
afterAtMost(10, Opcode.MOVE_RESULT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.layout.player.overlay
|
package app.revanced.patches.youtube.layout.player.overlay
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.checkCast
|
import app.revanced.patcher.checkCast
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
|
@ -12,6 +11,6 @@ internal val BytecodePatchContext.createPlayerOverviewMethod by gettingFirstMeth
|
||||||
returnType("V")
|
returnType("V")
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("scrim_overlay"),
|
ResourceType.ID("scrim_overlay"),
|
||||||
checkCast("Landroid/widget/ImageView;", location = MatchAfterWithin(10)),
|
checkCast("Landroid/widget/ImageView;", afterAtMost(10)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,21 +15,21 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||||
internal val BytecodePatchContext.dislikeMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.dislikeMethod by gettingFirstMethodDeclaratively {
|
||||||
returnType("V")
|
returnType("V")
|
||||||
instructions(
|
instructions(
|
||||||
addString("like/dislike"),
|
"like/dislike"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.likeMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.likeMethod by gettingFirstMethodDeclaratively {
|
||||||
returnType("V")
|
returnType("V")
|
||||||
instructions(
|
instructions(
|
||||||
addString("like/like"),
|
"like/like"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.removeLikeMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.removeLikeMethod by gettingFirstMethodDeclaratively {
|
||||||
returnType("V")
|
returnType("V")
|
||||||
instructions(
|
instructions(
|
||||||
addString("like/removelike"),
|
"like/removelike"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ internal val BytecodePatchContext.rollingNumberMeasureStaticLabelParentMethod by
|
||||||
returnType("Ljava/lang/String;")
|
returnType("Ljava/lang/String;")
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
addString("RollingNumberFontProperties{paint="),
|
"RollingNumberFontProperties{paint="(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,7 +105,7 @@ internal val BytecodePatchContext.rollingNumberTextViewMethod by gettingFirstMet
|
||||||
internal val BytecodePatchContext.textComponentConstructorMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.textComponentConstructorMethod by gettingFirstMethodDeclaratively {
|
||||||
accessFlags(AccessFlags.CONSTRUCTOR, AccessFlags.PRIVATE)
|
accessFlags(AccessFlags.CONSTRUCTOR, AccessFlags.PRIVATE)
|
||||||
instructions(
|
instructions(
|
||||||
addString("TextComponent"),
|
"TextComponent"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,7 +113,7 @@ internal val BytecodePatchContext.textComponentDataMethod by gettingFirstMethodD
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||||
parameterTypes("L", "L")
|
parameterTypes("L", "L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("text"),
|
"text"(),
|
||||||
)
|
)
|
||||||
custom { _, classDef ->
|
custom { _, classDef ->
|
||||||
classDef.fields.find { it.type == "Ljava/util/BitSet;" } != null
|
classDef.fields.find { it.type == "Ljava/util/BitSet;" } != null
|
||||||
|
|
@ -128,7 +128,7 @@ internal val BytecodePatchContext.textComponentLookupMethod by gettingFirstMetho
|
||||||
returnType("L")
|
returnType("L")
|
||||||
parameterTypes("L")
|
parameterTypes("L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("…"),
|
"…"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
package app.revanced.patches.youtube.layout.seekbar
|
package app.revanced.patches.youtube.layout.seekbar
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterImmediately
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.anyInstruction
|
import app.revanced.patcher.anyInstruction
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
|
@ -93,8 +92,8 @@ internal val BytecodePatchContext.playerLinearGradientMethod by gettingFirstMeth
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.COLOR("yt_youtube_magenta"),
|
ResourceType.COLOR("yt_youtube_magenta"),
|
||||||
|
|
||||||
opcode(Opcode.FILLED_NEW_ARRAY, location = MatchAfterWithin(5)),
|
afterAtMost(5, Opcode.FILLED_NEW_ARRAY()),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,7 +106,7 @@ internal val BytecodePatchContext.playerLinearGradientLegacyMethod by gettingFir
|
||||||
ResourceType.COLOR("yt_youtube_magenta"),
|
ResourceType.COLOR("yt_youtube_magenta"),
|
||||||
|
|
||||||
Opcode.FILLED_NEW_ARRAY(),
|
Opcode.FILLED_NEW_ARRAY(),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -130,8 +129,8 @@ internal val BytecodePatchContext.lottieCompositionFactoryZipMethod by gettingFi
|
||||||
parameterTypes("Landroid/content/Context;", "Ljava/util/zip/ZipInputStream;", "Ljava/lang/String;")
|
parameterTypes("Landroid/content/Context;", "Ljava/util/zip/ZipInputStream;", "Ljava/lang/String;")
|
||||||
returnType("L")
|
returnType("L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("Unable to parse composition"),
|
"Unable to parse composition"(),
|
||||||
addString(" however it was not found in the animation."),
|
" however it was not found in the animation."(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.layout.shortsautoplay
|
package app.revanced.patches.youtube.layout.shortsautoplay
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
import app.revanced.patcher.fieldAccess
|
import app.revanced.patcher.fieldAccess
|
||||||
|
|
@ -17,10 +16,10 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||||
internal val BytecodePatchContext.reelEnumConstructorMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.reelEnumConstructorMethod by gettingFirstMethodDeclaratively {
|
||||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||||
instructions(
|
instructions(
|
||||||
addString("REEL_LOOP_BEHAVIOR_UNKNOWN"),
|
"REEL_LOOP_BEHAVIOR_UNKNOWN"(),
|
||||||
addString("REEL_LOOP_BEHAVIOR_SINGLE_PLAY"),
|
"REEL_LOOP_BEHAVIOR_SINGLE_PLAY"(),
|
||||||
addString("REEL_LOOP_BEHAVIOR_REPEAT"),
|
"REEL_LOOP_BEHAVIOR_REPEAT"(),
|
||||||
addString("REEL_LOOP_BEHAVIOR_END_SCREEN"),
|
"REEL_LOOP_BEHAVIOR_END_SCREEN"(),
|
||||||
Opcode.RETURN_VOID(),
|
Opcode.RETURN_VOID(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -29,7 +28,7 @@ internal val BytecodePatchContext.reelPlaybackRepeatParentMethod by gettingFirst
|
||||||
returnType("V")
|
returnType("V")
|
||||||
parameterTypes("Ljava/lang/String;", "J")
|
parameterTypes("Ljava/lang/String;", "J")
|
||||||
instructions(
|
instructions(
|
||||||
addString("Reels[%s] Playback Time: %d ms"),
|
"Reels[%s] Playback Time: %d ms"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,13 +55,13 @@ internal val BytecodePatchContext.reelPlaybackMethod by gettingFirstMethodDeclar
|
||||||
methodCall(
|
methodCall(
|
||||||
name = "<init>",
|
name = "<init>",
|
||||||
parameters = listOf("I", "L", "L"),
|
parameters = listOf("I", "L", "L"),
|
||||||
location = MatchAfterWithin(15),
|
afterAtMost(15),
|
||||||
),
|
),
|
||||||
methodCall(
|
methodCall(
|
||||||
opcode = Opcode.INVOKE_VIRTUAL,
|
opcode = Opcode.INVOKE_VIRTUAL,
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
returnType = "I",
|
returnType = "I",
|
||||||
location = MatchAfterWithin(5),
|
afterAtMost(5),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.layout.spoofappversion
|
package app.revanced.patches.youtube.layout.spoofappversion
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.fieldAccess
|
import app.revanced.patcher.fieldAccess
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
|
|
@ -21,10 +20,10 @@ internal val BytecodePatchContext.toolBarButtonMethod by gettingFirstMethodDecla
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("menu_item_view"),
|
ResourceType.ID("menu_item_view"),
|
||||||
methodCall(returnType = "I", opcode = Opcode.INVOKE_INTERFACE),
|
methodCall(returnType = "I", opcode = Opcode.INVOKE_INTERFACE),
|
||||||
opcode(Opcode.MOVE_RESULT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT()),
|
||||||
fieldAccess(type = "Landroid/widget/ImageView;", opcode = Opcode.IGET_OBJECT, location = MatchAfterWithin(6)),
|
fieldAccess(type = "Landroid/widget/ImageView;", opcode = Opcode.IGET_OBJECT, afterAtMost(6)),
|
||||||
methodCall("Landroid/content/res/Resources;", "getDrawable", location = MatchAfterWithin(8)),
|
methodCall("Landroid/content/res/Resources;", "getDrawable", afterAtMost(8)),
|
||||||
methodCall("Landroid/widget/ImageView;", "setImageDrawable", location = MatchAfterWithin(4)),
|
methodCall("Landroid/widget/ImageView;", "setImageDrawable", afterAtMost(4)),
|
||||||
)
|
)
|
||||||
custom { method, _ ->
|
custom { method, _ ->
|
||||||
// 20.37+ has second parameter of "Landroid/content/Context;"
|
// 20.37+ has second parameter of "Landroid/content/Context;"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||||
internal val BytecodePatchContext.intentActionMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.intentActionMethod by gettingFirstMethodDeclaratively {
|
||||||
parameterTypes("Landroid/content/Intent;")
|
parameterTypes("Landroid/content/Intent;")
|
||||||
instructions(
|
instructions(
|
||||||
addString("has_handled_intent"),
|
"has_handled_intent"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ internal val BytecodePatchContext.browseIdMethod by gettingFirstMethodDeclarativ
|
||||||
|
|
||||||
// parameterTypes() // 20.30 and earlier is no parameters. 20.31+ parameter is L.
|
// parameterTypes() // 20.30 and earlier is no parameters. 20.31+ parameter is L.
|
||||||
instructions(
|
instructions(
|
||||||
addString("FEwhat_to_watch"),
|
"FEwhat_to_watch"(),
|
||||||
512(),
|
512(),
|
||||||
fieldAccess(opcode = Opcode.IPUT_OBJECT, type = "Ljava/lang/String;"),
|
fieldAccess(opcode = Opcode.IPUT_OBJECT, type = "Ljava/lang/String;"),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.layout.startupshortsreset
|
package app.revanced.patches.youtube.layout.startupshortsreset
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.StringComparisonType
|
import app.revanced.patcher.StringComparisonType
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.addString
|
||||||
|
|
@ -25,10 +24,10 @@ internal val BytecodePatchContext.userWasInShortsAlternativeMethod by gettingFir
|
||||||
parameterTypes("Ljava/lang/Object;")
|
parameterTypes("Ljava/lang/Object;")
|
||||||
instructions(
|
instructions(
|
||||||
checkCast("Ljava/lang/Boolean;"),
|
checkCast("Ljava/lang/Boolean;"),
|
||||||
methodCall(smali = "Ljava/lang/Boolean;->booleanValue()Z", location = MatchAfterImmediately()),
|
methodCall(smali = "Ljava/lang/Boolean;->booleanValue()Z", after()),
|
||||||
opcode(Opcode.MOVE_RESULT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT()),
|
||||||
// 20.40+ string was merged into another string and is a partial match.
|
// 20.40+ string was merged into another string and is a partial match.
|
||||||
addString("userIsInShorts: ", comparison = StringComparisonType.CONTAINS, location = MatchAfterWithin(15)),
|
addString("userIsInShorts: ", comparison = StringComparisonType.CONTAINS, afterAtMost(15)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -40,7 +39,7 @@ internal val BytecodePatchContext.userWasInShortsLegacyMethod by gettingFirstMet
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
parameterTypes("Ljava/lang/Object;")
|
parameterTypes("Ljava/lang/Object;")
|
||||||
instructions(
|
instructions(
|
||||||
addString("Failed to read user_was_in_shorts proto after successful warmup"),
|
"Failed to read user_was_in_shorts proto after successful warmup"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
|
||||||
internal val BytecodePatchContext.deviceDimensionsModelToStringMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.deviceDimensionsModelToStringMethod by gettingFirstMethodDeclaratively {
|
||||||
returnType("L")
|
returnType("L")
|
||||||
instructions(
|
instructions(
|
||||||
addString("minh."),
|
"minh."(),
|
||||||
addString(";maxh."),
|
";maxh."(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package app.revanced.patches.youtube.misc.extension.hooks
|
package app.revanced.patches.youtube.misc.extension.hooks
|
||||||
|
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patches.shared.misc.extension.activityOnCreateExtensionHook
|
import app.revanced.patches.shared.misc.extension.activityOnCreateExtensionHook
|
||||||
import app.revanced.patches.shared.misc.extension.extensionHook
|
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||||
import app.revanced.patches.youtube.shared.YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
import app.revanced.patches.youtube.shared.YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
||||||
|
|
@ -13,11 +14,11 @@ internal val applicationInitHook = extensionHook {
|
||||||
// Does _not_ resolve to the YouTube main activity.
|
// Does _not_ resolve to the YouTube main activity.
|
||||||
// Required as some hooked code runs before the main activity is launched.
|
// Required as some hooked code runs before the main activity is launched.
|
||||||
instructions(
|
instructions(
|
||||||
addString("Application.onCreate"),
|
"Application.onCreate"(),
|
||||||
addString("Application creation")
|
"Application creation"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val applicationInitOnCrateHook = activityOnCreateExtensionHook(
|
internal val applicationInitOnCrateHook = activityOnCreateExtensionHook(
|
||||||
YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture
|
package app.revanced.patches.youtube.misc.fix.backtoexitgesture
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
|
import app.revanced.patcher.after
|
||||||
import app.revanced.patcher.checkCast
|
import app.revanced.patcher.checkCast
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.literal
|
import app.revanced.patcher.literal
|
||||||
import app.revanced.patcher.methodCall
|
import app.revanced.patcher.methodCall
|
||||||
import app.revanced.patcher.opcode
|
import app.revanced.patcher.opcode
|
||||||
|
|
@ -33,10 +34,10 @@ internal val BytecodePatchContext.recyclerViewTopScrollingMethod by gettingFirst
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
methodCall(smali = "Ljava/util/Iterator;->next()Ljava/lang/Object;"),
|
methodCall(smali = "Ljava/util/Iterator;->next()Ljava/lang/Object;"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
checkCast("Landroid/support/v7/widget/RecyclerView;", MatchAfterImmediately()),
|
checkCast("Landroid/support/v7/widget/RecyclerView;", MatchAfterImmediately()),
|
||||||
literal(0, location = MatchAfterImmediately()),
|
literal(0, after()),
|
||||||
methodCall(definingClass = "Landroid/support/v7/widget/RecyclerView;", location = MatchAfterImmediately()),
|
methodCall(definingClass = "Landroid/support/v7/widget/RecyclerView;", after()),
|
||||||
opcode(Opcode.GOTO, MatchAfterImmediately()),
|
after(Opcode.GOTO()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@ internal val BytecodePatchContext.unstableContentProviderMethod by gettingFirstM
|
||||||
name = "putAll",
|
name = "putAll",
|
||||||
parameters = listOf("Ljava/util/Map;"),
|
parameters = listOf("Ljava/util/Map;"),
|
||||||
),
|
),
|
||||||
addString("ContentProvider query returned null cursor"),
|
"ContentProvider query returned null cursor"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.misc.gms
|
package app.revanced.patches.youtube.misc.gms
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.*
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
|
@ -21,7 +20,7 @@ internal val BytecodePatchContext.specificNetworkErrorViewControllerMethod by ge
|
||||||
ResourceType.DRAWABLE("ic_offline_no_content_upside_down"),
|
ResourceType.DRAWABLE("ic_offline_no_content_upside_down"),
|
||||||
ResourceType.STRING("offline_no_content_body_text_not_offline_eligible"),
|
ResourceType.STRING("offline_no_content_body_text_not_offline_eligible"),
|
||||||
methodCall(name = "getString", returnType = "Ljava/lang/String;"),
|
methodCall(name = "getString", returnType = "Ljava/lang/String;"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -35,6 +34,6 @@ internal val BytecodePatchContext.loadingFrameLayoutControllerMethod by gettingF
|
||||||
ResourceType.DRAWABLE("ic_offline_no_content_upside_down"),
|
ResourceType.DRAWABLE("ic_offline_no_content_upside_down"),
|
||||||
ResourceType.STRING("offline_no_content_body_text_not_offline_eligible"),
|
ResourceType.STRING("offline_no_content_body_text_not_offline_eligible"),
|
||||||
methodCall(name = "getString", returnType = "Ljava/lang/String;"),
|
methodCall(name = "getString", returnType = "Ljava/lang/String;"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ internal val BytecodePatchContext.messageDigestImageUrlParentMethod by gettingFi
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
anyInstruction(
|
anyInstruction(
|
||||||
addString("@#&=*+-_.,:!?()/~'%;\$"),
|
"@#&=*+-_.,:!?()/~'%;\$"(),
|
||||||
addString("@#&=*+-_.,:!?()/~'%;\$[]"), // 20.38+
|
"@#&=*+-_.,:!?()/~'%;\$[]"(), // 20.38+
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ internal val BytecodePatchContext.abUriParserLegacyMethod by gettingFirstMethodD
|
||||||
returnType("Ljava/lang/Object;")
|
returnType("Ljava/lang/Object;")
|
||||||
parameterTypes("Ljava/lang/Object;")
|
parameterTypes("Ljava/lang/Object;")
|
||||||
instructions(
|
instructions(
|
||||||
addString("Found entityKey=`"),
|
"Found entityKey=`"(),
|
||||||
addString("that does not contain a PlaylistVideoEntityId", comparison = StringComparisonType.CONTAINS),
|
addString("that does not contain a PlaylistVideoEntityId", comparison = StringComparisonType.CONTAINS),
|
||||||
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
||||||
)
|
)
|
||||||
|
|
@ -48,8 +48,8 @@ internal val BytecodePatchContext.httpUriParserMethod by gettingFirstMethodDecla
|
||||||
parameterTypes("Ljava/lang/String;")
|
parameterTypes("Ljava/lang/String;")
|
||||||
instructions(
|
instructions(
|
||||||
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
||||||
addString("https"),
|
"https"(),
|
||||||
addString("://"),
|
"://"(),
|
||||||
addString("https:"),
|
"https:"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal val BytecodePatchContext.componentCreateMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.componentCreateMethod by gettingFirstMethodDeclaratively {
|
||||||
instructions(
|
instructions(
|
||||||
addString("Element missing correct type extension"),
|
"Element missing correct type extension"(),
|
||||||
addString("Element missing type"),
|
"Element missing type"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ internal val BytecodePatchContext.emptyComponentMethod by gettingFirstMethodDecl
|
||||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.PRIVATE, AccessFlags.CONSTRUCTOR)
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
instructions(
|
instructions(
|
||||||
addString("EmptyComponent"),
|
"EmptyComponent"(),
|
||||||
)
|
)
|
||||||
custom { _, classDef ->
|
custom { _, classDef ->
|
||||||
classDef.methods.filter { AccessFlags.STATIC.isSet(it.accessFlags) }.size == 1
|
classDef.methods.filter { AccessFlags.STATIC.isSet(it.accessFlags) }.size == 1
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package app.revanced.patches.youtube.misc.loopvideo
|
package app.revanced.patches.youtube.misc.loopvideo
|
||||||
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.patch.BytecodePatchContext
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
import app.revanced.patcher.returnType
|
import app.revanced.patcher.returnType
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
@ -12,7 +12,7 @@ internal val BytecodePatchContext.videoStartPlaybackMethod by gettingFirstMethod
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returnType("V")
|
returnType("V")
|
||||||
instructions(
|
instructions(
|
||||||
addString("play() called when the player wasn't loaded."),
|
"play() called when the player wasn't loaded."(),
|
||||||
addString("play() blocked because Background Playability failed"),
|
"play() blocked because Background Playability failed"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package app.revanced.patches.youtube.misc.navigation
|
package app.revanced.patches.youtube.misc.navigation
|
||||||
|
|
||||||
import app.revanced.patcher.*
|
import app.revanced.patcher.*
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterImmediately
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
|
|
@ -131,26 +129,26 @@ internal val BytecodePatchContext.pivotBarButtonsViewSetSelectedMethod by gettin
|
||||||
internal val BytecodePatchContext.pivotBarConstructorMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.pivotBarConstructorMethod by gettingFirstMethodDeclaratively {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||||
instructions(
|
instructions(
|
||||||
addString("com.google.android.apps.youtube.app.endpoint.flags"),
|
"com.google.android.apps.youtube.app.endpoint.flags"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.imageEnumConstructorMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.imageEnumConstructorMethod by gettingFirstMethodDeclaratively {
|
||||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||||
instructions(
|
instructions(
|
||||||
addString("TAB_ACTIVITY_CAIRO"),
|
"TAB_ACTIVITY_CAIRO"(),
|
||||||
opcode(Opcode.INVOKE_DIRECT, location = MatchAfterImmediately()),
|
after(Opcode.INVOKE_DIRECT()),
|
||||||
opcode(Opcode.SPUT_OBJECT, location = MatchAfterImmediately()),
|
after(Opcode.SPUT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.setEnumMapMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.setEnumMapMethod by gettingFirstMethodDeclaratively {
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.DRAWABLE("yt_fill_bell_black_24"),
|
ResourceType.DRAWABLE("yt_fill_bell_black_24"),
|
||||||
methodCall(smali = "Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;", location = MatchAfterWithin(10)),
|
methodCall(smali = "Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;", afterAtMost(10)),
|
||||||
methodCall(
|
methodCall(
|
||||||
smali = "Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;",
|
smali = "Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;",
|
||||||
location = MatchAfterWithin(10),
|
afterAtMost(10),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package app.revanced.patches.youtube.misc.playercontrols
|
package app.revanced.patches.youtube.misc.playercontrols
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterImmediately
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.checkCast
|
import app.revanced.patcher.checkCast
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
|
|
@ -74,7 +73,7 @@ internal val BytecodePatchContext.playerTopControlsInflateMethod by gettingFirst
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("controls_layout_stub"),
|
ResourceType.ID("controls_layout_stub"),
|
||||||
methodCall("Landroid/view/ViewStub;", "inflate"),
|
methodCall("Landroid/view/ViewStub;", "inflate"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,7 +83,7 @@ internal val BytecodePatchContext.playerBottomControlsInflateMethod by gettingFi
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("bottom_ui_container_stub"),
|
ResourceType.ID("bottom_ui_container_stub"),
|
||||||
methodCall("Landroid/view/ViewStub;", "inflate"),
|
methodCall("Landroid/view/ViewStub;", "inflate"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterImmediately()),
|
after(Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
package app.revanced.patches.youtube.misc.playertype
|
package app.revanced.patches.youtube.misc.playertype
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
import app.revanced.patcher.addString
|
import app.revanced.patcher.after
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
import app.revanced.patcher.opcode
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.parameterTypes
|
import app.revanced.patcher.parameterTypes
|
||||||
import app.revanced.patcher.patch.BytecodePatchContext
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
import app.revanced.patcher.returnType
|
import app.revanced.patcher.returnType
|
||||||
|
|
@ -35,7 +35,7 @@ internal val BytecodePatchContext.reelWatchPagerMethod by gettingFirstMethodDecl
|
||||||
returnType("Landroid/view/View;")
|
returnType("Landroid/view/View;")
|
||||||
instructions(
|
instructions(
|
||||||
ResourceType.ID("reel_watch_player"),
|
ResourceType.ID("reel_watch_player"),
|
||||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterWithin(10)),
|
afterAtMost(10, Opcode.MOVE_RESULT_OBJECT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ internal val BytecodePatchContext.controlsStateToStringMethod by gettingFirstMet
|
||||||
parameterTypes()
|
parameterTypes()
|
||||||
returnType("Ljava/lang/String;")
|
returnType("Ljava/lang/String;")
|
||||||
instructions(
|
instructions(
|
||||||
addString("videoState"),
|
"videoState"(),
|
||||||
addString("isBuffering"),
|
"isBuffering"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
package app.revanced.patches.youtube.misc.settings
|
package app.revanced.patches.youtube.misc.settings
|
||||||
|
|
||||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.accessFlags
|
||||||
|
import app.revanced.patcher.after
|
||||||
|
import app.revanced.patcher.afterAtMost
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
import app.revanced.patcher.invoke
|
import app.revanced.patcher.invoke
|
||||||
|
|
@ -36,7 +37,8 @@ internal val BytecodePatchContext.cairoFragmentConfigMethod by gettingFirstMetho
|
||||||
returnType("Z")
|
returnType("Z")
|
||||||
instructions(
|
instructions(
|
||||||
45532100L(),
|
45532100L(),
|
||||||
opcode(Opcode.MOVE_RESULT, location = MatchAfterWithin(10)),
|
|
||||||
|
afterAtMost(10, Opcode.MOVE_RESULT()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,7 @@
|
||||||
package app.revanced.patches.youtube.video.playerresponse
|
package app.revanced.patches.youtube.video.playerresponse
|
||||||
|
|
||||||
import app.revanced.patcher.accessFlags
|
import app.revanced.patcher.*
|
||||||
import app.revanced.patcher.addString
|
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
|
||||||
import app.revanced.patcher.instructions
|
|
||||||
import app.revanced.patcher.parameterTypes
|
|
||||||
import app.revanced.patcher.patch.BytecodePatchContext
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
import app.revanced.patcher.returnType
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -31,7 +26,7 @@ internal val BytecodePatchContext.playerParameterBuilderMethod by gettingFirstMe
|
||||||
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||||
"Z",
|
"Z",
|
||||||
"Z",
|
"Z",
|
||||||
"Lj\$/time/Duration;",
|
"Lj$/time/Duration;",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,11 +52,9 @@ internal val BytecodePatchContext.playerParameterBuilder2026Method by gettingFir
|
||||||
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||||
"Z",
|
"Z",
|
||||||
"Z",
|
"Z",
|
||||||
"Lj\$/time/Duration;",
|
"Lj$/time/Duration;",
|
||||||
)
|
|
||||||
instructions(
|
|
||||||
addString("psps"),
|
|
||||||
)
|
)
|
||||||
|
instructions("psps"())
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -87,9 +80,7 @@ internal val BytecodePatchContext.playerParameterBuilder2015Method by gettingFir
|
||||||
"Z",
|
"Z",
|
||||||
"Z",
|
"Z",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions("psps"())
|
||||||
addString("psps"),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -116,9 +107,7 @@ internal val BytecodePatchContext.playerParameterBuilder2010Method by gettingFir
|
||||||
"Z",
|
"Z",
|
||||||
"Z",
|
"Z",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions("psps"())
|
||||||
addString("psps"),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -144,9 +133,7 @@ internal val BytecodePatchContext.playerParameterBuilder2002Method by gettingFir
|
||||||
"Z",
|
"Z",
|
||||||
"Z",
|
"Z",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions("psps"())
|
||||||
addString("psps"),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -171,9 +158,7 @@ internal val BytecodePatchContext.playerParameterBuilder1925Method by gettingFir
|
||||||
"Z",
|
"Z",
|
||||||
"Z",
|
"Z",
|
||||||
)
|
)
|
||||||
instructions(
|
instructions("psps"())
|
||||||
addString("psps"),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||||
internal val BytecodePatchContext.videoQualityItemOnClickParentMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.videoQualityItemOnClickParentMethod by gettingFirstMethodDeclaratively {
|
||||||
returnType("V")
|
returnType("V")
|
||||||
instructions(
|
instructions(
|
||||||
addString("VIDEO_QUALITIES_MENU_BOTTOM_SHEET_FRAGMENT"),
|
"VIDEO_QUALITIES_MENU_BOTTOM_SHEET_FRAGMENT"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ internal val BytecodePatchContext.speedArrayGeneratorMethod by gettingFirstMetho
|
||||||
instructions(
|
instructions(
|
||||||
methodCall(name = "size", returnType = "I"),
|
methodCall(name = "size", returnType = "I"),
|
||||||
newInstance("Ljava/text/DecimalFormat;"),
|
newInstance("Ljava/text/DecimalFormat;"),
|
||||||
addString("0.0#"),
|
"0.0#"(),
|
||||||
7L(),
|
7L(),
|
||||||
Opcode.NEW_ARRAY(),
|
Opcode.NEW_ARRAY(),
|
||||||
fieldAccess(definingClass = "/PlayerConfigModel;", type = "[F"),
|
fieldAccess(definingClass = "/PlayerConfigModel;", type = "[F"),
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
internal val BytecodePatchContext.initializePlaybackSpeedValuesMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.initializePlaybackSpeedValuesMethod by gettingFirstMethodDeclaratively {
|
||||||
parameterTypes("[L", "I")
|
parameterTypes("[L", "I")
|
||||||
instructions(
|
instructions(
|
||||||
addString("menu_item_playback_speed"),
|
"menu_item_playback_speed"(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue