[GH-ISSUE #184] Emulator does not come up #132

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

Originally created by @lkkushan101 on GitHub (Jul 31, 2019).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/184

🐛 Bug Report

I pulled the docker container
docker pull budtmo/docker-android-x86-8.1
Ran the container
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Nexus One" --name android-container budtmo/docker-android-x86-8.1

Accessed in the browser
http://127.0.0.1:6080/

But i see the logo but not the emulator...

What should i do ?

Originally created by @lkkushan101 on GitHub (Jul 31, 2019). Original GitHub issue: https://github.com/budtmo/docker-android/issues/184 ## 🐛 Bug Report I pulled the docker container docker pull budtmo/docker-android-x86-8.1 Ran the container docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Nexus One" --name android-container budtmo/docker-android-x86-8.1 Accessed in the browser http://127.0.0.1:6080/ But i see the logo but not the emulator... What should i do ?
kerem closed this issue 2026-03-01 15:40:46 +03:00
Author
Owner

@kevenfeng commented on GitHub (Jul 31, 2019):

+1
ubuntu 16 Docker version 19.03.1

<!-- gh-comment-id:516723684 --> @kevenfeng commented on GitHub (Jul 31, 2019): +1 ubuntu 16 Docker version 19.03.1
Author
Owner

@lkkushan101 commented on GitHub (Jul 31, 2019):

do i have to change the docker version? please advice me to solve this issue

<!-- gh-comment-id:516753114 --> @lkkushan101 commented on GitHub (Jul 31, 2019): do i have to change the docker version? please advice me to solve this issue
Author
Owner

@alexcanDvlpr commented on GitHub (Jul 31, 2019):

I have the same problem. Windows 10 Docker version 18.09.2.

<!-- gh-comment-id:516873162 --> @alexcanDvlpr commented on GitHub (Jul 31, 2019): I have the same problem. Windows 10 Docker version 18.09.2.
Author
Owner

@dwwhalen commented on GitHub (Aug 1, 2019):

This seems to be a very popular problem. There is a closed issue that addresses it pretty well https://github.com/budtmo/docker-android/issues/120

My understanding is you need to be using Ubuntu. I have a Windows 10 laptop and was able to get it working with Ubuntu on VMware Workstation 15 Player. For the VM settings Virtualization engine I chose "Virtualize Intel VT-x/EPT or AMD-v/RVI". I had no luck with Oracle Virtual Box.

<!-- gh-comment-id:517322402 --> @dwwhalen commented on GitHub (Aug 1, 2019): This seems to be a very popular problem. There is a closed issue that addresses it pretty well https://github.com/budtmo/docker-android/issues/120 My understanding is you need to be using Ubuntu. I have a Windows 10 laptop and was able to get it working with Ubuntu on VMware Workstation 15 Player. For the VM settings Virtualization engine I chose "Virtualize Intel VT-x/EPT or AMD-v/RVI". I had no luck with Oracle Virtual Box.
Author
Owner

@yagelardan commented on GitHub (Aug 2, 2019):

Try to add "-p 4723:4723", then do "adb connect localhost:5555"

<!-- gh-comment-id:517597515 --> @yagelardan commented on GitHub (Aug 2, 2019): Try to add "-p 4723:4723", then do "adb connect localhost:5555"
Author
Owner

@shangyou commented on GitHub (Aug 4, 2019):

After the installation is completed, access through the browser, the following picture appears, the phone page does not appear, is it correct?
1564918789047

<!-- gh-comment-id:517996122 --> @shangyou commented on GitHub (Aug 4, 2019): After the installation is completed, access through the browser, the following picture appears, the phone page does not appear, is it correct? ![1564918789047](https://user-images.githubusercontent.com/2002594/62423118-ba447b80-b6ef-11e9-9f93-78ac4d065cda.jpg)
Author
Owner

@panyang1217 commented on GitHub (Aug 6, 2019):

+1
Azure VM with Ubuntu 18.04

<!-- gh-comment-id:518546231 --> @panyang1217 commented on GitHub (Aug 6, 2019): +1 Azure VM with Ubuntu 18.04
Author
Owner

@Grohden commented on GitHub (Aug 6, 2019):

#93 doesn't have a nice title, but I think that is the same problem.

I've made this comment and it might help you to understand the problem..

it seems that there are two emulator executables on the path, but the wrong one is picked, you can confirm this by calling which emulator (inside the container of course) and checking that it returns /root/tools/emulator instead of /root/emulator/emulator

In case this happens, you can start the emulator inside the container with /root/emulator/emulator -avd YOUR_EMULATOR_NAME.

If you wish to start the container with the emulator opened I don't have any ideas :/ using a script on the run command doesn't seems to work cuz the emulator is created using the DEVICE_NAME after the container is up/started

I've tried to create a image with this (to make the path use the correct emulator):

FROM budtmo/docker-android-x86-8.1

# Set ENV
ENV PATH=$ANDROID_HOME/emulator

but still the emulator doesn't start when I start the container

<!-- gh-comment-id:518817310 --> @Grohden commented on GitHub (Aug 6, 2019): #93 doesn't have a nice title, but I think that is the same problem. I've made [this comment](https://github.com/budtmo/docker-android/issues/93#issuecomment-516092215) and it might help you to understand the problem.. it seems that there are two `emulator` executables on the `path`, but the wrong one is picked, you can confirm this by calling `which emulator` (inside the container of course) and checking that it returns `/root/tools/emulator` instead of `/root/emulator/emulator` In case this happens, you can start the emulator inside the container with `/root/emulator/emulator -avd YOUR_EMULATOR_NAME`. If you wish to start the container with the emulator opened I don't have any ideas :/ using a script on the run command doesn't seems to work cuz the emulator is created using the DEVICE_NAME _after_ the container is up/started I've tried to create a image with this (to make the `path` use the correct emulator): ``` FROM budtmo/docker-android-x86-8.1 # Set ENV ENV PATH=$ANDROID_HOME/emulator ``` but still the emulator doesn't start when I start the container
Author
Owner

@eyal919 commented on GitHub (Aug 8, 2019):

same for me... using latest docker image budtmo/docker-android-x86-6.0 not bring up the emulator while version 1.7-p1 is working fine.

adb shell return: error: no devices/emulators found

this is the log output of docker-android.stderr.log

Error: AVD not created.
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/root/src/app.py", line 238, in <module>
    run()
  File "/root/src/app.py", line 217, in run
    prepare_avd(device, avd_name, dp_size)
  File "/root/src/app.py", line 112, in prepare_avd
    subprocess.check_call(creation_cmd, shell=True)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'avdmanager create avd -f -n nexus_5_6.0 -b google_apis/x86 -k "system-images;android-23;google_apis;x86" -d Nexus\ 5 -p /root/android_emulator' returned non-zero exit status 1.

update:
when running the command manually with verbose i'm getting this error:

Warning: java.nio.file.FileSystemException: /root/system-images/android-23/google_apis/x86/userdata.img -> /root/android_emulator/userdata-qemu.img: No space left on device
Error: AVD not created.

update:
if i'm changing the ANDROID_HOME (from /root to /dev) the emulator started but since there are many subfolder under /root that are needed to start the emulator normally (e.g. /root/build-tools) we can't change the ANDROID_HOME easily

<!-- gh-comment-id:519450877 --> @eyal919 commented on GitHub (Aug 8, 2019): same for me... using latest docker image budtmo/docker-android-x86-6.0 not bring up the emulator while version 1.7-p1 is working fine. adb shell return: error: no devices/emulators found this is the log output of docker-android.stderr.log ``` Error: AVD not created. Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/src/app.py", line 238, in <module> run() File "/root/src/app.py", line 217, in run prepare_avd(device, avd_name, dp_size) File "/root/src/app.py", line 112, in prepare_avd subprocess.check_call(creation_cmd, shell=True) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'avdmanager create avd -f -n nexus_5_6.0 -b google_apis/x86 -k "system-images;android-23;google_apis;x86" -d Nexus\ 5 -p /root/android_emulator' returned non-zero exit status 1. ``` ------------------ update: when running the command manually with verbose i'm getting this error: ``` Warning: java.nio.file.FileSystemException: /root/system-images/android-23/google_apis/x86/userdata.img -> /root/android_emulator/userdata-qemu.img: No space left on device Error: AVD not created. ``` -------------------- update: if i'm changing the ANDROID_HOME (from /root to /dev) the emulator started but since there are many subfolder under /root that are needed to start the emulator normally (e.g. /root/build-tools) we can't change the ANDROID_HOME easily
Author
Owner

@aranvic commented on GitHub (Aug 8, 2019):

the same problem on MacOs, Mojave 10.14

<!-- gh-comment-id:519495606 --> @aranvic commented on GitHub (Aug 8, 2019): the same problem on MacOs, Mojave 10.14
Author
Owner

@shangyou commented on GitHub (Aug 8, 2019):

Emulator was not previously initialized. Preparing a new one...

image

<!-- gh-comment-id:519584080 --> @shangyou commented on GitHub (Aug 8, 2019): Emulator was not previously initialized. Preparing a new one... ![image](https://user-images.githubusercontent.com/2002594/62719047-a70c1580-ba39-11e9-8921-64807528982c.png)
Author
Owner

@ghost commented on GitHub (Aug 8, 2019):

same problem here ! ubuntu 18.04

Client: Docker Engine - Community
 Version:           19.03.1
 API version:       1.40
 Go version:        go1.12.5
 Git commit:        74b1e89
 Built:             Thu Jul 25 21:21:05 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.1
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.5
  Git commit:       74b1e89
  Built:            Thu Jul 25 21:19:41 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

<!-- gh-comment-id:519616150 --> @ghost commented on GitHub (Aug 8, 2019): same problem here ! ubuntu 18.04 ``` Client: Docker Engine - Community Version: 19.03.1 API version: 1.40 Go version: go1.12.5 Git commit: 74b1e89 Built: Thu Jul 25 21:21:05 2019 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.1 API version: 1.40 (minimum version 1.12) Go version: go1.12.5 Git commit: 74b1e89 Built: Thu Jul 25 21:19:41 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.6 GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc: Version: 1.0.0-rc8 GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f docker-init: Version: 0.18.0 GitCommit: fec3683 ```
Author
Owner

@ghost commented on GitHub (Aug 8, 2019):

i solve this issue allowing virtualization in my bios config

<!-- gh-comment-id:519710150 --> @ghost commented on GitHub (Aug 8, 2019): i solve this issue allowing virtualization in my bios config
Author
Owner

@budtmo commented on GitHub (Aug 21, 2019):

duplicated #93

<!-- gh-comment-id:523404463 --> @budtmo commented on GitHub (Aug 21, 2019): duplicated #93
Author
Owner

@alexcanDvlpr commented on GitHub (Aug 29, 2019):

I solve this issue.

I have used a virtual machine with Ubuntu 18.04 in VMWare, in which I have installed Docker and I have followed the steps of this project and working.

The problem I found is that VirtualBox does not support "nested-virtualization" and VMWare does.

I hope it helps you.

<!-- gh-comment-id:526118347 --> @alexcanDvlpr commented on GitHub (Aug 29, 2019): I solve this issue. I have used a virtual machine with Ubuntu 18.04 in VMWare, in which I have installed Docker and I have followed the steps of this project and working. The problem I found is that VirtualBox does not support "nested-virtualization" and VMWare does. I hope it helps you.
Author
Owner

@gitamineHM commented on GitHub (Nov 1, 2019):

@budtmo The issue is the same with windows 7 and docker with linux container.

Edit : I have Tried to use Arm v 5.1 images for Windows, The Android Emulator launches but still on Android startup Logo, I have tried all possible Smartphone Simulators

<!-- gh-comment-id:548960951 --> @gitamineHM commented on GitHub (Nov 1, 2019): @budtmo The issue is the same with windows 7 and docker with linux container. Edit : I have Tried to use Arm v 5.1 images for Windows, The Android Emulator launches but still on Android startup Logo, I have tried all possible Smartphone Simulators
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#132
No description provided.