mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-29 22:24:31 +02:00
feat(youtube): add support version v18.34.38
, v18.35.36
, v18.36.39
This commit is contained in:
parent
33b4f7b63a
commit
8bbe752b3b
@ -31,6 +31,9 @@ Example:
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.34.38"
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -39,7 +39,10 @@ import org.w3c.dom.Element
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -24,7 +24,10 @@ import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,10 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,10 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,10 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,10 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -37,7 +37,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import app.revanced.util.integrations.Constants.FULLSCREEN
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -45,7 +45,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -30,7 +30,10 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,10 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,10 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -37,7 +37,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,10 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,10 @@ import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,10 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -12,6 +12,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.patch.litho.ComponentParserPatch.emptyComponentLabel
|
||||
import app.revanced.patches.youtube.general.suggestions.fingerprints.BreakingNewsFingerprint
|
||||
import app.revanced.patches.youtube.general.suggestions.fingerprints.SuggestionContentsBuilderFingerprint
|
||||
import app.revanced.patches.youtube.general.suggestions.fingerprints.SuggestionContentsBuilderLegacyFingerprint
|
||||
import app.revanced.patches.youtube.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
@ -37,7 +38,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
@ -46,7 +50,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
object SuggestionsShelfPatch : BytecodePatch(
|
||||
setOf(
|
||||
BreakingNewsFingerprint,
|
||||
SuggestionContentsBuilderFingerprint
|
||||
SuggestionContentsBuilderFingerprint,
|
||||
SuggestionContentsBuilderLegacyFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
@ -70,7 +75,11 @@ object SuggestionsShelfPatch : BytecodePatch(
|
||||
* Target method only removes the horizontal video shelf's content in the feed.
|
||||
* Since the header of the horizontal video shelf is not removed, it should be removed through the SuggestionsShelfFilter
|
||||
*/
|
||||
SuggestionContentsBuilderFingerprint.result?.let {
|
||||
val result = SuggestionContentsBuilderFingerprint.result // YouTube v18.36.xx ~
|
||||
?: SuggestionContentsBuilderLegacyFingerprint.result // ~ YouTube v18.35.xx
|
||||
?: throw SuggestionContentsBuilderFingerprint.exception
|
||||
|
||||
result.let {
|
||||
it.mutableMethod.apply {
|
||||
addInstructionsWithLabels(
|
||||
2, """
|
||||
@ -80,7 +89,7 @@ object SuggestionsShelfPatch : BytecodePatch(
|
||||
""" + emptyComponentLabel, ExternalLabel("show", getInstruction(2))
|
||||
)
|
||||
}
|
||||
} ?: throw SuggestionContentsBuilderFingerprint.exception
|
||||
}
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
|
@ -10,30 +10,36 @@ object SuggestionContentsBuilderFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("L", "L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
null,
|
||||
null,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.CONST_4,
|
||||
Opcode.CONST_4,
|
||||
Opcode.GOTO,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IGET,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.CONST_4,
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL_RANGE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.RETURN_OBJECT
|
||||
),
|
||||
customFingerprint = { _, classDef ->
|
||||
classDef.methods.count() == 3
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
classDef.methods.count() == 2
|
||||
&& methodDef.name == "a"
|
||||
}
|
||||
)
|
@ -0,0 +1,40 @@
|
||||
package app.revanced.patches.youtube.general.suggestions.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object SuggestionContentsBuilderLegacyFingerprint : MethodFingerprint(
|
||||
returnType = "L",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("L", "L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
null,
|
||||
null,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
),
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
classDef.methods.count() == 3
|
||||
&& methodDef.name == "a"
|
||||
}
|
||||
)
|
@ -41,7 +41,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,10 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -25,7 +25,10 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusIcon
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -25,7 +25,10 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusIcon
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -25,7 +25,10 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusIcon
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -29,7 +29,10 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusLabel
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -23,7 +23,10 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -28,7 +28,10 @@ import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -25,7 +25,10 @@ import org.w3c.dom.Element
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -27,7 +27,10 @@ import kotlin.io.path.exists
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -32,7 +32,10 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -31,7 +31,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -25,7 +25,10 @@ import kotlin.io.path.exists
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -31,7 +31,10 @@ import org.w3c.dom.Element
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,10 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,10 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -23,7 +23,10 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -32,7 +32,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -24,7 +24,10 @@ import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -42,7 +42,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -8,6 +8,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.youtube.misc.language.fingerprints.GeneralPrefsFingerprint
|
||||
import app.revanced.patches.youtube.misc.language.fingerprints.GeneralPrefsLegacyFingerprint
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@ -28,20 +29,30 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object LanguageSelectorPatch : BytecodePatch(
|
||||
setOf(GeneralPrefsFingerprint)
|
||||
setOf(
|
||||
GeneralPrefsFingerprint,
|
||||
GeneralPrefsLegacyFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
GeneralPrefsFingerprint.result?.let {
|
||||
val result = GeneralPrefsFingerprint.result // YouTube v18.33.xx ~
|
||||
?: GeneralPrefsLegacyFingerprint.result // ~ YouTube v18.33.xx
|
||||
?: throw GeneralPrefsFingerprint.exception
|
||||
|
||||
result.let {
|
||||
it.mutableMethod.apply {
|
||||
val targetIndex = it.scanResult.patternScanResult!!.startIndex + 1
|
||||
val targetIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
val targetRegister = getInstruction<OneRegisterInstruction>(targetIndex).registerA
|
||||
|
||||
addInstruction(
|
||||
@ -49,7 +60,7 @@ object LanguageSelectorPatch : BytecodePatch(
|
||||
"const/4 v$targetRegister, 0x1"
|
||||
)
|
||||
}
|
||||
} ?: throw GeneralPrefsFingerprint.exception
|
||||
}
|
||||
|
||||
SettingsPatch.updatePatchStatus("language-switch")
|
||||
|
||||
|
@ -7,12 +7,11 @@ object GeneralPrefsFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = emptyList(),
|
||||
opcodes = listOf(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.SGET,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.GOTO
|
||||
),
|
||||
strings = listOf("bedtime_reminder_toggle"),
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/GeneralPrefsFragment;") }
|
||||
|
@ -0,0 +1,19 @@
|
||||
package app.revanced.patches.youtube.misc.language.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object GeneralPrefsLegacyFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = emptyList(),
|
||||
opcodes = listOf(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.CONST_WIDE_32,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_NEZ
|
||||
),
|
||||
strings = listOf("bedtime_reminder_toggle"),
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/GeneralPrefsFragment;") }
|
||||
)
|
@ -36,7 +36,10 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -37,7 +37,10 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,10 @@ import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -40,7 +40,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -26,7 +26,10 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -24,7 +24,10 @@ import app.revanced.util.resources.ResourceHelper.addTranslations
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -31,7 +31,10 @@ import app.revanced.util.integrations.Constants.NAVIGATION
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -40,7 +40,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -31,7 +31,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -45,7 +45,10 @@ import org.w3c.dom.Element
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -27,7 +27,10 @@ import app.revanced.util.integrations.Constants.PLAYER
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,10 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -48,7 +48,10 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import app.revanced.util.integrations.Constants.PLAYER
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -31,7 +31,10 @@ import app.revanced.util.integrations.Constants.INTEGRATIONS_PATH
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -37,7 +37,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -27,7 +27,10 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,10 @@ import app.revanced.util.integrations.Constants.PLAYER
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -40,7 +40,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -37,7 +37,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -32,7 +32,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -46,7 +46,10 @@ import org.w3c.dom.Element
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,10 @@ import app.revanced.util.integrations.Constants.SEEKBAR
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -31,7 +31,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,10 @@ import app.revanced.util.integrations.Constants.SEEKBAR
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -66,7 +66,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -31,7 +31,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -43,7 +43,10 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.utils.fix.parameter.fingerprints
|
||||
package app.revanced.patches.youtube.utils.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
@ -11,7 +11,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.utils.fix.parameter.fingerprints.PlayerParameterBuilderFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.PlayerParameterBuilderFingerprint
|
||||
import app.revanced.patches.youtube.utils.fix.parameter.fingerprints.PlayerResponseModelImplGeneralFingerprint
|
||||
import app.revanced.patches.youtube.utils.fix.parameter.fingerprints.PlayerResponseModelImplLiveStreamFingerprint
|
||||
import app.revanced.patches.youtube.utils.fix.parameter.fingerprints.PlayerResponseModelImplRecommendedLevel
|
||||
@ -45,7 +45,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,10 @@ import app.revanced.util.resources.ResourceHelper.setMicroG
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40"
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -0,0 +1,37 @@
|
||||
package app.revanced.patches.youtube.utils.playerresponse
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.utils.fingerprints.PlayerParameterBuilderFingerprint
|
||||
|
||||
object PlayerResponsePatch : BytecodePatch(
|
||||
setOf(PlayerParameterBuilderFingerprint)
|
||||
) {
|
||||
private lateinit var insertMethod: MutableMethod
|
||||
|
||||
/**
|
||||
* Adds an invoke-static instruction, called with the new id when the video changes
|
||||
* @param methodDescriptor which method to call. Params have to be `Ljava/lang/String;`
|
||||
*/
|
||||
internal fun injectCall(
|
||||
methodDescriptor: String
|
||||
) {
|
||||
insertMethod.addInstructions(
|
||||
0, // move-result-object offset
|
||||
"invoke-static {p1}, $methodDescriptor"
|
||||
)
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
PlayerParameterBuilderFingerprint.result?.let {
|
||||
insertMethod = it.mutableMethod
|
||||
} ?: throw PlayerParameterBuilderFingerprint.exception
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user