com.pnfsoftware.jeb.core.units.code.android.IDexUnit |
Interface for units representing Android Dalvik bytecode containers, aka DEX files. The DEX unit interface is a virtual view of the DEX bytecode contained an Android application (APK).
Note that in the case of multi-DEX APKs, the DEX unit represents a virtual, unified view of the
separate DEX files contained in the APK. If required, the individual information about those DEX
files can be retrieved via IDexFile
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ACC_ABSTRACT | ||||||||||
int | ACC_ANNOTATION | ||||||||||
int | ACC_BRIDGE | ||||||||||
int | ACC_CONSTRUCTOR | ||||||||||
int | ACC_DECLARED_SYNCHRONIZED | ||||||||||
int | ACC_ENUM | ||||||||||
int | ACC_FINAL | ||||||||||
int | ACC_INTERFACE | ||||||||||
int | ACC_NATIVE | ||||||||||
int | ACC_PRIVATE | ||||||||||
int | ACC_PROTECTED | ||||||||||
int | ACC_PUBLIC | ||||||||||
int | ACC_STATIC | ||||||||||
int | ACC_STRICT | ||||||||||
int | ACC_SYNCHRONIZED | ||||||||||
int | ACC_SYNTHETIC | ||||||||||
int | ACC_TRANSIENT | ||||||||||
int | ACC_VARARGS | ||||||||||
int | ACC_VOLATILE | ||||||||||
int | ITAG_BYTECODE | ||||||||||
int | ITAG_CLASS | ||||||||||
int | ITAG_FIELD | ||||||||||
int | ITAG_IMMEDIATE | ||||||||||
int | ITAG_METHOD | ||||||||||
int | ITAG_PACKAGE | ||||||||||
int | ITAG_PARAMETER | ||||||||||
int | ITAG_STRING | ||||||||||
int | ITAG_TYPE | ||||||||||
int | ITAG_VARIABLE |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract IDexField |
addField(String signature)
Create a new field and add it to the field pool index.
| ||||||||||
abstract IDexMethod |
addMethod(String signature)
Create a new method reference and add it to the method pool index.
| ||||||||||
abstract IDexPrototype |
addPrototype(String prototypeString)
Create a new DEX prototype and add it to the prototype pool index.
| ||||||||||
abstract IDexString |
addString(String value)
Create a new string and add it to the string pool index.
| ||||||||||
abstract IDexType |
addType(String typeString)
Create a new type and add it to the type pool index.
| ||||||||||
abstract int |
findStringIndex(String s)
Retrieve the pool index of a string, by value.
| ||||||||||
abstract int | getBadTypeCount() | ||||||||||
abstract IDexCallSite | getCallSite(int index) | ||||||||||
abstract List<? extends IDexCallSite> | getCallSites() | ||||||||||
abstract IDexClass |
getClass(String fqname)
Convenience method used to retrieve a class by name.
| ||||||||||
abstract IDexClass |
getClass(int index)
Convenience method to retrieve a class by its DEX class pool index.
| ||||||||||
abstract List<? extends IDexClass> |
getClasses()
Get the DEX class pool
| ||||||||||
abstract List<IDexAddress> |
getCrossReferences(DexPoolType poolType, int index)
Retrieve a list of addresses referencing the provided pool item.
| ||||||||||
abstract List<IDexFile> |
getDexFiles()
Get the list of underlying objects representing each
classes.dex that compose
this unit. | ||||||||||
abstract String |
getDisassembly()
This convenience method provides the entire disassembly of the bytecode making up the DEX
file.
| ||||||||||
abstract IDexDisassemblyDocument |
getDisassemblyDocument()
Convenience method to retrieve the text document representing the disassembly of this code
unit.
| ||||||||||
abstract IDexField |
getField(String fqname)
Convenience method used to retrieve a field by name.
| ||||||||||
abstract IDexField |
getField(int index)
Convenience method to retrieve a field by its DEX field pool index.
| ||||||||||
abstract List<? extends IDexField> |
getFields()
Get the DEX field pool
| ||||||||||
abstract long |
getInstructionCount()
Retrieve the total amount of instructions in this DEX unit.
| ||||||||||
abstract IDexMethod |
getMethod(String fqname)
Convenience method used to retrieve a method by name.
| ||||||||||
abstract IDexMethod |
getMethod(int index)
Convenience method to retrieve a method by its DEX method pool index.
| ||||||||||
abstract IDexMethodHandle | getMethodHandle(int index) | ||||||||||
abstract List<? extends IDexMethodHandle> | getMethodHandles() | ||||||||||
abstract List<? extends IDexMethod> |
getMethods()
Get the DEX method pool
| ||||||||||
abstract IDexPackage | getPackage(String signature) | ||||||||||
abstract List<? extends IDexPackage> |
getPackages()
Get the list of code packages.
| ||||||||||
abstract IDexPrototype |
getPrototype(int index)
Convenience method to retrieve a prototype by its DEX prototype pool index.
| ||||||||||
abstract List<? extends IDexPrototype> |
getPrototypes()
Get the list of DEX prototypes defined in the DEX file (prototype pool).
| ||||||||||
abstract IDexString |
getString(int index)
Convenience method to retrieve a string by its DEX string pool index.
| ||||||||||
abstract int |
getStringCount()
Get the number of strings present in the aggregated string pools represented by this DEX
unit.
| ||||||||||
abstract List<? extends IDexString> |
getStrings()
Get the DEX string pool, including extra strings added via
addString . | ||||||||||
abstract IDexType |
getType(int index)
Convenience method to retrieve a type by its DEX type pool index.
| ||||||||||
abstract List<? extends IDexType> |
getTypes()
Get the DEX prototype pool
| ||||||||||
abstract boolean |
moveToPackage(IDexItem src, IDexPackage dst)
Move a class or a package to a destination package.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Create a new field and add it to the field pool index.
Create a new method reference and add it to the method pool index.
Create a new DEX prototype and add it to the prototype pool index.
prototypeString | a full prototype string, such as:
(typeParam1,typeParam2,...)typeReturn |
---|
Create a new string and add it to the string pool index.
Create a new type and add it to the type pool index.
typeString | a fully-qualified type name, using the standard Java internal signature
notation (L...; ) |
---|
Retrieve the pool index of a string, by value.
s | a string |
---|
Convenience method used to retrieve a class by name.
Convenience method to retrieve a class by its DEX class pool index.
Retrieve a list of addresses referencing the provided pool item.
poolType | pool item type; currently supported for xrefs: STRING, TYPE, FIELD, METHOD |
---|---|
index | pool item index |
Get the list of underlying objects representing each classes.dex
that compose
this unit.
This convenience method provides the entire disassembly of the bytecode making up the DEX
file. This method is a convenience method: the disassembly text document object can always be
retrieved via getFormatter()
.
Convenience method to retrieve the text document representing the disassembly of this code unit.
Convenience method used to retrieve a field by name.
Convenience method to retrieve a field by its DEX field pool index.
Retrieve the total amount of instructions in this DEX unit. Note that if this unit represents the virtual DEX file resulting from the merge of several classesX.dex files, the number of instructions returned is the sum of instructions of each individual DEX file.
Convenience method used to retrieve a method by name.
Convenience method to retrieve a method by its DEX method pool index.
Convenience method to retrieve a prototype by its DEX prototype pool index.
index | prototype index |
---|
Get the list of DEX prototypes defined in the DEX file (prototype pool).
Convenience method to retrieve a string by its DEX string pool index.
Get the number of strings present in the aggregated string pools represented by this DEX unit.
Get the DEX string pool, including extra strings added via addString
.
Convenience method to retrieve a type by its DEX type pool index.
Move a class or a package to a destination package.
src | a class or a package item |
---|---|
dst | the destination package item |