LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
LIEF::DEX Namespace Reference

Namespaces

namespace  details
 

Classes

class  Class
 Class which represents a DEX Class (i.e. a Java/Kotlin class) More...
 
class  CodeInfo
 
class  Field
 Class which represent a DEX Field. More...
 
class  File
 Class that represents a DEX file. More...
 
struct  fill_array_data
 
class  Hash
 Class which implements a visitor to compute a deterministic hash for LIEF DEX objects. More...
 
class  Header
 Class which represents the DEX header. This is the first structure that begins the DEX format. More...
 
class  MapItem
 Class which represents an element of the MapList object. More...
 
class  MapList
 Class which represents the map_list structure that follows the main DEX header. More...
 
class  Method
 Class which represents a DEX::Method. More...
 
struct  packed_switch
 
class  Parser
 Class which parses a DEX file to produce a DEX::File object. More...
 
class  Prototype
 Class which represents a DEX method prototype. More...
 
struct  sparse_switch
 
class  Type
 Class which represents a DEX type as described in the format specifications: https://source.android.com/devices/tech/dalvik/dex-format#typedescriptor. More...
 

Typedefs

using dex2dex_method_info_t = std::unordered_map<uint32_t, uint32_t>
 
using dex2dex_class_info_t = std::unordered_map<Method*, dex2dex_method_info_t>
 
using dex2dex_info_t = std::unordered_map<Class*, dex2dex_class_info_t>
 
using dex_version_t = uint32_t
 

Enumerations

enum  ACCESS_FLAGS {
  ACC_UNKNOWN = 0x0 , ACC_PUBLIC = 0x1 , ACC_PRIVATE = 0x2 , ACC_PROTECTED = 0x4 ,
  ACC_STATIC = 0x8 , ACC_FINAL = 0x10 , ACC_SYNCHRONIZED = 0x20 , ACC_VOLATILE = 0x40 ,
  ACC_BRIDGE = 0x40 , ACC_TRANSIENT = 0x80 , ACC_VARARGS = 0x80 , ACC_NATIVE = 0x100 ,
  ACC_INTERFACE = 0x200 , ACC_ABSTRACT = 0x400 , ACC_STRICT = 0x800 , ACC_SYNTHETIC = 0x1000 ,
  ACC_ANNOTATION = 0x2000 , ACC_ENUM = 0x4000 , ACC_CONSTRUCTOR = 0x10000 , ACC_DECLARED_SYNCHRONIZED = 0x20000
}
 
enum  METHOD_TYPES {
  METHOD_UNKNOWN = 0x00 , METHOD_VIRTUAL = 0x01 , METHOD_DIRECT = 0x02 , METHOD_EXTERN = 0x03 ,
  METHOD_CTOR = 0x04 , METHOD_STATIC = 0x05 , METHOD_STATIC_CTOR = 0x06
}
 
enum  SWITCH_ARRAY_IDENT : uint16_t { IDENT_PACKED_SWITCH = 0x0100 , IDENT_SPARSE_SWITCH = 0x0200 , IDENT_FILL_ARRAY = 0x0300 }
 
