<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">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. </div><div class=""><br class=""></div><div class="">Regards, Bernhard</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 23.02.2017 um 10:49 schrieb liujiefeng <<a href="mailto:liujiefeng@huawei.com" class="">liujiefeng@huawei.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Hi, there.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I’m trying to use SOOT to analyze a whole jar file in eclipse.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">And I use these sootArgs:<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> String[]<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62);" class="">sootArgsJar</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><span class="Apple-converted-space"> </span>= {</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-cp"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"C:\\Users\\xxxxxxx\\workspace-neon\\test.jar"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-process-dir"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"C:\\Users\\xxxxxxx\\workspace-neon\\test.jar"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-pp"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-w"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-app"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-keep-line-number"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-keep-bytecode-offset"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-p"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"cg"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"implicit-entry:false"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-p"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"cg.spark"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"enabled"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-p"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"cg.spark"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"simulate-natives"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-p"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"cg"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"safe-forname"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"-p"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"cg"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"safe-newinstance"</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class="">,</span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""> };</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">but I got some problem as below:<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: left; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; text-indent: 21pt;" class=""><u class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(0, 102, 204);" class="">java.lang.RuntimeException</span></u><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: red;" class="">: Class names not equal! test.DatabaseTestSettings$1 != test.bin.test.DatabaseTestSettings$1<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: red;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">So I look up some Soot command-line options and I found this:<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; text-indent: 21pt;" class=""><span lang="EN-US" class="">If subdirectories of<span class="Apple-converted-space"> </span><i class="">dir</i><span class="Apple-converted-space"> </span>contain<span class="Apple-converted-space"> </span></span><tt style="font-family: SimSun;" class=""><span lang="EN-US" style="font-size: 12pt;" class="">.class</span></tt><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>or<span class="Apple-converted-space"> </span></span><tt style="font-family: SimSun;" class=""><span lang="EN-US" style="font-size: 12pt;" class="">.jimple</span></tt><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>files, Soot assumes that the subdirectory names correspond to components of the classes' package names. If<span class="Apple-converted-space"> </span><i class="">dir</i><span class="Apple-converted-space"> </span>contains<span class="Apple-converted-space"> </span></span><tt style="font-family: SimSun;" class=""><span lang="EN-US" style="font-size: 12pt;" class="">subA/subB/MyClass.class</span></tt><span lang="EN-US" class="">, for instance, then Soot assumes<span class="Apple-converted-space"> </span></span><tt style="font-family: SimSun;" class=""><span lang="EN-US" style="font-size: 12pt;" class="">MyClass</span></tt><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>is in package<span class="Apple-converted-space"> </span></span><tt style="font-family: SimSun;" class=""><span lang="EN-US" style="font-size: 12pt;" class="">subA.subB</span></tt><span lang="EN-US" class="">.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">And how can I ignore this just to set my soot path to<span class="Apple-converted-space"> </span><i class="">test.jar/test/bin</i>?<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I’ve tried to set<span class="Apple-converted-space"> </span><i class="">-cp</i><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><i class="">-process-dir</i><span class="Apple-converted-space"> </span>to any form like:<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">"C:\\Users\\xxxxxxx\\workspace-neon\\test.jar:test\\bin"<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class=""> "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar;test\\bin”<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class=""> "C:\\Users\\xxxxxxx\\workspace-neon\\test.jar\\test\\bin"<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class=""> Etc..<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255);" class="">It all doesn’t work.</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Looking forward to your reply.<o:p class=""></o:p></span></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Soot-list mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Soot-list@CS.McGill.CA" style="color: purple; text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Soot-list@CS.McGill.CA</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://mailman.cs.mcgill.ca/mailman/listinfo/soot-list" style="color: purple; text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a></div></blockquote></div><br class=""></div></body></html>