mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-27 12:41:03 +00:00
temp
This commit is contained in:
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
||||
org.gradle.parallel = true
|
||||
android.useAndroidX = true
|
||||
kotlin.code.style = official
|
||||
version = liso-6.0.0-dev.1
|
||||
version = 5.47.0-dev.5
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
revanced-patcher = "22.0.0"
|
||||
revanced-patcher = "22.0.0-local"
|
||||
# Tracking https://github.com/google/smali/issues/64.
|
||||
#noinspection GradleDependency
|
||||
smali = "3.0.8"
|
||||
|
||||
1
gradle/wrapper/gradle-wrapper.properties
vendored
1
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,4 +1,3 @@
|
||||
#Mon Jun 16 14:39:32 CEST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.stringOption
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.patches.all.misc.transformation.transformInstructionsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.all.misc.transformation
|
||||
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.all.misc.transformation
|
||||
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.forEachInstructionAsSequence
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.facebook.ads.mainfeed
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction31i
|
||||
|
||||
@@ -2,7 +2,7 @@ package app.revanced.patches.instagram.misc.share
|
||||
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package app.revanced.patches.music.misc.extension.hooks
|
||||
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patches.music.shared.YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
|
||||
import app.revanced.patches.shared.misc.extension.activityOnCreateExtensionHook
|
||||
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||
@@ -9,7 +8,7 @@ internal val applicationInitHook = extensionHook {
|
||||
returns("V")
|
||||
parameters()
|
||||
instructions(
|
||||
string("activity")
|
||||
addString("activity")
|
||||
)
|
||||
custom { method, _ -> method.name == "onCreate" }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.reddit.customclients.infinityforreddit.api
|
||||
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patcher.util.toInstructions
|
||||
import app.revanced.patches.reddit.customclients.spoofClientPatch
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package app.revanced.patches.reddit.customclients.redditisfun.api
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
||||
@@ -24,3 +24,4 @@ internal val setRemoteConfigFingerprint = fingerprint {
|
||||
parameters("Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;")
|
||||
strings("reddit_oauth_url")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package app.revanced.patches.shared
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
|
||||
internal val castContextFetchFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("Error fetching CastContext.")
|
||||
addString("Error fetching CastContext.")
|
||||
)
|
||||
}
|
||||
|
||||
internal val primeMethodFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("com.android.vending"),
|
||||
string("com.google.android.GoogleCamera")
|
||||
addString("com.android.vending"),
|
||||
addString("com.google.android.GoogleCamera")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatchBuilder
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableField.Companion.toMutable
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableField.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.BasePreferenceScreen
|
||||
|
||||
@@ -5,9 +5,9 @@ import app.revanced.patcher.Fingerprint
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.encodedValue.MutableEncodedValue
|
||||
import app.revanced.patcher.dex.mutable.encodedValue.MutableLongEncodedValue
|
||||
import app.revanced.patcher.dex.mutable.encodedValue.MutableStringEncodedValue
|
||||
import com.android.tools.smali.dexlib2.iface.value.MutableEncodedValue
|
||||
import com.android.tools.smali.dexlib2.iface.value.MutableLongEncodedValue
|
||||
import com.android.tools.smali.dexlib2.iface.value.MutableStringEncodedValue
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import com.android.tools.smali.dexlib2.immutable.value.ImmutableLongEncodedValue
|
||||
|
||||
@@ -83,7 +83,7 @@ fun gmsCoreSupportPatch(
|
||||
val transformations = mutableListOf<() -> Unit>()
|
||||
|
||||
classDefs.forEach { classDef ->
|
||||
val mutableClass by lazy { classDef.mutable() }
|
||||
val mutableClass by lazy { classDef.getOrReplaceMutable() }
|
||||
|
||||
classDef.methods.forEach classLoop@{ method ->
|
||||
val implementation = method.implementation ?: return@classLoop
|
||||
|
||||
@@ -7,7 +7,7 @@ import app.revanced.patcher.fieldAccess
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val youTubeCopyTextFingerprint = fingerprint {
|
||||
@@ -15,7 +15,7 @@ internal val youTubeCopyTextFingerprint = fingerprint {
|
||||
parameters("L", "Ljava/util/Map;")
|
||||
instructions(
|
||||
opcode(Opcode.IGET_OBJECT),
|
||||
string("text/plain", location = MatchAfterWithin(2)),
|
||||
addString("text/plain", location = MatchAfterWithin(2)),
|
||||
methodCall(
|
||||
smali = "Landroid/content/ClipData;->newPlainText(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Landroid/content/ClipData;",
|
||||
location = MatchAfterWithin(2)
|
||||
@@ -64,6 +64,6 @@ internal val youTubeShareSheetFingerprint = fingerprint {
|
||||
|
||||
methodCall(smali = "Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;"),
|
||||
|
||||
string("YTShare_Logging_Share_Intent_Endpoint_Byte_Array")
|
||||
addString("YTShare_Logging_Share_Intent_Endpoint_Byte_Array")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
@@ -153,7 +153,7 @@ internal val nerdsStatsVideoFormatBuilderFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
parameters("L")
|
||||
instructions(
|
||||
string("codecs=\"")
|
||||
addString("codecs=\"")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.patch.BytecodePatchBuilder
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.util.findFreeRegister
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.stringOption
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.strava.upselling
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.removeInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
|
||||
@@ -69,7 +69,7 @@ val spoofSimPatch = bytecodePatch(
|
||||
}
|
||||
}
|
||||
}.forEach { (classDef, methods) ->
|
||||
with(classDef.mutable()) {
|
||||
with(classDef.getOrReplaceMutable()) {
|
||||
methods.forEach { (method, patches) ->
|
||||
with(findMutableMethodOf(method)) {
|
||||
while (!patches.isEmpty()) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.tumblr.featureflags
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableField.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableField.Companion.toMutable
|
||||
import app.revanced.patcher.extensions.ExternalLabel
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.interaction.downloads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val offlineVideoEndpointFingerprint = fingerprint {
|
||||
@@ -14,6 +14,6 @@ internal val offlineVideoEndpointFingerprint = fingerprint {
|
||||
"L",
|
||||
)
|
||||
instructions(
|
||||
string("Object is not an offlineable video: ")
|
||||
addString("Object is not an offlineable video: ")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package app.revanced.patches.youtube.interaction.swipecontrols
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.InputType
|
||||
|
||||
@@ -5,15 +5,15 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val addCreateButtonViewFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("Android Wear"),
|
||||
addString("Android Wear"),
|
||||
opcode(Opcode.IF_EQZ),
|
||||
string("Android Automotive", location = MatchAfterImmediately()),
|
||||
addString("Android Automotive", location = MatchAfterImmediately()),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.checkCast
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import app.revanced.patches.youtube.layout.searchbar.wideSearchbarLayoutFingerprint
|
||||
@@ -45,7 +45,7 @@ internal val parseElementFromBufferFingerprint = fingerprint {
|
||||
opcode(Opcode.INVOKE_INTERFACE, location = MatchAfterWithin(1)),
|
||||
opcode(Opcode.MOVE_RESULT_OBJECT, location = MatchAfterImmediately()),
|
||||
|
||||
string("Failed to parse Element", comparison = StringComparisonType.STARTS_WITH)
|
||||
addString("Failed to parse Element", comparison = StringComparisonType.STARTS_WITH)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ internal val playerOverlayFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
instructions(
|
||||
string("player_overlay_in_video_programming")
|
||||
addString("player_overlay_in_video_programming")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.hide.infocards
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@@ -11,7 +11,7 @@ internal val infocardsIncognitoFingerprint = fingerprint {
|
||||
returns("Ljava/lang/Boolean;")
|
||||
parameters("L", "J")
|
||||
instructions(
|
||||
string("vibrator")
|
||||
addString("vibrator")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ internal val infocardsIncognitoParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/String;")
|
||||
instructions(
|
||||
string("player_overlay_info_card_teaser")
|
||||
addString("player_overlay_info_card_teaser")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -16,7 +16,7 @@ internal val shortsBottomBarContainerFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Landroid/view/View;", "Landroid/os/Bundle;")
|
||||
instructions(
|
||||
string("r_pfvc"),
|
||||
addString("r_pfvc"),
|
||||
resourceLiteral(ResourceType.ID, "bottom_bar_container"),
|
||||
methodCall(name = "getHeight"),
|
||||
opcode(Opcode.MOVE_RESULT)
|
||||
@@ -57,7 +57,7 @@ internal val legacyRenderBottomNavigationBarLegacyParentFingerprint = fingerprin
|
||||
"L",
|
||||
)
|
||||
instructions(
|
||||
string("aa")
|
||||
addString("aa")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ internal val renderBottomNavigationBarLegacy1941ParentFingerprint = fingerprint
|
||||
"L",
|
||||
)
|
||||
instructions(
|
||||
string("aa")
|
||||
addString("aa")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ internal val renderBottomNavigationBarParentFingerprint = fingerprint {
|
||||
"I"
|
||||
)
|
||||
instructions(
|
||||
string("RPCAC")
|
||||
addString("RPCAC")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ internal val setPivotBarVisibilityFingerprint = fingerprint {
|
||||
internal val setPivotBarVisibilityParentFingerprint = fingerprint {
|
||||
parameters("Z")
|
||||
instructions(
|
||||
string("FEnotifications_inbox")
|
||||
addString("FEnotifications_inbox")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -46,7 +46,7 @@ internal val miniplayerModernViewParentFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
instructions(
|
||||
string("player_overlay_modern_mini_player_controls")
|
||||
addString("player_overlay_modern_mini_player_controls")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ internal val miniplayerOverrideFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
instructions(
|
||||
string("appName"),
|
||||
addString("appName"),
|
||||
methodCall(
|
||||
parameters = listOf("Landroid/content/Context;"),
|
||||
returnType = "Z",
|
||||
|
||||
@@ -9,8 +9,8 @@ import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
|
||||
@@ -2,28 +2,28 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val dislikeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
instructions(
|
||||
string("like/dislike")
|
||||
addString("like/dislike")
|
||||
)
|
||||
}
|
||||
|
||||
internal val likeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
instructions(
|
||||
string("like/like")
|
||||
addString("like/like")
|
||||
)
|
||||
}
|
||||
|
||||
internal val removeLikeFingerprint = fingerprint {
|
||||
returns("V")
|
||||
instructions(
|
||||
string("like/removelike")
|
||||
addString("like/removelike")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ internal val rollingNumberMeasureStaticLabelParentFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
parameters()
|
||||
instructions(
|
||||
string("RollingNumberFontProperties{paint=")
|
||||
addString("RollingNumberFontProperties{paint=")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ internal val rollingNumberTextViewFingerprint = fingerprint {
|
||||
internal val textComponentConstructorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.CONSTRUCTOR, AccessFlags.PRIVATE)
|
||||
instructions(
|
||||
string("TextComponent")
|
||||
addString("TextComponent")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ internal val textComponentDataFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("L", "L")
|
||||
instructions(
|
||||
string("text")
|
||||
addString("text")
|
||||
)
|
||||
custom { _, classDef ->
|
||||
classDef.fields.find { it.type == "Ljava/util/BitSet;" } != null
|
||||
@@ -122,7 +122,7 @@ internal val textComponentLookupFingerprint = fingerprint {
|
||||
returns("L")
|
||||
parameters("L")
|
||||
instructions(
|
||||
string("…")
|
||||
addString("…")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,9 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import app.revanced.patches.youtube.shared.YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@@ -125,8 +124,8 @@ internal val lottieCompositionFactoryZipFingerprint = fingerprint {
|
||||
parameters("Landroid/content/Context;", "Ljava/util/zip/ZipInputStream;", "Ljava/lang/String;")
|
||||
returns("L")
|
||||
instructions(
|
||||
string("Unable to parse composition"),
|
||||
string(" however it was not found in the animation.")
|
||||
addString("Unable to parse composition"),
|
||||
addString(" however it was not found in the animation.")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
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
|
||||
|
||||
@@ -5,17 +5,17 @@ import app.revanced.patcher.fieldAccess
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val reelEnumConstructorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||
instructions(
|
||||
string("REEL_LOOP_BEHAVIOR_UNKNOWN"),
|
||||
string("REEL_LOOP_BEHAVIOR_SINGLE_PLAY"),
|
||||
string("REEL_LOOP_BEHAVIOR_REPEAT"),
|
||||
string("REEL_LOOP_BEHAVIOR_END_SCREEN"),
|
||||
addString("REEL_LOOP_BEHAVIOR_UNKNOWN"),
|
||||
addString("REEL_LOOP_BEHAVIOR_SINGLE_PLAY"),
|
||||
addString("REEL_LOOP_BEHAVIOR_REPEAT"),
|
||||
addString("REEL_LOOP_BEHAVIOR_END_SCREEN"),
|
||||
opcode(Opcode.RETURN_VOID)
|
||||
)
|
||||
}
|
||||
@@ -24,7 +24,7 @@ internal val reelPlaybackRepeatParentFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters("Ljava/lang/String;", "J")
|
||||
instructions(
|
||||
string("Reels[%s] Playback Time: %d ms")
|
||||
addString("Reels[%s] Playback Time: %d ms")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fieldAccess
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -71,9 +71,9 @@ internal val shortsPlaybackIntentLegacyFingerprint = fingerprint {
|
||||
instructions(
|
||||
methodCall(returnType = "Lcom/google/android/libraries/youtube/player/model/PlaybackStartDescriptor;"),
|
||||
// None of these strings are unique.
|
||||
string("com.google.android.apps.youtube.app.endpoint.flags"),
|
||||
string("ReelWatchFragmentArgs"),
|
||||
string("reels_fragment_descriptor")
|
||||
addString("com.google.android.apps.youtube.app.endpoint.flags"),
|
||||
addString("ReelWatchFragmentArgs"),
|
||||
addString("reels_fragment_descriptor")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ internal val shortsPlaybackIntentFingerprint = fingerprint {
|
||||
)
|
||||
instructions(
|
||||
// None of these strings are unique.
|
||||
string("com.google.android.apps.youtube.app.endpoint.flags"),
|
||||
string("ReelWatchFragmentArgs"),
|
||||
string("reels_fragment_descriptor")
|
||||
addString("com.google.android.apps.youtube.app.endpoint.flags"),
|
||||
addString("ReelWatchFragmentArgs"),
|
||||
addString("reels_fragment_descriptor")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ package app.revanced.patches.youtube.layout.startpage
|
||||
import app.revanced.patcher.fieldAccess
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val intentActionFingerprint = fingerprint {
|
||||
parameters("Landroid/content/Intent;")
|
||||
instructions(
|
||||
string("has_handled_intent")
|
||||
addString("has_handled_intent")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ internal val browseIdFingerprint = fingerprint {
|
||||
|
||||
//parameters() // 20.30 and earlier is no parameters. 20.31+ parameter is L.
|
||||
instructions(
|
||||
string("FEwhat_to_watch"),
|
||||
addString("FEwhat_to_watch"),
|
||||
literal(512),
|
||||
fieldAccess(opcode = Opcode.IPUT_OBJECT, type = "Ljava/lang/String;")
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@@ -23,7 +23,7 @@ internal val userWasInShortsAlternativeFingerprint = fingerprint {
|
||||
methodCall(smali = "Ljava/lang/Boolean;->booleanValue()Z", location = MatchAfterImmediately()),
|
||||
opcode(Opcode.MOVE_RESULT, MatchAfterImmediately()),
|
||||
// 20.40+ string was merged into another string and is a partial match.
|
||||
string("userIsInShorts: ", comparison = StringComparisonType.CONTAINS, location = MatchAfterWithin(15))
|
||||
addString("userIsInShorts: ", comparison = StringComparisonType.CONTAINS, location = MatchAfterWithin(15))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ internal val userWasInShortsLegacyFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Ljava/lang/Object;")
|
||||
instructions(
|
||||
string("Failed to read user_was_in_shorts proto after successful warmup")
|
||||
addString("Failed to read user_was_in_shorts proto after successful warmup")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package app.revanced.patches.youtube.misc.dimensions.spoof
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
|
||||
internal val deviceDimensionsModelToStringFingerprint = fingerprint {
|
||||
returns("L")
|
||||
instructions(
|
||||
string("minh."),
|
||||
string(";maxh.")
|
||||
addString("minh."),
|
||||
addString(";maxh.")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.youtube.misc.extension.hooks
|
||||
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.extension.activityOnCreateExtensionHook
|
||||
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||
import app.revanced.patches.youtube.shared.YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
||||
@@ -13,8 +13,8 @@ internal val applicationInitHook = extensionHook {
|
||||
// Does _not_ resolve to the YouTube main activity.
|
||||
// Required as some hooked code runs before the main activity is launched.
|
||||
instructions(
|
||||
string("Application.onCreate"),
|
||||
string("Application creation")
|
||||
addString("Application.onCreate"),
|
||||
addString("Application creation")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.fix.contentprovider
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val unstableContentProviderFingerprint = fingerprint {
|
||||
@@ -15,6 +15,6 @@ internal val unstableContentProviderFingerprint = fingerprint {
|
||||
name = "putAll",
|
||||
parameters = listOf("Ljava/util/Map;")
|
||||
),
|
||||
string("ContentProvider query returned null cursor")
|
||||
addString("ContentProvider query returned null cursor")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.util.getReference
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
@@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.imageurlhook
|
||||
|
||||
import app.revanced.patcher.anyInstruction
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val onFailureFingerprint = fingerprint {
|
||||
@@ -63,8 +63,8 @@ internal val messageDigestImageUrlParentFingerprint = fingerprint {
|
||||
parameters()
|
||||
instructions(
|
||||
anyInstruction(
|
||||
string("@#&=*+-_.,:!?()/~'%;\$"),
|
||||
string("@#&=*+-_.,:!?()/~'%;\$[]"), // 20.38+
|
||||
addString("@#&=*+-_.,:!?()/~'%;\$"),
|
||||
addString("@#&=*+-_.,:!?()/~'%;\$[]"), // 20.38+
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.misc.links
|
||||
import app.revanced.patcher.StringComparisonType
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
/**
|
||||
@@ -14,8 +14,8 @@ internal val abUriParserLegacyFingerprint = fingerprint {
|
||||
returns("Ljava/lang/Object;")
|
||||
parameters("Ljava/lang/Object;")
|
||||
instructions(
|
||||
string("Found entityKey=`"),
|
||||
string("that does not contain a PlaylistVideoEntityId", comparison = StringComparisonType.CONTAINS),
|
||||
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;")
|
||||
)
|
||||
}
|
||||
@@ -43,9 +43,9 @@ internal val httpUriParserFingerprint = fingerprint {
|
||||
parameters("Ljava/lang/String;")
|
||||
instructions(
|
||||
methodCall(smali = "Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;"),
|
||||
string("https"),
|
||||
string("://"),
|
||||
string("https:"),
|
||||
addString("https"),
|
||||
addString("://"),
|
||||
addString("https:"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.containsLiteralInstruction
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val componentCreateFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("Element missing correct type extension"),
|
||||
string("Element missing type")
|
||||
addString("Element missing correct type extension"),
|
||||
addString("Element missing type")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ internal val emptyComponentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.CONSTRUCTOR)
|
||||
parameters()
|
||||
instructions(
|
||||
string("EmptyComponent")
|
||||
addString("EmptyComponent")
|
||||
)
|
||||
custom { _, classDef ->
|
||||
classDef.methods.filter { AccessFlags.STATIC.isSet(it.accessFlags) }.size == 1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package app.revanced.patches.youtube.misc.loopvideo
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val videoStartPlaybackFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
instructions(
|
||||
string("play() called when the player wasn't loaded."),
|
||||
string("play() blocked because Background Playability failed")
|
||||
addString("play() called when the player wasn't loaded."),
|
||||
addString("play() blocked because Background Playability failed")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -127,14 +127,14 @@ internal val pivotBarButtonsViewSetSelectedFingerprint = fingerprint {
|
||||
internal val pivotBarConstructorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
instructions(
|
||||
string("com.google.android.apps.youtube.app.endpoint.flags"),
|
||||
addString("com.google.android.apps.youtube.app.endpoint.flags"),
|
||||
)
|
||||
}
|
||||
|
||||
internal val imageEnumConstructorFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||
instructions(
|
||||
string("TAB_ACTIVITY_CAIRO"),
|
||||
addString("TAB_ACTIVITY_CAIRO"),
|
||||
opcode(Opcode.INVOKE_DIRECT, location = MatchAfterImmediately()),
|
||||
opcode(Opcode.SPUT_OBJECT, location = MatchAfterImmediately())
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.misc.navigation
|
||||
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.util.Document
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.playservice.is_19_25_or_greater
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.misc.playertype
|
||||
import app.revanced.patcher.InstructionLocation.MatchAfterWithin
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -54,7 +54,7 @@ internal val controlsStateToStringFingerprint = fingerprint {
|
||||
parameters()
|
||||
returns("Ljava/lang/String;")
|
||||
instructions(
|
||||
string("videoState"),
|
||||
string("isBuffering")
|
||||
addString("videoState"),
|
||||
addString("isBuffering")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.youtube.misc.settings
|
||||
|
||||
import app.revanced.patcher.dex.mutable.MutableClassDef
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableClassDef
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
|
||||
@@ -7,7 +7,7 @@ import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.newInstance
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -95,7 +95,7 @@ internal val rollingNumberTextViewAnimationUpdateFingerprint = fingerprint {
|
||||
internal val seekbarFingerprint = fingerprint {
|
||||
returns("V")
|
||||
instructions(
|
||||
string("timed_markers_width"),
|
||||
addString("timed_markers_width"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fieldAccess
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.youtube.shared.videoQualityChangedFingerprint
|
||||
import app.revanced.util.getReference
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -15,7 +15,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
internal val createVideoPlayerSeekbarFingerprint = fingerprint {
|
||||
returns("V")
|
||||
instructions(
|
||||
string("timed_markers_width"),
|
||||
addString("timed_markers_width"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ internal val playerControllerSetTimeReferenceFingerprint = fingerprint {
|
||||
|
||||
internal val playerInitFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("playVideo called on player response with no videoStreamingData."),
|
||||
addString("playVideo called on player response with no videoStreamingData."),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ internal val playerInitFingerprint = fingerprint {
|
||||
*/
|
||||
internal val seekFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("Attempting to seek during an ad"),
|
||||
addString("Attempting to seek during an ad"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ internal val mdxSeekFingerprint = fingerprint {
|
||||
|
||||
internal val mdxPlayerDirectorSetVideoStageFingerprint = fingerprint {
|
||||
instructions(
|
||||
string("MdxDirector setVideoStage ad should be null when videoStage is not an Ad state "),
|
||||
addString("MdxDirector setVideoStage ad should be null when videoStage is not an Ad state "),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ internal val videoEndFingerprint = fingerprint {
|
||||
returnType = "V"
|
||||
),
|
||||
literal(45368273L, location = MatchAfterWithin(5)),
|
||||
string("Attempting to seek when video is not playing"),
|
||||
addString("Attempting to seek when video is not playing"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.youtube.video.information
|
||||
|
||||
import app.revanced.patcher.dex.mutable.MutableClassDef
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableClassDef
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.video.playerresponse
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ internal val playerParameterBuilder2026Fingerprint = fingerprint {
|
||||
"Lj\$/time/Duration;"
|
||||
)
|
||||
instructions(
|
||||
string("psps")
|
||||
addString("psps")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ internal val playerParameterBuilder2015Fingerprint = fingerprint {
|
||||
"Z",
|
||||
)
|
||||
instructions(
|
||||
string("psps")
|
||||
addString("psps")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ internal val playerParameterBuilder2010Fingerprint = fingerprint {
|
||||
"Z"
|
||||
)
|
||||
instructions(
|
||||
string("psps")
|
||||
addString("psps")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ internal val playerParameterBuilder2002Fingerprint = fingerprint {
|
||||
"Z",
|
||||
)
|
||||
instructions(
|
||||
string("psps"),
|
||||
addString("psps"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ internal val playerParameterBuilder1925Fingerprint = fingerprint {
|
||||
"Z",
|
||||
)
|
||||
instructions(
|
||||
string("psps")
|
||||
addString("psps")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.Fingerprint
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.playservice.is_19_23_or_greater
|
||||
import app.revanced.patches.youtube.misc.playservice.is_20_02_or_greater
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.video.quality
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@@ -9,7 +9,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
internal val videoQualityItemOnClickParentFingerprint = fingerprint {
|
||||
returns("V")
|
||||
instructions(
|
||||
string("VIDEO_QUALITIES_MENU_BOTTOM_SHEET_FRAGMENT"),
|
||||
addString("VIDEO_QUALITIES_MENU_BOTTOM_SHEET_FRAGMENT"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.extensions.instructions
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableField.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableField.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.methodCall
|
||||
import app.revanced.patcher.newInstance
|
||||
import app.revanced.patcher.opcode
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
import app.revanced.patches.shared.misc.mapping.ResourceType
|
||||
import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
@@ -43,7 +43,7 @@ internal val speedArrayGeneratorFingerprint = fingerprint {
|
||||
instructions(
|
||||
methodCall(name = "size", returnType = "I"),
|
||||
newInstance("Ljava/text/DecimalFormat;"),
|
||||
string("0.0#"),
|
||||
addString("0.0#"),
|
||||
literal(7),
|
||||
opcode(Opcode.NEW_ARRAY),
|
||||
fieldAccess(definingClass = "/PlayerConfigModel;", type = "[F")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package app.revanced.patches.youtube.video.speed.remember
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.string
|
||||
import app.revanced.patcher.addString
|
||||
|
||||
internal val initializePlaybackSpeedValuesFingerprint = fingerprint {
|
||||
parameters("[L", "I")
|
||||
instructions(
|
||||
string("menu_item_playback_speed"),
|
||||
addString("menu_item_playback_speed"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.video.videoid
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.playertype.playerTypeHookPatch
|
||||
import app.revanced.patches.youtube.video.playerresponse.Hook
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package app.revanced.util
|
||||
|
||||
import app.revanced.patcher.FingerprintBuilder
|
||||
import app.revanced.patcher.dex.mutable.MutableClassDef
|
||||
import app.revanced.patcher.dex.mutable.MutableField
|
||||
import app.revanced.patcher.dex.mutable.MutableField.Companion.toMutable
|
||||
import app.revanced.patcher.dex.mutable.MutableMethod
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableClassDef
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableField
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableField.Companion.toMutable
|
||||
import com.android.tools.smali.dexlib2.mutable.MutableMethod
|
||||
import app.revanced.patcher.extensions.*
|
||||
import app.revanced.patcher.firstClassDefMutable
|
||||
import app.revanced.patcher.firstClassDefMutableOrNull
|
||||
@@ -805,7 +805,7 @@ fun BytecodePatchContext.forEachInstructionAsSequence(
|
||||
block: (classDef: MutableClassDef, method: MutableMethod, matchingIndex: Int, instruction: Instruction) -> Unit,
|
||||
) {
|
||||
classDefs.asSequence().flatMap { classDef ->
|
||||
val mutableClassDef by lazy { classDef.mutable() }
|
||||
val mutableClassDef by lazy { classDef.getOrReplaceMutable() }
|
||||
|
||||
classDef.methods.asSequence().flatMap { method ->
|
||||
val instructions =
|
||||
|
||||
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("app.revanced.patches") version "1.0.0-dev.7"
|
||||
id("app.revanced.patches") version "1.0.0-dev.8-local"
|
||||
}
|
||||
|
||||
settings {
|
||||
|
||||
Reference in New Issue
Block a user