enum  OPCODES : uint8_t {
  OP_NOP = 0x00 , OP_MOVE = 0x01 , OP_MOVE_FROM_16 = 0x02 , OP_MOVE_16 = 0x03 ,
  OP_MOVE_WIDE = 0x04 , OP_MOVE_WIDE_FROM_16 = 0x05 , OP_MOVE_WIDE_16 = 0x06 , OP_MOVE_OBJECT = 0x07 ,
  OP_MOVE_OBJECT_FROM_16 = 0x08 , OP_MOVE_OBJECT_16 = 0x09 , OP_MOVE_RESULT = 0x0a , OP_MOVE_RESULT_WIDE = 0x0b ,
  OP_MOVE_RESULT_OBJECT = 0x0c , OP_MOVE_EXCEPTION = 0x0d , OP_RETURN_VOID = 0x0e , OP_RETURN = 0x0f ,
  OP_RETURN_WIDE = 0x10 , OP_RETURN_OBJECT = 0x11 , OP_CONST_4 = 0x12 , OP_CONST_16 = 0x13 ,
  OP_CONST = 0x14 , OP_CONST_HIGH_16 = 0x15 , OP_CONST_WIDE_16 = 0x16 , OP_CONST_WIDE_32 = 0x17 ,
  OP_CONST_WIDE = 0x18 , OP_CONST_WIDE_HIGH_16 = 0x19 , OP_CONST_STRING = 0x1a , OP_CONST_STRING_JUMBO = 0x1b ,
  OP_CONST_CLASS = 0x1c , OP_MONITOR_ENTER = 0x1d , OP_MONITOR_EXIT = 0x1e , OP_CHECK_CAST = 0x1f ,
  OP_INSTANCE_OF = 0x20 , OP_ARRAY_LENGTH = 0x21 , OP_NEW_INSTANCE = 0x22 , OP_NEW_ARRAY = 0x23 ,
  OP_FILLED_NEW_ARRAY = 0x24 , OP_FILLED_NEW_ARRAY_RANGE = 0x25 , OP_FILL_ARRAY_DATA = 0x26 , OP_THROW = 0x27 ,
  OP_GOTO = 0x28 , OP_GOTO_16 = 0x29 , OP_GOTO_32 = 0x2a , OP_PACKED_SWITCH = 0x2b ,
  OP_SPARSE_SWITCH = 0x2c , OP_CMPL_FLOAT = 0x2d , OP_CMPG_FLOAT = 0x2e , OP_CMPL_DOUBLE = 0x2f ,
  OP_CMPG_DOUBLE = 0x30 , OP_CMP_LONG = 0x31 , OP_IF_EQ = 0x32 , OP_IF_NE = 0x33 ,
  OP_IF_LT = 0x34 , OP_IF_GE = 0x35 , OP_IF_GT = 0x36 , OP_IF_LE = 0x37 ,
  OP_IF_EQZ = 0x38 , OP_IF_NEZ = 0x39 , OP_IF_LTZ = 0x3a , OP_IF_GEZ = 0x3b ,
  OP_IF_GTZ = 0x3c , OP_IF_LEZ = 0x3d , OP_AGET = 0x44 , OP_AGET_WIDE = 0x45 ,
  OP_AGET_OBJECT = 0x46 , OP_AGET_BOOLEAN = 0x47 , OP_AGET_BYTE = 0x48 , OP_AGET_CHAR = 0x49 ,
  OP_AGET_SHORT = 0x4a , OP_APUT = 0x4b , OP_APUT_WIDE = 0x4c , OP_APUT_OBJECT = 0x4d ,
  OP_APUT_BOOLEAN = 0x4e , OP_APUT_BYTE = 0x4f , OP_APUT_CHAR = 0x50 , OP_APUT_SHORT = 0x51 ,
  OP_IGET = 0x52 , OP_IGET_WIDE = 0x53 , OP_IGET_OBJECT = 0x54 , OP_IGET_BOOLEAN = 0x55 ,
  OP_IGET_BYTE = 0x56 , OP_IGET_CHAR = 0x57 , OP_IGET_SHORT = 0x58 , OP_IPUT = 0x59 ,
  OP_IPUT_WIDE = 0x5a , OP_IPUT_OBJECT = 0x5b , OP_IPUT_BOOLEAN = 0x5c , OP_IPUT_BYTE = 0x5d ,
  OP_IPUT_CHAR = 0x5e , OP_IPUT_SHORT = 0x5f , OP_SGET = 0x60 , OP_SGET_WIDE = 0x61 ,
  OP_SGET_OBJECT = 0x62 , OP_SGET_BOOLEAN = 0x63 , OP_SGET_BYTE = 0x64 , OP_SGET_CHAR = 0x65 ,
  OP_SGET_SHORT = 0x66 , OP_SPUT = 0x67 , OP_SPUT_WIDE = 0x68 , OP_SPUT_OBJECT = 0x69 ,
  OP_SPUT_BOOLEAN = 0x6a , OP_SPUT_BYTE = 0x6b , OP_SPUT_CHAR = 0x6c , OP_SPUT_SHORT = 0x6d ,
  OP_INVOKE_VIRTUAL = 0x6e , OP_INVOKE_SUPER = 0x6f , OP_INVOKE_DIRECT = 0x70 , OP_INVOKE_STATIC = 0x71 ,
  OP_INVOKE_INTERFACE = 0x72 , OP_RETURN_VOID_NO_BARRIER = 0x73 , OP_INVOKE_VIRTUAL_RANGE = 0x74 , OP_INVOKE_SUPER_RANGE = 0x75 ,
  OP_INVOKE_DIRECT_RANGE = 0x76 , OP_INVOKE_STATIC_RANGE = 0x77 , OP_INVOKE_INTERFACE_RANGE = 0x78 , OP_NEG_INT = 0x7b ,
  OP_NOT_INT = 0x7c , OP_NEG_LONG = 0x7d , OP_NOT_LONG = 0x7e , OP_NEG_FLOAT = 0x7f ,
  OP_NEG_DOUBLE = 0x80 , OP_INT_TO_LONG = 0x81 , OP_INT_TO_FLOAT = 0x82 , OP_INT_TO_DOUBLE = 0x83 ,
  OP_LONG_TO_INT = 0x84 , OP_LONG_TO_FLOAT = 0x85 , OP_LONG_TO_DOUBLE = 0x86 , OP_FLOAT_TO_INT = 0x87 ,
  OP_FLOAT_TO_LONG = 0x88 , OP_FLOAT_TO_DOUBLE = 0x89 , OP_DOUBLE_TO_INT = 0x8a , OP_DOUBLE_TO_LONG = 0x8b ,
  OP_DOUBLE_TO_FLOAT = 0x8c , OP_INT_TO_BYTE = 0x8d , OP_INT_TO_CHAR = 0x8e , OP_INT_TO_SHORT = 0x8f ,
  OP_ADD_INT = 0x90 , OP_SUB_INT = 0x91 , OP_MUL_INT = 0x92 , OP_DIV_INT = 0x93 ,
  OP_REM_INT = 0x94 , OP_AND_INT = 0x95 , OP_OR_INT = 0x96 , OP_XOR_INT = 0x97 ,
  OP_SHL_INT = 0x98 , OP_SHR_INT = 0x99 , OP_USHR_INT = 0x9a , OP_ADD_LONG = 0x9b ,
  OP_SUB_LONG = 0x9c , OP_MUL_LONG = 0x9d , OP_DIV_LONG = 0x9e , OP_REM_LONG = 0x9f ,
  OP_AND_LONG = 0xa0 , OP_OR_LONG = 0xa1 , OP_XOR_LONG = 0xa2 , OP_SHL_LONG = 0xa3 ,
  OP_SHR_LONG = 0xa4 , OP_USHR_LONG = 0xa5 , OP_ADD_FLOAT = 0xa6 , OP_SUB_FLOAT = 0xa7 ,
  OP_MUL_FLOAT = 0xa8 , OP_DIV_FLOAT = 0xa9 , OP_REM_FLOAT = 0xaa , OP_ADD_DOUBLE = 0xab ,
  OP_SUB_DOUBLE = 0xac , OP_MUL_DOUBLE = 0xad , OP_DIV_DOUBLE = 0xae , OP_REM_DOUBLE = 0xaf ,
  OP_ADD_INT_2_ADDR = 0xb0 , OP_SUB_INT_2_ADDR = 0xb1 , OP_MUL_INT_2_ADDR = 0xb2 , OP_DIV_INT_2_ADDR = 0xb3 ,
  OP_REM_INT_2_ADDR = 0xb4 , OP_AND_INT_2_ADDR = 0xb5 , OP_OR_INT_2_ADDR = 0xb6 , OP_XOR_INT_2_ADDR = 0xb7 ,
  OP_SHL_INT_2_ADDR = 0xb8 , OP_SHR_INT_2_ADDR = 0xb9 , OP_USHR_INT_2_ADDR = 0xba , OP_ADD_LONG_2_ADDR = 0xbb ,
  OP_SUB_LONG_2_ADDR = 0xbc , OP_MUL_LONG_2_ADDR = 0xbd , OP_DIV_LONG_2_ADDR = 0xbe , OP_REM_LONG_2_ADDR = 0xbf ,
  OP_AND_LONG_2_ADDR = 0xc0 , OP_OR_LONG_2_ADDR = 0xc1 , OP_XOR_LONG_2_ADDR = 0xc2 , OP_SHL_LONG_2_ADDR = 0xc3 ,
  OP_SHR_LONG_2_ADDR = 0xc4 , OP_USHR_LONG_2_ADDR = 0xc5 , OP_ADD_FLOAT_2_ADDR = 0xc6 , OP_SUB_FLOAT_2_ADDR = 0xc7 ,
  OP_MUL_FLOAT_2_ADDR = 0xc8 , OP_DIV_FLOAT_2_ADDR = 0xc9 , OP_REM_FLOAT_2_ADDR = 0xca , OP_ADD_DOUBLE_2_ADDR = 0xcb ,
  OP_SUB_DOUBLE_2_ADDR = 0xcc , OP_MUL_DOUBLE_2_ADDR = 0xcd , OP_DIV_DOUBLE_2_ADDR = 0xce , OP_REM_DOUBLE_2_ADDR = 0xcf ,
  OP_ADD_INT_LIT_16 = 0xd0 , OP_RSUB_INT = 0xd1 , OP_MUL_INT_LIT_16 = 0xd2 , OP_DIV_INT_LIT_16 = 0xd3 ,
  OP_REM_INT_LIT_16 = 0xd4 , OP_AND_INT_LIT_16 = 0xd5 , OP_OR_INT_LIT_16 = 0xd6 , OP_XOR_INT_LIT_16 = 0xd7 ,
  OP_ADD_INT_LIT_8 = 0xd8 , OP_RSUB_INT_LIT_8 = 0xd9 , OP_MUL_INT_LIT_8 = 0xda , OP_DIV_INT_LIT_8 = 0xdb ,
  OP_REM_INT_LIT_8 = 0xdc , OP_AND_INT_LIT_8 = 0xdd , OP_OR_INT_LIT_8 = 0xde , OP_XOR_INT_LIT_8 = 0xdf ,
  OP_SHL_INT_LIT_8 = 0xe0 , OP_SHR_INT_LIT_8 = 0xe1 , OP_USHR_INT_LIT_8 = 0xe2 , OP_IGET_QUICK = 0xe3 ,
  OP_IGET_WIDE_QUICK = 0xe4 , OP_IGET_OBJECT_QUICK = 0xe5 , OP_IPUT_QUICK = 0xe6 , OP_IPUT_WIDE_QUICK = 0xe7 ,
  OP_IPUT_OBJECT_QUICK = 0xe8 , OP_INVOKE_VIRTUAL_QUICK = 0xe9 , OP_INVOKE_VIRTUAL_RANGE_QUICK = 0xea , OP_IPUT_BOOLEAN_QUICK = 0xeb ,
  OP_IPUT_BYTE_QUICK = 0xec , OP_IPUT_CHAR_QUICK = 0xed , OP_IPUT_SHORT_QUICK = 0xee , OP_IGET_BOOLEAN_QUICK = 0xef ,
  OP_IGET_BYTE_QUICK = 0xf0 , OP_IGET_CHAR_QUICK = 0xf1 , OP_IGET_SHORT_QUICK = 0xf2 , OP_INVOKE_POLYMORPHIC = 0xfa ,
  OP_INVOKE_POLYMORPHIC_RANGE = 0xfb , OP_INVOKE_CUSTOM = 0xfc , OP_INVOKE_CUSTOM_RANGE = 0xfd , OP_CONST_METHOD_HANDLE = 0xfe ,
  OP_CONST_METHOD_TYPE = 0xff
}
 The Dalvik Opcodes. More...
 
enum  INST_FORMATS : uint8_t {
  F_00x = 0 , F_10x , F_12x , F_11n ,
  F_11x , F_10t , F_20t , F_20bc ,
  F_22x , F_21t , F_21s , F_21h ,
  F_21c , F_23x , F_22b , F_22t ,
  F_22s , F_22c , F_22cs , F_30t ,
  F_32x , F_31i , F_31t , F_31c ,
  F_35c , F_35ms , F_35mi , F_3rc ,
  F_3rms , F_3rmi , F_51l , F_45cc ,
  F_4rcc
}
 

Functions

const char * to_string (MapItem::TYPES e)
 
const char * to_string (ACCESS_FLAGS e)
 
const char * to_string (Type::TYPES e)
 
const char * to_string (Type::PRIMITIVES e)
 
INST_FORMATS inst_format_from_opcode (OPCODES op)
 Return the INST_FORMATS format associated with the given opcode.
 
size_t inst_size_from_format (INST_FORMATS fmt)
 
size_t inst_size_from_opcode (OPCODES op)
 
bool is_switch_array (const uint8_t *ptr, const uint8_t *end)
 
size_t switch_array_size (const uint8_t *ptr, const uint8_t *end)
 
std::string to_json (const Object &v)
 
bool is_dex (const std::string &file)
 Check if the given file is a DEX.
 
bool is_dex (const std::vector< uint8_t > &raw)
 Check if the given raw data is a DEX.
 
dex_version_t version (const std::string &file)
 Return the DEX version of the given file.
 
dex_version_t version (const std::vector< uint8_t > &raw)
 Return the DEX version of the raw data.
 
dex_version_t version (BinaryStream &stream)
 

Typedef Documentation

◆ dex2dex_class_info_t

◆ dex2dex_info_t

using LIEF::DEX::dex2dex_info_t = std::unordered_map<Class*, dex2dex_class_info_t>

◆ dex2dex_method_info_t

using LIEF::DEX::dex2dex_method_info_t = std::unordered_map<uint32_t, uint32_t>

◆ dex_version_t

using LIEF::DEX::dex_version_t = uint32_t

Enumeration Type Documentation

◆ ACCESS_FLAGS

Enumerator
ACC_UNKNOWN 
ACC_PUBLIC 
ACC_PRIVATE 
ACC_PROTECTED 
ACC_STATIC 
ACC_FINAL 
ACC_SYNCHRONIZED 
ACC_VOLATILE 
ACC_BRIDGE 
ACC_TRANSIENT 
ACC_VARARGS 
ACC_NATIVE 
ACC_INTERFACE 
ACC_ABSTRACT 
ACC_STRICT 
ACC_SYNTHETIC 
ACC_ANNOTATION 
ACC_ENUM 
ACC_CONSTRUCTOR 
ACC_DECLARED_SYNCHRONIZED 

◆ INST_FORMATS

enum LIEF::DEX::INST_FORMATS : uint8_t
Enumerator
F_00x 
F_10x 
F_12x 
F_11n 
F_11x 
F_10t 
F_20t 
F_20bc 
F_22x 
F_21t 
F_21s 
F_21h 
F_21c 
F_23x 
F_22b 
F_22t 
F_22s 
F_22c 
F_22cs 
F_30t 
F_32x 
F_31i 
F_31t 
F_31c 
F_35c 
F_35ms 
F_35mi 
F_3rc 
F_3rms 
F_3rmi 
F_51l 
F_45cc 
F_4rcc 

◆ METHOD_TYPES

Enumerator
METHOD_UNKNOWN 
METHOD_VIRTUAL 
METHOD_DIRECT 
METHOD_EXTERN 
METHOD_CTOR 
METHOD_STATIC 
METHOD_STATIC_CTOR 

◆ OPCODES

enum LIEF::DEX::OPCODES : uint8_t

The Dalvik Opcodes.

Enumerator
OP_NOP 
OP_MOVE 
OP_MOVE_FROM_16 
OP_MOVE_16 
OP_MOVE_WIDE 
OP_MOVE_WIDE_FROM_16 
OP_MOVE_WIDE_16 
OP_MOVE_OBJECT 
OP_MOVE_OBJECT_FROM_16 
OP_MOVE_OBJECT_16 
OP_MOVE_RESULT 
OP_MOVE_RESULT_WIDE 
OP_MOVE_RESULT_OBJECT 
OP_M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_IGET_WIDE_QUICK 
OP_IGET_OBJECT_QUICK 
OP_IPUT_QUICK 
OP_IPUT_WIDE_QUICK 
OP_IPUT_OBJECT_QUICK 
OP_INVOKE_VIRTUAL_QUICK 
OP_INVOKE_VIRTUAL_RANGE_QUICK 
OP_IPUT_BOOLEAN_QUICK 
OP_IPUT_BYTE_QUICK 
OP_IPUT_CHAR_QUICK 
OP_IPUT_SHORT_QUICK 
OP_IGET_BOOLEAN_QUICK 
OP_IGET_BYTE_QUICK 
OP_IGET_CHAR_QUICK 
OP_IGET_SHORT_QUICK 
OP_INVOKE_POLYMORPHIC 
OP_INVOKE_POLYMORPHIC_RANGE 
OP_INVOKE_CUSTOM 
OP_INVOKE_CUSTOM_RANGE 
OP_CONST_METHOD_HANDLE 
OP_CONST_METHOD_TYPE 

