mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-24 03:01:03 +00:00
parametertypes and returntype
This commit is contained in:
@@ -7,8 +7,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val initializeNavigationButtonsListFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Lcom/instagram/common/session/UserSession;", "Z")
|
||||
returns("Ljava/util/List;")
|
||||
parameterTypes("Lcom/instagram/common/session/UserSession;", "Z")
|
||||
returnType("Ljava/util/List;")
|
||||
}
|
||||
|
||||
internal val navigationButtonsEnumClassDef = fingerprint {
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val getCustomShareDomainFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "getCustomShareDomain" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ internal val isValidSignatureClassFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val isValidSignatureMethodFingerprint = fingerprint {
|
||||
parameters("L", "Z")
|
||||
returns("Z")
|
||||
parameterTypes("L", "Z")
|
||||
returnType("Z")
|
||||
custom { method, _ ->
|
||||
method.indexOfFirstInstruction {
|
||||
getReference<MethodReference>()?.name == "keySet"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package app.revanced.patches.music.audio.exclusiveaudio
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val allowExclusiveAudioPlaybackFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
@@ -18,6 +18,6 @@ internal val allowExclusiveAudioPlaybackFingerprint = fingerprint {
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT
|
||||
Opcode.MOVE_RESULT,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package app.revanced.patches.music.layout.compactheader
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val chipCloudFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
opcodes(
|
||||
Opcode.CONST,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
)
|
||||
literal { chipCloud }
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val miniPlayerConstructorFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
ResourceType.ID("mpp_player_bottom_sheet"),
|
||||
)
|
||||
@@ -18,8 +18,8 @@ internal val miniPlayerConstructorFingerprint = fingerprint {
|
||||
*/
|
||||
internal val switchToggleColorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L", "J")
|
||||
returnType("V")
|
||||
parameterTypes("L", "J")
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
internal val tabLayoutTextFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
opcodes(
|
||||
Opcode.IGET,
|
||||
Opcode.INVOKE_STATIC,
|
||||
@@ -20,7 +20,7 @@ internal val tabLayoutTextFingerprint = fingerprint {
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT
|
||||
Opcode.MOVE_RESULT,
|
||||
)
|
||||
strings("FEmusic_search")
|
||||
custom { method, _ ->
|
||||
@@ -29,8 +29,7 @@ internal val tabLayoutTextFingerprint = fingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun indexOfGetVisibilityInstruction(method: Method) =
|
||||
method.indexOfFirstInstruction {
|
||||
opcode == Opcode.INVOKE_VIRTUAL &&
|
||||
getReference<MethodReference>()?.name == "getVisibility"
|
||||
}
|
||||
internal fun indexOfGetVisibilityInstruction(method: Method) = method.indexOfFirstInstruction {
|
||||
opcode == Opcode.INVOKE_VIRTUAL &&
|
||||
getReference<MethodReference>()?.name == "getVisibility"
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val numberOfPresetAppNamesExtensionFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("I")
|
||||
parameters()
|
||||
returnType("I")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "numberOfPresetAppNames" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
@@ -16,6 +16,6 @@ internal val numberOfPresetAppNamesExtensionFingerprint = fingerprint {
|
||||
// but that has limited usage and this fingerprint allows changing any part of the notification.
|
||||
internal val notificationFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("L")
|
||||
parameterTypes("L")
|
||||
strings("key_action_priority")
|
||||
}
|
||||
|
||||
@@ -10,32 +10,32 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val lithoOnBoundsChangeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/graphics/Rect;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/graphics/Rect;")
|
||||
instructions(
|
||||
fieldAccess(
|
||||
opcode = Opcode.IPUT_OBJECT,
|
||||
definingClass = "this",
|
||||
type = "Landroid/graphics/Path;"
|
||||
type = "Landroid/graphics/Path;",
|
||||
),
|
||||
|
||||
methodCall(
|
||||
definingClass = "this",
|
||||
name = "isStateful",
|
||||
returnType = "Z",
|
||||
location = MatchAfterWithin(5)
|
||||
location = MatchAfterWithin(5),
|
||||
),
|
||||
|
||||
fieldAccess(
|
||||
opcode = Opcode.IGET_OBJECT,
|
||||
definingClass = "this",
|
||||
type = "Landroid/graphics/Paint",
|
||||
location = MatchAfterWithin(5)
|
||||
location = MatchAfterWithin(5),
|
||||
),
|
||||
methodCall(
|
||||
smali = "Landroid/graphics/Paint;->setColor(I)V",
|
||||
location = MatchAfterImmediately()
|
||||
)
|
||||
location = MatchAfterImmediately(),
|
||||
),
|
||||
)
|
||||
custom { method, _ ->
|
||||
method.name == "onBoundsChange"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package app.revanced.patches.shared.misc.fix.verticalscroll
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val canScrollVerticallyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.RETURN,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT
|
||||
Opcode.MOVE_RESULT,
|
||||
)
|
||||
custom { _, classDef -> classDef.endsWith("SwipeRefreshLayout;") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val googlePlayUtilityFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("I")
|
||||
parameters("L", "I")
|
||||
returnType("I")
|
||||
parameterTypes("L", "I")
|
||||
strings(
|
||||
"This should never happen.",
|
||||
"MetadataValueReader",
|
||||
@@ -16,15 +16,15 @@ internal val googlePlayUtilityFingerprint = fingerprint {
|
||||
|
||||
internal val serviceCheckFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("V")
|
||||
parameters("L", "I")
|
||||
returnType("V")
|
||||
parameterTypes("L", "I")
|
||||
strings("Google Play Services not available")
|
||||
}
|
||||
|
||||
internal val gmsCoreSupportFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "getGmsCoreVendorGroupId" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
@@ -32,8 +32,8 @@ internal val gmsCoreSupportFingerprint = fingerprint {
|
||||
|
||||
internal val originalPackageNameExtensionFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
custom { methodDef, classDef ->
|
||||
methodDef.name == "getOriginalPackageName" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val themeLightColorResourceNameFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "getThemeLightColorResourceName" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
@@ -15,8 +15,8 @@ internal val themeLightColorResourceNameFingerprint = fingerprint {
|
||||
|
||||
internal val themeDarkColorResourceNameFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "getThemeDarkColorResourceName" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package app.revanced.patches.shared.misc.spoof
|
||||
|
||||
import app.revanced.patcher.invoke
|
||||
import app.revanced.patcher.method
|
||||
import app.revanced.patcher.accessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.patcher.custom
|
||||
import app.revanced.patcher.extensions.methodReference
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.firstMethodComposite
|
||||
import app.revanced.patcher.immutableClassDef
|
||||
import app.revanced.patcher.instructions
|
||||
import app.revanced.patcher.invoke
|
||||
import app.revanced.patcher.method
|
||||
import app.revanced.patcher.parameterTypes
|
||||
import app.revanced.patcher.returnType
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
@@ -36,7 +36,7 @@ internal val buildPlayerRequestURIMethodMatch = firstMethodComposite("key", "asi
|
||||
)
|
||||
}
|
||||
|
||||
internal val buildRequestMethodMatch = firstMethodComposite() {
|
||||
internal val buildRequestMethodMatch = firstMethodComposite {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returnType("Lorg/chromium/net/UrlRequest") // UrlRequest; or UrlRequest$Builder;
|
||||
instructions(
|
||||
@@ -75,15 +75,15 @@ internal val buildRequestMethodMatch = firstMethodComposite() {
|
||||
val parameterTypes = parameterTypes
|
||||
val parameterTypesSize = parameterTypes.size
|
||||
(parameterTypesSize == 6 || parameterTypesSize == 7 || parameterTypesSize == 8) &&
|
||||
parameterTypes[1] == "Ljava/util/Map;" // URL headers.
|
||||
&& indexOfNewUrlRequestBuilderInstruction(this) >= 0
|
||||
parameterTypes[1] == "Ljava/util/Map;" && // URL headers.
|
||||
indexOfNewUrlRequestBuilderInstruction(this) >= 0
|
||||
}
|
||||
}
|
||||
|
||||
internal val protobufClassParseByteBufferFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.STATIC)
|
||||
returns("L")
|
||||
parameters("L", "Ljava/nio/ByteBuffer;")
|
||||
returnType("L")
|
||||
parameterTypes("L", "Ljava/nio/ByteBuffer;")
|
||||
opcodes(
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
@@ -112,7 +112,7 @@ internal val createStreamingDataMethodMatch = firstMethodComposite {
|
||||
|
||||
internal val buildMediaDataSourceFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters(
|
||||
parameterTypes(
|
||||
"Landroid/net/Uri;",
|
||||
"J",
|
||||
"I",
|
||||
@@ -130,7 +130,7 @@ internal val hlsCurrentTimeMethodMatch = firstMethodComposite {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameterTypes("Z", "L")
|
||||
instructions(
|
||||
45355374L() // HLS current time feature flag.
|
||||
45355374L(), // HLS current time feature flag.
|
||||
)
|
||||
}
|
||||
|
||||
@@ -141,22 +141,22 @@ internal val mediaFetchEnumConstructorMethodMatch = firstMethodComposite {
|
||||
instructions(
|
||||
"ENABLED"(),
|
||||
"DISABLED_FOR_PLAYBACK"(),
|
||||
DISABLED_BY_SABR_STREAMING_URI_STRING()
|
||||
DISABLED_BY_SABR_STREAMING_URI_STRING(),
|
||||
)
|
||||
}
|
||||
|
||||
internal val nerdsStatsVideoFormatBuilderFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters("L")
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
addString("codecs=\"")
|
||||
addString("codecs=\""),
|
||||
)
|
||||
}
|
||||
|
||||
internal val patchIncludedExtensionMethodFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "isPatchIncluded" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
@@ -180,7 +180,7 @@ internal val mediaFetchHotConfigAlternativeMethodMatch = firstMethodComposite {
|
||||
// but its exact purpose is not known. If this flag is enabled while stream spoofing
|
||||
// then videos will never start playback and load forever.
|
||||
// Flag does not seem to affect playback if spoofing is off.
|
||||
internal val playbackStartDescriptorFeatureFlagMethodMatch = firstMethodComposite() {
|
||||
internal val playbackStartDescriptorFeatureFlagMethodMatch = firstMethodComposite {
|
||||
parameterTypes()
|
||||
returnType("Z")
|
||||
instructions(45665455L())
|
||||
@@ -189,10 +189,10 @@ internal val playbackStartDescriptorFeatureFlagMethodMatch = firstMethodComposit
|
||||
internal fun indexOfNewUrlRequestBuilderInstruction(method: Method) = method.indexOfFirstInstruction {
|
||||
val reference = methodReference ?: return@indexOfFirstInstruction false
|
||||
|
||||
opcode == Opcode.INVOKE_VIRTUAL && reference.definingClass == "Lorg/chromium/net/CronetEngine;"
|
||||
&& reference.name == "newUrlRequestBuilder"
|
||||
&& reference.parameterTypes.size == 3
|
||||
&& reference.parameterTypes[0] == "Ljava/lang/String;"
|
||||
&& reference.parameterTypes[1] == "Lorg/chromium/net/UrlRequest\$Callback;"
|
||||
&& reference.parameterTypes[2] == "Ljava/util/concurrent/Executor;"
|
||||
opcode == Opcode.INVOKE_VIRTUAL && reference.definingClass == "Lorg/chromium/net/CronetEngine;" &&
|
||||
reference.name == "newUrlRequestBuilder" &&
|
||||
reference.parameterTypes.size == 3 &&
|
||||
reference.parameterTypes[0] == "Ljava/lang/String;" &&
|
||||
reference.parameterTypes[1] == "Lorg/chromium/net/UrlRequest\$Callback;" &&
|
||||
reference.parameterTypes[2] == "Ljava/util/concurrent/Executor;"
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
|
||||
getMainActivityOnCreateMethod().addInstruction(
|
||||
0,
|
||||
"invoke-static { }, $extensionClassDescriptor->setClientOrderToUse()V"
|
||||
"invoke-static { }, $extensionClassDescriptor->setClientOrderToUse()V",
|
||||
)
|
||||
|
||||
// TODO?: Force off 45708738L ?
|
||||
@@ -61,7 +61,6 @@ internal fun spoofVideoStreamsPatch(
|
||||
|
||||
// region Block /initplayback requests to fall back to /get_watch requests.
|
||||
|
||||
|
||||
buildInitPlaybackRequestMatch.method.apply {
|
||||
val moveUriStringIndex = buildInitPlaybackRequestMatch.indices.first()
|
||||
val targetRegister = getInstruction<OneRegisterInstruction>(moveUriStringIndex).registerA
|
||||
@@ -71,7 +70,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
"""
|
||||
invoke-static { v$targetRegister }, $EXTENSION_CLASS_DESCRIPTOR->blockInitPlaybackRequest(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$targetRegister
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -88,7 +87,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
"""
|
||||
invoke-static { v$uriRegister }, $EXTENSION_CLASS_DESCRIPTOR->blockGetWatchRequest(Landroid/net/Uri;)Landroid/net/Uri;
|
||||
move-result-object v$uriRegister
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -108,7 +107,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
"""
|
||||
move-object v$freeRegister, p1
|
||||
invoke-static { v$buildRequestMethodUrlRegister, v$freeRegister }, $EXTENSION_CLASS_DESCRIPTOR->fetchStreams(Ljava/lang/String;Ljava/util/Map;)V
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -126,7 +125,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
addInstruction(
|
||||
videoDetailsIndex + 1,
|
||||
"invoke-direct { p0, v$videoDetailsRegister }, " +
|
||||
"$resultMethodType->$setStreamDataMethodName($videoDetailsClass)V",
|
||||
"$resultMethodType->$setStreamDataMethodName($videoDetailsClass)V",
|
||||
)
|
||||
|
||||
val protobufClass = protobufClassParseByteBufferFingerprint.method.definingClass
|
||||
@@ -198,10 +197,11 @@ internal fun spoofVideoStreamsPatch(
|
||||
val insertIndex = indexOfNewUrlRequestBuilderInstruction(this)
|
||||
|
||||
addInstructions(
|
||||
insertIndex, """
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static { v$buildRequestMethodUrlRegister }, $EXTENSION_CLASS_DESCRIPTOR->blockGetAttRequest(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$buildRequestMethodUrlRegister
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
"""
|
||||
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->appendSpoofedClient(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$register
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -258,7 +258,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
|
||||
hlsCurrentTimeMethodMatch.method.insertLiteralOverride(
|
||||
hlsCurrentTimeMethodMatch.indices.first(),
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->fixHLSCurrentTime(Z)Z"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->fixHLSCurrentTime(Z)Z",
|
||||
)
|
||||
|
||||
// endregion
|
||||
@@ -272,17 +272,17 @@ internal fun spoofVideoStreamsPatch(
|
||||
val mediaFetchEnumClass = definingClass
|
||||
val sabrFieldIndex = indexOfFirstInstructionOrThrow(disabledBySABRStreamingUrlString) {
|
||||
opcode == Opcode.SPUT_OBJECT &&
|
||||
getReference<FieldReference>()?.type == mediaFetchEnumClass
|
||||
getReference<FieldReference>()?.type == mediaFetchEnumClass
|
||||
}
|
||||
|
||||
Pair(
|
||||
mediaFetchEnumClass,
|
||||
getInstruction<ReferenceInstruction>(sabrFieldIndex).reference
|
||||
getInstruction<ReferenceInstruction>(sabrFieldIndex).reference,
|
||||
)
|
||||
}
|
||||
|
||||
val sabrFingerprint = fingerprint {
|
||||
returns(mediaFetchEnumClass)
|
||||
returnType(mediaFetchEnumClass)
|
||||
opcodes(
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.RETURN_OBJECT,
|
||||
@@ -301,7 +301,7 @@ internal fun spoofVideoStreamsPatch(
|
||||
return-object v0
|
||||
:ignore
|
||||
nop
|
||||
"""
|
||||
""",
|
||||
)
|
||||
|
||||
// endregion
|
||||
@@ -311,21 +311,21 @@ internal fun spoofVideoStreamsPatch(
|
||||
if (fixMediaFetchHotConfig()) {
|
||||
mediaFetchHotConfigMethodMatch.method.insertLiteralOverride(
|
||||
mediaFetchHotConfigMethodMatch.indices.first(),
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z",
|
||||
)
|
||||
}
|
||||
|
||||
if (fixMediaFetchHotConfigAlternative()) {
|
||||
mediaFetchHotConfigAlternativeMethodMatch.method.insertLiteralOverride(
|
||||
mediaFetchHotConfigAlternativeMethodMatch.indices.first(),
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z",
|
||||
)
|
||||
}
|
||||
|
||||
if (fixParsePlaybackResponseFeatureFlag()) {
|
||||
playbackStartDescriptorFeatureFlagMethodMatch.method.insertLiteralOverride(
|
||||
playbackStartDescriptorFeatureFlagMethodMatch.indices.first(),
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->usePlaybackStartFeatureFlag(Z)Z"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->usePlaybackStartFeatureFlag(Z)Z",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.android.tools.smali.dexlib2.immutable.reference.ImmutableMethodRefere
|
||||
// Located @ ub.i0.h#p (9.5.0)
|
||||
internal val createTabsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE)
|
||||
returns("Ljava/util/List;")
|
||||
returnType("Ljava/util/List;")
|
||||
custom { method, _ ->
|
||||
method.implementation?.instructions?.any { instruction ->
|
||||
if (instruction.opcode != Opcode.INVOKE_STATIC) return@any false
|
||||
@@ -28,7 +28,7 @@ internal val createTabsFingerprint = fingerprint {
|
||||
// Located @ com.sony.songpal.mdr.vim.activity.MdrRemoteBaseActivity.e#run (9.5.0)
|
||||
internal val showNotificationFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returns("V")
|
||||
returnType("V")
|
||||
custom { method, _ ->
|
||||
method.implementation?.instructions?.any { instruction ->
|
||||
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return@any false
|
||||
|
||||
@@ -10,8 +10,8 @@ internal val colorSpaceUtilsClassFingerprint = fingerprint {
|
||||
|
||||
internal val convertArgbToRgbaFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC, AccessFlags.FINAL)
|
||||
returns("J")
|
||||
parameters("J")
|
||||
returnType("J")
|
||||
parameterTypes("J")
|
||||
}
|
||||
|
||||
internal val parseLottieJsonFingerprint = fingerprint {
|
||||
@@ -19,10 +19,10 @@ internal val parseLottieJsonFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val parseAnimatedColorFingerprint = fingerprint {
|
||||
parameters("L", "F")
|
||||
returns("Ljava/lang/Object;")
|
||||
parameterTypes("L", "F")
|
||||
returnType("Ljava/lang/Object;")
|
||||
custom { method, _ ->
|
||||
method.containsLiteralInstruction(255.0) &&
|
||||
method.containsLiteralInstruction(1.0)
|
||||
method.containsLiteralInstruction(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ val `Change lyrics provider` by creatingBytecodePatch(
|
||||
InetAddress.getByName(host)
|
||||
} catch (_: UnknownHostException) {
|
||||
Logger.getLogger(this::class.java.name).warning(
|
||||
"Host \"$host\" did not resolve to any domain."
|
||||
"Host \"$host\" did not resolve to any domain.",
|
||||
)
|
||||
} catch (_: Exception) {
|
||||
// Must ignore any kind of exception. Trying to resolve network
|
||||
@@ -71,7 +71,7 @@ val `Change lyrics provider` by creatingBytecodePatch(
|
||||
val setUrlBuilderHostIndex = indexOfFirstInstructionReversedOrThrow(invokeBuildUrlIndex) {
|
||||
val reference = getReference<MethodReference>()
|
||||
reference?.definingClass == "Lokhttp3/HttpUrl${"$"}Builder;" &&
|
||||
reference.parameterTypes.firstOrNull() == "Ljava/lang/String;"
|
||||
reference.parameterTypes.firstOrNull() == "Ljava/lang/String;"
|
||||
}
|
||||
val hostRegister = getInstruction<FiveRegisterInstruction>(setUrlBuilderHostIndex).registerD
|
||||
|
||||
@@ -79,7 +79,7 @@ val `Change lyrics provider` by creatingBytecodePatch(
|
||||
name = "rv_getCustomLyricsProviderHttpClient"
|
||||
addInstruction(
|
||||
setUrlBuilderHostIndex,
|
||||
"const-string v$hostRegister, \"$lyricsProviderHost\""
|
||||
"const-string v$hostRegister, \"$lyricsProviderHost\"",
|
||||
)
|
||||
|
||||
// Add the patched method to the class.
|
||||
@@ -91,10 +91,9 @@ val `Change lyrics provider` by creatingBytecodePatch(
|
||||
|
||||
// region Replace the call to the HTTP client builder method used exclusively for lyrics by the modified one.
|
||||
|
||||
|
||||
val getLyricsHttpClientFingerprint = fingerprint {
|
||||
returns(httpClientBuilderMethod.returnType)
|
||||
parameters()
|
||||
returnType(httpClientBuilderMethod.returnType)
|
||||
parameterTypes()
|
||||
custom { method, _ ->
|
||||
method.indexOfFirstInstruction {
|
||||
getReference<MethodReference>() == httpClientBuilderMethod
|
||||
@@ -123,9 +122,9 @@ val `Change lyrics provider` by creatingBytecodePatch(
|
||||
patchedHttpClientBuilderMethod.definingClass,
|
||||
patchedHttpClientBuilderMethod.name, // Only difference from the original method.
|
||||
patchedHttpClientBuilderMethod.parameters,
|
||||
patchedHttpClientBuilderMethod.returnType
|
||||
)
|
||||
)
|
||||
patchedHttpClientBuilderMethod.returnType,
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,12 @@ internal val httpClientBuilderFingerprint = fingerprint {
|
||||
strings("client == null", "scheduler == null")
|
||||
}
|
||||
|
||||
internal fun getLyricsHttpClientFingerprint(httpClientBuilderMethodReference: MethodReference) =
|
||||
fingerprint {
|
||||
returns(httpClientBuilderMethodReference.returnType)
|
||||
parameters()
|
||||
custom { method, _ ->
|
||||
method.indexOfFirstInstruction {
|
||||
getReference<MethodReference>() == httpClientBuilderMethodReference
|
||||
} >= 0
|
||||
}
|
||||
internal fun getLyricsHttpClientFingerprint(httpClientBuilderMethodReference: MethodReference) = fingerprint {
|
||||
returnType(httpClientBuilderMethodReference.returnType)
|
||||
parameterTypes()
|
||||
custom { method, _ ->
|
||||
method.indexOfFirstInstruction {
|
||||
getReference<MethodReference>() == httpClientBuilderMethodReference
|
||||
} >= 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val shareCopyUrlFingerprint = fingerprint {
|
||||
returns("Ljava/lang/Object;")
|
||||
parameters("Ljava/lang/Object;")
|
||||
returnType("Ljava/lang/Object;")
|
||||
parameterTypes("Ljava/lang/Object;")
|
||||
strings("clipboard", "Spotify Link")
|
||||
custom { method, _ ->
|
||||
method.name == "invokeSuspend"
|
||||
@@ -15,8 +15,8 @@ internal val shareCopyUrlFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val oldShareCopyUrlFingerprint = fingerprint {
|
||||
returns("Ljava/lang/Object;")
|
||||
parameters("Ljava/lang/Object;")
|
||||
returnType("Ljava/lang/Object;")
|
||||
parameterTypes("Ljava/lang/Object;")
|
||||
strings("clipboard", "createNewSession failed")
|
||||
custom { method, _ ->
|
||||
method.name == "apply"
|
||||
@@ -24,14 +24,14 @@ internal val oldShareCopyUrlFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val formatAndroidShareSheetUrlFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
parameters("L", "Ljava/lang/String;")
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes("L", "Ljava/lang/String;")
|
||||
opcodes(
|
||||
Opcode.GOTO,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.RETURN_OBJECT
|
||||
Opcode.RETURN_OBJECT,
|
||||
)
|
||||
literal {
|
||||
'\n'.code.toLong()
|
||||
@@ -40,8 +40,8 @@ internal val formatAndroidShareSheetUrlFingerprint = fingerprint {
|
||||
|
||||
internal val oldFormatAndroidShareSheetUrlFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters("Lcom/spotify/share/social/sharedata/ShareData;", "Ljava/lang/String;")
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes("Lcom/spotify/share/social/sharedata/ShareData;", "Ljava/lang/String;")
|
||||
literal {
|
||||
'\n'.code.toLong()
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val getEnterFromFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
returnType("Ljava/lang/String;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Z")
|
||||
parameterTypes("Z")
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package app.revanced.patches.tudortmund.lockscreen
|
||||
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val brightnessFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "run" &&
|
||||
method.definingClass.contains("/ScreenPlugin\$") &&
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.tumblr.featureflags
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
// This fingerprint targets the method to get the value of a Feature in the class "com.tumblr.configuration.Feature".
|
||||
// Features seem to be Tumblr's A/B testing program.
|
||||
@@ -15,8 +15,8 @@ import app.revanced.patcher.fingerprint
|
||||
// we want to insert our instructions there.
|
||||
internal val getFeatureValueFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters("L", "Z")
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes("L", "Z")
|
||||
opcodes(
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_STATIC,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package app.revanced.patches.tumblr.fixes
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
// Fingerprint for the addQueryParam method from retrofit2
|
||||
// https://github.com/square/retrofit/blob/trunk/retrofit/src/main/java/retrofit2/RequestBuilder.java#L186
|
||||
// Injecting here allows modifying dynamically set query parameters
|
||||
internal val addQueryParamFingerprint = fingerprint {
|
||||
parameters("Ljava/lang/String;", "Ljava/lang/String;", "Z")
|
||||
parameterTypes("Ljava/lang/String;", "Ljava/lang/String;", "Z")
|
||||
strings("Malformed URL. Base: ", ", Relative: ")
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ internal val constructMediaOptionsSheetFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val showDownloadVideoUpsellBottomSheetFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
strings("mediaEntity", "url")
|
||||
opcodes(Opcode.IF_EQZ)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val sanitizeSharingLinksFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
returnType("Ljava/lang/String;")
|
||||
strings("<this>", "shareParam", "sessionToken")
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ internal val linkBuilderFingerprint = fingerprint {
|
||||
// Returns a shareable link for the "Share via..." dialog.
|
||||
internal val linkResourceGetterFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Landroid/content/res/Resources;")
|
||||
parameterTypes("Landroid/content/res/Resources;")
|
||||
custom { _, classDef ->
|
||||
classDef.fields.any { field ->
|
||||
field.type.startsWith("Lcom/twitter/model/core/")
|
||||
|
||||
@@ -30,8 +30,8 @@ val `Hide Ads` by creatingBytecodePatch(
|
||||
|
||||
// Patch the ads-free method to always return true
|
||||
val adFreeFingerprint = fingerprint {
|
||||
returns("I")
|
||||
parameters()
|
||||
returnType("I")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
classDef == targetClass
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ internal val tabIdClassFingerprint = fingerprint {
|
||||
|
||||
context(BytecodePatchContext)
|
||||
internal val shouldShowTabIdMethodFingerprint get() = fingerprint {
|
||||
parameters("I", "I")
|
||||
returns("Z")
|
||||
parameterTypes("I", "I")
|
||||
returnType("Z")
|
||||
custom { methodDef, classDef ->
|
||||
classDef == tabIdClassFingerprint.classDef
|
||||
}
|
||||
|
||||
@@ -10,16 +10,14 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
internal val fullScreenEngagementAdContainerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
custom { method, _ ->
|
||||
method.containsLiteralInstruction(fullScreenEngagementAdContainer)
|
||||
&& indexOfAddListInstruction(method) >= 0
|
||||
method.containsLiteralInstruction(fullScreenEngagementAdContainer) &&
|
||||
indexOfAddListInstruction(method) >= 0
|
||||
}
|
||||
}
|
||||
|
||||
internal fun indexOfAddListInstruction(method: Method) =
|
||||
method.indexOfFirstInstructionReversed {
|
||||
getReference<MethodReference>()?.name == "add"
|
||||
}
|
||||
|
||||
internal fun indexOfAddListInstruction(method: Method) = method.indexOfFirstInstructionReversed {
|
||||
getReference<MethodReference>()?.name == "add"
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val getPremiumViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("I", "I")
|
||||
returnType("V")
|
||||
parameterTypes("I", "I")
|
||||
opcodes(
|
||||
Opcode.ADD_INT_2ADDR,
|
||||
Opcode.ADD_INT_2ADDR,
|
||||
|
||||
@@ -4,12 +4,12 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
|
||||
internal val createDialogFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("L", "L", "Ljava/lang/String;")
|
||||
returnType("V")
|
||||
parameterTypes("L", "L", "Ljava/lang/String;")
|
||||
instructions(
|
||||
methodCall(smali = "Landroid/app/AlertDialog\$Builder;->setNegativeButton(ILandroid/content/DialogInterface\$OnClickListener;)Landroid/app/AlertDialog\$Builder;"),
|
||||
methodCall(smali = "Landroid/app/AlertDialog\$Builder;->setOnCancelListener(Landroid/content/DialogInterface\$OnCancelListener;)Landroid/app/AlertDialog\$Builder;"),
|
||||
methodCall(smali = "Landroid/app/AlertDialog\$Builder;->create()Landroid/app/AlertDialog;"),
|
||||
methodCall(smali = "Landroid/app/AlertDialog;->show()V")
|
||||
methodCall(smali = "Landroid/app/AlertDialog;->show()V"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ val `Disable double tap actions` by creatingBytecodePatch(
|
||||
sharedExtensionPatch,
|
||||
settingsPatch,
|
||||
addResourcesPatch,
|
||||
versionCheckPatch
|
||||
versionCheckPatch,
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
@@ -35,7 +35,7 @@ val `Disable double tap actions` by creatingBytecodePatch(
|
||||
"20.14.43",
|
||||
"20.21.37",
|
||||
"20.31.40",
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
apply {
|
||||
@@ -44,7 +44,7 @@ val `Disable double tap actions` by creatingBytecodePatch(
|
||||
// just to prevent spamming a cryptic error message the user may not understand
|
||||
// and don't add in app settings that won't work.
|
||||
return@apply Logger.getLogger(this::class.java.name).warning(
|
||||
"Disable double tap actions requires 20.14.43+"
|
||||
"Disable double tap actions requires 20.14.43+",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ val `Disable double tap actions` by creatingBytecodePatch(
|
||||
|
||||
val doubleTapInfoGetSeekSourceFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Z")
|
||||
returns(seekTypeEnumFingerprint.originalClassDef.type)
|
||||
parameterTypes("Z")
|
||||
returnType(seekTypeEnumFingerprint.originalClassDef.type)
|
||||
opcodes(
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.SGET_OBJECT,
|
||||
@@ -76,17 +76,17 @@ val `Disable double tap actions` by creatingBytecodePatch(
|
||||
"""
|
||||
invoke-static { p1 }, $EXTENSION_CLASS_DESCRIPTOR->disableDoubleTapChapters(Z)Z
|
||||
move-result p1
|
||||
"""
|
||||
""",
|
||||
)
|
||||
|
||||
doubleTapInfoCtorFingerprint.match(
|
||||
doubleTapInfoGetSeekSourceFingerprint.classDef
|
||||
doubleTapInfoGetSeekSourceFingerprint.classDef,
|
||||
).method.addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static { p3 }, $EXTENSION_CLASS_DESCRIPTOR->disableDoubleTapChapters(Z)Z
|
||||
move-result p3
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,16 @@ internal val seekTypeEnumFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||
strings(
|
||||
"SEEK_SOURCE_SEEK_TO_NEXT_CHAPTER",
|
||||
"SEEK_SOURCE_SEEK_TO_PREVIOUS_CHAPTER"
|
||||
"SEEK_SOURCE_SEEK_TO_PREVIOUS_CHAPTER",
|
||||
)
|
||||
}
|
||||
|
||||
internal val doubleTapInfoCtorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters(
|
||||
parameterTypes(
|
||||
"Landroid/view/MotionEvent;",
|
||||
"I",
|
||||
"Z",
|
||||
"Lj\$/time/Duration;"
|
||||
"Lj\$/time/Duration;",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package app.revanced.patches.youtube.interaction.downloads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val offlineVideoEndpointFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters(
|
||||
returnType("V")
|
||||
parameterTypes(
|
||||
"Ljava/util/Map;",
|
||||
"L",
|
||||
"Ljava/lang/String", // VideoId
|
||||
"L",
|
||||
)
|
||||
instructions(
|
||||
addString("Object is not an offlineable video: ")
|
||||
addString("Object is not an offlineable video: "),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ internal fun ClassDef.getAllowSwipingUpGestureMethod() = firstMutableMethodDecla
|
||||
}
|
||||
|
||||
internal val disableFastForwardLegacyFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
opcodes(Opcode.MOVE_RESULT)
|
||||
// Intent start flag only used in the subscription activity
|
||||
literal { 45411330 }
|
||||
@@ -69,8 +69,8 @@ internal val disableFastForwardLegacyFingerprint = fingerprint {
|
||||
|
||||
internal val disableFastForwardGestureFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
@@ -84,8 +84,8 @@ internal val disableFastForwardGestureFingerprint = fingerprint {
|
||||
|
||||
internal val customTapAndHoldFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
2.0f(),
|
||||
)
|
||||
@@ -104,8 +104,8 @@ internal val customTapAndHoldFingerprint = fingerprint {
|
||||
|
||||
internal val onTouchEventHandlerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.PUBLIC)
|
||||
returns("Z")
|
||||
parameters("L")
|
||||
returnType("Z")
|
||||
parameterTypes("L")
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL, // nMethodReference
|
||||
Opcode.RETURN,
|
||||
@@ -127,8 +127,8 @@ internal val onTouchEventHandlerFingerprint = fingerprint {
|
||||
|
||||
internal val seekbarTappingFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters("Landroid/view/MotionEvent;")
|
||||
returnType("Z")
|
||||
parameterTypes("Landroid/view/MotionEvent;")
|
||||
instructions(
|
||||
Int.MAX_VALUE(),
|
||||
|
||||
@@ -148,8 +148,8 @@ internal val seekbarTappingFingerprint = fingerprint {
|
||||
|
||||
internal val slideToSeekFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/view/View;", "F")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/view/View;", "F")
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val swipeControlsHostActivityFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
custom { method, _ ->
|
||||
method.definingClass == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val startVideoInformerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
returnType("V")
|
||||
opcodes(
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.RETURN_VOID,
|
||||
@@ -15,16 +15,16 @@ internal val startVideoInformerFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val storyboardRendererDecoderRecommendedLevelFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("L")
|
||||
parameterTypes("L")
|
||||
strings("#-1#")
|
||||
}
|
||||
|
||||
internal val subtitleTrackFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
|
||||
@@ -19,7 +19,7 @@ internal val addCreateButtonViewFingerprint = fingerprint {
|
||||
|
||||
internal val createPivotBarFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters(
|
||||
parameterTypes(
|
||||
"Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;",
|
||||
"Landroid/widget/TextView;",
|
||||
"Ljava/lang/CharSequence;",
|
||||
@@ -32,7 +32,7 @@ internal val createPivotBarFingerprint = fingerprint {
|
||||
|
||||
internal val animatedNavigationTabsFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
45680008L(),
|
||||
)
|
||||
@@ -40,7 +40,7 @@ internal val animatedNavigationTabsFeatureFlagFingerprint = fingerprint {
|
||||
|
||||
internal val translucentNavigationStatusBarFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
45400535L(), // Translucent status bar feature flag.
|
||||
)
|
||||
@@ -51,7 +51,7 @@ internal val translucentNavigationStatusBarFeatureFlagFingerprint = fingerprint
|
||||
*/
|
||||
internal val translucentNavigationButtonsFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
45630927L(), // Translucent navigation bar buttons feature flag.
|
||||
)
|
||||
@@ -62,7 +62,7 @@ internal val translucentNavigationButtonsFeatureFlagFingerprint = fingerprint {
|
||||
*/
|
||||
internal val translucentNavigationButtonsSystemFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
45632194L(), // Translucent system buttons feature flag.
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ val `Change form factor` by creatingBytecodePatch(
|
||||
sharedExtensionPatch,
|
||||
settingsPatch,
|
||||
addResourcesPatch,
|
||||
`Navigation buttons`
|
||||
`Navigation buttons`,
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
@@ -37,29 +37,29 @@ val `Change form factor` by creatingBytecodePatch(
|
||||
"20.14.43",
|
||||
"20.21.37",
|
||||
"20.31.40",
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
apply {
|
||||
addResources("youtube", "layout.formfactor.changeFormFactorPatch")
|
||||
|
||||
PreferenceScreen.GENERAL_LAYOUT.addPreferences(
|
||||
ListPreference("revanced_change_form_factor")
|
||||
ListPreference("revanced_change_form_factor"),
|
||||
)
|
||||
|
||||
hookNavigationButtonCreated(EXTENSION_CLASS_DESCRIPTOR)
|
||||
|
||||
val createPlayerRequestBodyWithModelFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
fieldAccess(smali = "Landroid/os/Build;->MODEL:Ljava/lang/String;"),
|
||||
fieldAccess(
|
||||
definingClass = formFactorEnumConstructorFingerprint.originalClassDef.type,
|
||||
type = "I",
|
||||
location = MatchAfterWithin(50)
|
||||
)
|
||||
location = MatchAfterWithin(50),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ val `Change form factor` by creatingBytecodePatch(
|
||||
"""
|
||||
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->getFormFactor(I)I
|
||||
move-result v$register
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
|
||||
internal val layoutCircleFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
returns("Landroid/view/View;")
|
||||
parameterTypes()
|
||||
returnType("Landroid/view/View;")
|
||||
opcodes(
|
||||
Opcode.CONST,
|
||||
Opcode.CONST_4,
|
||||
@@ -25,8 +25,8 @@ internal val layoutCircleFingerprint = fingerprint {
|
||||
|
||||
internal val layoutIconFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
returns("Landroid/view/View;")
|
||||
parameterTypes()
|
||||
returnType("Landroid/view/View;")
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
@@ -38,8 +38,8 @@ internal val layoutIconFingerprint = fingerprint {
|
||||
|
||||
internal val layoutVideoFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters()
|
||||
returns("Landroid/view/View;")
|
||||
parameterTypes()
|
||||
returnType("Landroid/view/View;")
|
||||
opcodes(
|
||||
Opcode.CONST,
|
||||
Opcode.CONST_4,
|
||||
@@ -52,16 +52,16 @@ internal val layoutVideoFingerprint = fingerprint {
|
||||
|
||||
internal val showEndscreenCardsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
custom { method, classDef ->
|
||||
classDef.methods.count() == 5
|
||||
&& method.containsLiteralInstruction(0)
|
||||
&& method.containsLiteralInstruction(5)
|
||||
&& method.containsLiteralInstruction(8)
|
||||
&& method.indexOfFirstInstruction {
|
||||
val reference = getReference<FieldReference>()
|
||||
reference?.type == "Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"
|
||||
} >= 0
|
||||
classDef.methods.count() == 5 &&
|
||||
method.containsLiteralInstruction(0) &&
|
||||
method.containsLiteralInstruction(5) &&
|
||||
method.containsLiteralInstruction(8) &&
|
||||
method.indexOfFirstInstruction {
|
||||
val reference = getReference<FieldReference>()
|
||||
reference?.type == "Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"
|
||||
} >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,31 +8,31 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
internal val autoNavConstructorFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
strings("main_app_autonav")
|
||||
}
|
||||
|
||||
internal val autoNavStatusFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
}
|
||||
|
||||
internal val removeOnLayoutChangeListenerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.IPUT,
|
||||
Opcode.INVOKE_VIRTUAL
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
)
|
||||
// This is the only reference present in the entire smali.
|
||||
custom { method, _ ->
|
||||
method.indexOfFirstInstruction {
|
||||
val reference = getReference<MethodReference>()
|
||||
reference?.name == "removeOnLayoutChangeListener" &&
|
||||
reference.definingClass.endsWith("/YouTubePlayerOverlaysLayout;")
|
||||
reference.definingClass.endsWith("/YouTubePlayerOverlaysLayout;")
|
||||
} >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val setFullScreenBackgroundColorFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
parameters("Z", "I", "I", "I", "I")
|
||||
parameterTypes("Z", "I", "I", "I", "I")
|
||||
custom { method, classDef ->
|
||||
classDef.type.endsWith("/YouTubePlayerViewNotForReflection;")
|
||||
&& method.name == "onLayout"
|
||||
classDef.type.endsWith("/YouTubePlayerViewNotForReflection;") &&
|
||||
method.name == "onLayout"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
*/
|
||||
internal val hideShowMoreButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL, AccessFlags.SYNTHETIC)
|
||||
returns("V")
|
||||
parameters("L", "Ljava/lang/Object;")
|
||||
returnType("V")
|
||||
parameterTypes("L", "Ljava/lang/Object;")
|
||||
instructions(
|
||||
ResourceType.LAYOUT("expand_button_down"),
|
||||
methodCall(smali = "Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;"),
|
||||
@@ -37,7 +37,7 @@ internal val hideShowMoreLegacyButtonFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val parseElementFromBufferFingerprint = fingerprint {
|
||||
parameters("L", "L", "[B", "L", "L")
|
||||
parameterTypes("L", "L", "[B", "L", "L")
|
||||
instructions(
|
||||
opcode(Opcode.IGET_OBJECT),
|
||||
// IGET_BOOLEAN // 20.07+
|
||||
@@ -50,7 +50,7 @@ internal val parseElementFromBufferFingerprint = fingerprint {
|
||||
|
||||
internal val playerOverlayFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
returnType("L")
|
||||
instructions(
|
||||
addString("player_overlay_in_video_programming"),
|
||||
)
|
||||
@@ -58,8 +58,8 @@ internal val playerOverlayFingerprint = fingerprint {
|
||||
|
||||
internal val showWatermarkFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L", "L")
|
||||
returnType("V")
|
||||
parameterTypes("L", "L")
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,8 +67,8 @@ internal val showWatermarkFingerprint = fingerprint {
|
||||
*/
|
||||
internal val yoodlesImageViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
parameters("L", "L")
|
||||
returnType("Landroid/view/View;")
|
||||
parameterTypes("L", "L")
|
||||
instructions(
|
||||
ResourceType.ID("youtube_logo"),
|
||||
)
|
||||
@@ -132,8 +132,8 @@ internal val searchResultsChipBarFingerprint = fingerprint {
|
||||
|
||||
internal val showFloatingMicrophoneButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("fab"),
|
||||
checkCast("/FloatingActionButton;", location = MatchAfterWithin(10)),
|
||||
@@ -143,7 +143,7 @@ internal val showFloatingMicrophoneButtonFingerprint = fingerprint {
|
||||
|
||||
internal val hideViewCountFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Ljava/lang/CharSequence;")
|
||||
returnType("Ljava/lang/CharSequence;")
|
||||
|
||||
opcodes(
|
||||
Opcode.RETURN_OBJECT,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.youtube.layout.hide.infocards
|
||||
|
||||
import app.revanced.patcher.accessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.firstMethodBuilder
|
||||
import app.revanced.patcher.instructions
|
||||
import app.revanced.patcher.parameterTypes
|
||||
@@ -14,18 +14,18 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val infocardsIncognitoFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/Boolean;")
|
||||
parameters("L", "J")
|
||||
returnType("Ljava/lang/Boolean;")
|
||||
parameterTypes("L", "J")
|
||||
instructions(
|
||||
addString("vibrator")
|
||||
addString("vibrator"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val infocardsIncognitoParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
returnType("Ljava/lang/String;")
|
||||
instructions(
|
||||
addString("player_overlay_info_card_teaser")
|
||||
addString("player_overlay_info_card_teaser"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
|
||||
internal val relatedEndScreenResultsParentFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
ResourceType.LAYOUT("app_related_endscreen_results"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val relatedEndScreenResultsFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters(
|
||||
returnType("V")
|
||||
parameterTypes(
|
||||
"I",
|
||||
"Z",
|
||||
"I",
|
||||
|
||||
@@ -12,8 +12,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val shortsBottomBarContainerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/view/View;", "Landroid/os/Bundle;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/view/View;", "Landroid/os/Bundle;")
|
||||
instructions(
|
||||
addString("r_pfvc"),
|
||||
ResourceType.ID("bottom_bar_container"),
|
||||
@@ -26,8 +26,8 @@ internal val shortsBottomBarContainerFingerprint = fingerprint {
|
||||
* 19.41 to 20.44.
|
||||
*/
|
||||
internal val renderBottomNavigationBarFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Ljava/lang/String;")
|
||||
returnType("V")
|
||||
parameterTypes("Ljava/lang/String;")
|
||||
instructions(
|
||||
opcode(Opcode.IGET_OBJECT, MatchFirst()),
|
||||
opcode(Opcode.MONITOR_ENTER, MatchAfterImmediately()),
|
||||
@@ -47,7 +47,7 @@ internal val renderBottomNavigationBarFingerprint = fingerprint {
|
||||
* Less than 19.41.
|
||||
*/
|
||||
internal val legacyRenderBottomNavigationBarLegacyParentFingerprint = fingerprint {
|
||||
parameters(
|
||||
parameterTypes(
|
||||
"I",
|
||||
"I",
|
||||
"L",
|
||||
@@ -66,7 +66,7 @@ internal val legacyRenderBottomNavigationBarLegacyParentFingerprint = fingerprin
|
||||
*/
|
||||
internal val renderBottomNavigationBarLegacy1941ParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters(
|
||||
parameterTypes(
|
||||
"I",
|
||||
"I",
|
||||
"L", // ReelWatchEndpointOuterClass
|
||||
@@ -82,8 +82,8 @@ internal val renderBottomNavigationBarLegacy1941ParentFingerprint = fingerprint
|
||||
|
||||
internal val renderBottomNavigationBarParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("[Ljava/lang/Class;")
|
||||
parameters(
|
||||
returnType("[Ljava/lang/Class;")
|
||||
parameterTypes(
|
||||
"Ljava/lang/Class;",
|
||||
"Ljava/lang/Object;",
|
||||
"I",
|
||||
@@ -95,8 +95,8 @@ internal val renderBottomNavigationBarParentFingerprint = fingerprint {
|
||||
|
||||
internal val setPivotBarVisibilityFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Z")
|
||||
returnType("V")
|
||||
parameterTypes("Z")
|
||||
opcodes(
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.IF_EQZ,
|
||||
@@ -104,7 +104,7 @@ internal val setPivotBarVisibilityFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val setPivotBarVisibilityParentFingerprint = fingerprint {
|
||||
parameters("Z")
|
||||
parameterTypes("Z")
|
||||
instructions(
|
||||
addString("FEnotifications_inbox"),
|
||||
)
|
||||
@@ -112,8 +112,8 @@ internal val setPivotBarVisibilityParentFingerprint = fingerprint {
|
||||
|
||||
internal val shortsExperimentalPlayerFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45677719L(),
|
||||
)
|
||||
@@ -121,8 +121,8 @@ internal val shortsExperimentalPlayerFeatureFlagFingerprint = fingerprint {
|
||||
|
||||
internal val renderNextUIFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45649743L(),
|
||||
)
|
||||
|
||||
@@ -4,8 +4,8 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
|
||||
internal val signInToTvPopupFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
parameters("Ljava/lang/String;", "Z", "L")
|
||||
returnType("Z")
|
||||
parameterTypes("Ljava/lang/String;", "Z", "L")
|
||||
instructions(
|
||||
resourceLiteral(
|
||||
ResourceType.STRING,
|
||||
|
||||
@@ -9,15 +9,15 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val timeCounterFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
instructions(
|
||||
opcode(Opcode.SUB_LONG_2ADDR),
|
||||
methodCall(
|
||||
opcode = Opcode.INVOKE_STATIC,
|
||||
returnType = "Ljava/lang/CharSequence;",
|
||||
location = MatchAfterImmediately()
|
||||
location = MatchAfterImmediately(),
|
||||
),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
||||
fieldAccess(opcode = Opcode.IGET_WIDE, type = "J", location = MatchAfterImmediately()),
|
||||
@@ -27,7 +27,7 @@ internal val timeCounterFingerprint = fingerprint {
|
||||
methodCall(
|
||||
opcode = Opcode.INVOKE_STATIC,
|
||||
returnType = "Ljava/lang/CharSequence;",
|
||||
location = MatchAfterWithin(5)
|
||||
)
|
||||
location = MatchAfterWithin(5),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ internal val miniplayerModernConstructorFingerprint = fingerprint {
|
||||
|
||||
internal val miniplayerDimensionsCalculatorParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
ResourceType.DIMEN("floaty_bar_button_top_margin"),
|
||||
)
|
||||
@@ -43,8 +43,8 @@ internal val miniplayerDimensionsCalculatorParentFingerprint = fingerprint {
|
||||
|
||||
internal val miniplayerModernViewParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
addString("player_overlay_modern_mini_player_controls"),
|
||||
)
|
||||
@@ -55,8 +55,8 @@ internal val miniplayerModernViewParentFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernAddViewListenerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/view/View;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/view/View;")
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,8 +64,8 @@ internal val miniplayerModernAddViewListenerFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernCloseButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("modern_miniplayer_close"),
|
||||
checkCast("Landroid/widget/ImageView;"),
|
||||
@@ -77,8 +77,8 @@ internal val miniplayerModernCloseButtonFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernExpandButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("modern_miniplayer_expand"),
|
||||
checkCast("Landroid/widget/ImageView;"),
|
||||
@@ -90,8 +90,8 @@ internal val miniplayerModernExpandButtonFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernExpandCloseDrawablesFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
ytOutlinePictureInPictureWhite24(),
|
||||
)
|
||||
@@ -102,8 +102,8 @@ internal val miniplayerModernExpandCloseDrawablesFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernForwardButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("modern_miniplayer_forward_button"),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
||||
@@ -112,7 +112,7 @@ internal val miniplayerModernForwardButtonFingerprint = fingerprint {
|
||||
|
||||
internal val miniplayerModernOverlayViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("scrim_overlay"),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
||||
@@ -124,8 +124,8 @@ internal val miniplayerModernOverlayViewFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernRewindButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("modern_miniplayer_rewind_button"),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
||||
@@ -137,8 +137,8 @@ internal val miniplayerModernRewindButtonFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerModernActionButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("modern_miniplayer_overlay_action_button"),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterWithin(5)),
|
||||
@@ -156,7 +156,7 @@ internal val miniplayerMinimumSizeFingerprint = fingerprint {
|
||||
|
||||
internal val miniplayerOverrideFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
returnType("L")
|
||||
instructions(
|
||||
addString("appName"),
|
||||
methodCall(
|
||||
@@ -169,7 +169,7 @@ internal val miniplayerOverrideFingerprint = fingerprint {
|
||||
|
||||
internal val miniplayerOverrideNoContextFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
opcode(Opcode.IGET_BOOLEAN), // Anchor to insert the instruction.
|
||||
)
|
||||
@@ -180,8 +180,8 @@ internal val miniplayerOverrideNoContextFingerprint = fingerprint {
|
||||
*/
|
||||
internal val miniplayerResponseModelSizeCheckFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters("Ljava/lang/Object;", "Ljava/lang/Object;")
|
||||
returnType("L")
|
||||
parameterTypes("Ljava/lang/Object;", "Ljava/lang/Object;")
|
||||
opcodes(
|
||||
Opcode.RETURN_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
@@ -194,7 +194,7 @@ internal val miniplayerResponseModelSizeCheckFingerprint = fingerprint {
|
||||
|
||||
internal val miniplayerOnCloseHandlerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
MINIPLAYER_DISABLED_FEATURE_KEY(),
|
||||
)
|
||||
@@ -210,8 +210,8 @@ internal val playerOverlaysLayoutFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val miniplayerSetIconsFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("I", "Ljava/lang/Runnable;")
|
||||
returnType("V")
|
||||
parameterTypes("I", "Ljava/lang/Runnable;")
|
||||
instructions(
|
||||
ResourceType.DRAWABLE("yt_fill_pause_white_36"),
|
||||
ResourceType.DRAWABLE("yt_fill_pause_black_36"),
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.panels.popup
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val engagementPanelControllerFingerprint = fingerprint {
|
||||
returns("L")
|
||||
returnType("L")
|
||||
strings(
|
||||
"EngagementPanelController: cannot show EngagementPanel before EngagementPanelController.init() has been called.",
|
||||
"[EngagementPanel] Cannot show EngagementPanel before EngagementPanelController.init() has been called.",
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
* 19.46+
|
||||
*/
|
||||
internal val openVideosFullscreenPortraitFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("L", "Lj\$/util/Optional;")
|
||||
returnType("V")
|
||||
parameterTypes("L", "Lj\$/util/Optional;")
|
||||
instructions(
|
||||
opcode(Opcode.MOVE_RESULT), // Conditional check to modify.
|
||||
// Open videos fullscreen portrait feature flag.
|
||||
@@ -26,8 +26,8 @@ internal val openVideosFullscreenPortraitFingerprint = fingerprint {
|
||||
*/
|
||||
internal val openVideosFullscreenPortraitLegacyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L", "Lj\$/util/Optional;")
|
||||
returnType("V")
|
||||
parameterTypes("L", "Lj\$/util/Optional;")
|
||||
opcodes(
|
||||
Opcode.GOTO,
|
||||
Opcode.SGET_OBJECT,
|
||||
@@ -39,14 +39,14 @@ internal val openVideosFullscreenPortraitLegacyFingerprint = fingerprint {
|
||||
Opcode.IF_EQ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT // Conditional check to modify.
|
||||
Opcode.MOVE_RESULT, // Conditional check to modify.
|
||||
)
|
||||
}
|
||||
|
||||
internal val openVideosFullscreenHookPatchExtensionFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
custom { methodDef, classDef ->
|
||||
methodDef.name == "isFullScreenPatchIncluded" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
|
||||
internal val createPlayerOverviewFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
ResourceType.ID("scrim_overlay"),
|
||||
checkCast("Landroid/widget/ImageView;", location = MatchAfterWithin(10)),
|
||||
|
||||
@@ -7,21 +7,21 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val dislikeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
addString("like/dislike"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val likeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
addString("like/like"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val removeLikeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
addString("like/removelike"),
|
||||
)
|
||||
@@ -29,8 +29,8 @@ internal val removeLikeFingerprint = fingerprint {
|
||||
|
||||
internal val rollingNumberMeasureAnimatedTextFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Lj\$/util/Optional;")
|
||||
parameters("L", "Ljava/lang/String;", "L")
|
||||
returnType("Lj\$/util/Optional;")
|
||||
parameterTypes("L", "Ljava/lang/String;", "L")
|
||||
opcodes(
|
||||
Opcode.IGET, // First instruction of method
|
||||
Opcode.IGET_OBJECT,
|
||||
@@ -50,8 +50,8 @@ internal val rollingNumberMeasureAnimatedTextFingerprint = fingerprint {
|
||||
*/
|
||||
internal val rollingNumberMeasureStaticLabelFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("F")
|
||||
parameters("Ljava/lang/String;")
|
||||
returnType("F")
|
||||
parameterTypes("Ljava/lang/String;")
|
||||
opcodes(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
@@ -62,8 +62,8 @@ internal val rollingNumberMeasureStaticLabelFingerprint = fingerprint {
|
||||
|
||||
internal val rollingNumberMeasureStaticLabelParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
addString("RollingNumberFontProperties{paint="),
|
||||
)
|
||||
@@ -80,8 +80,8 @@ internal val rollingNumberSetterFingerprint = fingerprint {
|
||||
|
||||
internal val rollingNumberTextViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L", "F", "F")
|
||||
returnType("V")
|
||||
parameterTypes("L", "F", "F")
|
||||
opcodes(
|
||||
Opcode.IPUT,
|
||||
null, // invoke-direct or invoke-virtual
|
||||
@@ -105,7 +105,7 @@ internal val textComponentConstructorFingerprint = fingerprint {
|
||||
|
||||
internal val textComponentDataFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("L", "L")
|
||||
parameterTypes("L", "L")
|
||||
instructions(
|
||||
addString("text"),
|
||||
)
|
||||
@@ -119,8 +119,8 @@ internal val textComponentDataFingerprint = fingerprint {
|
||||
*/
|
||||
internal val textComponentLookupFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters("L")
|
||||
returnType("L")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
addString("…"),
|
||||
)
|
||||
@@ -128,8 +128,8 @@ internal val textComponentLookupFingerprint = fingerprint {
|
||||
|
||||
internal val textComponentFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45675738L(),
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val setWordmarkHeaderFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/widget/ImageView;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/widget/ImageView;")
|
||||
instructions(
|
||||
ResourceType.ATTR("ytPremiumWordmarkHeader"),
|
||||
ResourceType.ATTR("ytWordmarkHeader"),
|
||||
@@ -20,8 +20,8 @@ internal val setWordmarkHeaderFingerprint = fingerprint {
|
||||
*/
|
||||
internal val wideSearchbarLayoutFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
parameters("L", "L")
|
||||
returnType("Landroid/view/View;")
|
||||
parameterTypes("L", "L")
|
||||
instructions(
|
||||
ResourceType.LAYOUT("action_bar_ringo"),
|
||||
)
|
||||
|
||||
@@ -13,9 +13,9 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val fullscreenSeekbarThumbnailsFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45398577(),
|
||||
)
|
||||
@@ -52,7 +52,7 @@ internal val playerSeekbarHandle1ColorFingerprint = fingerprint {
|
||||
|
||||
internal val playerSeekbarHandle2ColorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("Landroid/content/Context;")
|
||||
parameterTypes("Landroid/content/Context;")
|
||||
instructions(
|
||||
ResourceType.ATTR("ytTextSecondary"),
|
||||
ResourceType.ATTR("ytStaticBrandRed"),
|
||||
@@ -61,8 +61,8 @@ internal val playerSeekbarHandle2ColorFingerprint = fingerprint {
|
||||
|
||||
internal val watchHistoryMenuUseProgressDrawableFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
methodCall("Landroid/widget/ProgressBar;", "setMax"),
|
||||
opcode(Opcode.MOVE_RESULT),
|
||||
@@ -72,8 +72,8 @@ internal val watchHistoryMenuUseProgressDrawableFingerprint = fingerprint {
|
||||
|
||||
internal val lithoLinearGradientFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.STATIC)
|
||||
returns("Landroid/graphics/LinearGradient;")
|
||||
parameters("F", "F", "F", "F", "[I", "[F")
|
||||
returnType("Landroid/graphics/LinearGradient;")
|
||||
parameterTypes("F", "F", "F", "F", "[I", "[F")
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,8 +81,8 @@ internal val lithoLinearGradientFingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerLinearGradientFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
parameters("I", "I", "I", "I", "Landroid/content/Context;", "I")
|
||||
returns("Landroid/graphics/LinearGradient;")
|
||||
parameterTypes("I", "I", "I", "I", "Landroid/content/Context;", "I")
|
||||
returnType("Landroid/graphics/LinearGradient;")
|
||||
instructions(
|
||||
ResourceType.COLOR("yt_youtube_magenta"),
|
||||
|
||||
@@ -95,7 +95,7 @@ internal val playerLinearGradientFingerprint = fingerprint {
|
||||
* 19.25 - 19.47
|
||||
*/
|
||||
internal val playerLinearGradientLegacyFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
ResourceType.COLOR("yt_youtube_magenta"),
|
||||
|
||||
@@ -108,8 +108,8 @@ internal const val LOTTIE_ANIMATION_VIEW_CLASS_TYPE = "Lcom/airbnb/lottie/Lottie
|
||||
|
||||
internal val lottieAnimationViewSetAnimationIntFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("I")
|
||||
returns("V")
|
||||
parameterTypes("I")
|
||||
returnType("V")
|
||||
instructions(
|
||||
methodCall("this", "isInEditMode"),
|
||||
)
|
||||
@@ -120,8 +120,8 @@ internal val lottieAnimationViewSetAnimationIntFingerprint = fingerprint {
|
||||
|
||||
internal val lottieCompositionFactoryZipFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
parameters("Landroid/content/Context;", "Ljava/util/zip/ZipInputStream;", "Ljava/lang/String;")
|
||||
returns("L")
|
||||
parameterTypes("Landroid/content/Context;", "Ljava/util/zip/ZipInputStream;", "Ljava/lang/String;")
|
||||
returnType("L")
|
||||
instructions(
|
||||
addString("Unable to parse composition"),
|
||||
addString(" however it was not found in the animation."),
|
||||
@@ -135,8 +135,8 @@ internal val lottieCompositionFactoryZipFingerprint = fingerprint {
|
||||
*/
|
||||
internal val lottieCompositionFactoryFromJsonInputStreamFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
parameters("Ljava/io/InputStream;", "Ljava/lang/String;")
|
||||
returns("L")
|
||||
parameterTypes("Ljava/io/InputStream;", "Ljava/lang/String;")
|
||||
returnType("L")
|
||||
instructions(
|
||||
anyInstruction(literal(2), literal(3)),
|
||||
)
|
||||
|
||||
@@ -6,8 +6,6 @@ import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.shared.layout.theme.lithoColorHookPatch
|
||||
import app.revanced.patches.shared.layout.theme.lithoColorOverrideHook
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
@@ -28,6 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/theme/SeekbarColorPatch;"
|
||||
|
||||
@@ -38,14 +38,14 @@ val seekbarColorPatch = bytecodePatch(
|
||||
sharedExtensionPatch,
|
||||
lithoColorHookPatch,
|
||||
resourceMappingPatch,
|
||||
versionCheckPatch
|
||||
versionCheckPatch,
|
||||
)
|
||||
|
||||
apply {
|
||||
fun MutableMethod.addColorChangeInstructions(index: Int) {
|
||||
insertLiteralOverride(
|
||||
index,
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->getVideoPlayerSeekbarColor(I)I"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->getVideoPlayerSeekbarColor(I)I",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ val seekbarColorPatch = bytecodePatch(
|
||||
"""
|
||||
invoke-static { v$colorRegister }, $EXTENSION_CLASS_DESCRIPTOR->getVideoPlayerSeekbarClickedColor(I)I
|
||||
move-result v$colorRegister
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ val seekbarColorPatch = bytecodePatch(
|
||||
"""
|
||||
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->showWatchHistoryProgressDrawable(Z)Z
|
||||
move-result v$register
|
||||
"""
|
||||
""",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ val seekbarColorPatch = bytecodePatch(
|
||||
"""
|
||||
invoke-static/range { p4 .. p5 }, $EXTENSION_CLASS_DESCRIPTOR->getLithoLinearGradient([I[F)[I
|
||||
move-result-object p4
|
||||
"""
|
||||
""",
|
||||
)
|
||||
|
||||
val playerFingerprint: Fingerprint
|
||||
@@ -142,7 +142,7 @@ val seekbarColorPatch = bytecodePatch(
|
||||
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->getPlayerLinearGradient([I)[I
|
||||
move-result-object v$register
|
||||
"""
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -160,15 +160,15 @@ val seekbarColorPatch = bytecodePatch(
|
||||
|
||||
findInstructionIndicesReversedOrThrow {
|
||||
val reference = getReference<MethodReference>()
|
||||
reference?.definingClass == LOTTIE_ANIMATION_VIEW_CLASS_TYPE
|
||||
&& reference.name == setAnimationIntMethodName
|
||||
reference?.definingClass == LOTTIE_ANIMATION_VIEW_CLASS_TYPE &&
|
||||
reference.name == setAnimationIntMethodName
|
||||
}.forEach { index ->
|
||||
val instruction = getInstruction<FiveRegisterInstruction>(index)
|
||||
|
||||
replaceInstruction(
|
||||
index,
|
||||
"invoke-static { v${instruction.registerC}, v${instruction.registerD} }, " +
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->setSplashAnimationLottie(Lcom/airbnb/lottie/LottieAnimationView;I)V"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->setSplashAnimationLottie(Lcom/airbnb/lottie/LottieAnimationView;I)V",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -180,29 +180,31 @@ val seekbarColorPatch = bytecodePatch(
|
||||
val setAnimationIntName = lottieAnimationViewSetAnimationIntFingerprint
|
||||
.originalMethod.name
|
||||
|
||||
add(ImmutableMethod(
|
||||
LOTTIE_ANIMATION_VIEW_CLASS_TYPE,
|
||||
addedMethodName,
|
||||
listOf(ImmutableMethodParameter("I", null, null)),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(2),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
add(
|
||||
ImmutableMethod(
|
||||
LOTTIE_ANIMATION_VIEW_CLASS_TYPE,
|
||||
addedMethodName,
|
||||
listOf(ImmutableMethodParameter("I", null, null)),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(2),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-virtual { p0, p1 }, Lcom/airbnb/lottie/LottieAnimationView;->$setAnimationIntName(I)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
})
|
||||
""",
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
val factoryStreamClass: CharSequence
|
||||
val factoryStreamName: CharSequence
|
||||
val factoryStreamReturnType: CharSequence
|
||||
lottieCompositionFactoryFromJsonInputStreamFingerprint.match(
|
||||
lottieCompositionFactoryZipFingerprint.originalClassDef
|
||||
lottieCompositionFactoryZipFingerprint.originalClassDef,
|
||||
).originalMethod.apply {
|
||||
factoryStreamClass = definingClass
|
||||
factoryStreamName = name
|
||||
@@ -211,8 +213,8 @@ val seekbarColorPatch = bytecodePatch(
|
||||
|
||||
val lottieAnimationViewSetAnimationStreamFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters(factoryStreamReturnType.toString())
|
||||
returns("V")
|
||||
parameterTypes(factoryStreamReturnType.toString())
|
||||
returnType("V")
|
||||
custom { _, classDef ->
|
||||
classDef.type == lottieAnimationViewSetAnimationIntFingerprint.originalClassDef.type
|
||||
}
|
||||
@@ -220,28 +222,30 @@ val seekbarColorPatch = bytecodePatch(
|
||||
val setAnimationStreamName = lottieAnimationViewSetAnimationStreamFingerprint
|
||||
.originalMethod.name
|
||||
|
||||
add(ImmutableMethod(
|
||||
LOTTIE_ANIMATION_VIEW_CLASS_TYPE,
|
||||
addedMethodName,
|
||||
listOf(
|
||||
ImmutableMethodParameter("Ljava/io/InputStream;", null, null),
|
||||
ImmutableMethodParameter("Ljava/lang/String;", null, null)
|
||||
),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(4),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
add(
|
||||
ImmutableMethod(
|
||||
LOTTIE_ANIMATION_VIEW_CLASS_TYPE,
|
||||
addedMethodName,
|
||||
listOf(
|
||||
ImmutableMethodParameter("Ljava/io/InputStream;", null, null),
|
||||
ImmutableMethodParameter("Ljava/lang/String;", null, null),
|
||||
),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(4),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-static { p1, p2 }, $factoryStreamClass->$factoryStreamName(Ljava/io/InputStream;Ljava/lang/String;)$factoryStreamReturnType
|
||||
move-result-object v0
|
||||
invoke-virtual { p0, v0}, Lcom/airbnb/lottie/LottieAnimationView;->$setAnimationStreamName($factoryStreamReturnType)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
})
|
||||
""",
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package app.revanced.patches.youtube.layout.shortsautoplay
|
||||
|
||||
import app.revanced.patcher.InstructionLocation.*
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fieldAccess
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@@ -16,15 +16,15 @@ internal val reelEnumConstructorFingerprint = fingerprint {
|
||||
addString("REEL_LOOP_BEHAVIOR_SINGLE_PLAY"),
|
||||
addString("REEL_LOOP_BEHAVIOR_REPEAT"),
|
||||
addString("REEL_LOOP_BEHAVIOR_END_SCREEN"),
|
||||
opcode(Opcode.RETURN_VOID)
|
||||
opcode(Opcode.RETURN_VOID),
|
||||
)
|
||||
}
|
||||
|
||||
internal val reelPlaybackRepeatParentFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Ljava/lang/String;", "J")
|
||||
returnType("V")
|
||||
parameterTypes("Ljava/lang/String;", "J")
|
||||
instructions(
|
||||
addString("Reels[%s] Playback Time: %d ms")
|
||||
addString("Reels[%s] Playback Time: %d ms"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -32,32 +32,32 @@ internal val reelPlaybackRepeatParentFingerprint = fingerprint {
|
||||
* Matches class found in [reelPlaybackRepeatParentFingerprint].
|
||||
*/
|
||||
internal val reelPlaybackRepeatFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
methodCall(smali = "Lcom/google/common/util/concurrent/ListenableFuture;->isDone()Z")
|
||||
methodCall(smali = "Lcom/google/common/util/concurrent/ListenableFuture;->isDone()Z"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val reelPlaybackFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("J")
|
||||
returns("V")
|
||||
parameterTypes("J")
|
||||
returnType("V")
|
||||
instructions(
|
||||
fieldAccess(
|
||||
definingClass = "Ljava/util/concurrent/TimeUnit;",
|
||||
name = "MILLISECONDS"
|
||||
name = "MILLISECONDS",
|
||||
),
|
||||
methodCall(
|
||||
name = "<init>",
|
||||
parameters = listOf("I", "L", "L"),
|
||||
location = MatchAfterWithin(15)
|
||||
location = MatchAfterWithin(15),
|
||||
),
|
||||
methodCall(
|
||||
opcode = Opcode.INVOKE_VIRTUAL,
|
||||
parameters = listOf("L"),
|
||||
returnType = "I",
|
||||
location = MatchAfterWithin(5)
|
||||
)
|
||||
location = MatchAfterWithin(5),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val toolBarButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
ResourceType.ID("menu_item_view"),
|
||||
methodCall(returnType = "I", opcode = Opcode.INVOKE_INTERFACE),
|
||||
@@ -30,8 +30,8 @@ internal val toolBarButtonFingerprint = fingerprint {
|
||||
|
||||
internal val spoofAppVersionFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("L")
|
||||
parameters("L")
|
||||
returnType("L")
|
||||
parameterTypes("L")
|
||||
opcodes(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.GOTO,
|
||||
|
||||
@@ -7,16 +7,16 @@ import app.revanced.patcher.literal
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val intentActionFingerprint = fingerprint {
|
||||
parameters("Landroid/content/Intent;")
|
||||
parameterTypes("Landroid/content/Intent;")
|
||||
instructions(
|
||||
addString("has_handled_intent"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val browseIdFingerprint = fingerprint {
|
||||
returns("Lcom/google/android/apps/youtube/app/common/ui/navigation/PaneDescriptor;")
|
||||
returnType("Lcom/google/android/apps/youtube/app/common/ui/navigation/PaneDescriptor;")
|
||||
|
||||
// parameters() // 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(
|
||||
addString("FEwhat_to_watch"),
|
||||
512(),
|
||||
|
||||
@@ -15,9 +15,9 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
* 20.02+
|
||||
*/
|
||||
internal val userWasInShortsAlternativeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Ljava/lang/Object;")
|
||||
parameterTypes("Ljava/lang/Object;")
|
||||
instructions(
|
||||
checkCast("Ljava/lang/Boolean;"),
|
||||
methodCall(smali = "Ljava/lang/Boolean;->booleanValue()Z", location = MatchAfterImmediately()),
|
||||
@@ -31,9 +31,9 @@ internal val userWasInShortsAlternativeFingerprint = fingerprint {
|
||||
* Pre 20.02
|
||||
*/
|
||||
internal val userWasInShortsLegacyFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Ljava/lang/Object;")
|
||||
parameterTypes("Ljava/lang/Object;")
|
||||
instructions(
|
||||
addString("Failed to read user_was_in_shorts proto after successful warmup"),
|
||||
)
|
||||
@@ -44,8 +44,8 @@ internal val userWasInShortsLegacyFingerprint = fingerprint {
|
||||
*/
|
||||
internal val userWasInShortsConfigFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45358360L(),
|
||||
)
|
||||
|
||||
@@ -12,8 +12,8 @@ internal val useGradientLoadingScreenFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val splashScreenStyleFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Landroid/os/Bundle;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/os/Bundle;")
|
||||
instructions(
|
||||
anyInstruction(
|
||||
1074339245(), // 20.30+
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val backgroundPlaybackManagerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Z")
|
||||
parameters("L")
|
||||
returnType("Z")
|
||||
parameterTypes("L")
|
||||
opcodes(
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_EQZ,
|
||||
@@ -40,8 +40,8 @@ internal val backgroundPlaybackManagerFingerprint = fingerprint {
|
||||
|
||||
internal val backgroundPlaybackSettingsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
@@ -56,8 +56,8 @@ internal val backgroundPlaybackSettingsFingerprint = fingerprint {
|
||||
|
||||
internal val kidsBackgroundPlaybackPolicyControllerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("I", "L", "L")
|
||||
returnType("V")
|
||||
parameterTypes("I", "L", "L")
|
||||
opcodes(
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_NE,
|
||||
@@ -73,19 +73,19 @@ internal val kidsBackgroundPlaybackPolicyControllerFingerprint = fingerprint {
|
||||
|
||||
internal val backgroundPlaybackManagerShortsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Z")
|
||||
parameters("L")
|
||||
returnType("Z")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
app.revanced.patcher.literal(151635310)
|
||||
app.revanced.patcher.literal(151635310),
|
||||
)
|
||||
}
|
||||
|
||||
internal val shortsBackgroundPlaybackFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
app.revanced.patcher.literal(45415425)
|
||||
app.revanced.patcher.literal(45415425),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -93,6 +93,6 @@ internal val shortsBackgroundPlaybackFeatureFlagFingerprint = fingerprint {
|
||||
internal val pipInputConsumerFeatureFlagFingerprint = fingerprint {
|
||||
instructions(
|
||||
// PiP input consumer feature flag.
|
||||
app.revanced.patcher.literal(45638483L)
|
||||
app.revanced.patcher.literal(45638483L),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package app.revanced.patches.youtube.misc.dimensions.spoof
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val deviceDimensionsModelToStringFingerprint = fingerprint {
|
||||
returns("L")
|
||||
returnType("L")
|
||||
instructions(
|
||||
addString("minh."),
|
||||
addString(";maxh.")
|
||||
addString(";maxh."),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,26 +11,26 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val scrollPositionFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
opcodes(
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.RETURN_VOID
|
||||
Opcode.RETURN_VOID,
|
||||
)
|
||||
strings("scroll_position")
|
||||
}
|
||||
|
||||
internal val recyclerViewTopScrollingFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
methodCall(smali = "Ljava/util/Iterator;->next()Ljava/lang/Object;"),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, MatchAfterImmediately()),
|
||||
checkCast("Landroid/support/v7/widget/RecyclerView;", MatchAfterImmediately()),
|
||||
literal(0, location = MatchAfterImmediately()),
|
||||
methodCall(definingClass = "Landroid/support/v7/widget/RecyclerView;", location = MatchAfterImmediately()),
|
||||
opcode(Opcode.GOTO, MatchAfterImmediately())
|
||||
opcode(Opcode.GOTO, MatchAfterImmediately()),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package app.revanced.patches.youtube.misc.fix.contentprovider
|
||||
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val unstableContentProviderFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/content/ContentResolver;", "[Ljava/lang/String;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/content/ContentResolver;", "[Ljava/lang/String;")
|
||||
instructions(
|
||||
// Early targets use HashMap and later targets use ConcurrentMap.
|
||||
methodCall(
|
||||
name = "putAll",
|
||||
parameters = listOf("Ljava/util/Map;")
|
||||
parameters = listOf("Ljava/util/Map;"),
|
||||
),
|
||||
addString("ContentProvider query returned null cursor")
|
||||
addString("ContentProvider query returned null cursor"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
*/
|
||||
internal val playbackSpeedInFeedsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
opcodes(
|
||||
Opcode.IGET,
|
||||
Opcode.MUL_INT_LIT16,
|
||||
@@ -31,8 +31,7 @@ internal val playbackSpeedInFeedsFingerprint = fingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun indexOfGetPlaybackSpeedInstruction(method: Method) =
|
||||
method.indexOfFirstInstructionReversed {
|
||||
opcode == Opcode.IGET &&
|
||||
getReference<FieldReference>()?.type == "F"
|
||||
}
|
||||
internal fun indexOfGetPlaybackSpeedInstruction(method: Method) = method.indexOfFirstInstructionReversed {
|
||||
opcode == Opcode.IGET &&
|
||||
getReference<FieldReference>()?.type == "F"
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val specificNetworkErrorViewControllerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.DRAWABLE("ic_offline_no_content_upside_down"),
|
||||
ResourceType.STRING("offline_no_content_body_text_not_offline_eligible"),
|
||||
@@ -24,8 +24,8 @@ internal val specificNetworkErrorViewControllerFingerprint = fingerprint {
|
||||
// but it the layout image/text is identical to the network error fingerprint above.
|
||||
internal val loadingFrameLayoutControllerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
ResourceType.DRAWABLE("ic_offline_no_content_upside_down"),
|
||||
ResourceType.STRING("offline_no_content_body_text_not_offline_eligible"),
|
||||
|
||||
@@ -3,21 +3,21 @@ package app.revanced.patches.youtube.misc.hapticfeedback
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val markerHapticsFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
strings("Failed to execute markers haptics vibrate.")
|
||||
}
|
||||
|
||||
internal val scrubbingHapticsFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
strings("Failed to haptics vibrate for fine scrubbing.")
|
||||
}
|
||||
|
||||
internal val seekUndoHapticsFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
strings("Failed to execute seek undo haptics vibrate.")
|
||||
}
|
||||
|
||||
internal val zoomHapticsFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
strings("Failed to haptics vibrate for video zoom")
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package app.revanced.patches.youtube.misc.imageurlhook
|
||||
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.anyInstruction
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val onFailureFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters(
|
||||
returnType("V")
|
||||
parameterTypes(
|
||||
"Lorg/chromium/net/UrlRequest;",
|
||||
"Lorg/chromium/net/UrlResponseInfo;",
|
||||
"Lorg/chromium/net/CronetException;"
|
||||
"Lorg/chromium/net/CronetException;",
|
||||
)
|
||||
custom { method, _ ->
|
||||
method.name == "onFailed"
|
||||
@@ -21,8 +21,8 @@ internal val onFailureFingerprint = fingerprint {
|
||||
// Acts as a parent fingerprint.
|
||||
internal val onResponseStartedFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;")
|
||||
returnType("V")
|
||||
parameterTypes("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;")
|
||||
strings(
|
||||
"Content-Length",
|
||||
"Content-Type",
|
||||
@@ -36,8 +36,8 @@ internal val onResponseStartedFingerprint = fingerprint {
|
||||
|
||||
internal val onSucceededFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;")
|
||||
returnType("V")
|
||||
parameterTypes("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;")
|
||||
custom { method, _ ->
|
||||
method.name == "onSucceeded"
|
||||
}
|
||||
@@ -54,17 +54,17 @@ internal val requestFingerprint = fingerprint {
|
||||
|
||||
internal val messageDigestImageUrlFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("Ljava/lang/String;", "L")
|
||||
parameterTypes("Ljava/lang/String;", "L")
|
||||
}
|
||||
|
||||
internal val messageDigestImageUrlParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
anyInstruction(
|
||||
addString("@#&=*+-_.,:!?()/~'%;\$"),
|
||||
addString("@#&=*+-_.,:!?()/~'%;\$[]"), // 20.38+
|
||||
)
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.revanced.patches.youtube.misc.links
|
||||
|
||||
import app.revanced.patcher.StringComparisonType
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
/**
|
||||
@@ -11,12 +11,12 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
*/
|
||||
internal val abUriParserLegacyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/Object;")
|
||||
parameters("Ljava/lang/Object;")
|
||||
returnType("Ljava/lang/Object;")
|
||||
parameterTypes("Ljava/lang/Object;")
|
||||
instructions(
|
||||
addString("Found entityKey=`"),
|
||||
addString("that does not contain a PlaylistVideoEntityId", comparison = StringComparisonType.CONTAINS),
|
||||
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;")
|
||||
addString("that does not contain a PlaylistVideoEntityId", comparison = StringComparisonType.CONTAINS),
|
||||
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ internal val abUriParserLegacyFingerprint = fingerprint {
|
||||
*/
|
||||
internal val abUriParserFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/Object;")
|
||||
parameters("Ljava/lang/Object;")
|
||||
returnType("Ljava/lang/Object;")
|
||||
parameterTypes("Ljava/lang/Object;")
|
||||
instructions(
|
||||
// Method is a switch statement of unrelated code,
|
||||
// and there's no strings or anything unique to fingerprint.
|
||||
@@ -39,8 +39,8 @@ internal val abUriParserFingerprint = fingerprint {
|
||||
|
||||
internal val httpUriParserFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Landroid/net/Uri;")
|
||||
parameters("Ljava/lang/String;")
|
||||
returnType("Landroid/net/Uri;")
|
||||
parameterTypes("Ljava/lang/String;")
|
||||
instructions(
|
||||
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
||||
addString("https"),
|
||||
@@ -48,4 +48,3 @@ internal val httpUriParserFingerprint = fingerprint {
|
||||
addString("https:"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ internal val lithoFilterFingerprint = fingerprint {
|
||||
|
||||
internal val protobufBufferReferenceFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("[B")
|
||||
returnType("V")
|
||||
parameterTypes("[B")
|
||||
instructions(
|
||||
fieldAccess(
|
||||
opcode = Opcode.IGET_OBJECT,
|
||||
@@ -42,8 +42,8 @@ internal val protobufBufferReferenceFingerprint = fingerprint {
|
||||
|
||||
internal val protobufBufferReferenceLegacyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("I", "Ljava/nio/ByteBuffer;")
|
||||
returnType("V")
|
||||
parameterTypes("I", "Ljava/nio/ByteBuffer;")
|
||||
opcodes(
|
||||
Opcode.IPUT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
@@ -54,7 +54,7 @@ internal val protobufBufferReferenceLegacyFingerprint = fingerprint {
|
||||
|
||||
internal val emptyComponentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.CONSTRUCTOR)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
instructions(
|
||||
addString("EmptyComponent"),
|
||||
)
|
||||
@@ -65,7 +65,7 @@ internal val emptyComponentFingerprint = fingerprint {
|
||||
|
||||
internal val lithoThreadExecutorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("I", "I", "I")
|
||||
parameterTypes("I", "I", "I")
|
||||
custom { method, classDef ->
|
||||
classDef.superclass == "Ljava/util/concurrent/ThreadPoolExecutor;" &&
|
||||
method.containsLiteralInstruction(1L) // 1L = default thread timeout.
|
||||
@@ -74,15 +74,15 @@ internal val lithoThreadExecutorFingerprint = fingerprint {
|
||||
|
||||
internal val lithoComponentNameUpbFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45631264L(),
|
||||
)
|
||||
}
|
||||
|
||||
internal val lithoConverterBufferUpbFeatureFlagFingerprint = fingerprint {
|
||||
returns("L")
|
||||
returnType("L")
|
||||
instructions(
|
||||
45419603L(),
|
||||
)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package app.revanced.patches.youtube.misc.loopvideo
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val videoStartPlaybackFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
addString("play() called when the player wasn't loaded."),
|
||||
addString("play() blocked because Background Playability failed")
|
||||
addString("play() blocked because Background Playability failed"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val actionBarSearchResultsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
returnType("Landroid/view/View;")
|
||||
instructions(
|
||||
ResourceType.LAYOUT("action_bar_search_results_view_mic"),
|
||||
methodCall(name = "setLayoutDirection"),
|
||||
@@ -30,8 +30,8 @@ internal val toolbarLayoutFingerprint = fingerprint {
|
||||
*/
|
||||
internal val appCompatToolbarBackButtonFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/graphics/drawable/Drawable;")
|
||||
parameters()
|
||||
returnType("Landroid/graphics/drawable/Drawable;")
|
||||
parameterTypes()
|
||||
custom { _, classDef ->
|
||||
classDef.type == "Landroid/support/v7/widget/Toolbar;"
|
||||
}
|
||||
@@ -42,7 +42,7 @@ internal val appCompatToolbarBackButtonFingerprint = fingerprint {
|
||||
*/
|
||||
internal val initializeButtonsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
ResourceType.LAYOUT("image_only_tab"),
|
||||
)
|
||||
@@ -54,8 +54,8 @@ internal val initializeButtonsFingerprint = fingerprint {
|
||||
*/
|
||||
internal val navigationBarHookCallbackFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("V")
|
||||
parameters(EXTENSION_NAVIGATION_BUTTON_DESCRIPTOR, "Landroid/view/View;")
|
||||
returnType("V")
|
||||
parameterTypes(EXTENSION_NAVIGATION_BUTTON_DESCRIPTOR, "Landroid/view/View;")
|
||||
custom { method, _ ->
|
||||
method.name == "navigationTabCreatedCallback" &&
|
||||
method.definingClass == EXTENSION_CLASS_DESCRIPTOR
|
||||
@@ -81,7 +81,7 @@ internal val navigationEnumFingerprint = fingerprint {
|
||||
|
||||
internal val pivotBarButtonsCreateDrawableViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
returnType("Landroid/view/View;")
|
||||
custom { method, _ ->
|
||||
method.definingClass == "Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;" &&
|
||||
// Only one view creation method has a Drawable parameter.
|
||||
@@ -91,8 +91,8 @@ internal val pivotBarButtonsCreateDrawableViewFingerprint = fingerprint {
|
||||
|
||||
internal val pivotBarButtonsCreateResourceStyledViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
parameters("L", "Z", "I", "L")
|
||||
returnType("Landroid/view/View;")
|
||||
parameterTypes("L", "Z", "I", "L")
|
||||
custom { method, _ ->
|
||||
method.definingClass == "Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;"
|
||||
}
|
||||
@@ -103,7 +103,7 @@ internal val pivotBarButtonsCreateResourceStyledViewFingerprint = fingerprint {
|
||||
*/
|
||||
internal val pivotBarButtonsCreateResourceIntViewFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
returnType("Landroid/view/View;")
|
||||
custom { method, _ ->
|
||||
method.definingClass == "Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;" &&
|
||||
// Only one view creation method has an int first parameter.
|
||||
@@ -113,8 +113,8 @@ internal val pivotBarButtonsCreateResourceIntViewFingerprint = fingerprint {
|
||||
|
||||
internal val pivotBarButtonsViewSetSelectedFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("I", "Z")
|
||||
returnType("V")
|
||||
parameterTypes("I", "Z")
|
||||
instructions(
|
||||
methodCall(name = "setSelected"),
|
||||
)
|
||||
|
||||
@@ -12,8 +12,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val playerControlsVisibilityEntityModelFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
opcodes(
|
||||
Opcode.IGET,
|
||||
Opcode.INVOKE_STATIC,
|
||||
@@ -24,8 +24,8 @@ internal val playerControlsVisibilityEntityModelFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val youtubeControlsOverlayFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
methodCall(name = "setFocusableInTouchMode"),
|
||||
ResourceType.ID("inset_overlay_view_layout"),
|
||||
@@ -34,8 +34,8 @@ internal val youtubeControlsOverlayFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val motionEventFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Landroid/view/MotionEvent;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/view/MotionEvent;")
|
||||
instructions(
|
||||
methodCall(name = "setTranslationY"),
|
||||
)
|
||||
@@ -43,8 +43,8 @@ internal val motionEventFingerprint = fingerprint {
|
||||
|
||||
internal val playerControlsExtensionHookListenersExistFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
custom { methodDef, classDef ->
|
||||
methodDef.name == "fullscreenButtonVisibilityCallbacksExist" &&
|
||||
classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
@@ -53,8 +53,8 @@ internal val playerControlsExtensionHookListenersExistFingerprint = fingerprint
|
||||
|
||||
internal val playerControlsExtensionHookFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("V")
|
||||
parameters("Z")
|
||||
returnType("V")
|
||||
parameterTypes("Z")
|
||||
custom { methodDef, classDef ->
|
||||
methodDef.name == "fullscreenButtonVisibilityChanged" &&
|
||||
classDef.type == EXTENSION_CLASS_DESCRIPTOR
|
||||
@@ -63,8 +63,8 @@ internal val playerControlsExtensionHookFingerprint = fingerprint {
|
||||
|
||||
internal val playerTopControlsInflateFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("controls_layout_stub"),
|
||||
methodCall("Landroid/view/ViewStub;", "inflate"),
|
||||
@@ -73,8 +73,8 @@ internal val playerTopControlsInflateFingerprint = fingerprint {
|
||||
}
|
||||
|
||||
internal val playerBottomControlsInflateFingerprint = fingerprint {
|
||||
returns("Ljava/lang/Object;")
|
||||
parameters()
|
||||
returnType("Ljava/lang/Object;")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.ID("bottom_ui_container_stub"),
|
||||
methodCall("Landroid/view/ViewStub;", "inflate"),
|
||||
@@ -84,8 +84,8 @@ internal val playerBottomControlsInflateFingerprint = fingerprint {
|
||||
|
||||
internal val overlayViewInflateFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/view/View;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/view/View;")
|
||||
instructions(
|
||||
ResourceType.ID("heatseeker_viewstub"),
|
||||
ResourceType.ID("fullscreen_button"),
|
||||
@@ -98,14 +98,14 @@ internal val overlayViewInflateFingerprint = fingerprint {
|
||||
*/
|
||||
internal val controlsOverlayVisibilityFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Z", "Z")
|
||||
returnType("V")
|
||||
parameterTypes("Z", "Z")
|
||||
}
|
||||
|
||||
internal val playerBottomControlsExploderFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45643739L(),
|
||||
)
|
||||
@@ -113,8 +113,8 @@ internal val playerBottomControlsExploderFeatureFlagFingerprint = fingerprint {
|
||||
|
||||
internal val playerTopControlsExperimentalLayoutFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("I")
|
||||
parameters()
|
||||
returnType("I")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45629424L(),
|
||||
)
|
||||
@@ -122,8 +122,8 @@ internal val playerTopControlsExperimentalLayoutFeatureFlagFingerprint = fingerp
|
||||
|
||||
internal val playerControlsLargeOverlayButtonsFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45709810L(),
|
||||
)
|
||||
@@ -131,8 +131,8 @@ internal val playerControlsLargeOverlayButtonsFeatureFlagFingerprint = fingerpri
|
||||
|
||||
internal val playerControlsFullscreenLargeButtonsFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45686474L(),
|
||||
)
|
||||
@@ -140,8 +140,8 @@ internal val playerControlsFullscreenLargeButtonsFeatureFlagFingerprint = finger
|
||||
|
||||
internal val playerControlsButtonStrokeFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45713296(),
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ internal val playerTypeEnumFingerprint = fingerprint {
|
||||
|
||||
internal val reelWatchPagerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Landroid/view/View;")
|
||||
returnType("Landroid/view/View;")
|
||||
instructions(
|
||||
ResourceType.ID("reel_watch_player"),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterWithin(10)),
|
||||
@@ -36,7 +36,7 @@ internal val reelWatchPagerFingerprint = fingerprint {
|
||||
|
||||
internal val videoStateEnumFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
strings(
|
||||
"NEW",
|
||||
"PLAYING",
|
||||
@@ -50,8 +50,8 @@ internal val videoStateEnumFingerprint = fingerprint {
|
||||
// 20.33 and lower class name ControlsState. 20.34+ class name is obfuscated.
|
||||
internal val controlsStateToStringFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters()
|
||||
returns("Ljava/lang/String;")
|
||||
parameterTypes()
|
||||
returnType("Ljava/lang/String;")
|
||||
instructions(
|
||||
addString("videoState"),
|
||||
addString("isBuffering"),
|
||||
|
||||
@@ -23,8 +23,8 @@ val playerTypeHookPatch = bytecodePatch(
|
||||
apply {
|
||||
val playerOverlaysSetPlayerTypeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters(playerTypeEnumFingerprint.originalClassDef.type)
|
||||
returnType("V")
|
||||
parameterTypes(playerTypeEnumFingerprint.originalClassDef.type)
|
||||
custom { _, classDef ->
|
||||
classDef.endsWith("/YouTubePlayerOverlaysLayout;")
|
||||
}
|
||||
@@ -51,8 +51,8 @@ val playerTypeHookPatch = bytecodePatch(
|
||||
|
||||
val videoStateFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters(controlStateType)
|
||||
returnType("V")
|
||||
parameterTypes(controlStateType)
|
||||
instructions(
|
||||
// Obfuscated parameter field name.
|
||||
fieldAccess(
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val licenseActivityOnCreateFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/os/Bundle;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/os/Bundle;")
|
||||
custom { method, classDef ->
|
||||
method.name == "onCreate" && classDef.endsWith("/LicenseActivity;")
|
||||
}
|
||||
@@ -19,8 +19,8 @@ internal val licenseActivityOnCreateFingerprint = fingerprint {
|
||||
|
||||
internal val setThemeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters()
|
||||
returnType("L")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
ResourceType.STRING("app_theme_appearance_dark"),
|
||||
)
|
||||
@@ -28,7 +28,7 @@ internal val setThemeFingerprint = fingerprint {
|
||||
|
||||
internal val cairoFragmentConfigFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
45532100L(),
|
||||
opcode(Opcode.MOVE_RESULT, location = MatchAfterWithin(10)),
|
||||
@@ -39,8 +39,8 @@ internal val cairoFragmentConfigFingerprint = fingerprint {
|
||||
// 20.31 is the first target with all the bold icons present.
|
||||
internal val boldIconsFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
parameters()
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
instructions(
|
||||
45685201L(),
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
internal const val YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE = "Lcom/google/android/apps/youtube/app/watchwhile/MainActivity;"
|
||||
|
||||
internal val conversionContextFingerprintToString = fingerprint {
|
||||
parameters()
|
||||
parameterTypes()
|
||||
strings(
|
||||
"ConversionContext{", // Partial string match.
|
||||
", widthConstraint=",
|
||||
@@ -62,7 +62,7 @@ internal fun getLayoutConstructorMethodMatch() = firstMethodComposite {
|
||||
|
||||
internal val mainActivityConstructorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters()
|
||||
parameterTypes()
|
||||
custom { _, classDef ->
|
||||
classDef.type == YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
||||
}
|
||||
@@ -70,8 +70,8 @@ internal val mainActivityConstructorFingerprint = fingerprint {
|
||||
|
||||
internal val mainActivityOnBackPressedFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
custom { method, classDef ->
|
||||
method.name == "onBackPressed" && classDef.type == YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
||||
}
|
||||
@@ -86,8 +86,8 @@ internal val BytecodePatchContext.mainActivityOnCreateMethod by gettingFirstMuta
|
||||
|
||||
internal val rollingNumberTextViewAnimationUpdateFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Landroid/graphics/Bitmap;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/graphics/Bitmap;")
|
||||
opcodes(
|
||||
Opcode.NEW_INSTANCE, // bitmap ImageSpan
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
@@ -128,8 +128,8 @@ internal fun getSeekbarOnDrawMethodMatch() = firstMethodComposite {
|
||||
|
||||
internal val subtitleButtonControllerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("Lcom/google/android/libraries/youtube/player/subtitles/model/SubtitleTrack;")
|
||||
returnType("V")
|
||||
parameterTypes("Lcom/google/android/libraries/youtube/player/subtitles/model/SubtitleTrack;")
|
||||
instructions(
|
||||
ResourceType.STRING("accessibility_captions_unavailable"),
|
||||
ResourceType.STRING("accessibility_captions_button_name"),
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val vp9CapabilityFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
strings(
|
||||
"vp9_supported",
|
||||
"video/x-vnd.on2.vp9"
|
||||
"video/x-vnd.on2.vp9",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.video.playerresponse
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
/**
|
||||
@@ -9,11 +9,11 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
*/
|
||||
internal val playerParameterBuilderFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;",
|
||||
"I",
|
||||
"Z",
|
||||
@@ -26,7 +26,7 @@ internal val playerParameterBuilderFingerprint = fingerprint {
|
||||
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||
"Z",
|
||||
"Z",
|
||||
"Lj\$/time/Duration;"
|
||||
"Lj\$/time/Duration;",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -35,11 +35,11 @@ internal val playerParameterBuilderFingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerParameterBuilder2026Fingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;",
|
||||
"I",
|
||||
"Z",
|
||||
@@ -52,10 +52,10 @@ internal val playerParameterBuilder2026Fingerprint = fingerprint {
|
||||
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||
"Z",
|
||||
"Z",
|
||||
"Lj\$/time/Duration;"
|
||||
"Lj\$/time/Duration;",
|
||||
)
|
||||
instructions(
|
||||
addString("psps")
|
||||
addString("psps"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -64,11 +64,11 @@ internal val playerParameterBuilder2026Fingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerParameterBuilder2015Fingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;",
|
||||
"I",
|
||||
"Z",
|
||||
@@ -83,7 +83,7 @@ internal val playerParameterBuilder2015Fingerprint = fingerprint {
|
||||
"Z",
|
||||
)
|
||||
instructions(
|
||||
addString("psps")
|
||||
addString("psps"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -92,11 +92,11 @@ internal val playerParameterBuilder2015Fingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerParameterBuilder2010Fingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
"Ljava/lang/String;",
|
||||
"I",
|
||||
"Z",
|
||||
@@ -109,10 +109,10 @@ internal val playerParameterBuilder2010Fingerprint = fingerprint {
|
||||
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||
"Z",
|
||||
"Z",
|
||||
"Z"
|
||||
"Z",
|
||||
)
|
||||
instructions(
|
||||
addString("psps")
|
||||
addString("psps"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -121,8 +121,8 @@ internal val playerParameterBuilder2010Fingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerParameterBuilder2002Fingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
@@ -149,8 +149,8 @@ internal val playerParameterBuilder2002Fingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerParameterBuilder1925Fingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
@@ -167,7 +167,7 @@ internal val playerParameterBuilder1925Fingerprint = fingerprint {
|
||||
"Z",
|
||||
)
|
||||
instructions(
|
||||
addString("psps")
|
||||
addString("psps"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ internal val playerParameterBuilder1925Fingerprint = fingerprint {
|
||||
*/
|
||||
internal val playerParameterBuilderLegacyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters(
|
||||
returnType("L")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;", // VideoId.
|
||||
"[B",
|
||||
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package app.revanced.patches.youtube.video.quality
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val videoQualityItemOnClickParentFingerprint = fingerprint {
|
||||
returns("V")
|
||||
returnType("V")
|
||||
instructions(
|
||||
addString("VIDEO_QUALITIES_MENU_BOTTOM_SHEET_FRAGMENT"),
|
||||
)
|
||||
@@ -17,12 +17,12 @@ internal val videoQualityItemOnClickParentFingerprint = fingerprint {
|
||||
* Resolves to class found in [videoQualityItemOnClickFingerprint].
|
||||
*/
|
||||
internal val videoQualityItemOnClickFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters(
|
||||
returnType("V")
|
||||
parameterTypes(
|
||||
"Landroid/widget/AdapterView;",
|
||||
"Landroid/view/View;",
|
||||
"I",
|
||||
"J"
|
||||
"J",
|
||||
)
|
||||
custom { method, _ ->
|
||||
method.name == "onItemClick"
|
||||
@@ -31,8 +31,8 @@ internal val videoQualityItemOnClickFingerprint = fingerprint {
|
||||
|
||||
internal val videoQualityMenuOptionsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.STATIC)
|
||||
returns("[L")
|
||||
parameters("Landroid/content/Context", "L", "L")
|
||||
returnType("[L")
|
||||
parameterTypes("Landroid/content/Context", "L", "L")
|
||||
opcodes(
|
||||
Opcode.CONST_4, // First instruction of method.
|
||||
Opcode.CONST_4,
|
||||
@@ -45,8 +45,8 @@ internal val videoQualityMenuOptionsFingerprint = fingerprint {
|
||||
|
||||
internal val videoQualityMenuViewInflateFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
parameters("L", "L", "L")
|
||||
returnType("L")
|
||||
parameterTypes("L", "L", "L")
|
||||
opcodes(
|
||||
Opcode.INVOKE_SUPER,
|
||||
Opcode.CONST,
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val getOldPlaybackSpeedsFingerprint = fingerprint {
|
||||
parameters("[L", "I")
|
||||
parameterTypes("[L", "I")
|
||||
strings("menu_item_playback_speed")
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ internal val showOldPlaybackSpeedMenuExtensionFingerprint = fingerprint {
|
||||
|
||||
internal val serverSideMaxSpeedFeatureFlagFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
returnType("Z")
|
||||
instructions(
|
||||
45719140L(),
|
||||
)
|
||||
@@ -36,8 +36,8 @@ internal val serverSideMaxSpeedFeatureFlagFingerprint = fingerprint {
|
||||
|
||||
internal val speedArrayGeneratorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("[L")
|
||||
parameters("Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;")
|
||||
returnType("[L")
|
||||
parameterTypes("Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;")
|
||||
instructions(
|
||||
methodCall(name = "size", returnType = "I"),
|
||||
newInstance("Ljava/text/DecimalFormat;"),
|
||||
@@ -53,8 +53,8 @@ internal val speedArrayGeneratorFingerprint = fingerprint {
|
||||
*/
|
||||
internal val speedLimiterFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("F", "Lcom/google/android/libraries/youtube/innertube/model/media/PlayerConfigModel;")
|
||||
returnType("V")
|
||||
parameterTypes("F", "Lcom/google/android/libraries/youtube/innertube/model/media/PlayerConfigModel;")
|
||||
instructions(
|
||||
0.25f(),
|
||||
4.0f(),
|
||||
@@ -66,8 +66,8 @@ internal val speedLimiterFingerprint = fingerprint {
|
||||
*/
|
||||
internal val speedLimiterLegacyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("F")
|
||||
returnType("V")
|
||||
parameterTypes("F")
|
||||
opcodes(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package app.revanced.patches.youtube.video.speed.remember
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val initializePlaybackSpeedValuesFingerprint = fingerprint {
|
||||
parameters("[L", "I")
|
||||
parameterTypes("[L", "I")
|
||||
instructions(
|
||||
addString("menu_item_playback_speed"),
|
||||
)
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val videoIdFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
methodCall(
|
||||
definingClass = "Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;",
|
||||
@@ -22,8 +22,8 @@ internal val videoIdFingerprint = fingerprint {
|
||||
|
||||
internal val videoIdBackgroundPlayFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.DECLARED_SYNCHRONIZED, AccessFlags.FINAL, AccessFlags.PUBLIC)
|
||||
returns("V")
|
||||
parameters("L")
|
||||
returnType("V")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
methodCall(
|
||||
definingClass = "Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;",
|
||||
@@ -47,8 +47,8 @@ internal val videoIdBackgroundPlayFingerprint = fingerprint {
|
||||
|
||||
internal val videoIdParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("[L")
|
||||
parameters("L")
|
||||
returnType("[L")
|
||||
parameterTypes("L")
|
||||
instructions(
|
||||
524288L(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user