luoyesiqiu / dpt-shell

An android Dex protects shell implementation
MIT License
519 stars 190 forks source link

问题请教 #10

Closed lixian5968 closed 2 years ago

lixian5968 commented 2 years ago

hook LoadMethod 之后,dex_file的指针为什么要往后移动beginoffset位? begin 应该是dex_file.h 下面的第一个属性值吧?

这行代码

uint8_t begin_ptr = (uint8_t ) ((uint8_t *) dex_file + begin_offset);

luoyesiqiu commented 2 years ago

是的,加上偏移是为了定位到begin_字段

lixian5968 commented 2 years ago

打扰下,为什么有这个偏移 begin_offset ? 按照dex_file.h的结构,begin_offset 应该为0才对吧 ?

luoyesiqiu commented 2 years ago

它开头有虚表指针