Discussion:
Using X11 in apps
John Dallman
2018-07-02 09:41:24 UTC
Permalink
I'm porting a large math library and its test harness to Android. Most of
this looks reasonably straightforward, but the test harness has debugging
graphics. In the UNIX implementation of the test harness, this is done by
opening an X11 graphics window on the developer's display, and displaying
the debugging graphics in that.

The obvious parallel is to use ES GL graphics on the device display.
However, since the test harness will only ever be used with the device
plugged into a Linux development host (Yes, I really am quite sure of that,
I'm porting a library, *not* developing an application), I could save some
work by using X11 and addressing the developer's display.

However, that requires X11 headers and libraries for the device side, and
the ability to pass the X11 wire protocol over the USB link back to the
Linux development host. Do either of these things exist?

I've found X11 servers for Android in the Play Store, but they are
different: they provide the ability to use an Android device as an X
terminal. X nomenclature is backwards to most systems: the thing that runs
the screen is a server, which runs on a terminal, and the program that
sends graphics commands to the server is a client.

Thanks,

John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3D0vnYvBA0amxcg3G_8Envb5-rE4OtM2LXV%2BSEz4KQ%2BbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Ryan Prichard' via android-ndk
2018-07-02 22:17:10 UTC
Permalink
Post by John Dallman
However, that requires X11 headers and libraries for the device side, and
the ability to pass the X11 wire protocol over the USB link back to the
Linux development host. Do either of these things exist?
For the second part, maybe you could forward X11 over TCP using "adb
reverse"?

e.g. I think "adb reverse tcp:6000 tcp:6000" would forward X11 connections
to :0 on the device to a server on the development host.

-Ryan
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CALgsJzn5pEJPGr9g5TddyysXScxLOZSeV2NBnTU6a%2BLLgkoAZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
John Dallman
2018-07-03 12:20:58 UTC
Permalink
On Mon, Jul 2, 2018 at 11:17 PM 'Ryan Prichard' via android-ndk <
Post by John Dallman
However, that requires X11 headers and libraries for the device side, and
Post by John Dallman
the ability to pass the X11 wire protocol over the USB link back to the
Linux development host. Do either of these things exist?
For the second part, maybe you could forward X11 over TCP using "adb
reverse"?
e.g. I think "adb reverse tcp:6000 tcp:6000" would forward X11 connections
to :0 on the device to a server on the development host.
Thanks, that sounds as if it would handle part 2.

Does anyone know of headers and libraries for producing X11 programs that
run on Android?

John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3DOX-MkBaC_TrMkdLyuc%3DRBfDVyHsTPBea3xUB7TE%2BWUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Athos Fabio Bacchiocchi
2018-07-04 02:23:13 UTC
Permalink
If the code you are porting is using Xlib you could just try compiling it
for Android. Hopefully it doesn't have system dependencies you can't
satisfy.

At that point it should just be a matter of having the android device and
the PC on the same network and, on the device, connecting to the display
server with something like:

XOpenDisplay("192.168.what.ever:0");

Athos
Post by John Dallman
On Mon, Jul 2, 2018 at 11:17 PM 'Ryan Prichard' via android-ndk <
Post by John Dallman
However, that requires X11 headers and libraries for the device side, and
Post by John Dallman
the ability to pass the X11 wire protocol over the USB link back to the
Linux development host. Do either of these things exist?
For the second part, maybe you could forward X11 over TCP using "adb
reverse"?
e.g. I think "adb reverse tcp:6000 tcp:6000" would forward X11
connections to :0 on the device to a server on the development host.
Thanks, that sounds as if it would handle part 2.
Does anyone know of headers and libraries for producing X11 programs that
run on Android?
John
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/
msgid/android-ndk/CAH1xqg%3DOX-MkBaC_TrMkdLyuc%
3DRBfDVyHsTPBea3xUB7TE%2BWUw%40mail.gmail.com
<https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3DOX-MkBaC_TrMkdLyuc%3DRBfDVyHsTPBea3xUB7TE%2BWUw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAK8eEF%3Dn_VXTw0ZqYDn7GGHpF%3Dcds8iQiDK8xzS%3DK0E%3DAS5TAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...