您的位置:首页 > 理论基础 > 数据结构算法

Dex文件结构及对应的数据结构

2016-02-17 17:14 609 查看






string_ids_off字段:

typedef struct DexStringId {
u4 stringDataOff;
} DexStringId;
type_ids_off字段:

struct DexTypeId {
u4 descriptorIdx; /* index into stringIds list for type descriptor */
};

proto_ids_off字段:

struct DexProtoId{
u4 shortyIdx; /* index into stringIds forshorty
descriptor */
u4 returnTypeIdx; /* index into typeIds list for return type */
u4 parametersOff; /* file offset to type_list for parameter types */
};

field_ids_off字段:

struct DexFieldId{
u2 classIdx; /* index into typeIds list for defining class */
u2 typeIdx; /* index into typeIds for field type */
u4 nameIdx; /* index into stringIds for field name */
};

method_ids_off字段:

struct DexMethodId{
u2 classIdx; /* index into typeIds list for defining class */
u2 protoIdx; /* index into protoIds for method prototype */
u4 nameIdx; /* index into stringIds for method name */
};

class_defs_off字段:

struct DexClassDef{
u4 classIdx; /* index into typeIds for this class */
u4 accessFlags;
u4 superclassIdx; /* index into typeIds for superclass */
u4 interfacesOff; /* file offset to DexTypeList */
u4 sourceFileIdx; /* index into stringIds for source file name */
u4 annotationsOff; /* file offset to annotations_directory_item */
u4 classDataOff; /* file offset to class_data_item */
u4 staticValuesOff; /* file offset to DexEncodedArray */
};
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: