tracer0tong / android-emulator

Yet another Docker container with Android SDK and Android emulator
Apache License 2.0
246 stars 95 forks source link

how to use tracer0tong/android-emulator #3

Closed JixiaAAM closed 8 years ago

JixiaAAM commented 8 years ago

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.

tracer0tong commented 8 years ago

I found at least two issues. Android SDK now contains 64-bit versions of utilities by default. I have used 32-bit Ubuntu. Second issue, in android command line utility they changed names of package filters and right now half of SDK not installs on container rebuild.

I started to fix this issues. I will switch to 64-bit vanilla Ubuntu and fix filters.

tracer0tong commented 8 years ago

Hi. I fixed couple of issues, so you can try to use it again. Sequence is the same: tracer@dev:~/android-emulator$ git clone https://github.com/tracer0tong/android-emulator.git android-emulator tracer@dev:~/android-emulator$ cd android-emulator tracer@dev:~/android-emulator$ sudo make run ...... b4d08ca9032f513a7428ee5a6668730978dcbe3a191d7a52b2dfbd4ef5e35113 tracer@dev:~/android-emulator$ sudo make ports Use: adb kill-server adb connect 172.17.0.2:32769 or adb connect 0.0.0.0:32769 tracer@dev:~/android-emulator$ adb kill-server tracer@dev:~/android-emulator$ adb connect 0.0.0.0:32769

tracer@dev:~/android-emulator$ adb shell root@generic_x86:/ #

tracer0tong commented 8 years ago

I will upload new version to Docker repository later.

tracer0tong commented 8 years ago

@JixiaAAM please check also fixes available here https://github.com/docker/docker/issues/18180