feat(kakaotalk): Add patches for changing device model and disabling signature verification
This commit is contained in:
@ -0,0 +1,29 @@
|
|||||||
|
package app.revanced.patches.kakaotalk.changemodel
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.Package
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patcher.patch.stringOption
|
||||||
|
import app.revanced.patches.kakaotalk.changemodel.fingerprints.changeModelFingerprint
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val changeModelPatch = bytecodePatch(
|
||||||
|
name = "Change model",
|
||||||
|
description = "Changes the device model to supporting subdevice features",
|
||||||
|
) {
|
||||||
|
val changeModelOption = stringOption(
|
||||||
|
"model", "SM-X926N"
|
||||||
|
)
|
||||||
|
|
||||||
|
compatibleWith(Package("com.kakao.talk", setOf("25.3.5")))
|
||||||
|
|
||||||
|
execute {
|
||||||
|
changeModelFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const-string v0, "${changeModelOption.value}"
|
||||||
|
return-object v0
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.kakaotalk.changemodel.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
internal val changeModelFingerprint = fingerprint {
|
||||||
|
strings("MODEL", "\\s", "-", "US", "toUpperCase(...)")
|
||||||
|
custom {
|
||||||
|
_, classDef ->
|
||||||
|
classDef.methods.indexOf(classDef.methods.last()) > 2
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package app.revanced.patches.kakaotalk.signature
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.Package
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patches.memegenerator.detection.signature.verifySignatureFingerprint
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val verifyingSignaturePatch = bytecodePatch(
|
||||||
|
name = "Disable verifying signature",
|
||||||
|
description = "Disables the signature verification check that prevents the app from running.",
|
||||||
|
) {
|
||||||
|
compatibleWith(Package("com.kakao.talk", setOf("25.3.5")))
|
||||||
|
|
||||||
|
execute {
|
||||||
|
verifySignatureFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.kakaotalk.signature.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
internal val verifyingSignatureFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||||
|
returns("Z")
|
||||||
|
parameters()
|
||||||
|
strings("getPackageName(...)")
|
||||||
|
}
|
Reference in New Issue
Block a user