Skip to content

soot.SootMethodRefImpl$ClassResolutionFailedException #49

Open
@traceprobe

Description

@traceprobe

I am trying to build info flow graph (no tainting) with the following code:
SetupApplication analyzer = new SetupApplication(FRAMEWORK_DIR, APK_PATH);
analyzer.getConfig().setTaintAnalysisEnabled(false);
analyzer.getConfig().setMergeDexFiles(true);
analyzer.constructCallgraph();

For any apk file, i got the following exception:
soot.SootMethodRefImpl$ClassResolutionFailedException: Class android.content.ServiceConnection doesn't have method onServiceConnected([android.content.ComponentName]) : void; failed to resolve in superclasses and interfacesLooking in android.content.ServiceConnection which has methods [<android.content.ServiceConnection: void onServiceConnected(android.content.ComponentName,android.os.IBinder)>, <android.content.ServiceConnection: void onServiceDisconnected(android.content.ComponentName)>]
at soot.SootMethodRefImpl.resolve(SootMethodRefImpl.java:237)
at soot.SootMethodRefImpl.resolve(SootMethodRefImpl.java:152)
at soot.jimple.internal.AbstractInvokeExpr.getMethod(AbstractInvokeExpr.java:56)
at soot.jimple.validation.InvokeArgumentValidator.validate(InvokeArgumentValidator.java:54)
at soot.jimple.JimpleBody.validate(JimpleBody.java:118)
at soot.jimple.JimpleBody.validate(JimpleBody.java:98)
at soot.jimple.infoflow.cfg.LibraryClassPatcher.patchServiceConnection(LibraryClassPatcher.java:561)
at soot.jimple.infoflow.cfg.LibraryClassPatcher.patchLibraries(LibraryClassPatcher.java:55)
at soot.jimple.infoflow.android.SetupApplication.initializeSoot(SetupApplication.java:1130)
at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1313)
at soot.jimple.infoflow.android.SetupApplication.constructCallgraph(SetupApplication.java:1182)

Looked a bit into the code and it seems that the LibraryClassPatcher.patchServiceConnection method is causing the problem:
Scene.v().makeMethodRef(sc, "onServiceConnected",
Collections.singletonList(smGetFM.getParameterType(0)), VoidType.v(), false),

The inconsistent method signature (onServiceConnected([android.content.ComponentName])) is designed here. Is there any way to avoid this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions