Live data from Hacker News

Android in Docker without QEMU/emulator

github.com

41–50 of 72 posts

Re: Android in Docker without QEMU/emulator

#41
post #8

Earlier quoted context omitted.

All Linux containers leak the host kernel no? The Anbox project relies on the exact same 2 modules: https://docs.anbox.io/userguide/install_kernel_modules.html . While these are "android-specific", they are present in the linux kernel tree, and even come pre-installed in Ubuntu 19.04 (and probably more distros).

> All Linux containers leak the host kernel no? Curious in what way?

See the other replies and if you're on Linux run

  ps -ef
on the host and you'll see the processes in the containers too. That doesn't happen if those processes run in a VM.

Re: Android in Docker without QEMU/emulator

#42

Earlier quoted context omitted.

What do you mean? Where is it needed?

i believe they are referring to the whatsapp bug that the saudi prince used on jeff bezos. simply sending bezos a message gave the saudi prince root access on his phone and he dumped all his messages and photos and released them to the press. running in a vm would just have whatsapp so they can send and receive messages without exposing all the private information on their phone in case of some 0day

So you would run the VM on a phone? Because if not, you'd need to carry an open and connected laptop around.

Re: Android in Docker without QEMU/emulator

#43
post #33
post #21

This could be useful for running WhatsApp inside a vm instead of your phone for those rare instances where it is needed.

I recommend you to use web.whatsapp.com then, it's pretty decent now (except that it does not support calls)

That needs whatsapp running on your phone to work as far as I know (because it basically runs the communication on the phone and then syncs that to the browser)

Re: Android in Docker without QEMU/emulator

#45
post #15
post #11

For development work I use the default Android emulator that comes with Android Studio. Are any of these ones superior in terms of performance, resource utilization, etc? The cloud angle is mildly interesting although in my specific use-case I'd probably just end up paying for a service that can provide access to emulators in the cloud. Is there more scope to do things like automating inputs etc this way? How would o…

This one specifically seems to run Android in the Linux Kernel using the usual suspects of container tech. It should have next to zero performance impact so it will definitely have better performance compared to the default Android emulator considering that's using qemu, even if it's qemu-kvm. Whether it's as reliable as running a VM, is something that'll need to be tested. Personally I got an error when trying to ex…

Sounds like QEMU doing that. QEMU has a command mode - ctrl+A followed by X should kill it.

Re: Android in Docker without QEMU/emulator

#47
post #43
post #33

Earlier quoted context omitted.

I recommend you to use web.whatsapp.com then, it's pretty decent now (except that it does not support calls)

That needs whatsapp running on your phone to work as far as I know (because it basically runs the communication on the phone and then syncs that to the browser)

If you can work out how to get on the beta release of web.whatsapp.com then it's no longer required for your phone to be online.

Re: Android in Docker without QEMU/emulator

#48
post #41

Earlier quoted context omitted.

> All Linux containers leak the host kernel no? Curious in what way?

See the other replies and if you're on Linux run ps -ef on the host and you'll see the processes in the containers too. That doesn't happen if those processes run in a VM.

This is by design. The kernel still runs the processes inside the container. If you namespace the user running `ps`, it will not be able to see the container processes. The only reason you're seeing them is because you're in the default (root?) namespace.

The container on the other hand cannot see the host's processes or other things. At least not without an exploit.

Re: Android in Docker without QEMU/emulator

#49
post #45
post #15

Earlier quoted context omitted.

This one specifically seems to run Android in the Linux Kernel using the usual suspects of container tech. It should have next to zero performance impact so it will definitely have better performance compared to the default Android emulator considering that's using qemu, even if it's qemu-kvm. Whether it's as reliable as running a VM, is something that'll need to be tested. Personally I got an error when trying to ex…

Sounds like QEMU doing that. QEMU has a command mode - ctrl+A followed by X should kill it.

This isn't running on QEMU.

Re: Android in Docker without QEMU/emulator

#50

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 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.

Post reply on HN