Re: Android X Server

200 views
Skip to first unread message

Timothy Meade

unread,
May 27, 2011, 9:43:36 PM5/27/11
to androi...@googlegroups.com


I'm cc'ing the new mailing list so we can continue the discussion there http://groups.google.com/androix-users

On May 27, 2011 11:47 AM, "webbbn" <reply+m-7413368-f5ec52ffb8dc...@reply.github.com> wrote:
>
> Thanks for the offer of help.  Maybe you can clear up a few questions that I
> have building the androix-xserver package.
>
> First, I'l a little confused about the layout of the git repository.  I
> haven't used git much, so I'm not sure I have the latest source.  If I just
> "git clone" the repostitory I appear to get the -0.2 branch, which I think
> is old.  I ended up switching to the -0.8 branch in github and pulling a
> tarball.  Is that the correct version?
>
> After I did that, I got it to build usin the top-level autogen.sh script.
> It looks like that just builds a native library (I think).  It looks like
> the Android app source is in the hw/android directory, but there's several
> makefiles and scripts in there, and none of them seem to build correctly, so
> I'm thinking that I'm looking in the wrong place.  Any pointers would be
> appretiated.
>
> Oh, and the Transformer is tegra 2 based, and it's very nice.  It's a good
> combination of a tablet and netbook.  My goal is to be able to develop
> natively on it, which is why I wold like an X server.  I have to have emacs,
> and it doesn't work right in any of the terminals that I've found.  It would
> be great if there was a native X emacs on Android.
>
> I would really like to build some way to make "seamless" X apps on Android.
> I had thought that using Xfvb as an intermediary betwen X apps and the
> Android display would work, but a native X server should be better.  There
> just needs to be some mechanism to manage the X apps and bring the X server
> forward when approproiate.  It sould work similar to a rootless X server on
> Windows.
> On May 26, 2011 9:13 PM, "tmzt" <
> re...@reply.github.com>
> wrote:
> > Transformer is ARM based? I'll help with the build where I can, I do still
> > have the tree but it's on a server I can't get to right now. The keyboard
> is
> > basically a missing map from android keycodes to xkb. Xkb won't build for
> > bionic so you have to use a static or libc version, I have an example
> script
> > for the G2 on my dropbox as well as a keymap (the shell script downloads
> > it). Keycodes are raw untranslated keycodes from android.
> >
> > The script is here http://db.tt/lvIAcNu
> >
> > If you do end up with them I can put together a github or you can send me
> a
> > pull request from one of yours.
> >
> > Tim
> > On May 26, 2011 9:01 PM, "webbbn" <
> > re...@reply.github.com>
> > wrote:
> >> Thanks! I was able to install your .apk on my eee transformer and bring
> up
> >> a window from a chrooted ubuntu image, but the keyboard isn't working
> >> right. It's still much farther along than I expected.
> >>
> >> I'm working on building it now. I'll let you know how it goes.
> >>
> >> --
> >> Reply to this email directly or view it on GitHub:
> >> http://github.com/inbox/7319314#reply
> >
> > --
> > Reply to this email directly or view it on GitHub:
> > http://github.com/inbox/7319314#reply
>
> --
> Reply to this email directly or view it on GitHub:
> http://github.com/inbox/7319314#reply

I believe that is correct, -8 is the latest version. You have to check the same version out of each repo.

If you mean top level autogen.sh on the server repo, that's only to build the server itself, and you'll have to look through the scripts it's built from to see the option to build build androix.

Yes, it's a shared lib, the other repos have the ant build system for the apk, but you have to copy the .so manually (I have script which is in there for that purpose) as well as zip up your /usr/share/X11 into usrdata.so and put it in the correct directory as well.

For the transformer you'll have to change the dimensions of the screen and allocate the correct sized native buffer.

The server is in hw/android it's based off of Xvfb.

Once you've cloned each repo you can checkout androix-8 with

git checkout androix-8

or if that doesn't work

git checkout -b androix-8 origin/androix-8

