Check if the given file is a DEX.
Check if the given raw data is a DEX.
Return the DEX version of the given file.
Return the DEX version of the raw data.
Class that represents a DEX file.
Public Types
Public Functions
Version of the current DEX file.
Name of this file.
Location of this file.
All classes used in the DEX file
Check if the given class name exists.
Return the DEX::Class object associated with the given name.
Return the DEX::Class object associated with the given index.
De-optimize information.
De-optimize information as JSON.
Return an iterator over all the DEX::Method used in this DEX file.
Return an iterator over all the DEX::Field used in this DEX file.
String pool.
Type pool.
Prototype pool.
Extract the current dex file and deoptimize it.
Class which represents the DEX header. This is the first structure that begins the DEX format.
The official documentation is provided here: https://source.android.com/devices/tech/dalvik/dex-format#header-item
Public Types
Public Functions
The file checksum.
SHA-1 DEX signature (which is not really used as a signature)
Size of the entire file (including the current the header)
Size of this header. It should be 0x70.
Offset from the start of the file to the map list (see: DEX::MapList)
Offset and size of the string pool.
Class which represents a DEX::Method.
Public Types
Public Functions
True if a class is associated with this method.
DEX::Class associated with this Method or a nullptr if not resolved.
Offset to the Dalvik Bytecode.
Dalvik Bytecode as bytes.
Index in the DEX Methods pool.
True if this method is a virtual one. i.e. not static, private, finale or constructor.
Check if the current method has the given ACCESS_FLAGS.
ACCESS_FLAGS as an std::set.
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Public Types
Public Functions
Mangled class name (e.g. Lcom/example/android/MyActivity;
)
Package Name.
Demangled class name.
Check if the class has the given access flag.
Access flags used by this class.
Filename associated with this class (if any)
True if the current class extends another one.
Methods implemented in this class.
Return Methods having the given name.
Fields implemented in this class.
Return Fields having the given name.
De-optimize information.
Original index in the DEX class pool.
Class which represent a DEX Field.
Public Types
Public Functions
True if a class is associated with this field (which should be the case)
Index in the DEX Fields pool.
True if this field is a static one.
Check if the field has the given ACCESS_FLAGS.
ACCESS_FLAGS as a list.
Class which represents a DEX method prototype.
Public Types
Public Functions
Types of the parameters.
Class which represents a DEX type as described in the format specifications: https://source.android.com/devices/tech/dalvik/dex-format#typedescriptor.
Public Types
Values:
Public Functions
IF the current type is a TYPES::CLASS, return the associated DEX::CLASS. Otherwise the returned value is undefined.
IF the current type is a TYPES::ARRAY, return the associated array. Otherwise the returned value is undefined.
IF the current type is a TYPES::PRIMITIVE, return the associated PRIMITIVES. Otherwise the returned value is undefined.
Return the array dimension if the current type is an array. Otherwise it returns 0.
In the case of a TYPES::ARRAY, return the array’s type.
Public Static Functions
Class which represents the map_list
structure that follows the main DEX header.
This MapList aims at referencing the location of other DEX structures as described in https://source.android.com/devices/tech/dalvik/dex-format#map-item
Public Types
Public Functions
Iterator over LIEF::DEX::MapItem.
Return the LIEF::DEX::MapItem associated with the given type.
Return the LIEF::DEX::MapItem associated with the given type.
Return the LIEF::DEX::MapItem associated with the given type.
Return the LIEF::DEX::MapItem associated with the given type.
Class which represents an element of the MapList object.
Public Types
Values:
Public Functions
Reserved value (likely for alignment prupose)
The number of elements (the real meaning depends on the type)
Offset from the start of the DEX file to the items associated with the underlying TYPES.