...
void (*orig)();
void hooked()
{
__android_log_print(ANDROID_LOG_INFO, "HOOKED!", "HOOKED()");
orig(); // Call original function (thanks Cydia!)
}
// DECLFN(fn name, return type, args)
// CApplication* self because that function is a non-static class method
DECLFN(ApplicationStart, void, CApplication* self)
{
__android_log_print(ANDROID_LOG_INFO, "HOOKED!", "Application::Start");
CALLFN(ApplicationStart, self); // Call original function (only if exists!!!). Dont try to self->Start()
}
jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
uintptr_t lib = ARMPatch::getLib("libMYGAME.so");
//ARMPatch::hook(dlsym((void*)lib, "FunctionSym"), &hooked, &orig);
ARMPatch::hook(lib + 0xABC123, &hooked, &orig);
ARMPatch::hook(&CApplication::Start, USEFN(ApplicationStart)); // You can link a SO library using for example: LDLIBS += -lMYAPP
return JNI_VERSION_1_6;
}
...
forked from RusJJ/ARMPatch
-
Notifications
You must be signed in to change notification settings - Fork 1
Just a hook for ARM applications based on @4x11's ARMhook (i think he made it?), on Cydia's Substrate and on Rprop's And64InlineHook
License
LGLTeam/ARMPatch
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Just a hook for ARM applications based on @4x11's ARMhook (i think he made it?), on Cydia's Substrate and on Rprop's And64InlineHook
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- C++ 84.0%
- Makefile 10.7%
- PowerShell 5.3%