日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

5 dex文件

發布時間:2025/3/15 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 5 dex文件 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Dex文件中數據結構

類型

含義

u1

等同于uint8_t,表示1字節無符號數

u2

等同于uint16_t,表示2字節的無符號數

u4

等同于uint32_t,表示4字節的無符號數

u8

等同于uint64_t,表示8字節的無符號數

sleb128

有符號LEB128,可變長度1~5字節

uleb128

無符號LEB128,可變長度1~5字節

uleb128p1

無符號LEB128值加1,可變長度1~5字節

?

sleb128,uleb128,uleb128p1是DEX文件中特有的數據類型

每個LEB128由1~5個字節組成,所有字節組合在一起表示一個32位的數據,

每個字節只有7位為有效位,如果第一個字節的最高位為1,則LEB128使用第二個字節,以此類推。如果讀取5個字節后下一個字節的最高位仍為1則該dex文件無效,Dalvik虛擬機在驗證dex時會返回失敗

?

Dex文件整體結構

Dex由多個結構體組合而成,一個dex有7部份。

DexHeader結構體占用0x70個字節

DexFile源碼文件 dalvik\libdex\DexFile.h

3 /* 4 * Structure representing a DEX file. 5 * 6 * Code should regard DexFile as opaque, using the API calls provided here 7 * to access specific structures. 8 */ 9 struct DexFile { 10 /* directly-mapped "opt" header */ 11 const DexOptHeader* pOptHeader; 12 13 /* pointers to directly-mapped structs and arrays in base DEX */ 14 const DexHeader* pHeader; 15 const DexStringId* pStringIds; 16 const DexTypeId* pTypeIds; 17 const DexFieldId* pFieldIds; 18 const DexMethodId* pMethodIds; 19 const DexProtoId* pProtoIds; 20 const DexClassDef* pClassDefs; 21 const DexLink* pLinkData; 22 23 /* 24 * These are mapped out of the "auxillary" section, and may not be 25 * included in the file. 26 */ 27 const DexClassLookup* pClassLookup; 28 const void* pRegisterMapPool; // RegisterMapClassPool 29 30 /* points to start of DEX file data */ 31 const u1* baseAddr; 32 33 /* track memory overhead for auxillary structures */ 34 int overhead; 35 36 /* additional app-specific data structures associated with the DEX */ 37 //void* auxData; 38 };

轉載于:https://www.cnblogs.com/heixiang/p/10965084.html

總結

以上是生活随笔為你收集整理的5 dex文件的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。