secure-software-engineering / FlowDroid

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

Cannot assign intent for androidx.fragment.app.FragmentActivity due to the newest ExcludeList #487

Closed Canonize closed 1 year ago

Canonize commented 2 years ago

[main] ERROR soot.jimple.infoflow.android.entryPointCreators.components.ActivityEntryPointCreator - Assign Intent for <androidx.fragment.app.FragmentActivity: void startIntentSenderForResult(android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)> fails. java.lang.RuntimeException: This operation requires resolving level BODIES but androidx.fragment.app.FragmentActivity is at resolving level SIGNATURES If you are extending Soot, try to add the following call before calling soot.Main.main(..): Scene.v().addBasicClass(androidx.fragment.app.FragmentActivity,BODIES); Otherwise, try whole-program mode (-w).

Use FlowDroid from the develop branch to analyze some apps, ERROR above occurred. Have tried two given advice, didn't seem to work.

But when I remove excludeList.add("androidx.*"); from SootConfigForAndroid.setSootOptions(Options options, InfoflowConfiguration config), it works fine. Guess we shouldn't exclude androidx.*, if want to add getIntent() methods for androidx.fragment.app.FragmentActivity?

maryammsd commented 2 years ago

@Canonize Did you find a solution for this issue?

Canonize commented 2 years ago

@maryammsd I removed excludeList.add("androidx.*"); from SootConfigForAndroid.setSootOptions(Options options, InfoflowConfiguration config).

StevenArzt commented 1 year ago

There is a solution for the original problem in this thread, i.e., remove the exclusion. This thread has nothing to do with JAR files. Please do not mix topics.