[Soot-list] Call Graph Generation Performance
Simone Aonzo
simone.aonzo at gmail.com
Thu Apr 7 03:47:13 EDT 2016
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
> <mailto: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
> <mailto: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 <mailto: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 <mailto:Soot-list at CS.McGill.CA>
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
>
>
>
> --
> Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160407/113d60ad/attachment.html
More information about the Soot-list
mailing list