secure-software-engineering / DroidForce

DroidForce Project Repository. See our ARES'2014 paper for the details on DroidForce.
GNU Lesser General Public License v2.1
18 stars 15 forks source link

java.io.FileNotFoundException: ./sootOutput/AndroidManifest.xml #2

Closed lolobosse closed 8 years ago

lolobosse commented 8 years ago

Good afternoon,

As a TUM Student, I take part in the Securing Android Praktikum. Therefore, we're trying to instrument many APK from the FDroid repository (Open Source Android Repository) and for some unknown reason (even if the app is pretty trivial), we get this error:

java.io.FileNotFoundException: ./sootOutput/AndroidManifest.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.(FileInputStream.java:146)
    at soot.jimple.infoflow.android.axml.ApkHandler.addFilesToApk(ApkHandler.java:213)
    at soot.jimple.infoflow.android.axml.ApkHandler.addFilesToApk(ApkHandler.java:121)
    at de.ecspride.util.UpdateManifestAndCodeForWaitPDP.replaceManifest(UpdateManifestAndCodeForWaitPDP.java:161)
    at de.ecspride.Main.runFlowDroid(Main.java:150)
    at de.ecspride.Main.main(Main.java:84)
Exception in thread "main" java.lang.RuntimeException: error when writing new manifest: java.io.FileNotFoundException: ./sootOutput/AndroidManifest.xml (No such file or directory)
    at de.ecspride.util.UpdateManifestAndCodeForWaitPDP.replaceManifest(UpdateManifestAndCodeForWaitPDP.java:164)
    at de.ecspride.Main.runFlowDroid(Main.java:150)
    at de.ecspride.Main.main(Main.java:84)

The Instrumented apk, can be found there

Did we miss something or is it really a bug in the InstrumentationPEP

Alexandre-Bartel commented 8 years ago

Thanks for reporting this! It should have been fixed by 5d9a60d53b5d968a6dc4d9163b814de9a1bfe9c7. Please confirm and close the issue.

lolobosse commented 8 years ago

Good evening Alexandre,

I just tested and I get an other error. It seems a bit more normal but still an exception, do you have it also on your build?

Created a SourceSinkManager with 32 sources, 37 sinks, and 1 callback methods.
[main] INFO de.ecspride.Main - Initialization done. Duration: 29550 ms.
[main] INFO de.ecspride.Main - Starting taint analysis and bytecode instrumentation.
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    The constructor PolicyEnforcementPoint(Map, Set, Set, AndroidEntryPointCreator) refers to the missing type SourceSinkDefinition
    at de.ecspride.Main.runFlowDroid(Main.java:109)
    at de.ecspride.Main.main(Main.java:84)
jarsigner: unable to open jar file: /Users/laurentmeyer/Downloads/testInstru/org.dgtale.icsimport_3.apk

(My server has the same output as my Eclipse except that I try to sign the APK after the instrumentation, that's why you have this difference for the last line).

Alexandre-Bartel commented 8 years ago

You have probably an old version of soot-infoflow / soot-infoflow-android / ... Pull the latest versions of all the projects DroidForce relies on and try again.

lolobosse commented 8 years ago

Sorry, yes. It is working :tada: :clap: