Git Product home page Git Product logo

android-emulator's People

Contributors

nightscape avatar tracer0tong avatar truongsinh avatar wseng avatar yijunyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-emulator's Issues

Multiple emulator in same docker container

Hi Author,

it is possible to create several avd in the docker container manually and start them?
I tried the command in the entrypoint.sh, but failed.
echo "no" | /usr/local/android-sdk/tools/android create avd -f -n test2 -t ${EMULATOR} --abi default/${ARCH}
echo "no" | /usr/local/android-sdk/tools/emulator64-${EMU} -avd test2 -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet -vnc :0

mounting volumes

I was not able to mount any volumes into the image by specifying -v... option. Did I miss something or is this simply undoable the way I thought it should work out?

QUESTION: add apk and files to the image

I'm quite new to Docker and was wondering if it's possible to already install apks and add files to the emulator, and make a new image out of it, to avoid having to copy and reinstall things each time the container is started?

I tried doing a commit after adding apks and file, but when running the resulting image, no apk was installed and no file was there.

Specify explicit version of the base image

Currently the Dockerfile is based on latest ubuntu image
FROM ubuntu
and therefore may become unstable at some point in time.
Please consider changing to specific verified version of ubuntu ex. ubuntu:16.04.

can I upgrade the android SDK to 24.2

Hey, I am using your Dockerfile to build the image on my local machine with 24.2 android SDK version. When I try to run a container with that image, it raise KVM is not installed on this machine (/dev/kvm is missing), but when I change android SDK version back to 23, it works well. Any thing I missing? Why I can not upgrade the SDK here? :)

cannot download java-7-oracle ,404

hi, the java you use PPA -> java7 cannot download now , maybe you can update to java-8-oracle.

by the way, can you tell me what's the point that can use adb connect in Docker , I try like what you did, but it just can't connect . Is the "-usbdevice tablet" or "socat" or other, please tell me ,thank you.

arm64-v8a image support

Google has system-images;android-24;default;arm64-v8a image that would be nice to utilize for testing 64bit arm native code in a CI situation.

I took a shot at it, but can't expose the emulator to other machines.

Things to note:

