Android & X11 Forwarding - General Questions and Answers

Looking for a new phone, and the Nokia N900 was at the top of my list just because is ran a full fledged Linux distro, and I knew I could do some X11 forwarding, but I couldn't get OpenGL apps to forward properly, Mesa didn't help, and it doesn't run on CDMA networks. So I'm considering Android.
I'm aware it doesn't have a native X server, and I'm also aware you can run another Operating System in conjuction, and access it through VNC, but that seems like a huge waste of resources, especially since I'd like to run some relatively demanding things with my phone (like run Blender through X11 forwarding).
So here is the question:
Can any Android phone X11 forward apps without running another operating system?
Is there a method for running OpenGL apps? (like a wrapper, Mesa, etc)

Can any Android phone do X11 forwarding or not?
Any input would be appreciated, I'd like to make a decision.

Help please? I can clarify if necessary.

Hey did you find out if x11 forwarding is possible on android???
Can it be done on the n900???

so?
Looking for the same... Any updates?

Related

[Q] OS emulation on other phones?

So I have a smart phone running the Android platform and I know there is an x86 Android project to run it on a full desktop/laptop system.
I also found a DosBox app for it, which I haven't tried but I hear people have gotten Windows 3.11/95 to work on.
Also with the webtop on my phone it can run a full Debian Linux install.
My question is in two parts:
A. Has anyone tried to port this to other mobile phones (Windows, RIM, iOS, etc...) yet?
B. Has anyone tried to port any other OS's to Android?
I mentioned iOS specifically in A. because some MacFans really like their OS and might not want to give up that functionality and it might make people more willing to adopt the platform.
I'd have posted links to cite references, but I'm still under restriction for being new.

[Q] X11 Server in Android

Hello,
While I am a huge supporter of the oongoing work of porting Ubuntu to the ASUS Transformer, I am more interested in seeing a native X11 Implementation. I run Debian as my primary OS and would love to be able to access native applications without the need for VNC. I do love Honeycomb, which is why I wont go pure Ubuntu​
DISCLAIMER: I AM NOT A DEV
I'm pretty sure there's a very good reason that this isn't possible. If so, it would have been implemented from the G1/Dream onward. I think it has something to do with the fact that Android really only uses the Linux kernel and thus DisplayFlinger (the video output module) has absolutely zero interoperability with X11. Also, the Android system structure (for lack of the correct term) just plain doesn't allow for something like X11 to exist.
There's pseudo-workarounds which involve having a Debian shell on your phone/tablet and then accessing it via a VNC app... but it takes over the whole screen, so you may as well just be booting into a Ubuntu partition.
http://www.androidauthority.com/run-x-windows-x11-on-your-android-smartphone-2176/
(I never got it working on any phone I own/owned though)
Android and X11 do not work together for several reasons;
First is instances owning the fb, only one is allowed to own the framebuffer, this is why on your computer you can't have more than one VT running X. The framebuffer is owned by the DisplayFlinger, Androids own XWindowManager, the flinger and X11 are not interchangeable, it is one or the other and Android apps will not run on X.
The second is libc, Android does not implement libc, but instead its own mutated library called bionic this means compiling with bionic, statically compiling, or forgetting about it. Forgetting about it is the easiest to do here because statically compiling will end up with a 100+mb xserver, which we don't want, compiling with bionic has two issues one, stripped binaries will not run on bionic, so you might as well be just running Androids display manager, and the second issue is as above.
Couldn't someone emulate a framebuffer in an android app and have X take over that framebuffer and make the app's screen be the display on this emulated framebuffer?
EDIT: I guess what I am trying to describe is that you could set up X to write to a different framebuffer than android and make an app to display this framebuffer while still keeping the android UI.
A X server for android is available.
Search github for androix-xserver. The fork of webbbn has a branch containing a lot of recent developments. Only problem with the xserver for android is building the thing. It has a lot of dependencies. It should be beter documented.
There's really no reason one could not implement a full X server against standard Android SurfaceFlinger Surfaces. Though what might be more interesting would be a library-ized version to make it simpler to bundle app + ui into a self-contained "native" Android app package.
It's just a bunch of work -- not particularly glamorous or exciting, unless you're really into porting or writing X servers -- but especially with the NDK these days supporting native apps, access to surfaces, and access to openGL, all the necessary bits are out there to make it possible
Writing a X server program that works e.g. more or less like a vnc client is likely more fun than useful. You can get around the bionic issue in many cases, but for practicle value you're just not able to make it work without z lot of effort. Better off using the vnc/x thing, a debian chroot, and an android vnc client to local host.
Sent from my Transformer TF101 using Tapatalk
I'm gonna speculate and say that it just needs to display a window on the surface flinger and render the Xorg api stuff.. also poll for taps.. doesn't seem like it would be too complex... maybe more complex to have it functioning well on every device.
Vnc will never be better than native X even if it is currently more convienent. I find it frustrating when people say something is not likely because it is tedious or trivial.
Just the fact that someone is actually working on an implementation suggests that it will happen eventually. When it is finished and works.. guess who is gonna be the only ones with the software that can do it!
They're where the people who ask these questions will eventually find themselves.
TBH, the idea of running an xserver with a chroot'd distro on my tab makes me all tingly.
tiiiiingly, kthx!
Sent from my TI-89 silver edition
The rendering stuff is one thing, issues with auth, environment, etc are another. It's slightly more complicated than filling pixels. Something you might also want to consider, doing it with a real X rather tha n the x/vnc trick, is pretty much the same. At best versus writing your own vnc client, it would *maybe* have better performance, rather than just an easy way tobsetup a .xinit/.xsession file.
Sent from my Transformer TF101 using Tapatalk
no me gusta.
Another approach
Another approach might be this
Search for X11 server with VNC backend in the market place (not allowed to post URLs)
market.android.com/details?id=com.theqvd.android.x
It is an X server with VNC backend.
It's probably just a bundle of Xvnc compiled for Linux/ARMv5 and an Android VNC client that knows how to connect to it smoothly. Basically packing what people already do, in an app.
I would also worry if the C code was replaced with a 100% Java xvnc port.
Sent from my Transformer Prime TF201 using Tapatalk
vnc x server and android
While I would love to see a native x server on android, the only way it would work is if there was a port of an android exec environment. Then you can integrate the keyboard, market and etc. But until then the UI is just... Unacceptable. HOWEVER I have been effing with it a lot and realized the best way to run Linux applications for now is to skip the desktop environment... Run xinit via xvfb vnc (tightvncserver) and to make it capture by window at your phones native res. Set options economic translate. This will run any non multimedia application B E A utifully
And then their are freaks like me that get by fine with a terminal emulators UI lol
Sent from my Transformer Prime TF201 using Tapatalk
Hi, another approach here. I think it's a native x11 server (no chroot, no vnc) written in java... there are no binaries though, only sources. If there is any dev here willing to build an apk from sources for us it would be great...
x11
afaik we can run several x11 in pc with different vts, and since x11 is a server its completely possible to write something that listens to tcp and draw stuff grab events and send tcp stuff on a single android app despite that being rly similar to vnc or rdp except vnc works on image buffers,x11 its a bit more complex... i suppose .
i use every day a winxserver at work completely independent of os window manager concluding that would be possible on a android app, (probably lots of work)
android-x11-server looks good, I'm surprised how far along it is but I'm sure the developer has a reason for not putting a downloadable APK up yet.
Something like X11->VNC works like keeping a copy of the frame buffer and figuring out what to encode and send to the VNC client for rendering. X11 and RDP I believe are more command driven, but I'm not sure about RDP. Some kind of native X11 server would rock.
Sent from my Transformer Prime TF201 using Tapatalk
I've just released an open-source X server for Android, also available through the Android Market. Details at my20percent.wordpress.com/2012/02/27/android-x-server/
Note that it's still in beta, and doesn't come with a window manager, although in theory you can run a window manager remotely.
Regards,
mkwan
Anybody here who can download mkwan's android-x11-server from the market and attach it here?
Thanks

[Project] Linux on Android

