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

Interface for plugins that provide hooks for the emulation of dex code and native code. 

 At this time, those plugins can be [used](#getUsage()) by the [APK generic unpacker ](IGenericUnpacker). They are not used by IR optimizers using the emulator. \(Future addition.\) 

 Implementors should not implement this interface directly: extend [AndroidEmulationHooksSkeleton](AndroidEmulationHooksSkeleton) instead.

## Static Field: USAGE_ALL
Type: `int`

Constant value: `-1`
Description: The hooks may be used by all supported components.

## Static Field: USAGE_NONE
Type: `int`

Constant value: `0`
Description: The hooks should not be used by any component.

## Static Field: USAGE_UNPACKER
Type: `int`

Constant value: `1`
Description: The hooks may be used by the generic unpacker.

## Method: getDexExternalHooks
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDSandboxHooks`

Description: Provide an object to hook external dex code emulation, such as the Android runtime libraries, Java API, etc. etc.
return: optional, may be null

## Method: getDexInternalHooks
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDEmulatorHooks`

Description: Provide an object to hook internal dex code emulation \(i.e. the application code\).
return: optional, may be null

## Method: getNativeCodeHooks
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator.IEEmulatorHooks`

Description: Provide an object to hook native code emulation. Limited to aarch64.
return: optional, may be null

## Method: getNativeMemoryHooks
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStateHooks`

Description: Provide an object to hook native memory access by the emulator.
return: optional, may be null

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

Description: Determine by which components the hooks defined in this object may be used.
return: flags specifying where the hooks may be used; see `USAGE_xxx`

