1

I have converted a apk file to jimple Intermediate representation using soot below command:

java -Xmx2g -jar soot-trunk.jar soot.Main -w -allow-phantom-refs -android-jars /home/jyoti/Android/adt-bundle-linux-x86_64-20140702/sdk/platforms/ -src-prec apk -f jimple -process-dir Onlytelephony.apk

Now I want to do reverse. I want to convert jimple files to single apk using soot. For this i am using following command:

java -Xmx2g -jar soot-trunk.jar soot.Main -w -allow-phantom-refs -android-jars /home/jyoti/Android/adt-bundle-linux-x86_64-20140702/sdk/platforms/ -src-prec jimple -f dex -process-dir jimple_Onlytelephony/

But this command give me exceptions as follows:

[Thread-2] ERROR heros.solver.CountingThreadPoolExecutor - Worker
 thread execution failed: null java.lang.NullPointerException   at
 soot.toolkits.graph.UnitGraph.<init    (UnitGraph.java:76)   at
 soot.toolkits.graph.ExceptionalUnitGraph.<init    (ExceptionalUnitGraph.java:158)
   at
 soot.jimple.toolkits.scalar.UnreachableCodeEliminator.internalTransform(UnreachableCodeEliminator.java:79)
   at soot.BodyTransformer.transform(BodyTransformer.java:51)  at
 soot.Transform.apply(Transform.java:105)  at
 soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:61)     at
 soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:95)     at
 soot.Pack.apply(Pack.java:125)    at
 soot.jimple.JimpleMethodSource.getBody(JimpleMethodSource.java:49)    at
 soot.SootMethod.getBodyFromMethodSource(SootMethod.java:91)   at
 soot.SootMethod.retrieveActiveBody(SootMethod.java:322)   at
 soot.PackManager$3.run(PackManager.java:1223)     at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:745)
 java.util.concurrent.RejectedExecutionException: Task
 soot.PackManager$3@2e5e3fd3 rejected from
 heros.solver.CountingThreadPoolExecutor@2db04d6d[Shutting down, pool
 size = 3, active threads = 3, queued tasks = 0, completed tasks = 3]
   at
 java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
   at
 java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821)
   at
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372)
   at
 heros.solver.CountingThreadPoolExecutor.execute(CountingThreadPoolExecutor.java:51)
   at soot.PackManager.retrieveAllBodies(PackManager.java:1219)    at
 soot.PackManager.runPacksNormally(PackManager.java:463)   at
 soot.PackManager.runPacks(PackManager.java:396)   at
 soot.Main.run(Main.java:271)  at soot.Main.main(Main.java:147)

How can I convert Jimple to dex using soot?

CrazyCasta
  • 26,917
  • 4
  • 45
  • 72

1 Answers1

0

Can you please ask this question on the Soot mailing list? Anyway this looks odd. I don't even understand why in this instance Soot is referring to Heros at all. It should not.

Eric
  • 1,343
  • 1
  • 11
  • 19
  • The problem is solved now. The soot-trunk.jar was having some problem. The latest version solved the problem. Thanks Eric... – jyoti gajrani Mar 07 '16 at 13:53