FlowDroid icon indicating copy to clipboard operation
FlowDroid copied to clipboard

Unable to run flowdroid analysis on Windows11

Open mafga74 opened this issue 2 years ago • 4 comments

Dear all

I am already trying to run an analysis with Flowdroid over an android app but when I execute the next:

java -jar .\soot-infoflow-cmd\target\soot-infoflow-cmd-2.12.0-jar-with-dependencies.jar -a ..\App\OTA_New_tool_V3.0.apk -p "C:\Program Files\Android\Android Studio" -s .\soot-infoflow-android\SourcesAndSinks.txt

I obtain the following answer:

The data flow analysis has failed. Error message: No source/sink file specified for the data flow analysis java.lang.RuntimeException: No source/sink file specified for the data flow analysis at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1460) at soot.jimple.infoflow.cmd.MainClass.run(MainClass.java:364) at soot.jimple.infoflow.cmd.MainClass.main(MainClass.java:262)

I have no idea about how to solve the situation.

Can anyone help me please?

Thanks in advance MAFGA

mafga74 avatar Nov 05 '23 09:11 mafga74

Your Android platform directory is wrong. You need to specify the "platforms" directory inside the Android SDK folder, not the root of your Android Studio installation.

The specification of the source/sink definition file seems right, though. Maybe you can set a breakpoint in the parseCommandLineOptions method in the MainClass to see what's hapenning. On my machine, the commamd-line tool works. I use absolute paths instead of relative ones, but that shouldn't make a difference.

StevenArzt avatar Nov 05 '23 14:11 StevenArzt

Thanks for your answer StevenArzt.

Can you help me on what do you exactly mean by "the "platforms" directory inside the Android SDK folder". The apk claims for Android API level 25 that is already installed on Android Studio on the next folder "C:\Users\mafga\AppData\Local\Android\Sdk" (see the attached image). Do you mean to use this folder? I also tried with this path with no better results.

APILevel25

I am using the soot-infoflow-cmd-2.12.0-jar-with-dependencies.jar downloaded from https://repo1.maven.org/maven2/de/fraunhofer/sit/sse/flowdroid/soot-infoflow-cmd/2.12.0/ so I do not have the possibility of using breakpoints yet.

Thanks in advance.

Best regards MAFGA

mafga74 avatar Nov 05 '23 20:11 mafga74

The platforms directory would then be C:\Users\mafga\AppData\Local\Android\Sdk\platforms.

Does the SourcesAndSinks.txt file exist on your hard disk in the folder soot-infoflow-android?

For me, this command-line works well with the 2.12 command-line JAR:

java -jar .\soot-infoflow-cmd-2.12.0-jar-with-dependencies.jar -s "C:\Users\arzt\Documents\OpenSource\FlowDroid\soot-infoflow-android\SourcesAndSinks.txt" -a "C:\Users\arzt\Documents\Apps\InsecureBankv2.apk" -p "C:\Users\arzt\AppData\Local\Android\Sdk\platforms"

StevenArzt avatar Nov 06 '23 08:11 StevenArzt

Thank you very much for your help StevenArzt

It works!!! Now it is time to see if I am able to understand the results :-) The problem was what you mentioned about the platform directory.

Best regards MAFGA

mafga74 avatar Nov 06 '23 12:11 mafga74