CalebFenton / simplify

Android virtual machine and deobfuscator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simplify +Java-Deobfuscator

apkunpacker opened this issue · comments

Hi dev is there any way to combine simplify with java deobfuscator as main idea in both the project is same , virtually executing classes so if combining possible then it will greatly work with simplifying code plus deobfuscating known obfuscator . Thanks

I've thought about this question myself. I got a lot of inspiration from https://github.com/Sable/soot personally. I don't think it's possible to easily port smalivm to Java because it's a very Dalvik specific emulator. Mainly: it works with registers instead of a stack and a lot of the logic is in Dalvik opcode classes.

However, you could convert java bytecode to dalvik bytecode and then run simplify on it. Then, you could use enjarify, dex2jar, or whatever to turn it back into Java. It's not perfect, but it's more or less what you'd need to do to smalivm to get it to work with java. E.g. translate java opcodes into groups of smalivm opcodes which are based on Dalvik. Smalivm's output is handled by dexlib so that means you'd have to convert it back to Java anyway.

What specific uses cases did you have in mind?

I'm closing this issue because I think you can already kind of do this and doing it properly would be about as hard as rewriting everything but feel free to continue discussion.