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

 



 



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 */

};

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值