[Soot-list] FlowDroid exception encountered using Eclipse-generated soot.jar

Roy Liu royliudev at gmail.com
Wed Oct 8 05:31:32 EDT 2014


Hi Eric,

Thanks for your prompt reply and suggestion.

I've tried reordering the classpath entries by moving forward
soot-infoflow-android.jar
and soot-infoflow.jar, as well as a few other combinations like putting
axml-2.0.jar forward
and putting soot.jar as the last jar in the classpath.
Still, the same exception was reported.

In fact, if I use the nightly-built soot-trunk.jar, it's perfectly fine if
I just put it in the same
exact position as the Eclipse-built soot.jar, e.g. the first entry in the
classpath as shown
in the executed command line earlier.

Any other possible explanation for the raised exception?
FYI, I've tried different JDK versions, including the latest Java 8, to
generate the JAR files.
No errors were reported during the JAR exporting step.

Many thanks!

Cheers,
Roy


On Wed, Oct 8, 2014 at 3:41 PM, Bodden, Eric <eric.bodden at sit.fraunhofer.de>
wrote:

> Hi Roy.
>
> My suspicion is that your classpath entries are ordered incorrectly,
> leading to inconsistent class versions being picked up. Try moving
> soot-infoflow-android.jar and soot-infoflow.jar forward etc.
>
> Cheers,
> Eric
>
> On 08.10.2014, at 05:02, Roy Liu <royliudev at gmail.com> wrote:
>
> > Hi All,
> >
> > I'm currently experimenting running FlowDroid to analyze some Android
> malware samples.
> > I've used Eclipse to import all the Java source packages required to run
> FlowDroid as mentioned
> > in the FlowDroid's github page (
> https://github.com/secure-software-engineering/soot-infoflow-android/wiki
> );
> > and then build the source packages to generate the corresponding JAR
> files, which can be seen in the following command line.
> >
> >    D:> java -Xmx1g -cp
> soot.jar;soot-infoflow.jar;soot-infoflow-android.jar;slf4j-api-1.7.5.jar;
> >    slf4j-simple-1.7.5.jar;axml-2.0.jar
> soot.jimple.infoflow.android.TestApps.Test malware1.apk
> >    adt\sdk\platforms
> >
> > The following exception, however, was encountered due to the
> Eclipse-generated soot.jar:
> >
> >    Exception in thread "main" java.lang.NoClassDefFoundError:
> org/xmlpull/v1/XmlPullParserException
> >         at java.lang.Class.getDeclaredMethods0(Native Method)
> >         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
> >         at java.lang.Class.privateGetMethodRecursive(Unknown Source)
> >         at java.lang.Class.getMethod0(Unknown Source)
> >         at java.lang.Class.getMethod(Unknown Source)
> >         at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
> >         at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
> >    Caused by: java.lang.ClassNotFoundException:
> org.xmlpull.v1.XmlPullParserException
> >         at java.net.URLClassLoader$1.run(Unknown Source)
> >         at java.net.URLClassLoader$1.run(Unknown Source)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at java.net.URLClassLoader.findClass(Unknown Source)
> >         at java.lang.ClassLoader.loadClass(Unknown Source)
> >         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >         at java.lang.ClassLoader.loadClass(Unknown Source)
> >         ... 7 more
> >
> > If I replace the Eclipse-built soot.jar with the FlowDroid's
> nighly-built soot-trunk.jar,
> > while keeping my other Eclipse-built JAR files soot-infoflow.jar and
> soot-infoflow-android.jar,
> > then FlowDroid execution works fine and is able to produce the
> privacy-leakage path results.
> >
> > I was wondering what could be the cause of the exception when I used the
> Eclipse-generated soot.jar.
> > No compilation errors were reported during the soot.jar building (i.e.
> JAR exporting) process.
> > And the other two Eclipse-based JAR files (soot-infoflow.jar and
> soot-infoflow-android.jar),
> > which were generated in the same way as soot.jar, work just fine with
> the FlowDroid's
> > nighly-built soot-trunk.jar.
> >
> > Any enlightenment on this exception issue will be much appreciated.
> >
> > Thanks and regards,
> > Roy Liu
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at CS.McGill.CA
> > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering at Fraunhofer SIT, TU Darmstadt and EC
> SPRIDE
> Tel: +49 6151 16-75422    Fax: +49 6151 869-127
> Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141008/2ec22152/attachment-0001.html 


More information about the Soot-list mailing list