YAHFA icon indicating copy to clipboard operation
YAHFA copied to clipboard

Cannot hook private/hidden API

Open vegedreamgagnoa opened this issue 2 years ago • 1 comments

It's weird. I tried to hook android.view.WindowManagerGlobal#getInstance method on an x86_64 Android Emulator (API 28/Android 9) as a sample and YAHFA reported that the hook and backup done, but actually the method was not hooked. Hooking non-private/non-hidden API was not a problem!

Could you help? Pine and Whale works great in this case (both can easily work with Private/Hidden API/Class); I don't see why YAHFA is failing in this one.

vegedreamgagnoa avatar Mar 05 '22 09:03 vegedreamgagnoa

More info:

I tried to hook VMDebug#dumpHprofData which is a private class/API marked with @hide, and it works fine with YAHFA.

Seems like the problem is hooking hidden virtual methods!!!!

vegedreamgagnoa avatar Mar 05 '22 10:03 vegedreamgagnoa