[Soot-list] Call Graph Generation Performance
Enzo Lucky
luckenzo24 at yahoo.com
Thu Apr 7 06:16:43 EDT 2016
Hi Simone,
I am aware of the options (e.g. the access path length) you use, my understanding is using these options will make Soot generate a non-precise call graph. I wanted to know if there are other options to improve performance that wouldn't require sacrificing the precision of the call graph.
Thanks,Enzo
On Thursday, April 7, 2016 8:48 AM, Simone Aonzo <simone.aonzo at gmail.com> wrote:
Yes, I use FlowDroid.
The size of the apk is irrilevant, what matters is the size of the classes.dex
With my configuration running on an Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz:
small, 2,3MB, 30 sec
medium, 6,8MB, 1 minute
big, 11MB (whatsapp), 3 minutes
With the default configuration I've never seen it halting [but I can't say that it never halts, dear Turing :)] with the medium and the big dex, also after 7 hours.
Keep in touch!
Simone
On 06/04/2016 19:11, Denis Bogdanas wrote:
Interesting,
I'm assuming you use FlowDroid. I'm also looking into good options for performance.
What size is the apk and how much faster are these settings compared to defaults?
thanks,
Denis
On 6 April 2016 at 06:05, Simone Aonzo <simone.aonzo at gmail.com> wrote:
This is the way I get a call graph in a reasonable time... if someone
has better ideas: share!
soot.G.reset();
SetupApplication setupApplication = new
SetupApplication(androidJar.toString(), apk.toString());
setupApplication.getConfig().setFlowSensitiveAliasing(false);
// --aliasflowins
setupApplication.getConfig().setAccessPathLength(1); // --aplength n
setupApplication.getConfig().setEnableStaticFieldTracking(false);
// --nostatic
setupApplication.getConfig().setEnableCallbacks(false);// --nocallbacks
setupApplication.getConfig().setPathBuilder(DefaultPathBuilderFactory.PathBuilder.ContextSensitive);//
--pathalgo
setupApplication.getConfig().setComputeResultPaths(false); // --nopaths
setupApplication.getConfig().setEnableExceptionTracking(false);
// --noexceptions
setupApplication.calculateSourcesSinksEntrypoints(sourcesAndSinks.toString());
Options.v().set_src_prec(Options.src_prec_apk);
Options.v().set_soot_classpath("/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:.");
Options.v().set_process_dir(Collections.singletonList(apk.toString()));
Options.v().set_android_jars(androidJar.toString());
List<String> excludeList = new LinkedList<String>();
excludeList.add("java.");
excludeList.add("sun.misc.");
excludeList.add("android.");
excludeList.add("org.apache.");
excludeList.add("soot.");
excludeList.add("javax.servlet.");
Options.v().set_exclude(excludeList);
Options.v().set_no_bodies_for_excluded(true);
Options.v().set_output_format(Options.output_format_none);
Options.v().set_allow_phantom_refs(true);
Options.v().set_whole_program(true);
Options.v().setPhaseOption("cg.spark", "on");
Options.v().setPhaseOption("cg", "trim-clinit:false");
SootMethod dummyMain =
setupApplication.getEntryPointCreator().createDummyMain();
Options.v().set_main_class(dummyMain.getSignature());
Scene.v().setEntryPoints(Collections.singletonList(dummyMain));
PackManager.v().runPacks();
CallGraph callGraph = Scene.v().getCallGraph();
2016-04-04 12:37 GMT+02:00 Enzo Lucky <luckenzo24 at yahoo.com>:
> Hi,
>
> I am using Soot to generate call graph of some Android apps, and I find Soot
> take more than a day to generate the call graph for some apps. Can I do
> anything other than the suggestions in the FlowDroid homepage
> (https://github.com/secure-software-engineering/soot-infoflow-android/wiki#improving-performance)?
> I want a precise call graph and hence, I didn't use any of the options.
> Also, is the time normal or am I doing something wrong? Please find attached
> my dummy main class.
>
> Thanks,
> Enzo
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
--
Denis
_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160407/c0beac2d/attachment-0001.html
More information about the Soot-list
mailing list