Fix please
Hello, this hook does not work well on Android 10, the game crashes, crashes when entering, I checked the same mod on 3 devices on Android 11 - 13, everything works perfectly, 10 errors and crashes.
send your code
I can't send the code because people can see it, can we go to a private telegram chat?
Right here githud's markdown
void main();
#define GHook(address, hook, orig) GlossHook((void *)(address), (void *)(hook), (void **)(&orig))
void (*SendToAll)(void *, monoString *);
bool chatspam; void *uid; int chat_step = -1; void handleChatSpam() { static float spamtimer = 0; spamtimer += 1; if (spamtimer >= 600) { chat_step++; if (chat_step == 4) { chat_step = 0; }
switch (chat_step) {
case 0:
SendToAll(uid, il2cpp_string_new("Asterial - Мощный чит для Android"));
break;
case 1:
SendToAll(uid, il2cpp_string_new("Asterial - Самый большой функционал для новых версий Standoff 2"));
break;
case 2:
SendToAll(uid, il2cpp_string_new("t.me/AsterialHack - Ссылка на группу в Telegram"));
break;
case 3:
SendToAll(uid, il2cpp_string_new("Сдавайся, шансов нет :)"));
break;
}
spamtimer = 0;
}
}
void (*oChat)(void *); void hChat(void *a) { uid = a; if (chatspam) { handleChatSpam(); }
oChat(a);
}
void Hook() {
SendToAll = reinterpret_cast<decltype(SendToAll)>(il2cpp + Asterial(0x2491E0C)); // 0x2491EF4
GHook(il2cpp + Asterial(0x2491FA8), hChat, oChat);
}
I sent you the Cheat function for advertising in chat, even with one function it doesn’t work, other hooks work great, I need your hook because it works perfectly on all devices except 10 Android
I myself can’t understand what the problem is with Android 10 even.
Even with this code, your hook does not work on Android 10, but on other versions of Android everything works perfectly.
void *libAndroid = xdl_open(android, Asterial(RTLD_LAZY)); while (!libAndroid) { libAndroid = xdl_open(android, Asterial(RTLD_LAZY)); LOGERROR(Asterial("Номер Ошибки: 104")); std::this_thread::sleep_for(std::chrono::seconds(1)); }
GHook(xdl_sym(libAndroid, Asterial("ANativeWindow_getWidth"), nullptr), hook_getWidth, old_getWidth); GHook(xdl_sym(libAndroid, Asterial("ANativeWindow_getHeight"), nullptr), hook_getHeight, old_getHeight);
If you need help from me in correcting this error, write to me, I will help as best I can, I have root rights on my devices
Check if the il2cpp + Astererial (0x2491FA8) address is valid and if it is located in the .got section. Also, determine if reentrancy occurs in function hChat
Android 10, do other HOOK APIs work? For example InlineHook
Yes other hooks work perfectly
I tried: DobbyHook and A64HookFunction.
And these hooks work perfectly.
Send me a screenshot of your address in idapro. Secondly, you should give me the Android Log information, where there are hook records. Also, you should write the code to print the log at the beginning of the hChar function and see if it is executed into the hook function, where does it crash?
Okay, I'll output the log to the logs
Hello, I fixed a bug with Android 10 64 bit. I corrected the definition in Gloss_reg for 64-bit architecture (aarch64). Added the x30 field to the regs structure, since it is used for lr in ARM64. Moved cpsr to the end of the regs structure to match the standard register layout.
I have a request for you, can you give me your project GlossHook? I'm not going to distribute it as my own, I want to add new features and improvements, if you can give access to GitHub then I will update it.
I have many devices for testing and development.
I will try to update once a week and of course I will test everything I add.
fix to 1.9.0