[Soot-list] Help with FastHierarchy.isSubclass(SootClass child, SootClass parent)
Henddher Pedroza
hpedro2 at uic.edu
Tue Oct 9 09:56:23 EDT 2012
Thanks again Eric, but I am confused:
I have a jar file containing all classes I want to analyze. This jar
contains an Android app so all classes not present in the jar are
assumed to be part of the target platform; therefore, all these other
classes should be available in "android.jar" part of Android SDK.
My code looks like this:
Options.v().set_process_dir(Arrays.asList(new String[] {
"myAndroidApp.jar" })); // (1)
Options.v().set_soot_classpath("./android.jar:./myAndroidApp.jar"); // (2)
Options.v().set_exclude(Arrays.asList(new String[] { "android." })); // (3)
The intention is to perform analysis in all classes found in
myAndroidApp.jar, such classes will have references to classes in
"android.jar" but none of the classes in "android.jar" will be analyzed
- And I expect all classes in "android.jar" to be fully loaded by Soot
but not analyzed.
Am I using the settings incorrectly?
I tried removing (3) and it made no difference; Soot still threw NPE at 151.
- Henddher
On 10/06/2012 02:50 PM, Eric Bodden wrote:
>> I thought excluding classes would just instruct Soot to skip analysis of
>> them.
> No, soot won't load that class.
>
>> In my case, anything that starts with "android." would not be analyzed
>> but any included class (all in my jar because of "set_process_dir") that
>> uses excluded classes would still be analyzed. Right?
> That sounds right.
>
>> I can see that only the classes in my jar are being analyzed (I loop through
>> Scene.v().getApplicationClasses())
>> Am I not using exclude/include correctly?
> Well it really depends on your use case, what "correct" really means.
>
>> On the other hand, if exclusion was indeed the issue, why would some classes
>> in my jar trigger the NPE and not all of them
> Because for some classes the super class is excluded (and thus null)
> but not for others.
>
> Eric
More information about the Soot-list
mailing list