[Soot-list] Spark & Android Source Code no main class

Jason Ott jott002 at ucr.edu
Wed Mar 25 01:31:25 EDT 2015


I would like to build a callgraph for each class of the android framework
and I am struggling.  I haven't found much in the way of documentation or
examples for using SPARK in general.

I have a basic program that does the following:

public class DumpClass {
public static void main(String[] args) {

Scene.v().loadBasicClasses();
    SootClass mclass;
        mclass = Scene.v().loadClassAndSupport(args[0]);
        mclass.setApplicationClass();

Options.v().set_whole_program(true);
Options.v().setPhaseOption("cg.spark", "on");
Scene.v().loadNecessaryClasses();

Options.v().set_main_class(mclass.getMethods().get(0).toString());
PackManager.v().runPacks();

  new SparkTest(mclass);
    }
}

Now, when I run this, I get: Exception in thread "main"
java.lang.RuntimeException: There is no main class set!

I'm not quite sure what to do with that or what to do next if this thing
ever works.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150324/2e1801d5/attachment.html 


More information about the Soot-list mailing list