-
Notifications
You must be signed in to change notification settings - Fork 0
FlowdroidUtils
Jordan Samhi edited this page Aug 22, 2023
·
2 revisions
The FlowdroidUtils
class is part of the AndroSpecter library and serves as a utility class for initializing and running Flowdroid analyses on Android apps.
The class offers one constructor:
-
public FlowdroidUtils(String apkPath)
: Constructs a newFlowdroidUtils
object with the given APK path.
-
public SetupApplication initializeFlowdroid(String platformPath, IInfoflowConfig config, String CallGraphAlgo)
: Initializes a Flowdroid analysis on an Android app using the provided parameters, returning theSetupApplication
object representing the analysis. -
public Set<String> runTaintAnalysis(Set<AndroidMethod> sources, Set<AndroidMethod> sinks)
: Runs the taint analysis on the provided set of sources and sinks, returning a set of strings, each describing a path from a source to a sink. -
public String getPackageName()
: Returns the package name of the Android application, or null if the Manifest file could not be processed.
Here is an example of how to use the FlowdroidUtils
class to initialize and run taint analysis:
FlowdroidUtils flowdroid = new FlowdroidUtils("path/to/app.apk");
SetupApplication sa = flowdroid.initializeFlowdroid("path/to/platform", null, "SPARK");
Set<String> results = flowdroid.runTaintAnalysis(sources, sinks);
for(String result : results) {
System.out.println(result);
}