jmpews / Dobby

a lightweight, multi-platform, multi-architecture hook framework.
Apache License 2.0
4k stars 833 forks source link

Can't hook art::gc::Heap::PreZygoteFork on Android 11 with ARM #109

Closed kotori2 closed 3 years ago

kotori2 commented 3 years ago

In my own fork of EdXposed, there is a hook for art::gc::Heap::PreZygoteFork. It works. fine on ARM64 but failed on ARM.

Stack trace:

telegram-cloud-photo-size-5-6134389153815702320-y telegram-cloud-photo-size-5-6134389153815702323-y

Disassembled function (on Pixel 4 XL, RP1A.201005.004, /apex/com.android.art/lib/libart.so): telegram-cloud-photo-size-5-6134389153815702322-y

It seems SP register was messed up here. Also the hook fails at System UI and the system crashes, so I don't have time to attach a debugger. Any advice on how to debug it here?

jmpews commented 3 years ago

hi, i'll test it today.

jmpews commented 3 years ago

@kotori2 Any contact? wechat?

kotori2 commented 3 years ago

Email sent to the address on your profile page

kotori2 commented 3 years ago

fixed https://github.com/jmpews/Dobby/commit/b3b3f8160f84c1e94d7a66c36488d63ef5f5d450