Closed wolfnightblack closed 1 year ago
Are you referring to native method hooking?
Are you referring to native method hooking?
Yes ! i want use Alicord to return system_prop form native
This library is for hooking Java code, not native functions. For that you'd need something like Dobby
Hi! This library actually performs native hooking using the aforementioned dobby library, but the api is not exposed because it's not really its purpose
However, you could just copy that code into your own project:
and then usage is pretty straight forward:
void* backup = nullptr;
int replace_func(const char *name, char *value) {
printf("get prop called with name %s", name);
auto original = reinterpret_cast<int (*)(const char *, char *)>(backup);
return original(name, value);
}
void perform_hook() {
backup = InlineHooker(reinterpret_cast<void *>(__system_property_get), reinterpret_cast<void *>(replace_func));
if (!backup) {} // hook failed
}
Hope this helps!
Hello ! thank for your lib. Can you guide how to hook function: __system_property_get