# Interface: com.pnfsoftware.jeb.core.units.code.android.IApkUnit

Interface for units representing Android "application packages", aka APK files. Units representing APKs are not obliged to implement this interface. 

 JEB's internal APK handler plugin produces units which do implement this interface.

## Method: createEmulatedAndroid
- return type: `com.pnfsoftware.jeb.core.units.code.android.IEmulatedAndroid`

Description: Convenience method to create a limited environment to emulate this APK. Currently, the emulated environment is a simple Arm 64\-bit \(aarch64\) Android 13 system \(API level 33\).
return: an emulated Android environment

## Method: createGenericUnpacker
- return type: `com.pnfsoftware.jeb.core.units.code.android.IGenericUnpacker`

Description: Convenience method to create a generic unpacker, backed by an [emulated\-android](IEmulatedAndroid) object, that can be used to attempt to retrieve resources unpacked at runtime..
return: an emulated Android environment

## Method: dynamic
- return type: `com.pnfsoftware.jeb.core.units.code.android.IDexDynamic`

Description: Dynamic state.
return: Dynamic state

## Method: getActivities
- return type: `java.util.List<java.lang.String>`

Description: Get the list of activity classes declared by the applications. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: a list of fully\-qualified class names

## Method: getApplicationComponentFactory
- return type: `java.lang.String`

Description: Get the application component factory.
return: the application component factory, null if the APK does not declare a custom factory

## Method: getApplicationName
- return type: `java.lang.String`

Description: Get the application name.
return: the application name, null if the APK does not contain an application

## Method: getAssets
- return type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: Convenience method to retrieve the `Assets` folder unit \(may not exist\).
return: 

## Method: getCertificate
- return type: `com.pnfsoftware.jeb.core.units.ICertificateUnit`

Description: Convenience method to retrieve the primary certificate unit of this APK. Use the methods `getSignatureSchemeXxx` to determine if additional signing schemes were used.
return: a certificate unit of null if none were found \(the APK is not signed\)

## Method: getDex
- return type: `com.pnfsoftware.jeb.core.units.code.android.IDexUnit`

Description: Convenience method to retrieve the main DEX unit of this APK. The primary DEX unit may represent the merger of several DEX files, in the case of multi\-DEX applications. 

 Use [UnitUtil](UnitUtil) to retrieve other/more sub\-units.
return: a DEX unit representing the bytecode of the app, null on error

## Method: getLibraries
- return type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: Convenience method to retrieve the `Libraries` folder unit \(may not exist\).
return: a container that contains platform\-dependent libraries.

## Method: getLibrariesForArch
- parameter: `abi`, type: `com.pnfsoftware.jeb.core.units.code.android.adb.AndroidPlatformABI`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.codeobject.IELFUnit>`

Description: Convenience method to retrieve the ELF SO \(Shared Object\) units `Libraries` for the provided target architecture.
return: a list of ELF units, possibly empty

## Method: getMainActivity
- return type: `java.lang.String`

Description: Get the main activity name. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: the main activity name, null on error or if none was found

## Method: getManifest
- return type: `com.pnfsoftware.jeb.core.units.IXmlUnit`

Description: Convenience method to retrieve the Android manifest unit of this APK. 

 Use [UnitUtil](UnitUtil) to retrieve other/more sub\-units.
return: an XML unit representing the manifest, null on error

## Method: getPackageName
- return type: `java.lang.String`

Description: Get the package name exposed in the Android Manifest file. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: the application package name

## Method: getPermissions
- return type: `java.util.List<java.lang.String>`

Description: Get the list of permissions requested by the application. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: the list of permissions declared to be used in the Android manifest

## Method: getProviders
- return type: `java.util.List<java.lang.String>`

Description: Get the list of provider classes declared by the applications. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: a list of fully\-qualified class names

## Method: getReceivers
- return type: `java.util.List<java.lang.String>`

Description: Get the list of receiver classes declared by the applications. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: a list of fully\-qualified class names

## Method: getResources
- return type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: Convenience method to retrieve the `Resources` folder unit \(may not exist\).
return: 

## Method: getServices
- return type: `java.util.List<java.lang.String>`

Description: Get the list of service classes declared by the applications. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: a list of fully\-qualified class names

## Method: getSignatureSchemeV2Block
- return type: `com.pnfsoftware.jeb.core.units.code.android.APKSigSchemeV2Block`

Description: Retrieve the APK signature scheme version 2 block. The specifications of this block are detailed here: https://source.android.com/security/apksigning/v2
return: a signature block, null if there is none \(eg, if the APK is not signed using the v2         scheme\)

## Method: getSignatureSchemeV3Block
- return type: `com.pnfsoftware.jeb.core.units.code.android.APKSigSchemeV3Block`

Description: Retrieve the APK signature scheme version 2 block. The specifications of this block are detailed here: https://source.android.com/security/apksigning/v3
return: a signature block, null if there is none \(eg, if the APK is not signed using the v3         scheme\)

## Method: getSignatureSchemeVersionFlags
- return type: `int`

Description: Retrieve a flag indicating which signing schemes are used in this APK.
return: a combination of flags: bit \#0 is on if v1 is used; bit \#1 is on if v2 is used; bit         \#2 is on if v3 is used

## Method: hasApplication
- return type: `boolean`

Description: Determine whether or not the APK contains an application \(Application tag in the Android manifest\); if there is no app, other application\-related methods \([#getApplicationName()](#getApplicationName()), [#isDebuggable()](#isDebuggable()), [#getActivities()](#getActivities()), [#getMainActivity()](#getMainActivity()), [#getServices()](#getServices()), [#getProviders()](#getProviders()), [#getReceivers()](#getReceivers())\) should not be used.
return: 

## Method: isDebuggable
- return type: `boolean`

Description: Determine if the app can be debugged, per the Android Manifest entry isDebuggable. This is a convenience method; users can retrieve the Manifest unit to examine the entire manifest file.
return: true if the application is legally debuggable, false otherwise

## Method: isMultiDex
- return type: `boolean`

Description: Determine if the bytecode of this APK is split over two or more DEX files.
return: true for multi\-DEX apps, false otherwise

