GlossHook icon indicating copy to clipboard operation
GlossHook copied to clipboard

Fix please

Open AsterialCoder opened this issue 1 year ago • 17 comments

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.

AsterialCoder avatar Jun 25 '24 12:06 AsterialCoder

send your code

XMDS avatar Jun 25 '24 12:06 XMDS

I can't send the code because people can see it, can we go to a private telegram chat?

AsterialCoder avatar Jun 25 '24 12:06 AsterialCoder

Right here githud's markdown

void main();

XMDS avatar Jun 25 '24 12:06 XMDS

#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);

}

AsterialCoder avatar Jun 25 '24 12:06 AsterialCoder

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

AsterialCoder avatar Jun 25 '24 12:06 AsterialCoder

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);

AsterialCoder avatar Jun 25 '24 13:06 AsterialCoder

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

AsterialCoder avatar Jun 25 '24 13:06 AsterialCoder

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

XMDS avatar Jun 25 '24 13:06 XMDS

Android 10, do other HOOK APIs work? For example InlineHook

XMDS avatar Jun 25 '24 13:06 XMDS

Yes other hooks work perfectly

AsterialCoder avatar Jun 25 '24 13:06 AsterialCoder

I tried: DobbyHook and A64HookFunction.

And these hooks work perfectly.

AsterialCoder avatar Jun 25 '24 13:06 AsterialCoder

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?

XMDS avatar Jun 25 '24 13:06 XMDS

Okay, I'll output the log to the logs

AsterialCoder avatar Jun 25 '24 13:06 AsterialCoder

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.

AsterialCoder avatar Jul 01 '24 14:07 AsterialCoder

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.

AsterialCoder avatar Jul 01 '24 14:07 AsterialCoder

I have many devices for testing and development.

AsterialCoder avatar Jul 01 '24 14:07 AsterialCoder

I will try to update once a week and of course I will test everything I add.

AsterialCoder avatar Jul 01 '24 14:07 AsterialCoder

fix to 1.9.0

XMDS avatar Nov 09 '24 11:11 XMDS