top | item 24684187

Android In a Box – Run Android applications on any GNU/Linux operating system

609 points| emersonrsantos | 5 years ago |anbox.io | reply

147 comments

order
[+] ignoramous|5 years ago|reply
Ubuntu has a cloud offering for this: https://ubuntu.com/blog/canonical-introduces-anbox-cloud-sca...

It is a valiant effort (lead by u/mrmorph) even if the open source version is limited and runs Android 7.

There's a community of over 1K enthusiasts on the telegram group: https://t.me/anbox

Previous discussions:

https://news.ycombinator.com/item?id=14090482 (317 points, April 2017)

https://news.ycombinator.com/item?id=17886542 (98 points, August 2018)

[+] blendergeek|5 years ago|reply
> Ubuntu has a cloud offering for this: https://ubuntu.com/blog/canonical-introduces-anbox-cloud-sca...

This isn't quite correct. From Simon Fels [0], we see that

"Despite the nature of Anbox, Anbox Cloud is not open source and a commercial product. It is based on the same underlying ideas of Anbox but is a completely separate code base."

> It is a valiant effort (lead by u/mrmorph) even if the open source version is limited and runs Android 7.

I really hope that all distributions of Anbox for PureOS, postmarketOS, etc. will soon start distributing a newer system image. Nothing prevents this and it would make Anbox actually useful.

[0] https://mm.gravedo.de/blog/posts/2020-01-21-taking-the-anbox...

[+] kbumsik|5 years ago|reply
That's pretty good sign!

These kinds of open source emulators or similar stuff usually driven by individuals and often have risk of being unmaintained. But this project is used by larger companies like Canonical so we can expect better support.

[+] R0b0t1|5 years ago|reply
Why use the word enthusiasts? It seems like a weird half word, but between what I am not sure.
[+] Cloudef|5 years ago|reply
https://github.com/Cloudef/android2gnulinux There's also this clean-room implementation of android apis and bionic->glibc translation layer that I worked in past. It can launch some unity games, and cli tools usually work. I used this mainly to reverse engineer chinese DRM in some android apps.
[+] londons_explore|5 years ago|reply
Why is a clean-room implementation necessary? Isn't android the Apache license, which lets you do (almost) whatever you like?
[+] ekianjo|5 years ago|reply
Long time no see Cloudef! Did you actually any of it for the Open Pandora?
[+] seba_dos1|5 years ago|reply
I'm playing with it on my Librem 5 sometimes out of curiosity. I didn't expect much, but some apps actually work really well (Element, Conversations, Android builds of my Allegro games etc.). Even tried Among Us which is a Unity game and it's... kinda playable (there is a problem with some shaders making it hard to play, but it all works otherwise - haven't debugged it yet though).
[+] semi-extrinsic|5 years ago|reply
I've been pleasantly surprised at how well one of the premium nautical chart apps work under Anbox. It counts as the same license as my phone (no additional cost), and the ability to sit at home and plan a trip on a high resolution monitor with very good mouse/keyboard ergonomics and blazing fast render when moving around, is just night and day compared to doing it on my phone. I can even run it splitscreen with a proper web browser for reading about potential destinations, running Google Earth, etc.
[+] LockAndLol|5 years ago|reply
Does anbox degrade battery life of the Librem5? And have you ran stuff like Signal and Telegram on it?

Nice to know at least somebody got their phone and is able to play around with it.

[+] Abishek_Muthian|5 years ago|reply
Have you tried web notifications on a browser in Anbox on Librem? How does PureOS handle web notifications?

I'm assuming you haven't installed Google Play Services on Anbox to test actual Google Push Message Service.

[+] knocte|5 years ago|reply
good stuff! have you tried whatsapp?
[+] wila|5 years ago|reply
Another way to run Android on x86 is by running it in a VM [0]

Disclaimer: I wrote the article which is basically a walk-through for installing Android x86 on a VM in VMware Fusion.

[0] https://www.vimalin.com/blog/install-android-x86-in-vmware-f...

[+] ape4|5 years ago|reply
This seems nicer to me. Just like any other VM, using a proven container, etc.
[+] jmnicolas|5 years ago|reply
I installed Android 9 x86 on an old laptop but without a touch screen the experience was quite bad. Osmand would not run full screen, it might have been my mistake but I didn't continue further.
[+] erohead|5 years ago|reply
There's a fantastic dockerfile that is set up to run Anbox in a container and expose a VNC connection. Tested to work on cloud (DO/AWS): https://github.com/aind-containers/aind
[+] jeroenhd|5 years ago|reply
Can this be used to run a single application in a VNC window? I've been looking for a solution for running Android applications on Linux that support multi-user environments (Anbox only has one Android space, all apps and data are shared between Linux users) and this seems like it might work for my use case.
[+] panpanna|5 years ago|reply
One of the reasons I am not switching to an "alternative" platform like librem or pinephone is that I need apps for things like banking, which are available for iOS and android only.

With a working android emulation I could switch from android much easier.

