Hooks injected into ODEX-ed processes are never called on 9.0/Pie
As the title states, when injected into an ODEX-ed process on Android 9.0/Pie, the hooks are sometimes installed but never called.
Sometimes works on release APK's, but doesn't work on for example system_server.
Partially resolved by 377b0ee6aaa37b653b4d6449f26f25fbe552ad5e , by finding and replacing the function pointers in library's r/o and r/w sections as well.
There are still some test cases (not in code in this repo) where it doesn't work but should, possibly due to the ART framework copying the function pointers somewhere for calls made from (AOT-compiled) Java code. Not sure.
To add, this could be due to linker namespaces as well, the linker separating the symbol tables (or something along those lines) so resolving is off.
Like
#1