[Soot-list] Inner Class Detection Problem

110 views
Skip to first unread message

Jason Ott

unread,
Jul 24, 2015, 7:57:15 PM7/24/15
to soot...@cs.mcgill.ca
I have a class: com.android.server.power.PowerManagerService$BinderService which is an inner class.  However, Soot does not see it that way when I try to forceResolve it using: BODIES|HIERARCHY|SIGNATURES (or any combination of them).

When I use SootClass.hasOuterClass() on the above resolved class it returns false.

This is how I resolve the class:
protected synchronized SootClass bringClassToScene(String className) {
SootClass sootClass;
sootClass = Scene.v().forceResolve(className, SootClass.BODIES | SootClass.HIERARCHY | SootClass.SIGNATURES);
sootClass.setApplicationClass();
return sootClass;
}

So I then invoke:
SootClass sootClass = bringClassToScene("");
sootClass.hasOuterClass() //return false
I would expect it to return true in this case.

Steven Arzt

unread,
Jul 27, 2015, 5:36:14 AM7/27/15
to Jason Ott, soot...@cs.mcgill.ca

Hi Jason,

 

Please try to avoid using methods such as forceResolve(). As I said, these methods are internals of Soot. Without a very profound understanding of the Soot class loading process, you can run into all sorts of funny behaviors. Internal methods make assumptions about internal stuff. I will only look into this issue any further if it also occurs when using Soot properly – see my last e-mail about Transformers.

 

Best regards,

  Steven

Jason Ott

unread,
Jul 27, 2015, 5:29:37 PM7/27/15
to Steven Arzt, soot...@cs.mcgill.ca
Well, I'm quite confused then.  On March 27th 2015, you instructed me to use forceResolve().  If I Scene.v().loadClassAndSupport(), which the Survival guide suggests, it errors out with:

java.lang.RuntimeException: This operation requires resolving level SIGNATURES but com.android.server.power.PowerManagerService is at resolving level HIERARCHY
If you are extending Soot, try to add the following call before calling soot.Main.main(..):
Scene.v().addBasicClass(com.android.server.power.PowerManagerService,SIGNATURES);
Otherwise, try whole-program mode (-w).

We are using the -w parameter.  We aren't extending Soot, so the usage of soot.Main.main(..) doesn't apply here. We ask Soot to decompile a class and ask for some details about it -- the closest relative would be the RunVeryBusyAnalysis within the Soot Survivor's guide.
Reply all
Reply to author
Forward
0 new messages