Live data from Hacker News

Android in Docker without QEMU/emulator

github.com

61–70 of 72 posts

Re: Android in Docker without QEMU/emulator

#61
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?

I'm using it myself to run Whatsapp for the Matrix Whatsapp bridge [1] on a VPS.

[1] https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.htm...

Re: Android in Docker without QEMU/emulator

#62
post #37

Earlier quoted context omitted.

Frankly I just install Island, and then run Whatsapp (and all not-always-needed apps) inside it. Plus bonus: you can freeze the apps you don't need and keep the island running.

TIL about the Island app. Thank you!

Shelter.

https://f-droid.org/en/packages/net.typeblog.shelter/

https://github.com/PeterCxy/Shelter

Re: Android in Docker without QEMU/emulator

#63
post #26

Earlier quoted context omitted.

Windows (11?) has the feature built in right?

That feature's still in beta ( https://docs.microsoft.com/en-us/windows/android/wsa/ ). You can use it by joining the Windows Insider Program.

Or you can manually install it following the various guides explaining how to do so without joining Insiders

Re: Android in Docker without QEMU/emulator

#64
post #46

Perhaps a simple question, but... why?

Because alternatives have some requirements that may not suite some people.

1. VMs have relatively big resources overhead and this approach requires you to download some Android image first.

Of course you'd want some clean distribution and there simply aren't many such ones (that I know of) that are easily available. The ones I tried - were a 2-in-1 shitshow+slideshow for me. Maybe it's because I used ISO (for QEMU/KVM), as I didn't want to run proprietary crapware (VirtualBox/VMWare).

2. Going with Anbox requires having crapware snapd and their Android image is quite old (Android 7.1.1).

3. Going with Waydroid requires having Wayland, which if you don't use it - is an overkill to install just to have Android on your PC.

4. Going with Android from AndroidSDK - is probably an even harder way to get access to some Android on your PC (I don't really know, I haven't investigated that option).

Re: Android in Docker without QEMU/emulator

#65
post #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.

If it were Docker providing the secret sauce, Docker would be all you need to make it happen on non-Linux hosts.

It's the Linux kernel, configured with the appropriate Android modules, not Docker making this happen.

Re: Android in Docker without QEMU/emulator

#66
post #43

Earlier quoted context omitted.

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.

but you still need to feed a QR code to the android's "camera" on each browser you want to use.

Re: Android in Docker without QEMU/emulator

#67
post #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. :-/

Yep! Amusing to think I used to think cross-platform just meant running on Windows and Linux and that was fixed with Docker. Had no idea the rabbit hole was deeper until Mac released the new CPUs.

Re: Android in Docker without QEMU/emulator

#69
post #21

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

What do you mean? Where is it needed?

There are unfortunately situations where the only way to reach someone is via WhatsApp. I have avoided them but i can see WhatsApp in a VM being useful for those purposes.

Re: Android in Docker without QEMU/emulator

#70
post #42

Earlier quoted context omitted.

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.

You could connect to the VM using somelike like TeamViewer running on your phone.
Post reply on HN