-
36ae7c4c
by Twaik Yont at 2026-05-14T23:11:00+02:00
wineandroid: Add reply_fd plumbing to ioctl path.
Add an optional reply_fd parameter to all android ioctl handlers and
propagate it through android_dispatch_ioctl and android_ioctl, including
all ioctl call sites.
This prepares the ioctl path for passing file descriptors alongside
regular responses. The new parameter is not used yet and all callers
pass NULL, so there is no change in behavior.
This change is intentionally kept separate since it is mechanically
large but conceptually simple, making subsequent functional changes
easier to review.
This is a preparatory change with no functional impact.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>
-
d2ac39b4
by Twaik Yont at 2026-05-14T23:11:00+02:00
wineandroid: Switch ioctl dispatch to socket transport on main thread looper.
Implement ioctl handling over a UNIX SEQPACKET socket integrated with
the Android main thread ALooper.
Ioctls are now dispatched directly from ALooper callbacks using a
JNI-attached environment captured during looper initialization, removing
the need for a dedicated dispatch thread.
A temporary bootstrap thread is used to obtain the main thread looper
without interfering with the current Wine/JVM execution context.
Keep dequeueBuffer on the old transport for bisect safety, as it still
depends on wine_server_fd_to_handle() and requires a Wine TEB.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>
-
eaeb27d7
by Twaik Yont at 2026-05-14T23:11:00+02:00
wineandroid: Switch dequeueBuffer to socket transport.
Switch dequeueBuffer to the socket-based ioctl transport.
Replace the HANDLE duplication path using NtDuplicateObject and
wineserver with direct fd passing over a UNIX socket.
The ioctl is now handled entirely on the new dispatch thread and no
longer depends on Wine TEB-based handle conversion.
This completes the dequeueBuffer transition that was previously kept on
the old transport for bisect safety.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>
-
8f15e5af
by Twaik Yont at 2026-05-14T23:11:00+02:00
wineandroid: Remove unixlib/ntoskrnl ioctl path.
Remove the old wineandroid ioctl transport based on unixlib calls and
the ntoskrnl device/IRP dispatch path.
This drops the android_dispatch_ioctl entrypoint, the driver creation
code, and the unixlib call table, along with the associated device
thread and callback-based startup path.
With the socket-based dispatch thread now handling all ioctls, the old
HANDLE-based transport is no longer needed.
Also remove the remaining artifacts of the old execution model,
including the global JNIEnv, thread tracking, and the
wrap_java_call/unwrap_java_call helpers used to work around JVM/Wine
TLS conflicts.
Simplify initialization accordingly by using __wine_unix_lib_init()
directly, making dllmain.c consistent with winex11.drv.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>
-
3f8c0f30
by Twaik Yont at 2026-05-14T23:11:00+02:00
wineandroid: Return ioctl errors directly.
Return ioctl handler errors directly instead of converting them between
Android errno values and NTSTATUS.
The socket-based ioctl path no longer goes through Wine's device/IRP
infrastructure, so the old android_error_to_status() and
status_to_android_error() mappings are no longer needed.
Make the handlers return their native error values directly and pass
them through handle_ioctl_message() unchanged.
This simplifies the ioctl path and removes the leftover error mapping
layer from the old transport model.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>