mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-29 13:20:19 +02:00
feat(YouTube): add support version v18.41.39
This commit is contained in:
parent
c89df5554c
commit
8d42314d30
@ -35,7 +35,8 @@ Example:
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -39,8 +39,8 @@ object ComponentParserPatch : BytecodePatch(
|
||||
"""
|
||||
invoke-static {v$stringBuilderRegister, v$identifierRegister, v$objectRegister}, $descriptor(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/Object;)Z
|
||||
move-result v$stringBuilderRegister
|
||||
if-nez v$stringBuilderRegister, :filter
|
||||
""", ExternalLabel("filter", getInstruction(emptyComponentIndex))
|
||||
if-eqz v$stringBuilderRegister, :filter
|
||||
""" + emptyComponentLabel, ExternalLabel("filter", getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -52,8 +52,8 @@ object ComponentParserPatch : BytecodePatch(
|
||||
"""
|
||||
invoke-static {v$stringBuilderRegister}, $descriptor(Ljava/lang/StringBuilder;)Z
|
||||
move-result v$stringBuilderRegister
|
||||
if-nez v$stringBuilderRegister, :filter
|
||||
""", ExternalLabel("filter", getInstruction(emptyComponentIndex))
|
||||
if-eqz v$stringBuilderRegister, :filter
|
||||
""" + emptyComponentLabel, ExternalLabel("filter", getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ import org.w3c.dom.Element
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,8 @@ import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -44,7 +44,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -44,7 +44,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -48,7 +48,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import app.revanced.util.integrations.Constants.FULLSCREEN
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -50,7 +50,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -35,7 +35,8 @@ import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -44,7 +44,8 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,8 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -42,7 +42,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -40,7 +40,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.util.integrations.Constants.COMPONENTS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -47,7 +47,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,8 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -45,7 +45,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.util.integrations.Constants.GENERAL
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,8 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusIcon
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -30,7 +30,8 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusIcon
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,8 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusIcon
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -34,7 +34,8 @@ import app.revanced.util.resources.ResourceHelper.updatePatchStatusLabel
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,8 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,8 @@ import org.w3c.dom.Element
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -32,7 +32,8 @@ import kotlin.io.path.exists
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -37,7 +37,8 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -30,7 +30,8 @@ import kotlin.io.path.exists
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -36,7 +36,8 @@ import org.w3c.dom.Element
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,8 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,8 @@ import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -44,7 +44,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -28,7 +28,8 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -40,7 +40,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -45,7 +45,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -11,7 +11,9 @@ import app.revanced.patches.youtube.misc.openlinksdirectly.fingerprints.OpenLink
|
||||
import app.revanced.patches.youtube.misc.openlinksdirectly.fingerprints.OpenLinksDirectlyFingerprintSecondary
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch(
|
||||
name = "Enable open links directly",
|
||||
@ -35,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
@ -55,12 +58,15 @@ object OpenLinksDirectlyPatch : BytecodePatch(
|
||||
).forEach { fingerprint ->
|
||||
fingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val insertIndex = it.scanResult.patternScanResult!!.startIndex
|
||||
val register = getInstruction<Instruction35c>(insertIndex).registerC
|
||||
val insertIndex = implementation!!.instructions
|
||||
.indexOfFirst { instruction ->
|
||||
((instruction as? ReferenceInstruction)?.reference as? MethodReference)?.name == "parse"
|
||||
}
|
||||
val insertRegister = getInstruction<Instruction35c>(insertIndex).registerC
|
||||
|
||||
replaceInstruction(
|
||||
insertIndex,
|
||||
"invoke-static {v$register}, $MISC_PATH/OpenLinksDirectlyPatch;->enableBypassRedirect(Ljava/lang/String;)Landroid/net/Uri;"
|
||||
"invoke-static {v$insertRegister}, $MISC_PATH/OpenLinksDirectlyPatch;->enableBypassRedirect(Ljava/lang/String;)Landroid/net/Uri;"
|
||||
)
|
||||
}
|
||||
} ?: throw fingerprint.exception
|
||||
|
@ -10,11 +10,20 @@ object OpenLinksDirectlyFingerprintPrimary : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("Ljava/lang/Object"),
|
||||
opcodes = listOf(
|
||||
Opcode.RETURN_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.RETURN_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.RETURN_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.SGET,
|
||||
Opcode.SGET_OBJECT
|
||||
)
|
||||
Opcode.CHECK_CAST
|
||||
),
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
methodDef.name == "a"
|
||||
&& classDef.methods.count() == 3
|
||||
}
|
||||
)
|
@ -33,7 +33,8 @@ import app.revanced.util.integrations.Constants.MISC_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -45,7 +45,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import org.w3c.dom.Element
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -29,7 +29,8 @@ import app.revanced.util.resources.ResourceHelper.addTranslations
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,8 @@ import app.revanced.util.integrations.Constants.NAVIGATION
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -47,7 +47,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -1,13 +1,10 @@
|
||||
package app.revanced.patches.youtube.overlaybutton.download.pip.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object PiPPlaybackFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
parameters = listOf("Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
|
@ -53,7 +53,8 @@ import org.w3c.dom.Element
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -32,7 +32,8 @@ import app.revanced.util.integrations.Constants.PLAYER
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -33,7 +33,8 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -40,7 +40,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -6,6 +6,7 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
@ -52,7 +53,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
@ -84,12 +86,11 @@ object HideFilmstripOverlayPatch : BytecodePatch(
|
||||
|
||||
FineScrubbingOverlayFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val setOnClickListenerIndex = getIndex("setOnClickListener")
|
||||
val jumpIndex = setOnClickListenerIndex + 3
|
||||
val initialIndex = setOnClickListenerIndex - 1
|
||||
|
||||
if (SettingsPatch.upward1828) {
|
||||
var insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
||||
val jumpIndex = getTargetIndexUpTo(insertIndex, Opcode.GOTO, Opcode.GOTO_16)
|
||||
val initialIndex = jumpIndex - 1
|
||||
|
||||
if (getInstruction(insertIndex).opcode == Opcode.INVOKE_VIRTUAL)
|
||||
insertIndex++
|
||||
|
||||
@ -109,6 +110,10 @@ object HideFilmstripOverlayPatch : BytecodePatch(
|
||||
)
|
||||
removeInstruction(insertIndex)
|
||||
} else {
|
||||
val setOnClickListenerIndex = getIndex("setOnClickListener")
|
||||
val jumpIndex = setOnClickListenerIndex + 3
|
||||
val initialIndex = setOnClickListenerIndex - 1
|
||||
|
||||
val insertIndex = getIndex("bringChildToFront") + 1
|
||||
val insertRegister =
|
||||
getInstruction<TwoRegisterInstruction>(insertIndex).registerA
|
||||
@ -204,6 +209,20 @@ object HideFilmstripOverlayPatch : BytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
private fun MutableMethod.getTargetIndexUpTo(
|
||||
startIndex: Int,
|
||||
opcode1: Opcode,
|
||||
opcode2: Opcode
|
||||
): Int {
|
||||
for (index in startIndex until implementation!!.instructions.size) {
|
||||
if (getInstruction(index).opcode != opcode1 && getInstruction(index).opcode != opcode2)
|
||||
continue
|
||||
|
||||
return index
|
||||
}
|
||||
throw PatchException("Failed to find hook method")
|
||||
}
|
||||
|
||||
private fun MutableMethod.injectHook() {
|
||||
addInstructionsWithLabels(
|
||||
0, """
|
||||
|
@ -42,7 +42,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -38,7 +38,8 @@ import app.revanced.util.integrations.Constants.PLAYER
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,8 @@ import app.revanced.util.integrations.Constants.INTEGRATIONS_PATH
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -42,7 +42,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -32,7 +32,8 @@ import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -7,16 +7,18 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
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.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.player.seekmessage.fingerprints.SeekEduContainerFingerprint
|
||||
import app.revanced.patches.youtube.player.seekmessage.fingerprints.SeekEduUndoOverlayFingerprint
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.SeekUndoEduOverlayStub
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import app.revanced.util.integrations.Constants.PLAYER
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@ -45,7 +47,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
@ -77,7 +80,11 @@ object SeekMessagePatch : BytecodePatch(
|
||||
*/
|
||||
SeekEduUndoOverlayFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val insertIndex = getWideLiteralIndex(SeekUndoEduOverlayStub)
|
||||
val seekUndoCalls = implementation!!.instructions.withIndex()
|
||||
.filter { instruction ->
|
||||
(instruction.value as? WideLiteralInstruction)?.wideLiteral == SeekUndoEduOverlayStub
|
||||
}
|
||||
val insertIndex = seekUndoCalls.elementAt(seekUndoCalls.size - 1).index
|
||||
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
|
||||
|
||||
for (index in insertIndex until implementation!!.instructions.size) {
|
||||
|
@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -44,7 +44,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -46,7 +46,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -51,7 +51,8 @@ import org.w3c.dom.Element
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,8 @@ import app.revanced.util.integrations.Constants.SEEKBAR
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -39,7 +39,8 @@ import app.revanced.util.integrations.Constants.SEEKBAR
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -69,7 +69,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -48,7 +48,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -49,7 +49,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -41,7 +41,8 @@ import app.revanced.util.resources.ResourceHelper.setMicroG
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -61,7 +61,8 @@ import com.android.tools.smali.dexlib2.iface.reference.Reference
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
@ -48,7 +48,8 @@ import java.util.concurrent.TimeUnit
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34"
|
||||
"18.40.34",
|
||||
"18.41.39"
|
||||
]
|
||||
)
|
||||
],
|
||||
|
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