Skip to content
forked from RusJJ/ARMPatch

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

Notifications You must be signed in to change notification settings

LGLTeam/ARMPatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An example of usage

...
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;
}
...

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

No packages published

Languages

  • C++ 84.0%
  • Makefile 10.7%
  • PowerShell 5.3%