[Soot-list] Class Path issues

Jason Ott jott002 at ucr.edu
Fri May 8 16:33:09 EDT 2015


I have two very similar classes:

File one:
package com.android.server.accessibility;

//[import necessary packages]

public class AccessibilityManagerService_Main {
    public static void main(String[] args) {
        AccessibilityManagerService obj = new
AccessibilityManagerService(null);
// public methods
obj.addClient(null,-1);
obj.sendAccessibilityEvent(null,-1);
obj.getInstalledAccessibilityServiceList(-1);
obj.getEnabledAccessibilityServiceList(-1,-1);
obj.interrupt(-1);
try {
obj.addAccessibilityInteractionConnection(null,null,-1);
} catch (Exception e) {}
obj.removeAccessibilityInteractionConnection(null);
obj.registerUiTestAutomationService(null,null,null);
obj.unregisterUiTestAutomationService(null);
obj.temporaryEnableAccessibilityStateUntilKeyguardRemoved(null,false);
obj.getWindowToken(-1);
obj.dump(null,null,null);
    }
}

File two:
package com.android.server;

//[import necessary packages]

public class AlarmManagerService_Main {
    public static void main(String[] args) {
com.android.server.AlarmManagerService obj =
startService(com.android.server.AlarmManagerService.class);

obj.onStart();
    }
public static <T extends com.android.server.SystemService> T
startService(Class<T> serviceClass) {
final java.lang.String name = serviceClass.getName();
final T service;
try {
Constructor<T> constructor = serviceClass.getConstructor(Context.class);
service = constructor.newInstance(null);
service.onStart();
return service;
} catch(Exception e) {}
return null;
}
}

Both file one and file two are in the following directory:
/home/test/custom_files/

My soot/spark args are:
-p cg.spark on -w -cp
/home/test/custom_files/:/home/test/android_sources/:. -f J

Where /home/test/android_sources/ is the directory in which the android
compiled sources reside.

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:
"soot.SootResolver$SootClassNotFoundException: couldn't find class:
com.android.server.AlarmManagerService_Main (is your soot-class-path set
properly?)"

I'm really uncertain why this is the case.  Any insight would be helpful.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150508/7877bee5/attachment.html 


More information about the Soot-list mailing list