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

liujiefeng liujiefeng at huawei.com
Thu Feb 23 06:35:21 EST 2017


Thank you very much.

And I got another question that for the external dependency package which is not in the official pkg.

For example,

I have a.jar and I have sth.class who’s using a.jar.
But if I want to use Soot to analysis sth.class, it tells me that can’t find the class which is in a.jar.
I’ve tried the “-i” option, but didn't work.
If I use -process-dir to include a.jar,  it would be OK.

But , what should I do if I have many this kind of jar like b.jar & c.jar & etc.?
Since -process-dir didn't work if use the directory of all jar files.

发件人: Bernhard Berger [mailto:berber at tzi.de]
发送时间: 2017年2月23日 18:15
收件人: liujiefeng
抄送: soot-list at CS.McGill.CA
主题: Re: [Soot-list] problem about -process-dir of reading jar file

Hi,

Soot makes the same assumptions according to the jar file layout as  any standard java virtual machine. Therefore, you have a) to extract your or b) to repackage your jar files.

Regards, Bernhard


Am 23.02.2017 um 10:49 schrieb liujiefeng <liujiefeng at huawei.com<mailto:liujiefeng at huawei.com>>:

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.
_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA<mailto:Soot-list at CS.McGill.CA>
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list<https://mailman.cs.mcgill.ca/mailman/listinfo/soot-list>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170223/11017721/attachment-0001.html 


More information about the Soot-list mailing list