Issue in running CLI
Hi, thanks for this amazing tool. I am trying to run the CLI and followed the following steps.
- Download the soot-infoflow-cmd-2.9.0-jar-with-dependencies.jar file
- Run command ; java -jar FlowDroid/soot-infoflow-cmd-jar-with-dependencies.jar
-a FlowDroid/FlowDroidAliasActivity.apk
-p /Users/username/Library/Android/sdk/platforms
-s /Users/username/Documents/GitHub/FlowDroid/SourcesAndSinks.txt
I am getting the error:
The data flow analysis has failed. Error message: ZIP file can't be opened as a file system because an entry has a '.' or '..' element in its name
java.util.zip.ZipException: ZIP file can't be opened as a file system because an entry has a '.' or '..' element in its name
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1579)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.
How do I fix this?
I lost 30 minutes of my life solving this error. Let me guess, you are using some Linux with openJDK? Simply download and run the jar with the latest Oracle JRE. It will work.
Damn! I will try and revert.
Facing same issue on Mac M1
when I set Jdk to 1.8,it works
I can't reproduce the issue. It would be great if someone who has this problem could debug it and propose a fix as a merge request.
The release jar with dependencies seems to have a "./" entry, which shouldn't be there. Unzipping and rezipping worked for me, but a version compiled straight from the current repository state does not have the problem either.
The "." directory (that somehow was included in previous versions) is not included in 2.10.0.
2.9.0 (https://github.com/secure-software-engineering/FlowDroid/releases/download/v2.9/soot-infoflow-cmd-2.9.0-jar-with-dependencies.jar):

2.10.0 (https://github.com/secure-software-engineering/FlowDroid/releases/download/v2.10/soot-infoflow-cmd-jar-with-dependencies.jar):

The issues seems to be fixed.
BTW: 2.9.0 works with Java up to version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
However, for any more recent version the error occurs.