public class

ApkManifestHelper

extends ApkXmlResourceHelper
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

Class Overview

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.

Summary

Nested Classes
class ApkManifestHelper.ActivityDescription Short description of an APK activity end-point. 
enum ApkManifestHelper.AndroidSystemType Types of Android systems. 
class ApkManifestHelper.ApplicationDescription Description of the APK's application. 
class ApkManifestHelper.EndPointDescription Short description of APK end-point. 
enum ApkManifestHelper.EndPointType Types of APK end-points. 
class ApkManifestHelper.IntentFilterDescription Short description of an intent filter. 
class ApkManifestHelper.IntentFilterDescriptions A collection of intent filters. 
class ApkManifestHelper.ProviderDescription Short description of an APK provider end-point. 
class ApkManifestHelper.ReceiverDescription Short description of an APK received end-point. 
class ApkManifestHelper.ServiceDescription Short description of an APK service end-point. 
[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
From class com.pnfsoftware.jeb.core.units.code.android.XmlResourceHelper
Public Constructors
ApkManifestHelper(IApkUnit apk)
This convenience constructor can be used to create a helper from an APK unit.
ApkManifestHelper(IXmlUnit xml)
Create a manifest helper around the provided manifest unit.
ApkManifestHelper(Document doc)
Create a manifest helper around the provided low-level XML document object.
Public Methods
static boolean canParse(IApkUnit apk)
List<String> getActivities()
List<ApkManifestHelper.ActivityDescription> getActivityDescriptions()
ApkManifestHelper.ApplicationDescription getApplicationDescription()
String getApplicationName()
List<ApkManifestHelper.EndPointDescription> getEndPointDescriptions()
ApkManifestHelper.AndroidSystemType getIntendedSystemType()
String getMainActivity()
String getPackageName()
List<String> getPermissions()
List<ApkManifestHelper.ProviderDescription> getProviderDescriptions()
List<String> getProviders()
List<ApkManifestHelper.ReceiverDescription> getReceiverDescriptions()
List<String> getReceivers()
int[] getSdkVersion()
Retrieve the minimal and target Android version numbers to run the app.
List<ApkManifestHelper.ServiceDescription> getServiceDescriptions()
List<String> getServices()
Element getXmlManifestElement()
This low-level method offers access to the org.w3c.dom.Element holding the Manifest root.
boolean hasApplication()
boolean isDebuggable()
Protected Methods
void prepare(Document doc)
This implementation checks that the input XML resource is an actual Android Manifest.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.code.android.ApkXmlResourceHelper
From class com.pnfsoftware.jeb.core.units.code.android.XmlResourceHelper
From class java.lang.Object

Public Constructors

public ApkManifestHelper (IApkUnit apk)

This convenience constructor can be used to create a helper from an APK unit. A Manifest XML unit must exist under the APK unit.

public ApkManifestHelper (IXmlUnit xml)

Create a manifest helper around the provided manifest unit.

public ApkManifestHelper (Document doc)

Create a manifest helper around the provided low-level XML document object.

Public Methods

public static boolean canParse (IApkUnit apk)

public List<String> getActivities ()

public List<ApkManifestHelper.ActivityDescription> getActivityDescriptions ()

public ApkManifestHelper.ApplicationDescription getApplicationDescription ()

Returns
  • null if the manifest does not have an Application element

public String getApplicationName ()

public List<ApkManifestHelper.EndPointDescription> getEndPointDescriptions ()

public ApkManifestHelper.AndroidSystemType getIntendedSystemType ()

public String getMainActivity ()

public String getPackageName ()

public List<String> getPermissions ()

public List<ApkManifestHelper.ProviderDescription> getProviderDescriptions ()

public List<String> getProviders ()

public List<ApkManifestHelper.ReceiverDescription> getReceiverDescriptions ()

public List<String> getReceivers ()

public int[] getSdkVersion ()

Retrieve the minimal and target Android version numbers to run the app.

Returns
  • a tuple (minSdkVersion, targetSdkVersion)

public List<ApkManifestHelper.ServiceDescription> getServiceDescriptions ()

public List<String> getServices ()

public Element getXmlManifestElement ()

This low-level method offers access to the org.w3c.dom.Element holding the Manifest root. Use this method to retrieve any tag or attribute stored in the manifest.

public boolean hasApplication ()

public boolean isDebuggable ()

Protected Methods

protected void prepare (Document doc)

This implementation checks that the input XML resource is an actual Android Manifest.