<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">Hi all,</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">I used soot to analyze apk,and instrumented apk by modifying jimple code.I put the code about modifying jimple stmt in the SceneTransformer(wjtp).But,the issue was that the apk has no changes(I decompiled the instrumented apk to see the jimple code).I thougt the Scene Transformer didn't work.And the relative code in main method is as following:</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;"><br></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; line-height: 1.7;">&lt;code snip&gt;</div><div><div>Options.v().set_src_prec(Options.src_prec_apk);</div><div><span style="line-height: 1.7;">Options.v().set_process_dir(Collections.singletonList(sr.apkPath));</span></div><div>Options.v().set_android_jars("/home/xcl/soot-jar/android-platform");</div></div><div><div>Options.v().set_output_format(Options.output_format_dex);</div><div>Options.v().set_output_dir("/home/xcl/ic3/apk-mod/classes");</div><div><span style="line-height: 23.7999992370605px;">Options.v().set_allow_phantom_refs(true);</span></div><div>Options.v().set_whole_program(true);</div><div>Options.v().setPhaseOption("jb", "enabled:true");</div><div>Options.v().setPhaseOption("wjtp", "enabled:true");</div><div><br></div><div>Scene.v().loadNecessaryClasses();</div><div>SootMethod entryPoint = sr.app.getEntryPointCreator().createDummyMain();</div><div>Options.v().set_main_class(entryPoint.getSignature());</div><div>Scene.v().setEntryPoints(Collections.singletonList(entryPoint));</div><div>&nbsp; <span class="Apple-tab-span" style="white-space:pre">                </span>&nbsp;</div><div>PackManager.v().runPacks();</div></div><div><div>PackManager.v().getPack("wjtp").add(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp;new Transform("wjtp.myTransform", new SceneTransformer() {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp; &nbsp;protected void internalTransform(String phaseName,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Map&lt;String,String&gt; options) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.err.println(Scene.v().getApplicationClasses());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println("okokok"); &nbsp; &nbsp; //This instruction could not print "okokok" in console</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//modifying jimple code stmt</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp; &nbsp;}</div><div>&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp;}));</div></div><div>PackManager.v().writeOutput();</div><div><span style="line-height: 23.7999992370605px;">&lt;/code snip&gt;</span></div><div><span style="line-height: 23.7999992370605px;"><br></span></div><div><span style="line-height: 23.7999992370605px;">So,is there something wrong with my code?And looking forward to your reply.</span></div><div><span style="line-height: 23.7999992370605px;"><br></span></div><div>Best regards,</div><div>Conly Xia</div></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>