Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.97 KB | None | 0 0
  1. SetupApplication app = new SetupApplication
  2.                     (androidPlatformPath, appPath + '/' + file.getName());
  3.  
  4. app.calculateSourcesSinksEntrypoints(new HashSet<AndroidMethod>(), new HashSet<AndroidMethod>());
  5. soot.G.reset();
  6. Options.v().set_src_prec(Options.src_prec_apk);
  7. Options.v().set_process_dir(Collections.singletonList(appPath + '/' + file.getName()));
  8. Options.v().set_android_jars(androidPlatformPath);
  9. Options.v().set_whole_program(true);
  10. Options.v().set_allow_phantom_refs(true);
  11. Options.v().set_output_format(Options.output_format_class);
  12. Options.v().setPhaseOption("cg.spark", "on");
  13.  
  14. Scene.v().loadNecessaryClasses();
  15. SootMethod dummyMain = app.getEntryPointCreator().createDummyMain();
  16. Options.v().set_main_class(dummyMain.getSignature());
  17. Scene.v().setEntryPoints(Collections.singletonList(dummyMain));
  18. PackManager.v().runPacks();
  19.  
  20. icfg = new JimpleBasedInterproceduralCFG();
  21. Iterator<Unit> icfgIterator = icfg.getCallsFromWithin(dummyMain).iterator();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement