본문

170328(화) - DEX (Dalvik Executable format)

DEX (Dalvik Executable format)


DEX

- Dalvik Executable format


- type

NameDescription
byte8-bit signed int
ubyte8-bit unsigned int
short16-bit signed int, little-endian
ushort16-bit unsigned int, little-endian
int32-bit signed int, little-endian
uint32-bit unsigned int, little-endian
long64-bit signed int, little-endian
ulong64-bit unsigned int, little-endian
sleb128signed LEB128, variable-length (see below)
uleb128unsigned LEB128, variable-length (see below)
uleb128p1unsigned LEB128 plus 1, variable-length (see below)

ㆍleb 128

- Little-Endian Base 128



- file layout

NameFormatDescription
headerheader_itemthe header
string_idsstring_id_item[]string identifiers list. These are identifiers for all the strings used by this file, either for internal naming (e.g., type descriptors) or as constant objects referred to by code. This list must be sorted by string contents, using UTF-16 code point values (not in a locale-sensitive manner), and it must not contain any duplicate entries.
type_idstype_id_item[]type identifiers list. These are identifiers for all types (classes, arrays, or primitive types) referred to by this file, whether defined in the file or not. This list must be sorted by string_idindex, and it must not contain any duplicate entries.
proto_idsproto_id_item[]method prototype identifiers list. These are identifiers for all prototypes referred to by this file. This list must be sorted in return-type (by type_id index) major order, and then by argument list (lexicographic ordering, individual arguments ordered by type_id index). The list must not contain any duplicate entries.
field_idsfield_id_item[]field identifiers list. These are identifiers for all fields referred to by this file, whether defined in the file or not. This list must be sorted, where the defining type (by type_id index) is the major order, field name (by string_id index) is the intermediate order, and type (by type_id index) is the minor order. The list must not contain any duplicate entries.
method_idsmethod_id_item[]method identifiers list. These are identifiers for all methods referred to by this file, whether defined in the file or not. This list must be sorted, where the defining type (by type_id index) is the major order, method name (by string_id index) is the intermediate order, and method prototype (by proto_id index) is the minor order. The list must not contain any duplicate entries.
class_defsclass_def_item[]class definitions list. The classes must be ordered such that a given class's superclass and implemented interfaces appear in the list earlier than the referring class. Furthermore, it is invalid for a definition for the same-named class to appear more than once in the list.
call_site_idscall_site_id_item[]call site identifiers list. These are identifiers for all call sites referred to by this file, whether defined in the file or not. This list must be sorted in ascending order of call_site_off. This list must not contain any duplicate entries.
method_handlesmethod_handle_item[]method handles list. A list of all method handles referred to by this file, whether defined in the file or not. This list is not sorted and may contain duplicates which will logically correspond to different method handle instances.
dataubyte[]data area, containing all the support data for the tables listed above. Different items have different alignment requirements, and padding bytes are inserted before each item if necessary to achieve proper alignment.
link_dataubyte[]data used in statically linked files. The format of the data in this section is left unspecified by this document. This section is empty in unlinked files, and runtime implementations may use it as they see fit.


'Mobile > Android API' 카테고리의 다른 글

170411(화) - System permission  (0) 2017.04.11
170411(화) - Device Compatibility  (0) 2017.04.11
170328(화) - App 기본 항목  (0) 2017.03.28
170328(화) - ART & Dalvik  (0) 2017.03.28
170321(화) - Android 구조  (0) 2017.03.21

공유

댓글