Also keep in mind I've only forked the repos for libraries I actually changed, the rest you'll have to pull from freedesktop.

--
Tim (tmzt)

axe

unread,
May 31, 2011, 9:29:33 PM5/31/11
to AndroiX Users
Tim,

I think I got everything to build correctly, but it isn't quite
working.

At first I noticed that the server was locking up when responding to
touchscreen events. This appears to bug in dix/main.c. At line 276
the serverInitComplete flag is set to TRUE, but only when XQUARTZ is
defined. This flag appears to be used in mi/mieq.c when DDXANDROID is
set, which causes a deadlock while it's waiting for the flag to be
set. Could you please see if this is fixed somewhere in github? I
may be checking out the wrong version.

I added a check for DDXANDROID in dix/main.c, and it got past that
step, but it doesn't seem to be drawing my xterm when I start an xterm
on the display. This may be a problem with my build, or the way I'm
running it, but I thought I might be either using the wrong branch or
the latest might not be checked in.

Thanks for checking this.

Brian

axe

unread,
May 31, 2011, 10:53:23 PM5/31/11
to AndroiX Users
Tim,

I fixed the drawing issue by adding a draw call in the resume method
in the Java code. For some reason the screen wasn't being refreshed
when I switched back to the X server from the terminal program after I
started the xterm. Now it appears that the display code works, as
well as the touchscreen/mouse. The only problem that I have is with
the keyboard, and that's not surprising. I haven't tried your
keyboard fix yet, and I'm not even sure that I have all of your
updated keyboard related packages installed. I'll let you know how it
goes from here.

Brian

Timothy Meade

unread,
Jun 1, 2011, 1:48:56 AM6/1/11
to androi...@googlegroups.com, Gene Mosher, Gene Mosher

I seem to remember there being a androix-9 which might have fixed the
DDXANDROID issue or it's also possible I didn't push it. I believe I
was trying to integrate better with the XQuartz code but shortly after
that they changed the locking semantics again in the server, making
this code used on more than just XQuartz.

I started to use my own generic define which might be what you're
missing but if you still have defined (XQUARTZ) || defined
(DDXANDROID) you probably don't have that code either.

My suggestion would be to use the new code from upstream for
dix/main.c and change my build scripts accordingly. If I get access to
the offline repo I will check the situation and push androix-9.

As for the other events issues, the only thing I see is if the service
dies it won't restart and connect to the front end, I haven't been
able to fix that and don't know what's causing it, but it probably
needs a better binder implementation, as will rootless.

The intention is to switch to GL rendering which will work much better
on 3.0 as well and keep the current code around for <2.1. I would
also optimize it by switching to drawing from the native code, passing
the SKSurface to the .so like the webkit code does in Android then the
drawing mechanism should be similar for both Skia and GL rendering.
The current method is based on svn.rockbox.org which is a much simpler
shared framebuffer (like is used now in AndroiX) which makes sense for
the embedded OS and LCD controllers they deal with. It worked, I got
my xterm mapped after a 3 days or so work and didn't make too many
changes to the drawing after that, as input was a lot harder.

In my experience with this code pretty much everything that prevents
input is tied to the mieq.c deadlocking of the pthread, with the
locks/unlocks unbalanced. Moving to upstream should fix this but it
means an ABI change in AndroiX (because the input ABI changed).
There's also the option of using the input thread code which should
work with pthreads.

