iqiyi / xHook

🔥 A PLT hook library for Android native ELF.
Other
4.07k stars 759 forks source link

请问能支持动态Hook多个so吗? #68

Closed wzp301 closed 4 years ago

wzp301 commented 4 years ago

@caikelun 大佬你好! 我最近有一个需求需要hook多个so的不同方法,这些so的加载时间是不确定的。 如果我调用了xhook_register和xhook_refresh方法Hook了第1个加载so之后,就不能Hook第2个加载的so了。 请问xhook能否支持这种应用场景?

wzp301 commented 4 years ago

问题已解决。 在hook第2个so之前调用xhook_clear方法清除之前hook缓存,然后再register一遍就可以啦。