<div dir="ltr">Eric said &quot;<span style="color: rgb(0, 0, 0);">It computes implicit information flows (if enabled on the command line). While they are not represented in an explicit PDG but rather computed on the fly, they might be sufficient for your purpose. Note that this is a forward-slicing approach.</span>&quot; inside https://mailman.cs.mcgill.ca/pipermail/soot-list/2014-February/006508.html. <div>So is it to say we can leverage &quot;implicit flow&quot; part to implement our own backward slicing? <br><br>On Sunday, November 29, 2015 at 8:51:15 AM UTC-8, Steven Arzt wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div lang="DE" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I have included the Soot mailing list in this reply. Some of the features you are asking for are not available in Soot, but have built them on top of Soot without contributing them back to the main development branch. Soot, for instance, does not have a slicer on its own. However, there are external implementations, for instance the one from the paper “Dynamic slicing with soot” by Adrian Treffer and Matthias Uflacker published at SOAP 2014. You can contact them to get their implementation. Another paper would be Nair’s master thesis: </span><span lang="EN-US"><a href="http://uwspace.uwaterloo.ca/bitstream/10012/5144/1/uw-ethesis.pdf" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fuwspace.uwaterloo.ca%2Fbitstream%2F10012%2F5144%2F1%2Fuw-ethesis.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNEQsF76anulbSeRdYGn7Lbb-12tyw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fuwspace.uwaterloo.ca%2Fbitstream%2F10012%2F5144%2F1%2Fuw-ethesis.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNEQsF76anulbSeRdYGn7Lbb-12tyw&#39;;return true;">uwspace.uwaterloo.ca/<wbr>bitstream/10012/5144/1/uw-<wbr>ethesis.pdf</a>. </span><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Our group has also built a slicer based on Soot in another research project, but, sadly, it’s much too specialized to be useful outside of that project.</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">For program dependence graphs, we do have support. Look into the package “soot.toolkits.graph.pdg”. Personally, I haven’t used these parts of Soot yet, but they exists and should work just fine.</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Best regards,</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">  Steven</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> nuaawangxiaolei [mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="FbfVbal7BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">nuaawan...@163.<wbr>com</a>] <br><b>Gesendet:</b> Samstag, 28. November 2015 14:14<br><b>An:</b> Steven Arzt<br><b>Betreff:</b> Re:AW: Question about flowdroid</span></p><p class="MsoNormal"> </p><div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">OK, thanks a lot, firstly.</span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">The reason why I want to combine flowdroid with wala is that I want to learn program slice, program dependence graph, system dependence graph. Someone tell me that Soot cannot do this work.</span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">Therefore, I want to combine flowdroid with wala.</span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">Now that you are the maintainer of Soot. I want to ask you whether Soot can conveniently make program slice, program dependence graph ,system dependence graph using the results of Flowdroid.</span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">If yes, would you like to share me some simple examples? And I can learn from them.</span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">If no, I have to use WALA finally.</span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">Look forwarding to your reply.</span></p></div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"><br><br><br><br>At 2015-11-27 22:38:49, &quot;Steven Arzt&quot; &lt;<a href="javascript:" target="_blank" gdf-obfuscated-mailto="FbfVbal7BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">Steve...@cased.de</a>&gt; wrote:<br><br></span></p><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi,</span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">FlowDroid is based on Soot, so the easiest way to create an analysis for Android apps is to write them using Soot. If you need a data flow analysis, that’s what FlowDroid is all about, so you can simply use the tool as-is.</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">If you want to nevertheless write your analysis in Wala and just need the dummy main method generated by FlowDroid, you can do it as you have proposed. To dump the dummy main method from FlowDroid, you need to set it as an application class and configure the Soot output format as “class”. Then, call the output writer.</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">To get a dummy main method in the first place, you can do something along these lines:</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             SetupApplication app = new SetupApplication</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                           (&quot;D:/Tools/adt-bundle-windows-<wbr>x86_64-20140321/sdk/platforms&quot;<wbr>,</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                           &quot;D:/Temp/com.tweakersoft.<wbr>aroundme-1.apk&quot;);</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             app.<wbr>calculateSourcesSinksEntrypoin<wbr>ts(&quot;D:/Arbeit/Android Analyse/soot-infoflow-android/<wbr>SourcesAndSinks.txt&quot;);</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             soot.G.reset();</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Options.v().set_<wbr>src_prec(Options.src_prec_apk)<wbr>;</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Options.v().set_process_dir(<wbr>Collections.singletonList(&quot;D:/<wbr>Temp/com.tweakersoft.aroundme-<wbr>1.apk&quot;));</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Options.v().set_android_jars(&quot;<wbr>D:/Tools/adt-bundle-windows-<wbr>x86_64-20140321/sdk/platforms&quot;<wbr>);</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Options.v().set_allow_phantom_<wbr>refs(true);</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Options.v().set_output_format(<wbr>Options.output_format_class);</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Scene.v().<wbr>loadNecessaryClasses();</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             SootMethod entryPoint = app.getEntryPointCreator().<wbr>createDummyMain();</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Options.v().set_main_class(<wbr>entryPoint.getSignature());</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             Scene.v().setEntryPoints(<wbr>Collections.singletonList(<wbr>entryPoint));</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             System.out.println(entryPoint.<wbr>getActiveBody());</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">             PackManager.v().writeOutput();</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">This should work. If it does not for some reason, feel free to contact me. Your “class” files (both for the dummy main method and for all of the classes inside your apk file) should then end up in the “sootOutput” folder.</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Best regards,</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">  Steven</span><span style="color:black"></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span style="color:black"></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black"> nuaawangxiaolei [mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="FbfVbal7BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">nuaawan...@163.<wbr>com</a>] <br><b>Gesendet:</b> Freitag, 27. November 2015 03:11<br><b>An:</b> <a href="javascript:" target="_blank" gdf-obfuscated-mailto="FbfVbal7BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">steve...@ec-spride.de</a><br><b>Betreff:</b> Question about flowdroid</span><span style="color:black"></span></p><p class="MsoNormal"><span style="color:black"> </span></p><div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">Hi:</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    Sorry to interrupt you. From your homepage, I know you are the maintainer of Flowdroid and Soot. Now I have a question. That is I want to combine flowdroid with wala.</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    Someone on the website  said the way  to do this , as follows:</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    Firstly, FlowDroid will build a dummy main method for the app and dump it in sootOutput/dummyMainClass. class. The name of the main method is dummyMainMethod. </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    Secondly, Load dummyMainClass. class along with the rest of the bytecodes for the app and wrap dummyMainClass. dummyMainMethod in a WALA DefaultEntrypoint.</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    Therefore, I want to ask you whether this method is feasible. If this method is feasible, would you like to tell me how to dump the dummyMainClass.class and load the dummyMainClass.class with the rest of the bytecodes for the app</span><span lang="ZH-CN" style="font-size:10.5pt;color:black">?</span><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"> using Flowdroid</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    Thanks a lot and look forward to hearing from you.</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">    </span><span style="color:black"></span></p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"> </span></p><p><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"> </span></p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"> </p><p> </p></div></div></blockquote></div></div>