Class LayoutFileParser
java.lang.Object
soot.jimple.infoflow.android.resources.AbstractResourceParser
soot.jimple.infoflow.android.resources.LayoutFileParser
Parser for analyzing the layout XML files inside an android application
- Author:
- Steven Arzt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final soot.util.MultiMap<String,soot.SootClass> protected final Stringprotected final ARSCFileParserprotected soot.SootClassprotected soot.SootClassprotected soot.SootClassprotected final soot.util.MultiMap<String,AndroidLayoutControl> Fields inherited from class soot.jimple.infoflow.android.resources.AbstractResourceParser
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the callback methods found in the layout XML file.soot.util.MultiMap<String,soot.SootClass> Gets the fragments found in the layout XML file.booleanGets whether this analysis shall only collect sensitive controls such as password fieldssoot.util.MultiMap<String,AndroidLayoutControl> Gets the user controls found in the layout XML file.Gets the user controls found in the layout XML file.voidparseLayoutFile(File apkFile) Parses all layout XML files in the given APK file and loads the IDs of the user controls in it.voidparseLayoutFileDirect(File apkFile) Parses all layout XML files in the given APK file and loads the IDs of the user controls in it.protected voidparseLayoutNode(String layoutFile, AXmlNode rootNode) Parses the layout file with the given root nodevoidsetControlFactory(LayoutControlFactory controlFactory) Sets the layout control factory to use for creating new layout controlsMethods inherited from class soot.jimple.infoflow.android.resources.AbstractResourceParser
handleAndroidResourceFiles
-
Field Details
-
userControls
-
callbackMethods
-
includeDependencies
-
fragments
-
packageName
-
resParser
-
scViewGroup
protected soot.SootClass scViewGroup -
scView
protected soot.SootClass scView -
scWebView
protected soot.SootClass scWebView
-
-
Constructor Details
-
LayoutFileParser
-
-
Method Details
-
parseLayoutFile
Parses all layout XML files in the given APK file and loads the IDs of the user controls in it. This method only registers a Soot phase that is run when the Soot packs are next run- Parameters:
apkFile- The APK file in which to look for user controls
-
parseLayoutFileDirect
Parses all layout XML files in the given APK file and loads the IDs of the user controls in it. This method directly executes the analyses witout registering any Soot phases.- Parameters:
apkFile- The APK file in which to look for user controls
-
parseLayoutNode
Parses the layout file with the given root node- Parameters:
layoutFile- The full path and file name of the file being parsedrootNode- The root node from where to start parsing
-
getUserControlsByID
Gets the user controls found in the layout XML file. The result is a mapping from the id to the respective layout control.- Returns:
- The layout controls found in the XML file.
-
getUserControls
Gets the user controls found in the layout XML file. The result is a mapping from the file name in which the control was found to the respective layout control.- Returns:
- The layout controls found in the XML file.
-
getCallbackMethods
Gets the callback methods found in the layout XML file. The result is a mapping from the file name to the set of found callback methods.- Returns:
- The callback methods found in the XML file.
-
getFragments
Gets the fragments found in the layout XML file. The result is a mapping from the activity class to the set of found fragments ids.- Returns:
- The fragments found in the XML file.
-
getLoadOnlySensitiveControls
public boolean getLoadOnlySensitiveControls()Gets whether this analysis shall only collect sensitive controls such as password fields- Returns:
- True if this analysis shall only collect sensitive controls, otherwise false
-
setControlFactory
Sets the layout control factory to use for creating new layout controls- Parameters:
controlFactory- The layout control factory
-