You do need all the libraries I've actually forked, but most of the
changes are really minor and have either been fixed upstream (mostly
by removing wrappers around POSIX functions or should be fixed
upstream by making certain paths configurable.

Upstream probably would prefer this was a xf86 driver, not a DDX by
the way and I'm aware of that but I really don't want to have an
xorg.conf so it's a DDX like XQuartz.

Tim

PS

Took a quick look at github. I'm not sure what serverInitComplete is
supposed to do extactly have to ask jeremyhu who wrote the XQuartz
code, easiest thing would be to change those defines back to XQuartz
as I don't use wait_for_server_init() at all, or figure it out and add
what I'm missing (probably in the objc in hw/darwin)

My hope for this is upstream is cleaner and won't need as many changes
most of which could be competely generic allowing X to be built as a
library that could be consumed by different wrappers, including Java
JNI and XQuartz that was the intention with these changes at least but
I may have been overzealous with find and replace in mi/mieq.c.

Timothy Meade

unread,
Jun 2, 2011, 12:48:45 PM6/2/11
to Brian Webb, Gene Mosher, androi...@googlegroups.com


On Jun 1, 2011 10:21 PM, "Brian Webb" <web...@gmail.com> wrote:
>
> Gene,
>
> Thanks for the info.  Your application looks interesting, and I can
> see how it would be a benefit to have a good X server for Android.
>
> If you're talking about the source to the X server, I would be
> interested in getting a copy to see if it's different from what I have
> from the git repository.  I'm currently trying to track down where the
> keyboard event are getting lost in my version, and haven't found it
> yet.
>
> When I get something fully operational I plan to start looking at
> making it as seamless as possible in Android.  I'm not sure what that
> means yet, but my hope is that each running X app could have (for
> example) an icon in the task bar to make switching to the apps as easy
> as possible.  The icon would resume the X server and activate the
> appropriate X app.  There's alot of details to work out, though.
>
> Brian
>
> On Wed, Jun 1, 2011 at 1:26 PM, Gene Mosher <ge...@viewtouch.com> wrote:
> > Tim;
> >
> > Thanks for copying me on that email response to Brian.
> >
> > Just to summarize, ViewTouch is a touchscreen desktop manager and widget
> > environment with lots of point of sale functionality built into the
> > widgets.  It makes extensive use of remote X forwarding for our
> > customers so that we only require one instance of the application and
> > data for any size restaurant.  You have the binaries and I am willing to
> > provide the source if you are interested.  ViewTouch is the kind of
> > thing that really benefits from having an X Server on Android devices.
> > (Brian, after visiting viewtouch.com if you would also like the binaries
> > and/or source, then just let me know.)  It would be interesting to see
> > what an application designed for collaboration and users with remote X
> > forwarding looks like on Android devices.  Here's a shot of ViewTouch on
> > a wireless touchscreen X terminal (from 2003).
> > http://www.viewtouch.com/mobile.html
> >
> > --Gene Mosher
> > Skype: ViewTouch_POS
> > 541-485-9235
> >
>
>
>
> --
> Brian Webb
> web...@gmail.com

Brian,
Gene develops a point of sale system using X, I cc'd him to follow progress on modernizing the codebase/build procedure for AndroiX and let him know about the mailing list. He was talking about code for his software, binaries and source.

If there's anything newer that what's on github it's backed up on my server which is currently offline and in another city.

Webbn has been making progress (I assume that's you).

As for missing input events, a month of development time was spent tracking that down and it ended up being a missing config file in X, if you extract my apk you'll find a usrdata.so with the file, a copy of xkbcomp from debian armel and the rest of the /usr/share/X11 tree which is needed for AndroiX. It's a zip file.

Hope that helps, I think you're about where I was when I put this on hold.

Tim

Brian Webb

unread,
Jun 2, 2011, 9:53:32 PM6/2/11
to Timothy Meade, Gene Mosher, androi...@googlegroups.com
Tim,

Thanks for the idea. I was able to extract the libusrdata.so from
your .apk and that seems to have fixed the keyboard events. That file
is different from the one that is in git, so I'll try to figure out
what the difference is and update it. I think my version now works
similar to the one that you sent me.

--
Brian Webb
web...@gmail.com

tmzt

unread,
Jul 4, 2011, 8:06:20 AM7/4/11
to Brian Webb, androi...@googlegroups.com, reply+m-9340336-1dcc02019875...@reply.github.com
Hey, Brian, any chance you could push your stuff to github?
Unfortunately it seems the repo I was missing is the same commit as
github, so everything I have is already pushed.

There are a few tablet users interested in getting this working >
800x480 but I no longer have a build environment (I'm basically on a
netbook for the moment) though it's a one line change.

I know what's wrong with the website, but it's not the priority at the
moment as Google Groups and github should suffice for the project,
though I would like to have the information section back up (maybe as
a github wiki?)

Brian Webb

unread,
Jul 4, 2011, 11:02:03 AM7/4/11
to tmzt, androi...@googlegroups.com, reply+m-9340336-1dcc02019875...@reply.github.com
Sure, I can push what I have. I believe the server display should
auto-size now, so it should work on any size tablet.

I believe everything is pushed to github except for the Java changes,
but I'll get that pushed in the next day or two. I've switching to a
new laptop now, so things are in a bit of flux.

Brian

--
Brian Webb
web...@gmail.com

Timothy Meade

unread,
Jul 5, 2011, 9:47:43 AM7/5/11
to Brian Webb, androi...@googlegroups.com, Gene Mosher
Thanks so much. Send me a pull request and I'll get it merged.

Timothy Meade

unread,
Jul 9, 2012, 1:38:27 PM7/9/12
to Gene Mosher, Brian Webb, yaypu...@gmail.com, androi...@googlegroups.com
At this point AndroiX would almost need a rewrite to work with a newer
version of X. There is a project based on Wayland, called Weston that
has a version that runs on Android and supports an X proxy.

There are still parts of the AndroiX codebase that could be forward
ported to the new release of X though, but the build infrastructure
needs rethought. (I've actually failed to get it to build.)

On Mon, Jul 9, 2012 at 1:26 PM, Gene Mosher <ge...@viewtouch.com> wrote:
> With the arrival of Google's 7" Nexus (1280x800) resolution for $200 I
> believe that it is now or never for ViewTouch to jump into the point of
> sale tablet arena. The key to this is Androix, the Android X Server.
>
> The decision to go with any tablet into a vertical market requires that
> it be the near perfect device and the 7" Nexus tablet is every bit that;
> low cost, high resolution, NFC (for contactless payment), easily
> available, IPS display, thin, DDR3, rounded rubber(ish) back for a good
> grip, 2-day charge, video chat with workgroup members, Google Now voice
> command, WiFi only (which avoids having to buy a cellphone plan), and a
> likely 10" bigger version in a few months.
>
> The ViewTouch POS application was given a name and written more than 25
> years ago, but it was with such a device as the Google Nexus in mind
> that it was created, even then. The current version was written more
> than 15 years ago but has the remote X forwarding which will make the
> Nexus shine in a multiuser workgroup context that every restaurant is.
>
> It is critical to have the X server running on the Nexus so if it's a
> question of money then please step forward and say so. I will be glad
> to discuss this with anyone on the phone or on Skype. I will also be
> glad to provide a way for anyone to make money on this whenever a
> restaurant buys the 7" Nexus for tableside ordering. This is very
> important to me and I will make sure that anyone who helps me with this
> will be able to get paid for doing so, one way or the other. I'm not a
> programmer so I don't have the skills to do this myself but I have a
> very good reputation in the POS business and I have a lot of inquiries
> for such a tablet. When the X server is running on the Nexus, with X
> forwarding, then I will be able to get lots of press and sales should
> skyrocket. Please get in touch if you can assist me with this.
>
> By the way, ViewTouch is much more than just Point of Sale software -
> it's a very fully featured application-specific desktop that can be used
> to develop all kinds of applications for groups of people who want to be
> able to use tablets to work together in many situations. It's not open
> source but I will share the source with anyone who wants to enhance it
> or who wants to be able to do the occasional pay-for extension to it.
>
> Gene Mosher
> ViewTouch
> 541-485-9235
> 541-515-5913
> Skype: ViewTouch_POS

leon lee

unread,
Aug 18, 2012, 1:47:57 AM8/18/12
to AndroiX Users
thanks for the update. never mind the build failure. can u share more
info about the failure. let's figure out how to finish the build
together.
> > Skype: ViewTouch_POS- 隐藏被引用文字 -
>
> - 显示引用的文字 -
Reply all
Reply to author
Forward
0 new messages