MinimalXenon
Platinian
Hello! I come looking for help on how to fix touch issues in Android 15 devices (Game: Toram Online).
Currently I am facing issues with two different touch logic:
A. Touch Logic from Zygisk-ImGui-Menu — Instantly crashes my game upon opening (or) the ImGui menu doesn't load.
B. Touch Logic from XposedImGuiMenu — Upon interacting with the mod menu in any ways (Touch/Holding/Dragging), the mod menu crashes.
Notes:
- Take note that while I use the touch logic from both repositories, I am using a different injection method.
- So far Method B works for my phone (Android 12).
These are the specific codes:
Method A:
Method B:
Currently I am facing issues with two different touch logic:
A. Touch Logic from Zygisk-ImGui-Menu — Instantly crashes my game upon opening (or) the ImGui menu doesn't load.
B. Touch Logic from XposedImGuiMenu — Upon interacting with the mod menu in any ways (Touch/Holding/Dragging), the mod menu crashes.
Notes:
- Take note that while I use the touch logic from both repositories, I am using a different injection method.
- So far Method B works for my phone (Android 12).
These are the specific codes:
Method A:
C++:
#define HOOKAF(ret, func, ...) \
ret (*orig##func)(__VA_ARGS__); \
ret my##func(__VA_ARGS__)
HOOKAF(void, Input, void *thiz, void *ex_ab, void *ex_ac)
{
origInput(thiz, ex_ab, ex_ac);
ImGui_ImplAndroid_HandleInputEvent((AInputEvent *)thiz);
return;
}
auto eglhandle = dlopen(OBF("libunity.so"), RTLD_LAZY);
auto eglSwapBuffers = dlsym(eglhandle, OBF("eglSwapBuffers"));
DobbyHook((void*)eglSwapBuffers, (void*)hook_eglSwapBuffers, (void**)&old_eglSwapBuffers);
void *sym_input = DobbySymbolResolver((OBF("/system/lib/libinput.so")), (OBF("_ZN7android13InputConsumer21initializeMotionEventEPNS_11MotionEventEPKNS_12InputMessageE")));
if (NULL != sym_input) {
DobbyHook(sym_input,(void*)myInput,(void**)&origInput);
}
Method B:
C++:
KittyScanner::ElfScanner unityMaps;
void *KittyMemoryFinder(const char *name, void *data) {
auto &scanner = *(KittyScanner::ElfScanner *) data;
return (void *) scanner.findSymbol(name);
}
do {
sleep(1);
unityMaps = KittyScanner::ElfScanner::createWithPath(OBF("libunity.so"));
} while (!unityMaps.isValid());
RegisterNativeFn nativeInjectEventFn = KittyScanner::findRegisterNativeFn(unityMaps, "nativeInjectEvent");
if (nativeInjectEventFn.isValid()) HOOKD_ABS(nativeInjectEventFn.fnPtr, nativeInjectEvent);
DobbyHookSM("libEGL.so", "eglSwapBuffers", (void *) hook_eglSwapBuffers, (void **) &old_eglSwapBuffers);
Last edited: