This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! nativeInjectEvent occasionally not found on Android devices but works fine on emulator

HeroOFYou

Platinian
Hi everyone,

I'm currently working with native libraries using KittyMemory and KittyScanner. I'm trying to locate the `nativeInjectEvent` function within `libunity.so` like this:

```cpp
std::vector<ProcMap> unityMaps = KittyMemory::getMapsByName("libunity.so");
RegisterNativeFn nativeInjectEvent = KittyScanner::findRegisterNativeFn(unityMaps, "nativeInjectEvent");
```

On Android emulators, everything works perfectly and `nativeInjectEvent` is always found. However, on some real Android devices, the function is occasionally not found — even though the game runs fine and `libunity.so` is loaded.

Has anyone encountered this inconsistency before?
Any ideas why `nativeInjectEvent` might be missing or invisible on physical devices but detectable on emulators?

Let me know if you'd like to add specific device models or logs — that can help others give more accurate answers.
 
Phone manufacturers are completely retarded, so they reinvent the wheel breaking shit that shouldn't break, this is why it doesn't work on SOME real devices (usually ones that have heavily modified ROMs, like HyperOS or OneUI). We can't really do anything about it other than look for workarounds.