Class InfoflowAndroidConfiguration.CallbackConfiguration

java.lang.Object
soot.jimple.infoflow.android.InfoflowAndroidConfiguration.CallbackConfiguration
Enclosing class:
InfoflowAndroidConfiguration

public static class InfoflowAndroidConfiguration.CallbackConfiguration extends Object
The configuration for analyzing callbacks in Android apps
Author:
Steven Arzt
  • Constructor Details

    • CallbackConfiguration

      public CallbackConfiguration()
  • Method Details

    • merge

      Copies the settings of the given configuration into this configuration object
      Parameters:
      cbConfig - The other configuration object
    • setEnableCallbacks

      public void setEnableCallbacks(boolean enableCallbacks)
      Sets whether the taint analysis shall consider callbacks
      Parameters:
      enableCallbacks - True if taints shall be tracked through callbacks, otherwise false
    • getEnableCallbacks

      public boolean getEnableCallbacks()
      Gets whether the taint analysis shall consider callbacks
      Returns:
      True if taints shall be tracked through callbacks, otherwise false
    • setCallbackAnalyzer

      public void setCallbackAnalyzer(InfoflowAndroidConfiguration.CallbackAnalyzer callbackAnalyzer)
      Sets the callback analyzer to be used in preparation for the taint analysis
      Parameters:
      callbackAnalyzer - The callback analyzer to be used
    • getCallbackAnalyzer

      public InfoflowAndroidConfiguration.CallbackAnalyzer getCallbackAnalyzer()
      Gets the callback analyzer that is being used in preparation for the taint analysis
      Returns:
      The callback analyzer being used
    • setFilterThreadCallbacks

      public void setFilterThreadCallbacks(boolean filterThreadCallbacks)
      Sets whether the callback analysis algorithm should follow paths that contain threads. If this option is disabled, callbacks only registered in threads will be missed. If it is enabled, context-insensitive callgraph algorithms can lead to a high number of false positives for the callback analyzer.
      Parameters:
      filterThreadCallbacks - True to discover callbacks registered in threads, otherwise false
    • getFilterThreadCallbacks

      public boolean getFilterThreadCallbacks()
      Gets whether the callback analysis algorithm should follow paths that contain threads. If this option is disabled, callbacks only registered in threads will be missed. If it is enabled, context-insensitive callgraph algorithms can lead to a high number of false positives for the callback analyzer.
      Returns:
      True to discover callbacks registered in threads, otherwise false
    • getMaxCallbacksPerComponent

      public int getMaxCallbacksPerComponent()
      Gets the maximum number of callbacks per component. If the callback collector finds more callbacks than this number for one given component, the analysis will assume that precision has degraded too much and will analyze this component without callbacks.
      Returns:
      The maximum number of callbacks per component
    • setMaxCallbacksPerComponent

      public void setMaxCallbacksPerComponent(int maxCallbacksPerComponent)
      Sets the maximum number of callbacks per component. If the callback collector finds more callbacks than this number for one given component, the analysis will assume that precision has degraded too much and will analyze this component without callbacks.
      Parameters:
      maxCallbacksPerComponent - The maximum number of callbacks per component
    • getCallbackAnalysisTimeout

      public int getCallbackAnalysisTimeout()
      Gets the timeout in seconds after which the callback analysis shall be stopped. After the timeout, the data flow analysis will continue with those callbacks that have been found so far.
      Returns:
      The callback analysis timeout in seconds
    • setCallbackAnalysisTimeout

      public void setCallbackAnalysisTimeout(int callbackAnalysisTimeout)
      Sets the timeout in seconds after which the callback analysis shall be stopped. After the timeout, the data flow analysis will continue with those callbacks that have been found so far.
      Parameters:
      callbackAnalysisTimeout - The callback analysis timeout in seconds
    • getMaxAnalysisCallbackDepth

      public int getMaxAnalysisCallbackDepth()
      Gets the maximum depth up to which the callback analyzer shall look into chains of callbacks registering other callbacks. A value equal to or smaller than zero indicates an infinite maximum depth.
      Returns:
      The maximum depth up to which to look into callback registration chains.
    • setMaxAnalysisCallbackDepth

      public void setMaxAnalysisCallbackDepth(int maxCallbackAnalysisDepth)
      Sets the maximum depth up to which the callback analyzer shall look into chains of callbacks registering other callbacks. A value equal to or smaller than zero indicates an infinite maximum depth.
      Parameters:
      maxCallbackAnalysisDepth - The maximum depth up to which to look into callback registration chains.
    • isSerializeCallbacks

      public boolean isSerializeCallbacks()
      Gets whether the collected callbacks shall be serialized into a file
      Returns:
      True to serialize the collected callbacks into a file, false otherwise
    • setSerializeCallbacks

      public void setSerializeCallbacks(boolean serializeCallbacks)
      Sets whether the collected callbacks shall be serialized into a file
      Parameters:
      serializeCallbacks - True to serialize the collected callbacks into a file, false otherwise
    • getCallbacksFile

      public String getCallbacksFile()
      Gets the full path and file name of the file to which the collected callback shall be written, or from which they shall be read, respectively
      Returns:
      The file for the collected callbacks
    • setCallbacksFile

      public void setCallbacksFile(String callbacksFile)
      Sets the full path and file name of the file to which the collected callback shall be written, or from which they shall be read, respectively
      Parameters:
      callbacksFile - The file for the collected callbacks
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object