This is a Haskell application that parses multiple jimple files and converts them into JSON
Use Haskell Stack tool for setup, or use cabal directly
stack setup
Again, if you are using Stack it is just
stack exec jimple-exe <file.jimple>
To run the tests:
stack exec jimple-exe <file.jimple>
You can create a jimple from a Java file by:
- Download Soot
- Generate the .class file using
javac HelloWorld.java
- Run soot:
java -cp soot-4.2.1-jar-with-dependencies.jar soot.Main -cp . -pp -f jimple HelloWorld
For Kotlin files, the process is somewhat different.
- Download Soot
- Get the Kotlin Runtime build
kotlinc -include-runtime -d output.jar ../<file>.kt
- Extract the Jar
jar xf output.jar
- Run soot
java -cp $HOME/soot-4.3.0-jar-with-dependencies.jar soot.Main -cp . -pp -f jimple OriginalKt -write-local-annotations -p jb use-original-names:true -keep-line-number -print-tags-in-output
- When dealing with Kotlin files, sometimes soot will complain about not finding
annotations
. This can be solved by downloading them from here. Then change the-cp .
to-cp .:<path-to-annotations.jar>