[+] swiley|5 years ago|reply
I've heard this a couple of times and it seems a bit strange. My bank is entirely online and has a very nice app (USAA) but there's absolutely nothing that can be done in the app and can't be done with their webpage.

Is this something that happens often in eg Europe?

[+] INTPenis|5 years ago|reply
Don't the app stores require a safe bootloader? And the banking apps in turn require a working app store.

I believe that's how they keep it secure, everything stops working if Google detects you've cracked your bootloader somehow.

Disclaimer; I'm using layperson's terms. But I've re-installed a few Pixel phones with Lineage.

[+] canistel|5 years ago|reply
Works only with snap, unless you want take the trouble of building it on your own...
[+] mappu|5 years ago|reply
It's also packaged in Debian contrib, if you want to avoid the snap.
[+] cheph|5 years ago|reply
I actually tried it with snap on fedora some time ago (maybe a year or two) and it did not work. I guess snap is cross platform as long as the platform is ubuntu, kind of like .net in that.
[+] l00sed|5 years ago|reply
I just commented about this. Disappointed as well. Is there a GitHub repo for building from source?
[+] lez|5 years ago|reply
My bank had just notified me that starting Jan 2021, I won't be able to use my bank card without a smartphone app for online purchases inside the EU.

This software arrived just in time.

[+] jmnicolas|5 years ago|reply
Fwiw this "feature" was so buggy on my bank app (Crédit Agricole) that they reverted me back to SMS 2 FA.
[+] jeppesen-io|5 years ago|reply
Very cool, I'm going try this

Anyone know if it works on ARM? I see it being a cool Raspberry PI use case. Didn't see anything in the docs

[+] solarkraft|5 years ago|reply
It does: One of the main use case is running Android apps on Linux phones.
[+] GekkePrutser|5 years ago|reply
Hey cool I was just looking at that.

I wonder if I could run Whatsapp in this, as a bridge to Whatsapp Web (for its Matrix bridge).. It should be more efficient than running a full Android VM from the Google Dev tools.

Has anyone tried this? I suppose the biggest issue will be the scanning of the QR code, as I don't think webcams are supported.

[+] pmontra|5 years ago|reply
Would it be able to access your contacts? I'm afraid WhatsApp needs them.

Suppose I'm the owner of a Linux Phone and run WhatsApp in Android in a Box. Should I maintain an address book inside the box (can it even fit into the same box of WhatsApp?) And how do I attach the pictures I take with my phone or the files I have on my local storage? Etc.

[+] eddhead|5 years ago|reply
Can this potentially run on WSL2 or the upcoming WSLG, cos that'll make life perfect for anyone running Windows (I'd use it as an emulator for my development needs)
[+] petters|5 years ago|reply
It seems to me that both Google and Microsoft would benefit a lot if all Android applications were available on Windows.

So I would not be surprised if they were wording on it.

[+] anaisbetts|5 years ago|reply
It seems like it could, but you have to compile a custom kernel with Android Binder enabled which, while possible in WSL2, is a bit of a pain in the ass
[+] ncmncm|5 years ago|reply
It is not an emulator.
[+] dtrailin|5 years ago|reply
I wonder if we will reach a point where Android might become the standard way to make apps across every platform. The framework seem abstract enough that it seems like run on different kernels (e.g. fuchsia). Would be interesting to see a native Android implementation on Mac and Windows.
[+] julius_set|5 years ago|reply
As someone who’s been writing both iOS and Android apps for almost a decade now. This made me chuckle, the sheer absurdity of Android being the standard when Google can’t even ensure mass adoption for their latest releases is just too ironic.
[+] dmos62|5 years ago|reply
I think that Android is a stepping stone. I expect to see things outright superseding it, or Android receiving a capital overhaul to fix the current situation where every phone uses an Android fork that must be maintained separately (though I think Android will run out of steam sooner than this will happen).
[+] l00sed|5 years ago|reply
This feels like a big deal for Android Development. I really dislike the bulk and sluggishness of Android Studio.
[+] dahfizz|5 years ago|reply
It's definitely cool, but I'm not sure it's a big deal. Anbox has been around for years and developers seem to prefer android studio.

Anbox solves the emulator problem, but setting up the Android toolchain yourself in a different ide is a big pain.

[+] solarkraft|5 years ago|reply
I tried Anbox on a relatively fast tablet a few months ago and it was a bit choppy, but everything worked! Something I found weird is that it needs a daemon to run, integration didn't seem very deep yet either. Longer term I'd be happy if it was deeply integrated, with Android apps running just like native ones. Currently it still seems to need a daemon and a complete running Android system. Does anyone know whether it's something one could get around or are we stuck with that?
[+] villgax|5 years ago|reply
Literally a DockerFile away.
[+] anaganisk|5 years ago|reply
Has to run on privileged mode tho
[+] Tepix|5 years ago|reply
Sounds nice for apps such as WhatsApp that i only need on special occasions and that will spy on me as much as they can get away with.
[+] sbmthakur|5 years ago|reply
Has anyone used anbox for pentesting android apps?