the android wrapper is deprecated (sdkmanager and it's new package name scheme can replace it's use in Dockerfile, and avdmanager can replace it's use in entrypoint.sh) The android tool doesn't like android-24,sys-img-arm64-v8a-android-24 (maybe new issue)

emulator64-arm moved (it's in $ANDROID_HOME/emulator now). There is a binary "emulator" that will start the image, but it hooks up the crash monitor and starts a local adb and I haven't found the magic to expose it to other machines (running Docker for Mac, current arm32 images work fine) or start it bare (the old emulator wrapper script seems to be a binary now that does some stuff I haven't dug into.)

device offline

Hi,

I just follow your introduction to install the emulator. But it shows device is offline after connected the emulator. Do you have meet this issue before ?
I've tried some ways to fix it, such as restart adb( adb kill-server & start-server) , delete .android/adbkey & adbkey.pub. But none work...

Remove SSH server

What is the added value of having the SSH server running inside the docker image?
The image can be easily accessed by calling
docker exec -it ${DOCKER_IMAGE_ID} bash
or
docker run -it ${DOCKER_IMAGE_ID} /bin/bash

Emulator hangs on black screen

When i trying to boot up the devices using CPU/ABI armeabi-v7a, 4GB RAM, 3GB Storage.
Its just hang on black screen,and nothing appear anymore,just blank
Preview:
https://media.discordapp.net/attachments/840846574925512735/842351704926453790/Screenshot_2021-05-13_184438.png
I tried to hold & presss the power button,nothing changed.Still BLANK.

I dont know why is this happening,please help!
(Its work before,but now it doesnt work.This is a new devices but with all same stuff)

question in connect to vnc

when I try to connect android with VNC in port tcp/5900, I just connect to the mac itself, not the android in docker, why?

how to use tracer0tong/android-emulator

I got your docker image of android emulator: tracer0tong/android-emulator from github. I use it this way:

  1.         $ docker pull tracer0tong/android-emulator:latest
    
  2.         $ docker run -d -P --name android tracer0tong/android-emulator 
    
  3.         $ docker ps –a 
    

I get:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a5f9318c6496 tracer0tong/android-emulator "/entrypoint.sh -e an" 25 minutes ago Up 25 minutes 0.0.0.0:32771->22/tcp, 0.0.0.0:32770->5554/tcp, 0.0.0.0:32769->5555/tcp, 0.0.0.0:32768->5900/tcp android
So, it seems working and it can provide adb ports.
4) $ adb connect 192.168.99.100:32769, it succeed
5) $ adb devices. It failed, does not display any information

I tried to play with this image for 2 days, used different ways , but can’t make it work.
I hope to get an android emulator that can support adb commands, so I can install software in it. And by using Appium, I can control this android emulator, just like I control android physical devices.

SSH permission denied, VNC denied

Running Docker on Windows 10, started with

$ docker run -d -P --name android tracer0tong/android-emulator

docker ps shows the container and available ports just fine.

$ docker ps
CONTAINER ID        IMAGE                          COMMAND             CREATED             STATUS              PORTS                                                                                                                       NAMES
a494f19f07a4        tracer0tong/android-emulator   "/entrypoint.sh"    32 minutes ago      Up 32 minutes       0.0.0.0:32772->22/tcp, 0.0.0.0:32771->5037/tcp, 0.0.0.0:32770->5554/tcp, 0.0.0.0:32769->5555/tcp, 0.0.0.0:32768->5900/tcp   android

When I try SSHing into it using user root it gives me "connection refused".

$ ssh [email protected] -p 32722
ssh: connect to host 0.0.0.0 port 32722: Connection refused

Trying to connect via VNC (using RealVNC client and port 5900) it gives me "denied by remote host".

Cannot `adb connect` from windows host

I'm having issues connecting to the devices from a windows host when the docker machine is running. Using the new linux subsystem in windows (ubuntu flavored) I can ssh in fine and poke around. I just don't know why it's complaining. The adb tools are on the windows host. Just for kicks and giggles though I tried to use the same tools through the linux subsystem and got similar results. I'm at a loss.

the running container

> docker ps
5972aa2fe34        tracer0tong/android-emulator   "/entrypoint.sh"    31 minutes ago      Up 31 minutes
       0.0.0.0:32774->22/tcp, 0.0.0.0:32773->80/tcp, 0.0.0.0:32772->443/tcp, 0.0.0.0:32771->5037/tcp, 
0.0.0.0:32770->5554/tcp, 0.0.0.0:32769->5555/tcp, 0.0.0.0:32768->5900/tcp   android

adb connect using 0.0.0.0

> adb kill-server
> adb connect 0.0.0.0:32769
* daemon not running; starting now at tcp:5037
* daemon started successfully
unable to connect to 0.0.0.0:32769: cannot connect to 0.0.0.0:32769: The requested address is not 
valid in its context. (10049)

adb connect using IpAddress

> docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' android
172.17.0.2
> adb kill-server
> adb connect 172.17.0.2:32769
* daemon not running; starting now at tcp:5037
* daemon started successfully
unable to connect to 172.17.0.2:32769: cannot connect to 172.17.0.2:32769: A connection attempt 
failed because the connected party did not properly respond after a period of time, or established 
connection failed because connected host has failed to respond. (10060)

A trimmed netstat -a

 Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:80             IVYSAUR:0              LISTENING
  TCP    0.0.0.0:135            IVYSAUR:0              LISTENING
  TCP    0.0.0.0:445            IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1536           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1537           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1538           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1539           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1540           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1544           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1546           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:1641           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:2179           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:8080           IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32768          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32769          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32770          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32771          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32772          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32773          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:32774          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:46708          IVYSAUR:0              LISTENING
  TCP    0.0.0.0:57621          IVYSAUR:0              LISTENING
.
.
.
  TCP    127.0.0.1:22223        IVYSAUR:0              LISTENING
  TCP    127.0.0.1:32774        IVYSAUR:57088          ESTABLISHED  ### My SSH session
  TCP    127.0.0.1:44430        IVYSAUR:0              LISTENING
.
.
.

I've been banging my head against the wall for quite some time now and any help towards getting adb to connect would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.