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

Steven Arzt Steven.Arzt at cased.de
Wed Jul 16 05:09:52 EDT 2014


Please do post a complete code listing. From the snippet you posted
(“beginning of my class”), it is very hard to see which code you placed
where. 

 

Von: H S [mailto:aras_h1988 at yahoo.com] 
Gesendet: Mittwoch, 16. Juli 2014 11:07
An: Steven Arzt; soot-list at sable.mcgill.ca; soot-list at CS.McGill.CA
Betreff: "SootClassNotFoundException" for creating dummy main method_ but
not always 

 


Gesendet über Yahoo Mail für Android

 

  _____  

From: H S <aras_h1988 at yahoo.com>; 
To: Steven Arzt <steven.arzt at cased.de>; soot-list at sable.mcgill.ca
<soot-list at sable.mcgill.ca>; soot-list at CS.McGill.CA
<soot-list at cs.mcgill.ca>; 
Subject: "SootClassNotFoundException" for creating dummy main method_ but
not always 
Sent: Tue, Jul 15, 2014 6:54:34 PM 

 


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.createDummy
MainInternal(AndroidEntryPointCreator.java:169)

      at
soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createDummyMai
nInternal(BaseEntryPointCreator.java:102)

      at
soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createDummyMai
n(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/20140716/0a6a0491/attachment-0003.html 


More information about the Soot-list mailing list