secure-software-engineering / FlowDroid

FlowDroid Static Data Flow Tracker
GNU Lesser General Public License v2.1
1.04k stars 296 forks source link

Creating API call graph with FlowDroid #753

Open AMS003010 opened 1 month ago

AMS003010 commented 1 month ago

Hello @StevenArzt 🖐️😁

I am very new to FlowDroid and loved the features that the application provides. Its Amazing !!!

I had a apk file and wanted to generate a API call graph for it. I have set MAVEN_HOME and ANDROID_HOME environment variables. I had a successful build with maven after executing the below commands

git checkout origin/develop
mvn -DskipTests install

image

The fact is I have no clue as to how to proceed anymore. Would be great if anyone could help be with this. I know its a lot !! 😅 Would be great if you do....

StevenArzt commented 1 month ago

You have built FlowDroid from source code, which is a good first step. For constructing a callgraph, you create your own Java program and reference FlowDroid as a Maven dependency. You will need two dependencies:

    <dependencies>
        <dependency>
            <groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
            <artifactId>soot-infoflow-android</artifactId>
            <version>2.14.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>de.fraunhofer.sit.sse.flowdroid</groupId>
            <artifactId>soot-infoflow</artifactId>
            <version>2.14.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

You can then instantiate the SetupApplication class and call the constructCallgraph method.