CalebFenton / simplify

Android virtual machine and deobfuscator
Other
4.45k stars 438 forks source link

Can't find Smali file for Lkotlin/e/b/j #129

Closed krviolent closed 4 years ago

krviolent commented 5 years ago

java -jar -Xss10M simplify-1.2.1.jar -et 'com/android' avito.apk [1 / 7101] Processing top level class Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1; (1 / 4) Executing top level method: Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1;->test(Ljava/lang/Object;)Z Exception in thread "main" java.lang.RuntimeException: Real exception was thrown executing ExecutionNode{signature=Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1;->test(Ljava/lang/Object;)Z, op=invoke-virtual {r0, r1}, Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1;->test(Lcom/schibsted/domain/messaging/database/model/MessageModel;)Z, @=2} and was not handled. This could be a bug in smalivm. at org.cf.smalivm.NodeExecutor.execute(NodeExecutor.java:91) at org.cf.smalivm.MethodExecutor.execute(MethodExecutor.java:61) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:103) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:64) at org.cf.simplify.Launcher.executeMethods(Launcher.java:195) at org.cf.simplify.Launcher.run(Launcher.java:141) at org.cf.simplify.Main.main(Main.java:14) Caused by: java.lang.RuntimeException: Can't find Smali file for Lkotlin/e/b/j; at org.cf.smalivm.type.ClassManager.parseClassIfNecessary(ClassManager.java:196) at org.cf.smalivm.type.ClassManager.getVirtualType(ClassManager.java:135) at org.cf.smalivm.type.ClassManager.getVirtualType(ClassManager.java:154) at org.cf.smalivm.opcode.InvokeOpFactory.create(InvokeOpFactory.java:82) at org.cf.smalivm.opcode.OpCreator.create(OpCreator.java:29) at org.cf.smalivm.context.ExecutionGraph.buildLocationToNodePile(ExecutionGraph.java:105) at org.cf.smalivm.context.ExecutionGraph.(ExecutionGraph.java:78) at org.cf.smalivm.VirtualMachine.updateInstructionGraph(VirtualMachine.java:188) at org.cf.smalivm.VirtualMachine.spawnInstructionGraph(VirtualMachine.java:139) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:98) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:82) at org.cf.smalivm.opcode.InvokeOp.executeLocalMethod(InvokeOp.java:353) at org.cf.smalivm.opcode.InvokeOp.execute(InvokeOp.java:128) at org.cf.smalivm.context.ExecutionNode.execute(ExecutionNode.java:52) at org.cf.smalivm.NodeExecutor.execute(NodeExecutor.java:80) ... 6 more

avito.zip

CalebFenton commented 5 years ago

Have you tried excluding problematic classes?

Is Lcom/schibsted/domain/messaging/repositories/source/message/ DatabaseDataSource$setMessageAsRead$1$1;->test(Ljava/lang/Object;)Z something you really care about? Exclude it.

On Thu, Sep 5, 2019, 11:00 PM krviolet notifications@github.com wrote:

java -jar -Xss10M simplify-1.2.1.jar -et 'com/android' avito.apk [1 / 7101] Processing top level class Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1; (1 / 4) Executing top level method: Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1;->test(Ljava/lang/Object;)Z Exception in thread "main" java.lang.RuntimeException: Real exception was thrown executing ExecutionNode{signature=Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1;->test(Ljava/lang/Object;)Z, op=invoke-virtual {r0, r1}, Lcom/schibsted/domain/messaging/repositories/source/message/DatabaseDataSource$setMessageAsRead$1$1;->test(Lcom/schibsted/domain/messaging/database/model/MessageModel;)Z, @=2} and was not handled. This could be a bug in smalivm. at org.cf.smalivm.NodeExecutor.execute(NodeExecutor.java:91) at org.cf.smalivm.MethodExecutor.execute(MethodExecutor.java:61) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:103) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:64) at org.cf.simplify.Launcher.executeMethods(Launcher.java:195) at org.cf.simplify.Launcher.run(Launcher.java:141) at org.cf.simplify.Main.main(Main.java:14) Caused by: java.lang.RuntimeException: Can't find Smali file for Lkotlin/e/b/j; at org.cf.smalivm.type.ClassManager.parseClassIfNecessary(ClassManager.java:196) at org.cf.smalivm.type.ClassManager.getVirtualType(ClassManager.java:135) at org.cf.smalivm.type.ClassManager.getVirtualType(ClassManager.java:154) at org.cf.smalivm.opcode.InvokeOpFactory.create(InvokeOpFactory.java:82) at org.cf.smalivm.opcode.OpCreator.create(OpCreator.java:29) at org.cf.smalivm.context.ExecutionGraph.buildLocationToNodePile(ExecutionGraph.java:105) at org.cf.smalivm.context.ExecutionGraph.(ExecutionGraph.java:78) at org.cf.smalivm.VirtualMachine.updateInstructionGraph(VirtualMachine.java:188) at org.cf.smalivm.VirtualMachine.spawnInstructionGraph(VirtualMachine.java:139) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:98) at org.cf.smalivm.VirtualMachine.execute(VirtualMachine.java:82) at org.cf.smalivm.opcode.InvokeOp.executeLocalMethod(InvokeOp.java:353) at org.cf.smalivm.opcode.InvokeOp.execute(InvokeOp.java:128) at org.cf.smalivm.context.ExecutionNode.execute(ExecutionNode.java:52) at org.cf.smalivm.NodeExecutor.execute(NodeExecutor.java:80) ... 6 more

avito.zip https://github.com/CalebFenton/simplify/files/3582374/avito.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CalebFenton/simplify/issues/129?email_source=notifications&email_token=AAKLG4T667MMJKEVTCCGUZLQIHWXLA5CNFSM4IUFI2K2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJXAWYQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKLG4WGVETT5TTCRNB6Z63QIHWXLANCNFSM4IUFI2KQ .

CalebFenton commented 5 years ago

Does Lkotlin/e/b/j; actually exist in the baksmali disassembly? (Hint: disassemble it to find out)

If not, and it's possible it's downloaded dynamically, you'll either need to provide it in the input or exclude classes that reference it directly or transitively.