kubo / plthook

Hook function calls by replacing PLT(Procedure Linkage Table) entries.
745 stars 152 forks source link

hook function from vtable #41

Closed fwflunky closed 2 years ago

fwflunky commented 2 years ago

hello, how to hook function from vtable with plthook on android armv7-a? i tried this if(plthook_replace(plthook, "_ZN25StartMenuScreenController4tickEv", (void*)my_startMenuTick, (void**)&startMenuTick) != 0) return 1;

static unsigned int (*startMenuTick)(void *thiz); static unsigned int my_startMenuTick(void *thiz) { __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "%s\n", "my_startMenuTick"); } but "my_startMenuTick" message is not shown via logcat, although messages from other functions are displayed and there were no errors while applying the hook