Hello gents and ladies,
Since the announcement that Canonical made on making Ubuntu on Android a release for OEMs to put on their devices, there has been quite a stir and interest on when we are getting to get this on our phones. Sadly, while the distro of Ubuntu is open-sourced, the programs that were created to achieve this method are not available to the public due to Canonical outsourcing the work to a 3rd party company.
Some users here may already say that we have Ubuntu on our phones but the method that is most commonly used by the community is to load up a virtual environment or Chroot inside of Android then remote into the interface via a VNC connection app. While this does work, it is a pretty sloppy method that is resource intensive and does not benefit from any hardware acceleration for the Linux desktop environment that is used. Plus, there is no way to pipe audio thru a VNC connection so using any audio/video programs in VNC is pointless.
Lastly, Ubuntu on Android is actually nothing new to the world of Android, as its been around for about a year and a half. It came in the form called Webtop that Motorola had launched on their Atrix/Bionic/RAZR lineup of phones. Webtop is essentially a stripped down version of Ubuntu with a lot of Linux tools taken out along with a very limited desktop environment. Webtop does everything that Ubuntu on Android does but in a neutered manner but there are different groups on each phone that have accomplished bringing back many of the linux tools that were taken out. Check out the thread below to see what I mean.
http://forum.xda-developers.com/showthread.php?t=1397583
It is believed that the same methods and tools that are present in Webtop are the same ones being used by Ubuntu on Android and possibly made by the same company. This can be seen in the demo video of Ubuntu on Android where the demonstrator had replaced the Webtop distro with a full Ubuntu 12.04 distro on a Motorola Atrix 2. So to debunk the myth that Ubuntu on Android can be easily loaded up on a phone as shown on video, no cause it was initially was setup with the required framework and partition space to load Ubuntu on Android even before Canonical announced Ubuntu on Android.
With all that is said, Canonical is targeted OEMs and Carriers to launch their Ubuntu on Android on select model phones and probably will not release the necessary tools as open-source code so the development community can compile their own working Ubuntu on Android. Now, all hope is not lost because some of the work has already been done but needs to come together into a package that can be ported from one phone to another.
Here are different parts that are needed:
1) Ubuntu image
There are many working images out there that run in a chroot environment but there is one universal image that is being implemented that is made by zacthespack that works on a variety of different devices - See attached thread
http://forum.xda-developers.com/showthread.php?t=1467811
2) X Server Port
Instead of using a VNC client and server model which is very resource intensive and does not benefit from GPU acceleration/Framebuffer. Using a X Server windows management system like they do on home PCs and laptop will greatly increase speed and functionality of a Linux distro opposed to VNC. This is how Webtop on the Motorola phones work is by using a port of X Server which pipes the display out to the HDMI port to be used with the Laptop dock or home dock. There is a group at AndroiX.org that is working on a port of X Server for Android that is looking very promising so hopefully anybody that can contribute to project to speed it up as it is the most crucial part for Linux in Android.
3) Sound
The biggest drawback of VNC is the lack of any sound processing which can be very annoying when trying to watch any videos or listen to sound clips on the web. What they are using on Webtop and Ubuntu on Android is a custom compiled version of PulseAudio module to pipe audio thru Android's audio manager system. No projects have yet been started on this so if anybody knows of one, feel free to post a link.
4) Android in Window
As demo'ed in the video and on Webtop, you have the ability to see whats on your Android display but in a window within Ubuntu when Webtop/Ubuntu on Android is engaged. This is a cool feature that maybe a X client app within android that pipes the display to a window in Ubuntu or maybe VNC client/server scenario. This is not really necessary to Linux in Android but non the less a cool feature to have.
5) Contacts/Text messages/Call logs
This is more shown in Ubuntu on Android opposed to Webtop where in Ubuntu mode, you can look at your Contacts or call logs in a program as opposed a Android view in a window. They also demo'ed a special program in Ubuntu to where you can send/receive text messages in a interface designed for Unity. They accomplished this by using a server application in Android, more commonly known as Motorola Phone Portal, that can relay information from the phone to applets inside of Webtop/Ubuntu on Android using a web interface API on localhost:8080 or on a remote computer on the same network. Like I said before, not really necessary but another cool function to have.
All and all, this pretty much sums up all the different parts for a project like this to take place. I am in no way a seasoned developer, just a person throwing out concepts that I have learned and done myself on the Bionic Webtop phone which hopefully some skilled individuals can run with as I am no Linux expert by any means. Anywho, let me know what you guys think about this and what can be improved.
Ubuntu on arm.
I've been looking into the development of something like this and have found a few resources that may prove beneficial:
Linux 4 Tegra (nVidia)
System Requirements
Host PC running Ubuntu Linux version 9.04 or higher.
Tegra Linux Driver Package providing a kernel image, bootloader, NVIDIA drivers, and flashing utilities. For more information, see the Release Notes.
Sample filesystem (example provided derived from Ubuntu 12.04)
Click to expand...
Click to collapse
Please note that nVidia currently provides driver packages for each model of the Tegra (Tegra 2 and 3).
As well as:
Ubuntu on Smartphones
Now. I've been playing with both an Ubuntu and Debian chroot and have ran into the issues you speak about (in a chroot with only vnc support is very limited, no sound, no camera, etc.) and would like the ability to dual boot at least.
[Q&A] Ubuntu on the Transformer (eMMC install) (xda-developers)
Basically, the creator of this thread is working from another dev's work to get ubuntu running on an Asus eeePad.

