0

I try to run soot dependent app, using lots of jar files as dependencies in the compilation and every time a new error occurs. The error I got at last is this:

[main] INFO soot.jimple.infoflow.android.SetupApplication - ARSC file parsing took 0.01102201 seconds Exception in thread "main" java.lang.NoSuchMethodError: soot.Body.getUnits()Lsoot/PatchingChain; at soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createEmptyMainMethod(BaseEntryPointCreator.java:165) at soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createDummyMainInternal(BaseEntryPointCreator.java:123) at soot.jimple.infoflow.entryPointCreators.BaseEntryPointCreator.createDummyMain(BaseEntryPointCreator.java:109) at soot.jimple.infoflow.android.SetupApplication.createMainMethod(SetupApplication.java:622) at soot.jimple.infoflow.android.SetupApplication.calculateCallbackMethods(SetupApplication.java:471) at soot.jimple.infoflow.android.SetupApplication.calculateSourcesSinksEntrypoints(SetupApplication.java:401) at soot.jimple.infoflow.android.SetupApplication.calculateSourcesSinksEntrypoints(SetupApplication.java:359) at Appgraph.main(Appgraph.java:37)

I try to run it both in Java 11 and Java 8 but the same error occurs. The compilation and running commands I use are:

javac -cp ".:soot-4.1.0-jar-with-dependencies.jar:soot-infoflow-android.jar:soot-infoflow.jar:axml-2.0.jar:commons-io-2.6.jar:android.jar:guava-27.1-android.jar:jsr305-1.3.9.jar:dexlib2-2.3.4.jar:multidexlib2-2.3.4.r2.jar:failureaccess-1.0.1.jar:sootall-2.5.0.jar:soot-2.5.0.jar:soot.jar:soot-4.1.0-jar-with-dependencies.jar" Appgraph.java for the compilation command

java -Xmx2g -cp ".:soot-4.1.0-jar-with-dependencies.jar:soot-infoflow-android.jar:soot-infoflow.jar:axml-2.0.jar:commons-io-2.6.jar:android.jar:guava-27.1-android.jar:jsr305-1.3.9.jar:dexlib2-2.3.4.jar:multidexlib2-2.3.4.r2.jar:failureaccess-1.0.1.jar:sootall-2.5.0.jar:soot-2.5.0.jar:SourcesAndSinks.txt" Appgraph apks/3baea0cd661a580a84e4110b1a309942.apk . as the running command

I tried multiple versions of soot but no version got me past the above error.

Harel
  • 11

1 Answers1

0

Seems like you are trying to use a very old version of FlowDroid (soot-infoflow) together with a new version of Soot.

The mentioned method soot.Body.getUnits()Lsoot/PatchingChain; is part of Soot and has been changed in August 2018: https://github.com/Sable/soot/commit/25e145a694676a6ae786ebb44fcef51aa03b4cf5#diff-e17f2a0d88bf86133287578f02eb7483

Hence you need a version of FlowDroid that has been released after that date.

JMax
  • 1,134
  • 1
  • 11
  • 20