[Soot-list] Call Graph Generation Performance
Simone Aonzo
simone.aonzo at gmail.com
Wed Apr 6 09:05:29 EDT 2016
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
>
More information about the Soot-list
mailing list