[Q] Native Linux on phones

What phones can boot into and run a desktop ARM Linux distro (such as Arch, Slackware, Ubuntu or Debian) natively, with call and messaging support?
Ubuntu Edge.
linuxphone said:
What phones can boot into and run a desktop ARM Linux distro (such as Arch, Slackware, Ubuntu or Debian)
natively, with call and messaging support?
Click to expand...
Click to collapse
The closet you can get is with Ubuntu Edge but it is still under development and will not be available for a some time.
I am sorry I can not post the links yet in the post but you can google for the "Ubuntu Edge" and you will get enough reading material about the project.
There are also some solutions with VNC and a VM in which you run a desktop Linux. Might not be what you want, but you would have a Linux running on your phone.
The main problem is going to be drivers, which is why a ARM Linux can't just be booted. Someone would need to be merging device specific drivers into the linux, test it, debug it and so on, which doesn't make sense if there are so few people really wanting it. And as you can see with Ubuntus try on that: It is a lot of development needed.
It's possible to dual boot Maemo (to use it for phone features) and Ubuntu (desktop) on Nokia N900.
It's also possible to dual boot Windows Mobile (for phone features) and Ubuntu (desktop) on HTC HD2.
On the other hand, these Indian tablets boot and run Linux:
w w w .youtube.com/watch?v=n1tC8uSR0og
And have phone features:
w w w .techulator.com/resources/9492-Datawind-UbiSlate-7C-Edge-tablet-Full-specifications-features-online.aspx
If anyone tested Linux with phone calls on those devices, please tell.
A long time ago I installed Gentoo Linux on an ARM based hx4700 iPaq; it worked but ran so slowly it wasn't much use. The specialised Linux distros Familiar and Angstrom ran much better, as they were specifically designed for handheld devices. Granted phone specs are way improved now, but is there any real advantage running a full-blown Linux on a phone.... surely Android is basically a Linux distro optimised for phone specs (and chargeable apps, etc...). Would it be less work to port apps you need to run on Android instead - if that's your aim? Although it may be worth doing just for the sake of it....
Full-blown Linux offers the advantage of being in control of the operating system. You choose the tools you need. Android is less secure (backdoors, apps reading your data) and mobile apps generally feel like crippled desktop apps. For example, apt-get is much more comfortable to use, you just type the packages you need and it downloads them, no need for searching inside categories of app market (and all of them are free with full functionality with no ads). You can use the same scripts you wrote for your PC. It can be tweaked to run really fast (low resource usage apps written in C vs Android's Java), and you choose your desktop environment (e. g. a tiling window manager with the right apps literally flies on an old machine, RAM used on system start with Xorg running equals 20 MBs). Also, there's full filesystem encryption.
Mobile hardware is more or less the equivalent of a Pentium 2 / 3 / 4 desktop PC, which is enough for full desktop app experience.
Im glad i found this topic.
Thats not new to me...
I think the questions to add are:
- How to fully remove Android to Install Linux
- Can i install all the Drivers needed?
So that i can use: Modem(phone); WiFi & GPS under Linux.
-Is it possible to revert to Android?
- Minimum Requirements to Run Linux and What Distro?
Sent from my GT-I9003 using XDA Free mobile app

linux for smartphones

hello!
is there a linux distribution for any kind of smartphone?
ubuntu touch is only for a few devices and android apps (e.g. gnuroot, etc.) are not a complete operating system and are very limited
is there a complete generic linux distribution to install on any smartphone (no matter if other functions dont work like phone calls, send messages, etc.)
by now i have a motorola razr xt914 d1
thanks a lot
arturo a. said:
hello!
is there a linux distribution for any kind of smartphone?
ubuntu touch is only for a few devices and android apps (e.g. gnuroot, etc.) are not a complete operating system and are very limited
is there a complete generic linux distribution to install on any smartphone (no matter if other functions dont work like phone calls, send messages, etc.)
by now i have a motorola razr xt914 d1
thanks a lot
Click to expand...
Click to collapse
There's a Linux installer app: which you can find if you search the Google Play store for: "Complete Linux Installer"
hi thanks for your answer!
unfortunately according to commentaries that app is not what i am looking for.
i believe many people wants a linux distribution on their smartphone (full installation or at least dual boot) the same way we can install our favorite distribution on any pc
i hope some day this will be possible
anyway thank you.
bye
GNUroot
Does anyone know what is required to use GNUroot and what it is capable of?
Do I need to install a terminal separately? There is no launch icon.
There is some more info on linux installer development here - http://linuxonandroid.org/ and here - http://forum.xda-developers.com/showthread.php?t=1585009
arturo a. said:
hello!
is there a linux distribution for any kind of smartphone?
ubuntu touch is only for a few devices and android apps (e.g. gnuroot, etc.) are not a complete operating system and are very limited
is there a complete generic linux distribution to install on any smartphone (no matter if other functions dont work like phone calls, send messages, etc.)
by now i have a motorola razr xt914 d1
thanks a lot
Click to expand...
Click to collapse
Umm... Not for ANY PHONES. Just few phones could run Ubuntu(Made from Linux) Touch. There is no Linux distribution for any SmartPhones. You should port Ubuntu touch to your phone.
TIP:Android is made of Linux. Linux-Based OS. Structure of Android kernel is very similar as Linux Kernel. If you want to run a Linux Command line, You should run terminal.(make, gcc, etc... )
Jason Hyunwoo said:
Umm... Not for ANY PHONES. Just few phones could run Ubuntu(Made from Linux) Touch. There is no Linux distribution for any SmartPhones. You should port Ubuntu touch to your phone.
TIP:Android is made of Linux. Linux-Based OS. Structure of Android kernel is very similar as Linux Kernel. If you want to run a Linux Command line, You should run terminal.(make, gcc, etc... )
Click to expand...
Click to collapse
I want the exact same thing that the original poster wants: a smartphone that is running unrestricted Linux.
What I DO NOT want is a smartphone that is "Linux-based", where the "Linux" designation is essentially irrelevant because the interface that is presented to the end-user significantly obstructs access to Linux for average users. In other words:
Who cares if it is "running Linux" if the average user using the phone cannot get to Linux without playing tricks with rooting?
Furthermore, I am NOT looking for a phone where I can use tools to get root access. I already know how to do that.
What I want is to be able to direct my NON-TECHNICAL CUSTOMERS to a website where they can buy these phones, many of whom are doctors and have ABSOLUTELY NO INTEREST WHATSOEVER of rooting their phones, to be able to install my native C++ applications on them. In other words, I want a smartphone that is running Linux, unrestricted, and if it is running anything else, that other thing does not interfere with installation of true native C++ applications that have fully access to the device. My customers will buy these phones, and install my custom native C++ application onto these (extra) phones via my web site.
I already know about Ubuntu Phone and Tizen. Both of those are not what they claim to be. They are not truly open platforms, as regular users cannot install regular Linux applications willy-nilly as they can on a PC. Jolla claims to be better, but their phones are not sold in the USA.
I want an unrestricted Linux smartphone that can be purchased online by medical professionals in the USA.
Please do not respond by telling me that there is no market for this, or that I can rewrite my application in Android/Java, or that I can give 3-hour training classes to each of my customers about the joys of rooting, etc. :silly:...

Categories

Resources