Closed gnipping closed 1 year ago
I'm not sure why you picked a Soot version. FlowDroid should reference the correct Soot version via Maven. If you compile your own code using Maven and declare FlowDroid as a dependency, Soot should automatically be added and Maven should take care to load the correct version. Since FlowDroid is on Maven central by now, that should also be the easiest solution.
I'm not sure why you picked a Soot version. FlowDroid should reference the correct Soot version via Maven. If you compile your own code using Maven and declare FlowDroid as a dependency, Soot should automatically be added and Maven should take care to load the correct version. Since FlowDroid is on Maven central by now, that should also be the easiest solution.
Thank you very much! After I remove the soot dependency in pom.xml, it works!
The old dependencies:
`
<dependency>
<groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
<artifactId>soot-infoflow</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
<artifactId>soot-infoflow-summaries</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
<artifactId>soot-infoflow-android</artifactId>
<version>2.10.0</version>
</dependency>
</dependencies>`
The new dependencies:
`
<dependency>
<groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
<artifactId>soot-infoflow-summaries</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
<artifactId>soot-infoflow-android</artifactId>
<version>2.10.0</version>
</dependency>
</dependencies>`
I want to use FlowDroid to get the call graph of an android apk. I use maven project with soot 4.1.0 and flowdroid 2.10.0.
My code is below: `package com.gnip.mama;
import soot.PackManager; import soot.Scene; import soot.jimple.infoflow.android.SetupApplication; import soot.jimple.toolkits.callgraph.CallGraph; import soot.options.Options;
import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList;
import java.util.List;
import static java.lang.System.exit;
public class AppCallGraph {
} `
When I run the following command:
java -jar CallGrpah-1.0-SNAPSHOT-jar-with-dependencies.jar C:\Users\17323\Desktop\mama\app-release.apk D:\android_sdk\platforms
I get the following exception:
[main] INFO soot.jimple.infoflow.android.SetupApplication - Initializing Soot... [main] INFO soot.jimple.infoflow.android.SetupApplication - Loading dex files... Exception in thread "main" java.lang.NoSuchMethodError: soot.Scene.createLocalGenerator(Lsoot/Body;)Lsoot/LocalGenerator; at soot.jimple.infoflow.cfg.LibraryClassPatcher.generateMessageObtainMethod(LibraryClassPatcher.java:231) at soot.jimple.infoflow.cfg.LibraryClassPatcher.patchMessageObtainImplementation(LibraryClassPatcher.java:123) at soot.jimple.infoflow.cfg.LibraryClassPatcher.patchLibraries(LibraryClassPatcher.java:71) at soot.jimple.infoflow.android.SetupApplication.initializeSoot(SetupApplication.java:1194) at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1439) at soot.jimple.infoflow.android.SetupApplication.constructCallgraph(SetupApplication.java:1311) at com.gnip.mama.AppCallGraph.main(AppCallGraph.java:40)
It seems like the soot does not have the method soot.Scene.createLocalGenerator(Lsoot/Body;)Lsoot/LocalGenerator; ? What is right version of flowdroid and soot? Could you help me? Thank you!