mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-21 10:03:55 +00:00
fix: Correctly name Enable ROM signature spoofing patch
This commit is contained in:
@@ -116,8 +116,8 @@ public final class app/revanced/patches/all/misc/shortcut/sharetargets/RemoveSha
|
|||||||
public static final fun getRemoveShareTargetsPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getRemoveShareTargetsPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/misc/spoof/SignatureSpoofPatchKt {
|
public final class app/revanced/patches/all/misc/spoof/EnableRomSignatureSpoofingKt {
|
||||||
public static final fun getSignatureSpoofPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getEnableRomSignatureSpoofing ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/misc/targetSdk/SetTargetSdkVersion34Kt {
|
public final class app/revanced/patches/all/misc/targetSdk/SetTargetSdkVersion34Kt {
|
||||||
|
|||||||
@@ -37,20 +37,6 @@ val spoofClientPatch = bytecodePatch(
|
|||||||
|
|
||||||
dependsOn(
|
dependsOn(
|
||||||
sharedExtensionPatch,
|
sharedExtensionPatch,
|
||||||
hexPatch(ignoreMissingTargetFiles = true, block = fun HexPatchBuilder.() {
|
|
||||||
listOf(
|
|
||||||
"arm64-v8a",
|
|
||||||
"armeabi-v7a",
|
|
||||||
"x86",
|
|
||||||
"x86_64"
|
|
||||||
).forEach { architecture ->
|
|
||||||
"https://login5.spotify.com/v3/login" to "http://127.0.0.1:$requestListenerPort/v3/login" inFile
|
|
||||||
"lib/$architecture/liborbit-jni-spotify.so"
|
|
||||||
|
|
||||||
"https://login5.spotify.com/v4/login" to "http://127.0.0.1:$requestListenerPort/v4/login" inFile
|
|
||||||
"lib/$architecture/liborbit-jni-spotify.so"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith("com.spotify.music")
|
compatibleWith("com.spotify.music")
|
||||||
@@ -103,82 +89,6 @@ val spoofClientPatch = bytecodePatch(
|
|||||||
|
|
||||||
// region Spoof client.
|
// region Spoof client.
|
||||||
|
|
||||||
loadOrbitLibraryFingerprint.method.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/16 v0, $requestListenerPort
|
|
||||||
invoke-static { v0 }, $EXTENSION_CLASS_DESCRIPTOR->launchListener(I)V
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
|
|
||||||
startupPageLayoutInflateFingerprint.method.apply {
|
|
||||||
val openLoginWebViewDescriptor =
|
|
||||||
"$EXTENSION_CLASS_DESCRIPTOR->launchLogin(Landroid/view/LayoutInflater;)V"
|
|
||||||
|
|
||||||
addInstructions(
|
|
||||||
0,
|
|
||||||
"invoke-static/range { p1 .. p1 }, $openLoginWebViewDescriptor"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
renderStartLoginScreenFingerprint.method.apply {
|
|
||||||
val onEventIndex = indexOfFirstInstructionOrThrow {
|
|
||||||
opcode == Opcode.INVOKE_INTERFACE && getReference<MethodReference>()?.name == "getView"
|
|
||||||
}
|
|
||||||
|
|
||||||
val buttonRegister = getInstruction<OneRegisterInstruction>(onEventIndex + 1).registerA
|
|
||||||
|
|
||||||
addInstruction(
|
|
||||||
onEventIndex + 2,
|
|
||||||
"invoke-static { v$buttonRegister }, $EXTENSION_CLASS_DESCRIPTOR->setNativeLoginHandler(Landroid/view/View;)V"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
renderSecondLoginScreenFingerprint.method.apply {
|
|
||||||
val getViewIndex = indexOfFirstInstructionOrThrow {
|
|
||||||
opcode == Opcode.INVOKE_INTERFACE && getReference<MethodReference>()?.name == "getView"
|
|
||||||
}
|
|
||||||
|
|
||||||
val buttonRegister = getInstruction<OneRegisterInstruction>(getViewIndex + 1).registerA
|
|
||||||
|
|
||||||
// Early return the render for loop since the first item of the loop is the login button.
|
|
||||||
addInstructions(
|
|
||||||
getViewIndex + 2,
|
|
||||||
"""
|
|
||||||
invoke-virtual { v$buttonRegister }, Landroid/view/View;->performClick()Z
|
|
||||||
return-void
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
renderThirdLoginScreenFingerprint.method.apply {
|
|
||||||
val invokeSetListenerIndex = indexOfFirstInstructionOrThrow {
|
|
||||||
val reference = getReference<MethodReference>()
|
|
||||||
reference?.definingClass == "Landroid/view/View;" && reference.name == "setOnClickListener"
|
|
||||||
}
|
|
||||||
|
|
||||||
val buttonRegister = getInstruction<FiveRegisterInstruction>(invokeSetListenerIndex).registerC
|
|
||||||
|
|
||||||
addInstruction(
|
|
||||||
invokeSetListenerIndex + 1,
|
|
||||||
"invoke-virtual { v$buttonRegister }, Landroid/view/View;->performClick()Z"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
thirdLoginScreenLoginOnClickFingerprint.method.apply {
|
|
||||||
// Use placeholder credentials to pass the login screen.
|
|
||||||
val loginActionIndex = indexOfFirstInstructionOrThrow(Opcode.RETURN_VOID) - 1
|
|
||||||
val loginActionInstruction = getInstruction<FiveRegisterInstruction>(loginActionIndex)
|
|
||||||
|
|
||||||
addInstructions(
|
|
||||||
loginActionIndex,
|
|
||||||
"""
|
|
||||||
const-string v${loginActionInstruction.registerD}, "placeholder"
|
|
||||||
const-string v${loginActionInstruction.registerE}, "placeholder"
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region Disable verdicts.
|
// region Disable verdicts.
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ internal fun Node.addResource(
|
|||||||
appendChild(resource.serialize(ownerDocument, resourceCallback))
|
appendChild(resource.serialize(ownerDocument, resourceCallback))
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun org.w3c.dom.Document.getNode(tagName: String) = this.getElementsByTagName(tagName).item(0)
|
internal fun Document.getNode(tagName: String) = getElementsByTagName(tagName).item(0)
|
||||||
|
|
||||||
internal fun NodeList.findElementByAttributeValue(attributeName: String, value: String): Element? {
|
internal fun NodeList.findElementByAttributeValue(attributeName: String, value: String): Element? {
|
||||||
for (i in 0 until length) {
|
for (i in 0 until length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user