secure-software-engineering / FlowDroid

FlowDroid Static Data Flow Tracker
GNU Lesser General Public License v2.1
1.03k stars 293 forks source link

No sources found and abort analysis although I provide source method signature. #472

Open zhouyuhao1018 opened 2 years ago

zhouyuhao1018 commented 2 years ago

I put <android.os.Bundle: boolean getBoolean(java.lang.String)> -> _SOURCE_ in the SourcesAndSinks.txt. However, It repots as follows:

[main] INFO soot.jimple.infoflow.android.SetupApplication$InPlaceInfoflow - Looking for sources and sinks...
[main] ERROR soot.jimple.infoflow.android.SetupApplication$InPlaceInfoflow - No sources found, aborting analysis

here is jimple codes of MainActivity.java

    protected void onCreate(android.os.Bundle)
    {
        com.example.viewmedeltest.MainActivity r0;
        android.os.Bundle $r1;
        boolean $z0;
        ...... // some other locals

        r0 := @this: com.example.viewmedeltest.MainActivity;
        $r1 := @parameter0: android.os.Bundle;

        ...... // some other codes for activity initiation

        if $r1 == null goto label1;
        $z0 = virtualinvoke $r1.<android.os.Bundle: boolean getBoolean(java.lang.String)>("flag");  // here is source
        r0.<com.example.viewmedeltest.MainActivity: boolean isOpen> = $z0;
        if $z0 == 0 goto label1;
        specialinvoke r0.<com.example.viewmedeltest.MainActivity: void showDialog()>();
     label1:
        return;
    }

and here is java source code:

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ...... //  some other codes for activity initiation

        if (savedInstanceState!=null){
                isOpen = savedInstanceState.getBoolean("dialog");
                if (isOpen){
                    showDialog();
                }
        }

}

Why flowdroid reports no sources found?