<div dir="ltr"><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;">I have converted a apk file to jimple Intermediate representation using soot below command without any error:</p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;"><strong>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</strong></p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;"><strong><br></strong></p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;">Now I want to do reverse. I want to convert jimple files to single apk using soot. For this i am using following command:</p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;"><strong><br></strong></p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;"><strong>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/</strong></p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;">But this command give me exceptions as follows:</p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;">[Thread-2] ERROR heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: null java.lang.NullPointerException at soot.toolkits.graph.UnitGraph.(UnitGraph.java:76) at soot.toolkits.graph.ExceptionalUnitGraph.(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)</p><p style="font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; line-height: 19.5px;">How can I convert Jimple to dex using soot?</p></div>