Class ApkManifestHelper
java.lang.Object
com.pnfsoftware.jeb.core.units.code.android.XmlResourceHelper
com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
com.pnfsoftware.jeb.core.units.code.android.ApkManifestHelper
This helper class facilitates access to the data contained in an Android APK Manifest. In
particular, the
readAttributeXxx methods allow easy retrieval of attribute values by tag
names, throughout the entire document.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classShort description of an APK activity end-point.static enumTypes of Android systems.static classDescription of the APK's application.static classShort description of APK end-point.static enumTypes of APK end-points.static classShort description of an intent filter.static classA collection of intent filters.static classShort description of an APK provider end-point.static classShort description of an APK received end-point.static classShort description of an APK service end-point. -
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
attrPrefixFields inherited from class com.pnfsoftware.jeb.core.units.code.android.XmlResourceHelper
doc, rootElt -
Constructor Summary
ConstructorsConstructorDescriptionThis convenience constructor can be used to create a helper from an APK unit.Create a manifest helper around the provided manifest unit.Create a manifest helper around the provided low-level XML document object. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanint[]Retrieve the minimal and target Android version numbers to run the app.This low-level method offers access to theorg.w3c.dom.Elementholding the Manifest root.booleanbooleanprotected voidThis implementation checks that the input XML resource is an actual Android Manifest.Methods inherited from class com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
buildAttributeNameMethods inherited from class com.pnfsoftware.jeb.core.units.code.android.XmlResourceHelper
convertEltlist, convertNodelist, getAttr, getRootElement, getSimpleName, hasAttributeValue, isFullyQualifiedName, isSimpleName, readAttribute, readAttributes, readMultiAttributes
-
Constructor Details
-
ApkManifestHelper
This convenience constructor can be used to create a helper from an APK unit. A ManifestXML unitmust exist under the APK unit.- Parameters:
apk-
-
ApkManifestHelper
Create a manifest helper around the provided manifest unit.- Parameters:
xml-
-
ApkManifestHelper
Create a manifest helper around the provided low-level XML document object.- Parameters:
doc-
-
-
Method Details
-
canParse
-
prepare
This implementation checks that the input XML resource is an actual Android Manifest.- Overrides:
preparein classApkXmlResourceHelper
-
getXmlManifestElement
This low-level method offers access to theorg.w3c.dom.Elementholding the Manifest root. Use this method to retrieve any tag or attribute stored in the manifest.- Returns:
-
getPackageName
-
getPermissions
-
hasApplication
public boolean hasApplication() -
getApplicationName
-
isDebuggable
public boolean isDebuggable() -
getApplicationDescription
- Returns:
- null if the manifest does not have an Application element
-
getIntendedSystemType
-
getActivities
-
getServices
-
getReceivers
-
getProviders
-
getMainActivity
-
getEndPointDescriptions
-
getActivityDescriptions
-
getServiceDescriptions
-
getReceiverDescriptions
-
getProviderDescriptions
-
getSdkVersion
public int[] getSdkVersion()Retrieve the minimal and target Android version numbers to run the app.- Returns:
- a tuple (minSdkVersion, targetSdkVersion)
-