GlossHook icon indicating copy to clipboard operation
GlossHook copied to clipboard

LDPlayer (emulator) is crashing

Open RusJJ opened this issue 1 year ago • 13 comments

Hi @XMDS , there is a serious issue. GlossHook/GlossHookAddr causes the whole APK to crash. Please fix it

RusJJ avatar Aug 26 '24 16:08 RusJJ

What is that..?

Please ignore, my account got compromised, I deleted the comment

Saschl avatar Aug 26 '24 19:08 Saschl

Also there is another problem: im hooking a GetAbortClimb in both v2.10 for 32bit and 64bit. But calling original function in 32bit causes SIGSEGV. Since your code is closed, i dont even understand what's going on.

RusJJ avatar Aug 27 '24 07:08 RusJJ

The same crash for 32bit version of GTA:SA v2.10, symbols MeleeAttackJustDown and/or GetMeleeAttack

RusJJ avatar Aug 27 '24 09:08 RusJJ

Using GlossHookAddr fixed the crashing problem on 32-bit systems, while GlossHook is unstable as hell... It doesnt fix LDPlayer problem.

RusJJ avatar Aug 27 '24 09:08 RusJJ

The same crash for 32bit version of GTA:SA v2.10, symbols MeleeAttackJustDown and/or GetMeleeAttack

The first problem is that these functions have IT instructions. After being overwritten, the PC address of the original instructions in the backup area is no longer correct. There is no particularly good way to rewrite the repair IT instructions,Therefore, GlossHook provides a 4-byte instruction coverage method, which can solve the crash problem of IT instructions and short functions.

XMDS avatar Aug 27 '24 09:08 XMDS

Using GlossHookAddr fixed the crashing problem on 32-bit systems, while GlossHook is unstable as hell... It doesnt fix LDPlayer problem.

Second question. The name of the LDPlayer simulator in China is (雷电模拟器). The underlying environment of almost most Android emulators is x86 (the lower layer, not the upper layer). Because GlossHook internally hooks some functions in Linker and uses some codes related to the Android system (the simulator does not always fully implement all Android codes), GlossHook does not support x86/x86_64, so it cannot The emulator's Android system (such as functions in Linker) implements functions. Based on the above, GlossHook does not support Android emulators. If it is forced to support it, it will need to be adapted for all mainstream emulators, which will take a lot of time and other problems will arise. So it's best not to use it in the simulator.
By the way, xdl also has many problems in the simulator: https://github.com/hexhacking/xDL/issues/16

XMDS avatar Aug 27 '24 09:08 XMDS

In other aspects it is very stable. GlossHook Version 1.9.0 will be updated recently and will have better stability. It will take some time.

XMDS avatar Aug 27 '24 09:08 XMDS

Is there a way to not use hooks in a linker?

RusJJ avatar Aug 27 '24 10:08 RusJJ

In my another project it causes "illegal opcode" crash... Not even related to LDPlayer. What's new in 1.9.0 and when are you going to release the source code?

RusJJ avatar Aug 27 '24 10:08 RusJJ

Is there a way to not use hooks in a linker?

GlossHook's 4-byte hook uses the linker part (but it is not necessary). From a practical point of view, this API can be provided. But xdl can also cause problems.

XMDS avatar Aug 27 '24 10:08 XMDS

In my another project it causes "illegal opcode" crash... Not even related to LDPlayer. What's new in 1.9.0 and when are you going to release the source code?

1.9.0 will be open source later

XMDS avatar Aug 27 '24 10:08 XMDS

Im working with the project that should be working on LDPlayer and other emulators. Otherwise it will be very sad... Gloss is amazing but this thing is required. I already contacted LDPlayer's support but i dont think they will do something about it... That's a company that will not much care about a single project

RusJJ avatar Aug 27 '24 10:08 RusJJ

Forgot to say. Shadowhook was working fine but it was causing a lot of issues such as corrupted memory, that's why i used Gloss. And it started crashing because of IT intstruction. Does Shadowhook use linker hook? if it does, then it was working in LDPlayer very well.

Also, another issue. If you use GlossHookAddr with is_4_byte_hook=true on 64-bit version, it will not hook some functions. And this is causing big issues too...

RusJJ avatar Aug 27 '24 15:08 RusJJ

Also i accessed a limit of B/BL/BLX hooks. newly added hooks are not working...

RusJJ avatar Sep 04 '24 18:09 RusJJ

oh just found out not support emulator yet, right now i use Dobby with Native Bridge to ARM64 to make it's work i hope GlossHook support emulator in the future

DoDevil46 avatar Jul 09 '25 05:07 DoDevil46

oh just found out not support emulator yet, right now i use Dobby with Native Bridge to ARM64 to make it's work i hope GlossHook support emulator in the future

GlossHook is working almost on any (or on any) emulator. DobbyHook is really bad compared to Gloss. Gloss is getting fixed by XMDS every time, while Dobby has some serious stack corruption issues. And they dont fix it.

RusJJ avatar Jul 09 '25 06:07 RusJJ

oh just found out not support emulator yet, right now i use Dobby with Native Bridge to ARM64 to make it's work i hope GlossHook support emulator in the future

GlossHook is working almost on any (or on any) emulator. DobbyHook is really bad compared to Gloss. Gloss is getting fixed by XMDS every time, while Dobby has some serious stack corruption issues. And they dont fix it.

How? in my case i can't build my Zygisk Module due incompatible of lib.so or lib.a

i need to build x86_64 and ARM64 together to make my module work or else Zygisk not load into the app ld.lld: error: ...... libGlossHook.so is incompatible with elf_x86_64

DoDevil46 avatar Jul 09 '25 07:07 DoDevil46

Because OBVIOUSLY GlossHook is an ARM-only library...

RusJJ avatar Jul 09 '25 08:07 RusJJ