[Soot-list] problem about -process-dir of reading jar file

liujiefeng liujiefeng at huawei.com
Thu Feb 23 04:49:41 EST 2017


Hi, there.

I'm trying to use SOOT to analyze a whole jar file in eclipse.
And I use these sootArgs:

        String[] sootArgsJar = {
                "-cp", "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar",
                "-process-dir", "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar", "-pp",
                "-w", "-app",
                "-keep-line-number",
                "-keep-bytecode-offset",
                "-p", "cg", "implicit-entry:false",
                "-p", "cg.spark", "enabled",
                "-p", "cg.spark", "simulate-natives",
                "-p", "cg", "safe-forname",
                "-p", "cg", "safe-newinstance",
        };

but I got some problem as below:


java.lang.RuntimeException: Class names not equal! test.DatabaseTestSettings$1 != test.bin.test.DatabaseTestSettings$1


So I look up some Soot command-line options and I found this:

If subdirectories of dir contain .class or .jimple files, Soot assumes that the subdirectory names correspond to components of the classes' package names. If dir contains subA/subB/MyClass.class, for instance, then Soot assumes MyClass is in package subA.subB.

And how can I ignore this just to set my soot path to test.jar/test/bin?
I've tried to set -cp and -process-dir to any form like:

         "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar:test\\bin"
    "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar;test\\bin"
    "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar\\test\\bin"
    Etc..
It all doesn't work.

Looking forward to your reply.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170223/582db7fe/attachment.html 


More information about the Soot-list mailing list