◆ SWITCH_ARRAY_IDENT

Enumerator
IDENT_PACKED_SWITCH 
IDENT_SPARSE_SWITCH 
IDENT_FILL_ARRAY 

Function Documentation

◆ inst_format_from_opcode()

INST_FORMATS LIEF::DEX::inst_format_from_opcode ( OPCODES op)

Return the INST_FORMATS format associated with the given opcode.

◆ inst_size_from_format()

size_t LIEF::DEX::inst_size_from_format ( INST_FORMATS fmt)

◆ inst_size_from_opcode()

size_t LIEF::DEX::inst_size_from_opcode ( OPCODES op)

◆ is_dex() [1/2]

bool LIEF::DEX::is_dex ( const std::string & file)

Check if the given file is a DEX.

◆ is_dex() [2/2]

bool LIEF::DEX::is_dex ( const std::vector< uint8_t > & raw)

Check if the given raw data is a DEX.

◆ is_switch_array()

bool LIEF::DEX::is_switch_array ( const uint8_t * ptr,
const uint8_t * end )

◆ switch_array_size()

size_t LIEF::DEX::switch_array_size ( const uint8_t * ptr,
const uint8_t * end )

◆ to_json()

std::string LIEF::DEX::to_json ( const Object & v)

◆ to_string() [1/4]

const char * LIEF::DEX::to_string ( ACCESS_FLAGS e)

◆ to_string() [2/4]

const char * LIEF::DEX::to_string ( MapItem::TYPES e)

◆ to_string() [3/4]

const char * LIEF::DEX::to_string ( Type::PRIMITIVES e)

◆ to_string() [4/4]

const char * LIEF::DEX::to_string ( Type::TYPES e)

◆ version() [1/3]

dex_version_t LIEF::DEX::version ( BinaryStream & stream)

◆ version() [2/3]

dex_version_t LIEF::DEX::version ( const std::string & file)

Return the DEX version of the given file.

◆ version() [3/3]

dex_version_t LIEF::DEX::version ( const std::vector< uint8_t > & raw)

Return the DEX version of the raw data.