News for hackers. Stuff that matters.
Re:Android in Docker without QEMU/emulator by PascalW on Tuesday January 04, 2022 @05:35AM (#29793375)
Came across this very useful project. It provides Docker images with Android running directly in Docker, without qemu or an emulator. I've never seen this before, all other solutions that I'm aware of either run the Android emulator in Docker or use qemu directly (like Anbox).

Advantage of this is that it's very lightweight and does not require VT-X or AMD-V, ideal for running in cloud environments that typically do not expose this CPU capability.

Re:Android in Docker without QEMU/emulator by OJFord on Tuesday January 04, 2022 @07:26AM (#29794018)
Re:Android in Docker without QEMU/emulator by mathfailure on Tuesday January 04, 2022 @03:45PM (#29800196)
ReDroid: Requires Docker. The images seem to be based on pure Android. Multiple versions available: 8.1, 9, 10, 11, 12.

Anbox: Requires 'snapd'. The image is based on AOSP based on Android 7.1.1.

Waydroid: Requires Wayland. The image is based on LineageOS that is based on Android 10.

Re:Android in Docker without QEMU/emulator by carlhjerpe on Tuesday January 04, 2022 @07:06AM (#29793925)
Anbox doesn't use QEMU. It uses the same underlying kernel tech as Docker, LXC and other isolation tech. This is why you need the ashmem and "binder"(?) kernel modules to run Anbox.

I'm currently "trying" to get Anbox working on NixOS (It's currently broken on 5.x kernels but should be fixed by https://github.com/NixOS/nixpkgs/pull/102341) so that's why I know that Anbox is the "same" as this.

Re:Android in Docker without QEMU/emulator by PascalW on Tuesday January 04, 2022 @01:40PM (#29798296)
Interesting. I've never been able to make Anbox run in a cloud environment though, don't recall the exact details. But indeed I guess it should be able to work as there's also a commercial offering targeted specifically at cloud setups. https://anbox-cloud.io/
Re:Android in Docker without QEMU/emulator by rjzzleep on Tuesday January 04, 2022 @10:13AM (#29795588)
I personally haven't managed to get anbox to run at either acceptable performance or any kind of level I would consider stable. Someone posted waydroid as an alternative here a few months ago, but I haven't tried it yet.
Re:Android in Docker without QEMU/emulator by MayeulC on Tuesday January 04, 2022 @12:08PM (#29797059)
Waydroid seems performant enough to me. SuperTuxKart is very playable (though I didn't try much as on-screen controls are hard to handle with a mouse). Microsoft excel also works.

A lot of android apps only come with arm library, and need an extra emulation layer on x86, I haven't tried that.

Re:Android in Docker without QEMU/emulator by NoahKAndrews on Tuesday January 04, 2022 @01:28PM (#29798138)
Waydroid is a more performant successor to anbox.
Re:Android in Docker without QEMU/emulator by blueflow on Tuesday January 04, 2022 @09:42AM (#29795228)
Consider taking a moment to look into the difference between "emulator" and "virtual machine".

What the link refers to is an kind of Android emulator, but not the virtual machine kind of emulator.

If you are tempted to write a rebuttal in the "reply" box, answer this question first: Why are programs like xterm and urxvt called "Terminal Emulator"? What do they emulate?

Re:Android in Docker without QEMU/emulator by zaat on Tuesday January 04, 2022 @03:14PM (#29799728)
Hi blueflow, I see that today you are not tired of arguing semantics.

The issue here is context. What GP means by Android Emulator refers to specific piece of software, the AVD emulator provided by Google which emulates full android device, it emulates more than just VM, it's also have skins and physcal buttons.

https://developer.android.com/studio/run/emulator