[Soot-list] Static analysis on an android app source code

Steven Arzt Steven.Arzt at cased.de
Tue Oct 21 07:57:53 EDT 2014


Hi Xueliang,

 

Apparently your Soot classpath is incorrect. It should either point to the
"src" folder if you want to analyze Java (or Android) source code or to the
"bin" directory if you want to analyze bytecode. At the moment, your Soot
classpath points to the folder beneath "bin" and "src" in your Android
project, so Soot takes "bin" as part of the class names of those classes
inside it which is not what you want.

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Xueliang Li
Gesendet: Dienstag, 21. Oktober 2014 13:45
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] Static analysis on an android app source code

 

Hi all,

 

I'm doing some work on program dependence analysis on an android app source
code.

 

The argument for -soot-class-path is as following, just adding the android
jars. And "cocos2d-android" is where the app project is located.

 

-soot-class-path
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bundle/Clas
ses/classes.jar:/Users/xueliang/Documents/tools/dare-1.1.0-macos/libs/class/
android.policy.jar:/Users/xueliang/Documents/tools/dare-1.1.0-macos/libs/cla
ss/core.jar:/Users/xueliang/Documents/tools/dare-1.1.0-macos/libs/class/ext.
jar:/Users/xueliang/Documents/tools/dare-1.1.0-macos/libs/class/framework.ja
r:/Users/xueliang/Documents/tools/dare-1.1.0-macos/libs/class/services.jar:/
Users/xueliang/Documents/tools/source\
code/cocos2d-master/cocos2d-android/:. -process-dir
/Users/xueliang/Documents/tools/source\ code/cocos2d-master/cocos2d-android/

 

 

And the input and output options in my analysis code is following:

 

Options.v().set_src_prec(Options.src_prec_java);

Options.v().set_output_format(Options.output_format_dava);

 

 

However, I got the following exception:

 

Exception in thread "main" java.lang.RuntimeException: Class names not
equal! com.badlogic.gdx.math.CatmullRomSpline !=
bin.classes.com.badlogic.gdx.math.CatmullRomSpline

at soot.asm.SootClassBuilder.visit(SootClassBuilder.java:98)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:622)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:506)

at soot.asm.AsmClassSource.resolve(AsmClassSource.java:70)

at soot.SootResolver.bringToHierarchy(SootResolver.java:230)

at soot.SootResolver.bringToSignatures(SootResolver.java:255)

at soot.SootResolver.processResolveWorklist(SootResolver.java:169)

at soot.SootResolver.resolveClass(SootResolver.java:130)

at soot.Scene.loadClass(Scene.java:673)

at soot.Scene.loadClassAndSupport(Scene.java:658)

at soot.Scene.loadNecessaryClasses(Scene.java:1319)

at sootapdg.SAMain1.run(SAMain1.java:91)

at sootapdg.SAMain1.main(SAMain1.java:56)

 

Could anyone give me some suggestions? I will appreciate it very much!

 

 

Best

Xueliang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141021/feea4f4e/attachment.html 


More information about the Soot-list mailing list