<div dir="ltr">I have two very similar classes:<div><br></div><div>File one:</div><div>package com.android.server.accessibility;</div><div><br></div><div>//[import necessary packages]</div><div><br></div><div>public class AccessibilityManagerService_Main {</div><div>    public static void main(String[] args) {</div><div>        AccessibilityManagerService obj = new AccessibilityManagerService(null);</div><div><span class="" style="white-space:pre">        </span>// public methods</div><div><span class="" style="white-space:pre">        </span>obj.addClient(null,-1);</div><div><span class="" style="white-space:pre">        </span>obj.sendAccessibilityEvent(null,-1);</div><div><span class="" style="white-space:pre">        </span>obj.getInstalledAccessibilityServiceList(-1);</div><div><span class="" style="white-space:pre">        </span>obj.getEnabledAccessibilityServiceList(-1,-1);</div><div><span class="" style="white-space:pre">        </span>obj.interrupt(-1);</div><div><span class="" style="white-space:pre">        </span>try {</div><div><span class="" style="white-space:pre">            </span>obj.addAccessibilityInteractionConnection(null,null,-1);</div><div><span class="" style="white-space:pre">        </span>} catch (Exception e) {}</div><div><span class="" style="white-space:pre">        </span>obj.removeAccessibilityInteractionConnection(null);</div><div><span class="" style="white-space:pre">        </span>obj.registerUiTestAutomationService(null,null,null);</div><div><span class="" style="white-space:pre">        </span>obj.unregisterUiTestAutomationService(null);</div><div><span class="" style="white-space:pre">        </span>obj.temporaryEnableAccessibilityStateUntilKeyguardRemoved(null,false);</div><div><span class="" style="white-space:pre">        </span>obj.getWindowToken(-1);</div><div><span class="" style="white-space:pre">        </span>obj.dump(null,null,null);</div><div>    }</div><div>}</div><div><br></div><div>File two:</div><div>package com.android.server;</div><div><br></div><div>//[import necessary packages]</div><div><br></div><div>public class AlarmManagerService_Main {</div><div>    public static void main(String[] args) {</div><div><div>com.android.server.AlarmManagerService obj = startService(com.android.server.AlarmManagerService.class);</div><div><br></div><div><span class="" style="white-space:pre">                </span>obj.onStart();</div></div><div>    }</div><div><div><span class="" style="white-space:pre">        </span>public static &lt;T extends com.android.server.SystemService&gt; T startService(Class&lt;T&gt; serviceClass) {</div><div><span class="" style="white-space:pre">                </span>final java.lang.String name = serviceClass.getName();</div><div><span class="" style="white-space:pre">                </span>final T service;</div><div><span class="" style="white-space:pre">                </span>try {</div><div><span class="" style="white-space:pre">                        </span>Constructor&lt;T&gt; constructor = serviceClass.getConstructor(Context.class);</div><div><span class="" style="white-space:pre">                        </span>service = constructor.newInstance(null);</div><div><span class="" style="white-space:pre">                        </span>service.onStart();</div><div><span class="" style="white-space:pre">                        </span>return service;</div><div><span class="" style="white-space:pre">                </span>} catch(Exception e) {}</div><div><span class="" style="white-space:pre">                </span>return null;</div><div><span class="" style="white-space:pre">        </span>}</div></div><div>}</div><div><br></div><div>Both file one and file two are in the following directory: /home/test/custom_files/</div><div><br></div><div>My soot/spark args are:</div><div>-p cg.spark on -w -cp /home/test/custom_files/:/home/test/android_sources/:. -f J</div><div><br></div><div>Where /home/test/android_sources/ is the directory in which the android compiled sources reside.</div><div><br></div><div>When I run soot though, on the Scene.v().forceResolve(className, SootClass.BODIES) it can find file one properly.  But it cannot find file two.  You can see that the difference is rather minimal.  It errors with the following: </div><div>&quot;soot.SootResolver$SootClassNotFoundException: couldn&#39;t find class: com.android.server.AlarmManagerService_Main (is your soot-class-path set properly?)&quot;</div><div><br></div><div>I&#39;m really uncertain why this is the case.  Any insight would be helpful.</div><div><br></div><div>Thank you.</div></div>