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 class
Short description of an APK activity end-point.static enum
Types of Android systems.static class
Description of the APK's application.static class
Short description of APK end-point.static enum
Types of APK end-points.static class
Short description of an intent filter.static class
A collection of intent filters.static class
Short description of an APK provider end-point.static class
Short description of an APK received end-point.static class
Short description of an APK service end-point. -
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
attrPrefix
Fields 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 boolean
int[]
Retrieve the minimal and target Android version numbers to run the app.This low-level method offers access to theorg.w3c.dom.Element
holding the Manifest root.boolean
boolean
protected void
This implementation checks that the input XML resource is an actual Android Manifest.Methods inherited from class com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
buildAttributeName
Methods 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 unit
must 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:
prepare
in classApkXmlResourceHelper
-
getXmlManifestElement
This low-level method offers access to theorg.w3c.dom.Element
holding 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)
-