Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulator is running using nested virtualization. This is not recommended. It may not work at all... #281

Closed
rrdhani7 opened this issue Mar 4, 2021 · 9 comments · Fixed by #421

Comments

@rrdhani7
Copy link

rrdhani7 commented Mar 4, 2021

🐛 Bug Report

Operating System: Ubuntu 20.04

Docker Image: budtmo/docker-android-x86-8.1

Docker Version: 20.10.4, build d3cb89e

Docker-compose version (Only if you use it):

Docker Command to start docker-android: docker run

Expected Behavior: Android emulator is working well

Actual Behavior


Screenshot 2021-03-04 at 10 04 47 AM

@qwerty32123
Copy link

hey @rrdhani7 did u manage to fix this? im using google cloud with nested virtualization and im getting the same issue but in my case the container works, i can open any app etc, but i cannot connect it to adb correctly

when i did it from my own ubuntu i got emulator-5554 down the localhost:6080 line, then i could call from appium that emulator

`XXX@XXX-2:~$ adb connect localhost:6080
already connected to localhost:6080
XXX@XXX-2:~$ adb devices
List of devices attached
localhost:6080  offline

xxx@xxx-2:~$ docker ps -a
CONTAINER ID   IMAGE                           COMMAND                  CREATED         STATUS                   PO
RTS                                                                                                                
          NAMES
08da0f04e8b7   budtmo/docker-android-x86-8.1   "/bin/sh -c '/usr/bi…"   9 minutes ago   Up 9 minutes (healthy)   45
67/tcp, 0.0.0.0:5554-5555->5554-5555/tcp, :::5554-5555->5554-5555/tcp, 4723/tcp, 0.0.0.0:6080->6080/tcp, :::6080->6
080/tcp   android-container
xxx@xxx-2:~$ 

@qwerty32123
Copy link

Screenshot of noVNC

I got this trying 2 images but i think i will have the same problem in all, anyone knows any way of fixing this?

@mustafakirimli
Copy link

mustafakirimli commented Aug 13, 2021

I found a work-around for this issue, definitely there should be better way to handle it.

Either extending Dockerfile or just replacing entrypoint with below work-around will close the window/dialog.

Have/add new process on supervisor.conf file which runs below command. Need to install wmctrl package as Docker file does not have apt update && apt install -y wmctrl

wmctrl -c 'Running in Nested'
  • Also you should handle restarts of supervisor process, basic logic can be added to wait until screen/process appears and then only run command etc..

hhhaiai added a commit to TestJken66/docker-android that referenced this issue Nov 4, 2021
@inez
Copy link
Contributor

inez commented Dec 23, 2021

Speaking of nested virtualization - I'm curious if you noticed it being actually slow or very slow?

@asafe199
Copy link

asafe199 commented Jul 19, 2023

Do you guys were able to handle the situation? I'm using GCP and I got the same message. The performance is much lower than I expected.

@directentis1
Copy link

directentis1 commented Aug 11, 2023

Same problem here, I try to use it with Docker Compose and Dev Container with Codespaces, but not sure what I need to do to connect to it or open noVNC on a open tab.

Stuck on booting process...

@muvaf
Copy link
Contributor

muvaf commented Apr 18, 2024

I did some experiments using docker commit command and dive tool to see what changes in the container after you click never show again and then OK. Found out that the setting is stored in .config/Android Open Source Project/Emulator.conf in the following form:

[General]
showNestedWarning=false

Then, I've been able to disable the warning with the following command in my Dockerfile where I use docker-android image as base:

RUN mkdir -p "${WORK_PATH}/.config/Android Open Source Project" \
 && echo "[General]\nshowNestedWarning=false\n" > "${WORK_PATH}/.config/Android Open Source Project/Emulator.conf"

@budtmo
Copy link
Owner

budtmo commented Apr 27, 2024

Hi @muvaf ,

Thank you for the solution. Could you create a PR for that? I will review and merge that PR. it will benefit other as well.

@muvaf
Copy link
Contributor

muvaf commented Apr 27, 2024

@budtmo Sure, here you go #421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants