<div dir="ltr"><div dir="ltr"><div dir="ltr">I've just been trying to get Soot set up in a simple program to take in an Android APK and decompile it. I started off by following this tutorial: <br></div><div dir="ltr"><a href="https://github.com/Sable/soot/wiki/Instrumenting-Android-Apps-with-Soot">https://github.com/Sable/soot/wiki/Instrumenting-Android-Apps-with-Soot</a></div><div dir="ltr"><br></div><div>To get it working however, I had to use the -allow-phantom-refs flag -- otherwise I'd always receive things like:</div><div>"soot.SootResolver$SootClassNotFoundException: couldn't find class: android.app.ActivityThread (is your soot-class-path set properly?)"</div><div>(The actual class not found varies depending on the APK)</div><div><br></div><div>I've tried going through the source code for FlowDroid and a couple of other static analysis tools to see if they use this flag too, and found a lot of "Options.v().set_allow_phantom_refs(<span style="color:rgb(0,0,128);font-weight:bold">true</span>);", but since it defaults to false, perhaps there are a lot of occasions when it doesn't use this flag.</div><div><br></div><div>My question is, in the context of APK static analysis, is it recommended/required to use this flag? From my understanding, these class references are coming from the APK code itself, so perhaps it really isn't necessary to go to the extra effort of including these in my soot-class-path? Any help would be greatly appreciated.<br></div></div></div>