Interface IDexDecompilerUnit

All Superinterfaces:
IAddressableUnit, IDecompilerUnit, IEventSource, IInteractiveUnit, IUnit, IUnitCreator, IUserDataSupport

@Ser public interface IDexDecompilerUnit extends IDecompilerUnit
Specialized interface representing Dex (Dalvik) decompiler Units.
  • Field Details

  • Method Details

    • getCodeUnit

      IDexUnit getCodeUnit()
      Description copied from interface: IDecompilerUnit
      Get the code unit (possibly the parent, possibly null) that is providing the low-level data to this decompiler.
      Specified by:
      getCodeUnit in interface IDecompilerUnit
      Returns:
      a code unit, possibly null
    • getIntermediateContext

      IDGlobalContext getIntermediateContext()
      Retrieve the global IR context.
      Returns:
    • getHighLevelContext

      IJavaGlobalContext getHighLevelContext()
      Retrieve the global AST context.
      Returns:
    • getDynamicContentManager

      IDynamicContentManager getDynamicContentManager()
      Retrieve a DCR used during AST generation.
      Returns:
    • setIdentifierName

      boolean setIdentifierName(IJavaIdentifier ident, String name)
      Rename an identifier.
      Parameters:
      ident -
      name -
      Returns:
    • setIdentifierName

      boolean setIdentifierName(IJavaIdentifier ident, String name, boolean failOnNameConflict, boolean notify)
      Rename an identifier.
      Parameters:
      ident -
      name -
      failOnNameConflict -
      notify -
      Returns:
    • getIdentifierName

      String getIdentifierName(IJavaIdentifier ident)
      Retrieve the effective (renamed) name of an identifier in this method's AST.
      Parameters:
      ident -
      Returns:
    • getClass

      IJavaClass getClass(String csig, boolean createIfNotExist)
      Retrieve a previously decompiled AST class object or create an empty AST class element.
      Parameters:
      csig -
      createIfNotExist -
      Returns:
    • getField

      IJavaField getField(String fsig, boolean createIfNotExist)
      Retrieve a previously decompiled AST field object or create an empty AST field element.
      Parameters:
      fsig -
      createIfNotExist -
      Returns:
    • getMethod

      IJavaMethod getMethod(String msig, boolean createIfNotExist)
      Retrieve a previously decompiled AST method object or create an empty AST method element.
      Parameters:
      msig -
      createIfNotExist -
      Returns:
    • resetDecompilation

      void resetDecompilation(String identifier)
      Remove a decompiled object (i.e., same as IDecompilerUnit.removeDecompilation(String).) For a dex decompiler, reset and removal actions are equivalent.
      Specified by:
      resetDecompilation in interface IDecompilerUnit
    • resetClassElement

      boolean resetClassElement(IJavaClass c)
      Remove an AST class object.
      Parameters:
      c -
      Returns:
    • resetFieldElement

      boolean resetFieldElement(IJavaField f)
      Remove an AST field object.
      Parameters:
      f -
      Returns:
    • resetMethodElement

      boolean resetMethodElement(IJavaMethod m)
      Remove an AST method object.
      Parameters:
      m -
      Returns:
    • registerEventQueue

      void registerEventQueue(DexDecompilerEventQueue queue)
      Register a user-controlled event queue that will receive decompilation events.
      Parameters:
      queue -
    • unregisterEventQueue

      void unregisterEventQueue(DexDecompilerEventQueue queue)
      Unregister a previously registered user-controlled decompilation event queue.
      Parameters:
      queue -
    • getGlobalDecompilationEvents

      Collection<DexDecompilerEvent<?>> getGlobalDecompilationEvents()
      Retrieve the list decompilation events, without duplicates. Note that this queue is managed separately than user-controlled event queues.
      Returns:
    • getGlobalDecompilationEvents

      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
      Returns:
    • resetGlobalDecompilationEvents

      void resetGlobalDecompilationEvents()
      Reset the global decompilation events list. This operation is not reversible.
    • recordDecompilationEvent

      void recordDecompilationEvent(DexDecompilerEvent<?> event)
    • addSpecialComment

      void addSpecialComment(String address, String value)
    • clearSpecialComments

      void clearSpecialComments(String address)
    • createEmulatedAndroid

      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
    • createGenericUnpacker

      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