8000 agent: Retry emulated load through LoadLibraryExt by tubibibo · Pull Request #1286 · frida/frida-core · GitHub
[go: up one dir, main page]

Skip to content

agent: Retry emulated load through LoadLibraryExt - #1286

Merged
oleavr merged 1 commit into
frida:mainfrom
tubibibo:fix/emulated-load-library-ext
Nov 5, 2026
Merged

oleavr merged 1 commit into
frida:mainfrom
tubibibo:fix/emulated-load-library-ext

Conversation

@tubibibo
@tubibibo tubibibo commented Nov 5, 2026
Copy link
Copy Markdown
Contributor
8000

Fixes frida/frida#3814.

On LDPlayer 14 (Android 14, x86_64, libhoudini) the emulated realm fails to attach with "Process is not using emulation". The native bridge exports the modern symbols, so NativeBridgeApi.open() classifies it as MODERN, and get_emulated_provider() takes the load_library() branch. Houdini v3 refuses that deprecated entrypoint and returns NULL:

I houdini : [5377] Shall not invoke deprecated interface in v3 implementation!

The LoadLibraryExt() path is gated on flavor == LEGACY, so it is never tried.

I verified the call sequence in the target process on LDPlayer 14 with Frida scripts, using libnativebridge.so from /apex/com.android.art/lib64/ and the same emulated-agent path:

call result
NativeBridgeLoadLibrary(path, RTLD_LAZY) 0x0 (Houdini logs the deprecation warning)
NativeBridgeLoadLibraryExt(path, RTLD_LAZY, NULL) valid handle
NativeBridgeGetTrampoline(handle, "JNI_OnLoad") valid pointer

This patch keeps the existing behavior and only retries through LoadLibraryExt() when the plain call fails and the export is available, with a null namespace (accepted by Houdini v3; the legacy branch keeps its existing hard-coded namespace pointer).

Testing: the native-bridge calls above were verified on the device with Frida 17.24.1 (client and server). I could not run a full frida-core build here, so CI will be the first compile of the change.

Houdini v3 rejects the deprecated NativeBridgeLoadLibrary() entrypoint
and returns NULL, which surfaces as "Process is not using emulation".
When the plain call fails and the extended entrypoint is available,
retry through it with a null namespace.
@oleavr
oleavr force-pushed the fix/emulated-load-library-ext branch from 59d2643 to c233517 Compare November 5, 2026 10:29
@oleavr
oleavr merged commit 10d6f86 into frida:main Nov 5, 2026
@oleavr
oleavr commented Nov 5, 2026
Copy link
Copy Markdown
Member

Thanks! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--realm=emulated fails with "process is not using emulation" on LDPlayer 14 (Android 14, libhoudini), works on LDPlayer 9

2 participants

0