[Soot-list] "SootClassNotFoundException" for creating dummy main method_ but not always

H S aras_h1988 at yahoo.com
Tue Jul 15 14:54:34 EDT 2014


Hi :
I got the following error: for creating the dummy main method. 

Exception in thread "main" soot.SootResolver$SootClassNotFoundException: couldn't find class: com.example.myapplication4.app.MainActivity (is your soot-class-path set properly?)

at soot.SootResolver.bringToHierarchy(SootResolver.java:219)
at soot.SootResolver.bringToSignatures(SootResolver.java:252)
at soot.SootResolver.processResolveWorklist(SootResolver.java:168)
at soot.SootResolver.resolveClass(SootResolver.java:129)
at soot.Scene.forceResolve(Scene.java:1515)
at soot.jimple.infoflow.entryPointCreators.AndroidEntryPointCreator.createDummyMainInternal(AndroidEntryPointCreator.java:169)
at soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createDummyMainInternal(BaseEntryPointCreator.java:102)
at soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createDummyMain(BaseEntryPointCreator.java:87)
at src.MyCallGraph.onClickExtractor(MyCallGraph.java:144)
at src.MyCallGraph.initialiseSoot(MyCallGraph.java:99)
at src.MyMain.main(MyMain.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

***If I put the following code above the runInfoflow in my code I got the above error. 

SootMethod entryPoint = setupApplication.getEntryPointCreator().createDummyMain();
        Options.v().set_main_class(entryPoint.getSignature());
        Scene.v().setEntryPoints(Collections.singletonList(entryPoint));
        System.out.println(entryPoint.getActiveBody());

But after the runInfoflow I did not get it: infoflowResults = setupApplication.runInfoflow(resultsAvailableHandler);

Here is my setup in the beginning of my class:


soot.G.reset(); Options.v().set_prepend_classpath(true); Options.v().set_src_prec(Options.src_prec_apk); Options.v().set_process_dir(Collections.singletonList(APKPath)); Options.v().set_android_jars(AndroidJar); Options.v().set_force_android_jar(forcedPathAndroidJar);// Options.v().set_whole_program(true); Options.v().set_allow_phantom_refs(true); Options.v().setPhaseOption("cg.spark", "on"); Scene.v().loadNecessaryClasses(); Scene.v().loadDynamicClasses();// Scene.v().loadBasicClasses();// Scene.v().setPhantomRefs(true);// Options.v().soot_classpath(); SetupApplication setupApplication = new SetupApplication(forcedPathAndroidJar, APKPath); setupApplication.setEnableImplicitFlows(true); setupApplication.setEnableStaticFieldTracking(true); setupApplication.setFlowSensitiveAliasing(true); setupApplication.setEnableCallbacks(true); setupApplication.setComputeResultPaths(true); setupApplication.getSootConfig();// setupApplication.setTaintWrapper(new
 EasyTaintWrapper("EasyTaintWrapperSource.txt")); setupApplication.calculateSourcesSinksEntrypoints("SourcesAndSinks.txt"); 
Thank you again,
Sarah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140715/3d054c98/attachment-0003.html 


More information about the Soot-list mailing list