[GH-ISSUE #198] Unable to see Emulator #141

Closed
opened 2026-03-01 15:40:51 +03:00 by kerem · 11 comments
Owner

Originally created by @demersonh on GitHub (Sep 18, 2019).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/198

Hi,

I am trying to run this one on an azure VM but can't get the android emulator to pop-up. I am able to connect to noVNC but I can't see any emulator popping up.

When running adb -H localhost devices nothing shows up, it is like it is offline.

Has anyone experienced this? Could anyone please assist?

Regards,
Demerson

Originally created by @demersonh on GitHub (Sep 18, 2019). Original GitHub issue: https://github.com/budtmo/docker-android/issues/198 Hi, I am trying to run this one on an azure VM but can't get the android emulator to pop-up. I am able to connect to noVNC but I can't see any emulator popping up. When running adb -H localhost devices nothing shows up, it is like it is offline. Has anyone experienced this? Could anyone please assist? Regards, Demerson
kerem closed this issue 2026-03-01 15:40:51 +03:00
Author
Owner

@mattcopas commented on GitHub (Sep 19, 2019):

+1 I'm also experiencing this - running on both MacOS and Ubuntu 18.04

<!-- gh-comment-id:533187728 --> @mattcopas commented on GitHub (Sep 19, 2019): +1 I'm also experiencing this - running on both MacOS and Ubuntu 18.04
Author
Owner

@mattcopas commented on GitHub (Sep 20, 2019):

@demersonh Try running (from inside the docker container):

emulator -list-avds to list your virtual devices,

then run emulator @devide_name

I get an error:

statvfs('/root/android_emulator/snapshots/default_boot/ram.img') failed: No such file or directory
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: KVM requires a CPU that supports vmx or svm
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

Running on MacOSX

<!-- gh-comment-id:533596966 --> @mattcopas commented on GitHub (Sep 20, 2019): @demersonh Try running (from inside the docker container): `emulator -list-avds` to list your virtual devices, then run `emulator @devide_name` I get an error: ``` statvfs('/root/android_emulator/snapshots/default_boot/ram.img') failed: No such file or directory emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure KVM is properly installed and usable. CPU acceleration status: KVM requires a CPU that supports vmx or svm More info on configuring VM acceleration on Linux: https://developer.android.com/studio/run/emulator-acceleration#vm-linux General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration. ``` Running on MacOSX
Author
Owner

@demersonh commented on GitHub (Sep 24, 2019):

@mattcopas I ended up removing that one as it didn't work. I was trying to run it within an azure VM.

I still couldn't find an alternative :(

I saw a few more people were having the same issues but none of the solutions appear to work... Anyways, I hope you can manage to work it out and use this one. If I mind any alternative, I will share it with you.

Cheers

<!-- gh-comment-id:534787236 --> @demersonh commented on GitHub (Sep 24, 2019): @mattcopas I ended up removing that one as it didn't work. I was trying to run it within an azure VM. I still couldn't find an alternative :( I saw a few more people were having the same issues but none of the solutions appear to work... Anyways, I hope you can manage to work it out and use this one. If I mind any alternative, I will share it with you. Cheers
Author
Owner

@cemo commented on GitHub (Sep 26, 2019):

I think that this is because we are using "Docker for Mac" which is using "hypervisor". Hypervisor is not supporting nested virtualization. Instead we need to setup a docker machine with VirtualBox and use it for this purpose.

I think using a ARM based device will solve our problem.

<!-- gh-comment-id:535658083 --> @cemo commented on GitHub (Sep 26, 2019): I think that this is because we are using "Docker for Mac" which is using "hypervisor". Hypervisor is not supporting nested virtualization. Instead we need to setup a docker machine with VirtualBox and use it for this purpose. I think using a ARM based device will solve our problem.
Author
Owner

@TheoNeUpKid88 commented on GitHub (Oct 1, 2019):

@cemo please update the ticket if your approach does resolve this issue. - Thanks

<!-- gh-comment-id:537251715 --> @TheoNeUpKid88 commented on GitHub (Oct 1, 2019): @cemo please update the ticket if your approach does resolve this issue. - Thanks
Author
Owner

@cemo commented on GitHub (Oct 1, 2019):

I gave up these approaches since latest Android API's are not supporting ARM based emulators. So I decided to use Genymotion on my box with Docker based development environment. I have not completed my work but it think it will be working.

<!-- gh-comment-id:537253088 --> @cemo commented on GitHub (Oct 1, 2019): I gave up these approaches since latest Android API's are not supporting ARM based emulators. So I decided to use Genymotion on my box with Docker based development environment. I have not completed my work but it think it will be working.
Author
Owner

@mattcopas commented on GitHub (Oct 2, 2019):

I've managed to get this working on Ubuntu 18.04 physical machine (not a VM) with a slightly customised dockerfile:

FROM budtmo/docker-android-x86-9.0
RUN sdkmanager --update

docker build -t my-custom-emulator .

docker run --privileged -it -p 6080 -e DEVICE="Nexus 5" my-custom-emulator

Privileged mode is essential, and the sdkmanager update helped too.

<!-- gh-comment-id:537425036 --> @mattcopas commented on GitHub (Oct 2, 2019): I've managed to get this working on Ubuntu 18.04 physical machine (not a VM) with a slightly customised dockerfile: ``` FROM budtmo/docker-android-x86-9.0 RUN sdkmanager --update ``` `docker build -t my-custom-emulator .` `docker run --privileged -it -p 6080 -e DEVICE="Nexus 5" my-custom-emulator` Privileged mode is essential, and the sdkmanager update helped too.
Author
Owner

@cemo commented on GitHub (Oct 3, 2019):

Linux boxes are supporting nested virtualization. It would not be surprise it to be working.

<!-- gh-comment-id:537932252 --> @cemo commented on GitHub (Oct 3, 2019): Linux boxes are supporting nested virtualization. It would not be surprise it to be working.
Author
Owner

@TheoNeUpKid88 commented on GitHub (Oct 8, 2019):

This could potentially be another issue. Though, when I attempt to run e.g., docker run --privileged -it -p 6080 -e DEVICE="Nexus 5" my-custom-emulator with a volume to pre-load an APK the results the same, with the emulator crashing and/ or not being visible.

<!-- gh-comment-id:539664912 --> @TheoNeUpKid88 commented on GitHub (Oct 8, 2019): This could potentially be another issue. Though, when I attempt to run e.g., `docker run --privileged -it -p 6080 -e DEVICE="Nexus 5" my-custom-emulator` with a volume to _pre-load_ an APK the results the same, with the emulator crashing and/ or not being visible.
Author
Owner

@gitkav commented on GitHub (Oct 18, 2019):

Hi,

I am facing the same issue. My docker is running on Mac. Is there any solution for this issue?

<!-- gh-comment-id:543449274 --> @gitkav commented on GitHub (Oct 18, 2019): Hi, I am facing the same issue. My docker is running on Mac. Is there any solution for this issue?
Author
Owner

@budtmo commented on GitHub (Oct 22, 2019):

duplicated #93

<!-- gh-comment-id:544818421 --> @budtmo commented on GitHub (Oct 22, 2019): duplicated #93
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-android#141
No description provided.