[Soot-list] Help with FastHierarchy.isSubclass(SootClass child, SootClass parent)
Henddher Pedroza
hpedro2 at uic.edu
Sat Oct 6 12:50:41 EDT 2012
Thank you Eric. I double checked and both SQLiteOpenHelper and Activity
are included in android.jar.
$ jar tvf android.jar
...
25310 Wed Jul 11 02:08:44 CDT 2012 android/app/Activity.class
...
2188 Wed Jul 11 02:08:46 CDT 2012
android/database/sqlite/SQLiteOpenHelper.class
...
The issue seems to be more complex that I originally realized:
Some classes in my jar file make soot complain about hierarchy with
either one of the 2 classes mentioned.
IOW, ClassA in jar triggers the NPE at 151 with SQLiteOpenHelper while
ClassB triggers it with Activity. Others are correctly identified in the
hierarchy.
Any suggestion?
Perhaps the Options I am using are incorrect/incomplete?
I am using something like this
Options.v().set_process_dir(Arrays.asList(new String[] {
jarFile }));
String[] sootClassPathArray = new String[] {
"/home/me/android-sdk-linux/platforms/android-16/android.jar",
"/home/me/android-sdk-linux/add-ons/addon-google_apis-google-16/libs/maps.jar",
jarFile
};
Options.v().set_whole_program(true);
Options.v().set_app(true);
Options.v().set_exclude(Arrays.asList(new String[] {
"android.",
"dalvik.",
"com.google.android.",
"com.android.",
"org.apache.http.",
"org.json.",
"org.w3c.",
"org.xml.",
"org.xmlpull.",
"junit.",
}));
Options.v().set_soot_classpath(toPath(sootClassPathArray)); // toPath
inserts ":" path separator as needed
Options.v().set_allow_phantom_refs(true); // allow missing
classes in the hierarchy
Scene.v().loadNecessaryClasses();
hierarchy = Scene.v().getOrMakeFastHierarchy();
...
On 10/06/2012 09:10 AM, Eric Bodden wrote:
> Hello.
>
> Could it be that android.database.sqlite.SQLiteOpenHelper is loaded as
> a "phantom class" because it is not on your classpath?
>
> Eric
>
> On 5 October 2012 18:07, Henddher Pedroza <hpedro2 at uic.edu> wrote:
>> Hello all,
>>
>> I am new to Soot. I am using 2.5.0
>>
>> I am trying to use Soot to analyze Android apps. I am using Soot
>> framework (without phases).
>>
>> I am specifying sootClasspath as android.jar and my target jar, allowing
>> phantom refs, and app mode. I am excluding all classes found in
>> android.jar.
>>
>> I am trying to detect any class which derives from another class. When I
>> use android.app.Activity as parent, it works ok. But when I use
>> android.database.sqlite.SQLiteOpenHelper as parent,
>> FastHierarchy.isSubclass throws NPE (line 151) because parentInterval is
>> null.
>>
>> Any suggestion?
>>
>> Thanks in advance
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
More information about the Soot-list
mailing list