Anbox Can Run Android Apps Natively On Linux (In A Container) (anbox.io)
Slashdot user #1083, downwa, writes:
Canonical engineer Simon Fels has publicly released an Alpha version of Anbox. Similar to the method employed for Android apps on ChromeOS, Anbox runs an entire Android system (7.1.1 at present) in an LXC container. Developed over the last year and a half, the software promises to seamlessly bring performant Android apps to the Linux desktop.
After installing Anbox (based on Android 7.1.1) and starting Anbox Application Manager, ten apps are available: Calculator, Calendar, Clock, Contacts, Email, Files, Gallery, Music, Settings, and WebView. Apps run in separate resizeable windows. Additional apps (ARM-native binaries are excluded) can be installed via adb. Installation currently is only supported on a few Linux distributions able to install snaps. Contributions are welcome on Github.
In a blog post Simon describes it as "a side project" that he's worked on for over a year and a half. "There were quite a few problems to solve on the way to a really working implementation but it is now in a state that it makes sense to share it with a wider audience."
After installing Anbox (based on Android 7.1.1) and starting Anbox Application Manager, ten apps are available: Calculator, Calendar, Clock, Contacts, Email, Files, Gallery, Music, Settings, and WebView. Apps run in separate resizeable windows. Additional apps (ARM-native binaries are excluded) can be installed via adb. Installation currently is only supported on a few Linux distributions able to install snaps. Contributions are welcome on Github.
In a blog post Simon describes it as "a side project" that he's worked on for over a year and a half. "There were quite a few problems to solve on the way to a really working implementation but it is now in a state that it makes sense to share it with a wider audience."
If this could make is possible to run the app BankID, it would be awsome! (BankID is a used in Sweden to login to many websites like banks, drugstores, state websites, etc). The support for the desktop program for Linux ended a few years back, and since that, the mobile app is the only thing we GNU/Linux users can use.
Now back to your regular programming. ;)
at the moment.
I loaded it into a VirtualBox Ubuntu 16.04 VM and ran into two problems. 1. is it doesn't properly start its background service after install. Once you start it the app will start up and display the list of Android apps. However launching one of these segfaults the whole thing.
Modern app appers know that ONLY apps can app apps! These LUDDITES are so desperate to become appy app appers that they're making a LUDDITE program that lets them app apps on LUDDITE computers! Appald Trump will put a stop to this by deporting these LUDDITES to LUDDITE Mexico!
Apps!
Additional apps (ARM-native binaries are excluded) can be installed via adb.
What about if my Linux was running on an ARM cpu, e.g. on a Raspberry Pi?
Last time I checked, both Android and Chromebooks were already running the Linux kernel.
Escher was the first MC and Giger invented the HR department.
If it is running in a container that itself is running Android then it aint running fucking natively. still awesome news.
There are a lot of people who brag about Linux's popularity just because the Linux kernel is buried deep under the many layers that make up Android, and Android is very widely used.
Well I think that this project just goes to show how much Android is not Linux.
If Android should really be considered "Linux", then it would be so much easier to run an Android app on a typical GNU/systemd/Linux system.
Here we have somebody who works for one of the main desktop/server Linux vendors, and it took even him a long time, a lot of effort, and apparently some difficulty just to get something that barely works.
Yeah, the Linux kernel is way deep down inside of Android, but it's buried so deeply that it's pretty much irrelevant.
It's misleading to consider Android a form of Linux when it's damn difficult to get an Android app running on a traditional Linux distro.
The year of Android apps on the Linux desktop has commenced!
there are some android apps i like and would enjoy running on a Linux desktop with a proper mouse & keyboard, for example SDRTouch with my SDRPlay software defined receiver would be much better than on a little bitty tablet, and hopefully using a mouse with it would make it nicer for adjusting the frequency or bandwidth and other stuff, good luck to the developers i hope this pans out to be a great program and improves both Linux and android
Politics is Treachery, Religion is Brainwashing
I wonder if this has hope of working with crouton, the Ubuntu chroot for ChromeOS.
I want emulated Android mainly for privacy.
I cannot use the native ChromeOS Android support because it's not privacy-respecting: it force-hands-over the data of the Google account you use to login to ChromeOS, and it doesn't support ChromeOS multiprofile so you can't choose what Google account that will be. I suspect it also hands over device-wide serial numbers to the Android Play Store "ecosystem", just like native Android, something ChromeOS web browsing doesn't do. I'm not letting Uber create a dossier on me that I can't escape without throwing out my Chromebook to get a new serial number. I'm not letting Android apps of different companies compare dossiers about me amongst each other in the cloud, correlating them by Google account or device serial number, something iOS and web let you frustrate somewhat but Android eagerly enables.
I have been waiting for something like this for a long time. Unfortunately I have no interest in "snap" nor *buntu. And having it in a container isn't really "running android apps natively on linux" although it might be close, depending on the container system used. https://en.wikipedia.org/wiki/...
Other Android-under-Linux setups never seem to be free, open, stable, reliable, and compatible (especially when dealing with a touchscreen and trying to deal with screen rotation). At least not that I have tried.... and none were "native".
http://www.shashlik.io/
https://www.genymotion.com/
http://www.android-x86.org/
http://www.jide.com/remixos
Something that runs on Android only that you wish Linux had?
I can't think of any.
not interested in snap.
but if one could run android in docker, with 3d acceleration, that would be nice.
So, you can use apps "designed" for a pretty small screen with a touch-only UI, on a large monitor with a keyboard/mouse?
Actually, android also runs on tablets so not only small screens.
Nearly every last android device has a OTG port, and Android supports mouse and keyboard input out of the box (yup, plugin a powered hub, an USB keyboard and USB mouse and, suprise, everything works as expected.) (There are even small accessory manufacturer specializing in hardware keyboards with USB and Bluetooth for Android).
Not only that, but since recently Android even support variable-sized windows.
On actual real tablets, this is used to enable to tile application side-by-side.
But in Anbox it's used to enable application to run as arbitrary windows on the desktop.
And the parent was asking about an App that simply works as a glorified OTP. So that's definitely something which isn't entirle built around a phone UX.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
The summary is badly worded.
you can install apps but they need to be
either:
- in android's architecture-neutral bytecode ("I can't believe it's not Java(tm) !")
- in the same native architecture as your main OS, because there's no emulator, Anbox runs in a container, thus interecting straight with your current kernel.
Currently supported architecture lists: AMD64 (obviously), but also ARMHF and ARM64.
So you can install an ARM app, as long as you do it on a compatible Raspberry Pi, or Pyra, etc..
But again, the whole thing is currently alpha. So for the next few months don't excpet much except a lot of crashes, specially if you're not running the same kind of configuration as most other testers.
(You'll find way more bugs)
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
Actually there is a limitation, but the above poster is wrong: it's not a kernel one, it's a hardware one.
- Android expects hardware floating point (e.g.: armhf). But Raspberry Pi 1 lacks them.
Also this requires Android directly talking to the host kernel.
And not all Android Kernel extension (that are needed in this case) have been thoroughly tested with raspberry pi.
Expect to stumble unpon even more never-before-seen bugs.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
If you play close attention :
on any user space that lacked Android support up until now.
Anbox is a combination of 3 things :
- an LXC container containing the Android userland
- compiling android-only kernel extensions so the container can actually find them in the kernel (e.g.: Binder)
- using a forwarder normally designed for the emulator that will forward a few things (like graphics). Because the container is isolated from nearly all hardware accesses.
As long as your weird user-space can hangle this, you can give it a try.
(GNU/Linux of course. But Android might be able to host such a thing. Maybe even find a way to get a Busybox/uLibc user space run this)
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
Solution to run Android APPs before :
They run a virtual machine. A whole Android computer is emulated.
A complete stack, including the anrdoid userlan (of course, that's the point), but also including its own kernel which talks to the virtual hardware that is emulated inside the emulator/virtual machine, and that emulator/virtual machine is a user-land application that in turns runs on the host linux, and talk to yet another kernel, the one running on the real hardware.
In short you have two completey stack kernel+userspace, and a heavy emulation layer that simulates a whole imaginary computer in between.
(that layer can even have a CPU emulator, to run ARM apps on AMD64 hardware).
Solution such as Anbox :
- Add a few key missing feature to the host's kernel (e.g.: Android needs Binder, desktop seldom have it).
- Simply run the Android userland in a chroot
- Android talks to the real kernel running on the real hardware.
(Well not exactly a chroot. LXC uses namespace - like chroot but isolates many more things).
The point: Now you avoid an entire extra layer simulating a computer in which you run a whole stack with a kernel.
As sais, android userland talk directly to your desktop's kernel.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
I will explain it to you - it runs an entire Android userspace.
Yeah, and that's the entire point.
Before, you would need to fire up something like Qemu, and emulated a complete android machine with a running kernel inside.
Now said Android userspace can talk straight to the kernel, without any emulation layer.
That's the whole fucking point of this.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
I am a long time GIMP user, but sometimes I just want to do quick things with photos - tweak the colors, crop, add an arrow or note, or make a quick collage. There are lots of android apps that make things like this quick and easy. I have G'MIC but that gives you all the settings, which I do use. But sometimes it's nice to just have presets. And sometimes you just gotta make a meme out of a pic to send to friends. :)
My beliefs do not require that you agree with them.
Is "Canonical engineer Simon Fels" the illiterate fuck who thinks "performant" is a real word. If he is, he needs remedial English lessons ASAP.
Except virtually no Android apps even bother to make their apps work well on slightly larger tablet screen. {...} But for the vast majority of Android apps, the actual UI experience is designed for an approx. 6" diagonal vertically oriented screen with only touch-input. Virtually no apps are designed or redesigned to even work well on a slightly larger tablet screen.
My personnal experience differs (10" asian tablet here).
Of course, your personal annecdotal experience is just one data point as well as mine.
But I've seen several applications which work flawlessly on the 10" portrait (16:9 widescreen) tablet.
None of those that I regularily use pose any problem.
(Of the top of my head: Firefox, VLC, Google Maps, Google Calendar, the finding/renting software of a couple of car-sharing services, a few games, several chat programs both personnal (Skype, etc.) and professional (Cisco WebEx, Adobe Connect), Orbot (=tor), ConnectBot, ES Files, Netflix, Spotify, etc.)
They are either trivial (e.g.: Orbot - it's just a single "Start TOR" button in the middle) or they are correctly adapted.
And again, what the parent poster misses most are a few key apps (banking OTP / 2FA) which tend to have a trivial layout.
Any non-trivial app will absolutely suck to use on a 27" horizontally oriented screen using a keyboard and mouse.
Yes, I get it, like me and most other people on /. you're a dev. We tend to have our IDE open full screen on giant 27" 4k desktops, full with tools box and other small windows which completely clutter the screen. /. aren't typical users.
But you, me and the rest of
Most more "regular people" I know - even those with Linux installed on their laptop - tend to be of the 13-15" laptop HD screen crowd.
And again, thank to the same extension that enable side-by-side display on tablets, Anbox should allow you to open application in windows.
So in the end, it's not the a smartphone game will be so much scaled up, that you can see individual pixels, each the size of your normal desktop icon.
It's more that a laptop user will be able to open a small/medium window with an android app running inside.
Not that much different than any flash games.
Hell, WINE or a virtual PC environment will give you much better apps than Android will.
If the app do actually have a Windows desktop port.
There are a lot of people who use their iOS or Android smartphone or tablet as their main computing platform.
Thus there are a lot of things which are primarily targeting pocket devices.
e.g.: There is no such thing as a desktop Windows or Mac OS X verison of Instagram.
the typical non-dev hobbyist who's likely to install Linux on their laptop, would be also more likely to be interested in trying android-only apps on a laptop.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
So it is basically Android x86 which is indeed an unstable pile of shit - unless ran on the hardware that the "owner" of the x86 project provides from a parallel commercial company he runs
I strongly suspect that most of the problems with android kernels are the hardware drivers : for the GPU, the wireless chips, etc.
(because there aren't much kernel drivers which support android's unusuall ABI.
Most free/libre linux kernel drivers use GNU/Linux's DRI API for graphics instead of Android's Flinger)
Here the situation is a bit different :
- in the special case of the GPU, anbox uses a facility which is normally used by the emulators (like QEMU) for accelerated emulated graphics.
Graphics command are recorded by the container android compositor, and then sent to a daemon on the host whose role is to draw them on a regular Linux desktop over OpenGL.
There's no requirement for the host to support Android's ABI.
- network is isolated. guest can't have access to the actual network device (no direct Wifi chip control). container usually sees only a bridge device.
- Bluetooth isn't currently supported inside the container.
So once anbox leaves beta, it might end up being more stable than x86 android counting on special kernel API/ABI
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
1. Cut a hole in a box
2. Put your droid in the box
3. Make Linux open the box
And that's the way you do it!