mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-20 03:36:51 +01:00
fix: signature checker with changes of patcher
This commit is contained in:
parent
f4d8a8525b
commit
e82459d377
2
.gitignore
vendored
2
.gitignore
vendored
@ -114,4 +114,4 @@ gradle-app.setting
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# Potentially copyrighted test APK
|
||||
stock.apk
|
||||
*.apk
|
@ -10,9 +10,9 @@ import java.io.File
|
||||
internal class SignatureChecker {
|
||||
@Test
|
||||
fun checkSignatures() {
|
||||
val file = File("newest.apk")
|
||||
val file = File("stock.apk")
|
||||
if (!file.exists()) {
|
||||
throw IllegalStateException("Missing stock.apk! To run this test, please place stock.apk here: ${file.absolutePath}")
|
||||
throw IllegalStateException("Missing $file! To run this test, please place stock.apk here: ${file.absolutePath}")
|
||||
}
|
||||
val patcher = Patcher(file)
|
||||
patcher.addPatches(Index.patches.map { it() })
|
||||
@ -30,10 +30,10 @@ internal class SignatureChecker {
|
||||
|
||||
println("Signature: ${signature.metadata.name}.\nMethod: ${method.definingClass}->${method.toStr()}\nWarnings: ${warnings.count()}")
|
||||
for (warning in warnings) {
|
||||
println("${warning.instructionIndex} / ${warning.patternIndex}: ${warning.current} (expected: ${warning.expected})")
|
||||
println("${warning.instructionIndex} / ${warning.patternIndex}: ${warning.wrongOpcode} (expected: ${warning.correctOpcode})")
|
||||
}
|
||||
|
||||
println("=".repeat(20) + "\n")
|
||||
println("=".repeat(20))
|
||||
}
|
||||
}
|
||||
if (unresolved.isNotEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user