This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Hook not working

fdsfsdf

Rookie
Can someone tell what is wrong with my hook it is not working. I did the same thing with frida and it worked so the offset is correct.

In the hack_thread:

Code:
    HOOK("libil2cpp.so",
         str2Offset("0x9D29D4"),
         LoginButton,
         old_LoginButton);


Functions
Code:
void (*old_LoginButton)(void *instance);
void LoginButton(void *instance) {
    enterBreach = true;
    LOGI("Login button Clicked!");
}

Login button Clicked! is never printed so I assume the LoginButton() is never run
 
Could be that you're either not loading your hooks in onLoad(or a constructor attribute function) or that the hook is simply failing because some devices(and instances) will not work with substrate and A64InlineHook. If it's the latter then simply switch to either dobby hook or shadowhook and try getting the pointers with kitty memory. If you want an easier solution then use ByNameModding with either Shadow or Dobby and it will work just as well.


And keep in mind that Dobby will fail on some emulators so use shadowhook if possible.