Live data from Hacker News

Android in Docker without QEMU/emulator

github.com

51–60 of 72 posts

Re: Android in Docker without QEMU/emulator

#51
What exactly is Docker enabling here beyond a Docker workflow, which is quite orthogonal to the presence of a vm or emulator?

Isn't the enabling technology here just kernel-level android bits? Docker is fluff, yet ends up dominating the headline.

Re: Android in Docker without QEMU/emulator

#52

Earlier quoted context omitted.

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.

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.

Waydroid is a more performant successor to anbox.

Re: Android in Docker without QEMU/emulator

#53
Trying to fix some Rust docker builds that are being killed by QEMU on Apple Silicon right now. I always believed Docker was cross platform, I had no idea how much of a pain it can be to use with buildx and --platform to get stuff working. SIGSEGV errors at random points, non-deterministic errors, GAH!

Re: Android in Docker without QEMU/emulator

#54
post #51

What exactly is Docker enabling here beyond a Docker workflow, which is quite orthogonal to the presence of a vm or emulator? Isn't the enabling technology here just kernel-level android bits? Docker is fluff, yet ends up dominating the headline.

Does it not provide the mobile-like environment that apps expect?

I mean, cgroups, firewall rules, and chroot are also already provided by the kernel, but using them for running containers without Docker, or Podman, or LXD, or other piece of "fluff" is slightly unergonomic.

Re: Android in Docker without QEMU/emulator

#55
post #2

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…

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.

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

#56
post #53

Trying to fix some Rust docker builds that are being killed by QEMU on Apple Silicon right now. I always believed Docker was cross platform, I had no idea how much of a pain it can be to use with buildx and --platform to get stuff working. SIGSEGV errors at random points, non-deterministic errors, GAH!

That you (and many others apparently) had the impression that docker was cross platform says a lot about docker's markering, considering docker as far as I know it is a wrapper for a series of extremely linux-kernel-specific APIs. :-/

Re: Android in Docker without QEMU/emulator

#57
post #2

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…

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?

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

Re: Android in Docker without QEMU/emulator

#59
post #9
post #2

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…

Anbox and Waydroid are others, though they don't use Docker. https://github.com/anbox/anbox ( https://news.ycombinator.com/item?id=24684187 ) https://github.com/waydroid/waydroid ( https://news.ycombinator.com/item?id=28616985 )

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

#60
post #36

This is interesting, but I don’t see this as something for use in development of Android apps. Given all Android’s quarks and fragmentation the use of real devices and Google’s emulators will provide a better surface to catch bugs during dev. What’s the primary use case for these containerized versions of Android?

Software, websites testing?
Post reply on HN