-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Using termux-wayland without need to compile it with Termux key. #21
Comments
Great Idea.. That means even Third party apps can use termux:wayland.. just like VNC in google play since we have allowed users to set |
Sorry, my fault. I forgot that T::X11 uses Xorg on Termux fs side. We can try to provide wayland socket connection through the Java service. I think it will be much easier than modifying Xorg code. |
After receiving socket fd in Java service you can push it to wayland server using wl_display_add_socket_fd function on JNI side. |
Ok. I was not right. It is impossible to send Unix socket fd the same way Termux::API does. But we can try to send ACTION_VIEW broadcast with URI to temporary Unix socket. T::X11 will be able to open it and there we will be able to send fd to our socket. |
Maybe we can make use of this gist? |
The problem is SELinux and Android's restrictions. We can not connect to Unix or abstract sockets directly, we will have access denied error. But we can tell Android that there is Uri in private storage that we want to share with other app (send ACTION_VIEW broadcast with mime) and resolve this Uri in another app with ContentResolver. From here we can get it's AssetFileDescriptor, then ParcelFileDescriptor and finally regular file descriptor that can be passed to C. This file descriptor can be used as a transport for initial setup of socket's. |
Solved by #31 |
How do i use Termux Wayland??? |
You can not. |
Hi guys! I have no time to help to the project but I have an idea how to use termux wayland without signing it with the key Termux::App is signed.
The idea is to use the same connection mech Termux::API uses. Look:
It will let us use Unix sockets even if application has another keys. And it is compliant with SELinux security restrictions. Also in the future it will let us use android-emugl modified for Termux to let us use fast GLES (it can be modified to use Unix socket). What do you think?
The text was updated successfully, but these errors were encountered: