public interface

IDexDecompilerUnit

implements IDecompilerUnit
com.pnfsoftware.jeb.core.units.code.android.IDexDecompilerUnit

Class Overview

Specialized interface representing Dex (Dalvik) decompiler Units.

Summary

Constants
String propnameEmulatorConfigPath
[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.IDecompilerUnit
Public Methods
abstract void addSpecialComment(String address, String value)
abstract void clearSpecialComments(String address)
abstract IEmulatedAndroid createEmulatedAndroid()
Create a limited environment to emulate dex code and native code.
abstract IGenericUnpacker createGenericUnpacker()
Create a generic unpacker, backed by an emulated-android object, that can be used to attempt to retrieve resources unpacked at runtime.
abstract IJavaClass getClass(String csig, boolean createIfNotExist)
Retrieve a previously decompiled AST class object or create an empty AST class element.
abstract IDexUnit getCodeUnit()
Get the code unit (possibly the parent, possibly null) that is providing the low-level data to this decompiler.
abstract IDynamicContentManager getDynamicContentManager()
Retrieve a DCR used during AST generation.
abstract IJavaField getField(String fsig, boolean createIfNotExist)
Retrieve a previously decompiled AST field object or create an empty AST field element.
abstract Collection<DexDecompilerEvent<?>> getGlobalDecompilationEvents()
Retrieve the list decompilation events, without duplicates.
abstract Collection<DexDecompilerEvent<?>> getGlobalDecompilationEvents(boolean keepDuplicates)
Retrieve a copy of the decompilation events.
abstract IJavaGlobalContext getHighLevelContext()
Retrieve the global AST context.
abstract String getIdentifierName(IJavaIdentifier ident)
Retrieve the effective (renamed) name of an identifier in this method's AST.
abstract IDGlobalContext getIntermediateContext()
Retrieve the global IR context.
abstract IJavaMethod getMethod(String msig, boolean createIfNotExist)
Retrieve a previously decompiled AST method object or create an empty AST method element.
abstract void recordDecompilationEvent(DexDecompilerEvent<?> event)
abstract void registerEventQueue(DexDecompilerEventQueue queue)
Register a user-controlled event queue that will receive decompilation events.
abstract boolean resetClassElement(IJavaClass c)
Remove an AST class object.
abstract void resetDecompilation(String identifier)
Remove a decompiled object (i.e., same as removeDecompilation(String).) For a dex decompiler, reset and removal actions are equivalent.
abstract boolean resetFieldElement(IJavaField f)
Remove an AST field object.
abstract void resetGlobalDecompilationEvents()
Reset the global decompilation events list.
abstract boolean resetMethodElement(IJavaMethod m)
Remove an AST method object.
abstract boolean setIdentifierName(IJavaIdentifier ident, String name)
Rename an identifier.
abstract boolean setIdentifierName(IJavaIdentifier ident, String name, boolean failOnNameConflict, boolean notify)
Rename an identifier.
abstract void unregisterEventQueue(DexDecompilerEventQueue queue)
Unregister a previously registered user-controlled decompilation event queue.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.IUnitCreator
From interface com.pnfsoftware.jeb.core.IUserDataSupport
From interface com.pnfsoftware.jeb.core.units.IAddressableUnit
From interface com.pnfsoftware.jeb.core.units.IInteractiveUnit
From interface com.pnfsoftware.jeb.core.units.IUnit
From interface com.pnfsoftware.jeb.core.units.code.IDecompilerUnit
From interface com.pnfsoftware.jeb.util.events.IEventSource

Constants

public static final String propnameEmulatorConfigPath

Constant Value: "EmulatorConfigPath"

Public Methods

public abstract void addSpecialComment (String address, String value)

public abstract void clearSpecialComments (String address)

public abstract IEmulatedAndroid createEmulatedAndroid ()

Create a limited environment to emulate dex code and native code. Currently, the emulated environment is a simple Arm 64-bit (aarch64) Android 13 system (API level 33). This dex decompiler must be the descendant of an APK unit.

Returns
  • an emulated Android environment

public abstract IGenericUnpacker createGenericUnpacker ()

Create a generic unpacker, backed by an emulated-android object, that can be used to attempt to retrieve resources unpacked at runtime. This dex decompiler must be the descendant of an APK unit.

Returns
  • an emulated Android environment

public abstract IJavaClass getClass (String csig, boolean createIfNotExist)

Retrieve a previously decompiled AST class object or create an empty AST class element.

public abstract IDexUnit getCodeUnit ()

Get the code unit (possibly the parent, possibly null) that is providing the low-level data to this decompiler.

Returns
  • a code unit, possibly null

public abstract IDynamicContentManager getDynamicContentManager ()

Retrieve a DCR used during AST generation.

public abstract IJavaField getField (String fsig, boolean createIfNotExist)

Retrieve a previously decompiled AST field object or create an empty AST field element.

public abstract Collection<DexDecompilerEvent<?>> getGlobalDecompilationEvents ()

Retrieve the list decompilation events, without duplicates. Note that this queue is managed separately than user-controlled event queues.

public abstract Collection<DexDecompilerEvent<?>> getGlobalDecompilationEvents (boolean keepDuplicates)

Retrieve a copy of the decompilation events. Note that this queue is managed separately than user-controlled event queues.

Parameters
keepDuplicates if true, duplicate events will be present in the returned collection

public abstract IJavaGlobalContext getHighLevelContext ()

Retrieve the global AST context.

public abstract String getIdentifierName (IJavaIdentifier ident)

Retrieve the effective (renamed) name of an identifier in this method's AST.

public abstract IDGlobalContext getIntermediateContext ()

Retrieve the global IR context.

public abstract IJavaMethod getMethod (String msig, boolean createIfNotExist)

Retrieve a previously decompiled AST method object or create an empty AST method element.

public abstract void recordDecompilationEvent (DexDecompilerEvent<?> event)

public abstract void registerEventQueue (DexDecompilerEventQueue queue)

Register a user-controlled event queue that will receive decompilation events.

public abstract boolean resetClassElement (IJavaClass c)

Remove an AST class object.

public abstract void resetDecompilation (String identifier)

Remove a decompiled object (i.e., same as removeDecompilation(String).) For a dex decompiler, reset and removal actions are equivalent.

public abstract boolean resetFieldElement (IJavaField f)

Remove an AST field object.

public abstract void resetGlobalDecompilationEvents ()

Reset the global decompilation events list. This operation is not reversible.

public abstract boolean resetMethodElement (IJavaMethod m)

Remove an AST method object.

public abstract boolean setIdentifierName (IJavaIdentifier ident, String name)

Rename an identifier.

public abstract boolean setIdentifierName (IJavaIdentifier ident, String name, boolean failOnNameConflict, boolean notify)

Rename an identifier.

public abstract void unregisterEventQueue (DexDecompilerEventQueue queue)

Unregister a previously registered user-controlled decompilation event queue.