YAHFA icon indicating copy to clipboard operation
YAHFA copied to clipboard

is this hooking work for static field?

Open zillions opened this issue 7 years ago • 1 comments

Hello: been playing around a bit, I was reading the source c code, there are whole bunch of offsetting for all kinds of methods, just wonder, If I want to hook a static field, forward the field's address to a hook method(return val means to replace the static field's value), will the offset and the field looking be the same way? Is there any reference or demo around you can suggest? thank you very much. btw: your project helped a lot for understanding the android system.

zillions avatar Aug 06 '18 02:08 zillions

I'm not sure but the best way to modify static fields is using Java reflection instead of this tool. Reflection could be done with pure Java code or with JNI.

rk700 avatar Aug 08 '18 07:08 rk700