I tried to run emulator64-arm in a Docker container but it reported:
$ emulator64-arm -avd t2 -no-window -no-accel -gpu off
qemu: could not open disk image /home/testuser/.android/avd/t2.avd/sdcard.img: Interrupted system cal
I think qemu-aarch64 should be a pure software emulator without any fancy things involved but I was wrong.
I also tried to start the container with --privileged
but still no luck.
In my case we need to run some smoke tests for our Android APK, speed doesn't really matter but Android-X86 is not an option.
Although the M1 version docker desktop allows users to run x86 docker images under emulation, it will be a more efficient solution to offer your software as a “universal” Multi-Arch docker image that can serve both your ARM (M1) and x86 users.
With support for Apple M1 ARM Mac and QEMU included in Docker Desktop, you are able to build and use multi-architecture images (Linux x86, ARM, Windows) on whatever platform you are working on out of the box.
Complete Android-Studio in a Docker container. You can even start an Emulator inside it. If you don't have a display the Emulator can run with a "dummy" display - perfect for continous integration.
Write a Dockerfile for your application (see Creating your Image section). Run the docker build command. Pull your image from DockerHub on the target machine, and use the following command to run it in a Docker container: Note: If the image has not been pulled previously, docker run will pull it from the registry.
Is it possible to run the (Android) emulator through Docker? yes. I don't know much about Fastlane|wix/Detox, but I made this in a e2e/Appium project If so, how? Do you need a hardware that support virtualization Virtualization: VT-x (if 'Intel VT-x' or 'VT-x' feature supported)
The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
The image is built from the Dockerfile on the host and is pushed on a Docker registry that makes it accessible from a remote device (target machine). On the target machine the Docker image is pulled from the registry and is run in a Docker container. To build a Docker image on the host machine you will need to:
This is not about the root cause but a workaround.
AVD created under Linux will also create "qcow2" files for each image, with these qcow2 files, emulator can successfully start.
But these qcow2 files are not created under any other platforms, I was using an AVD created under Mac and got the error, then I recreated AVD under Linux and the error was gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With