-
-
Notifications
You must be signed in to change notification settings - Fork 231
Connect Each Device to a separate container - ADB fails when a second device attached #172
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
Comments
@idekterev, Faced same issue. Despite specifying /dev/bus/usb/001/004 (with android serial 12345) docker container tries to make adb connect to another device with serial 54321 which should be at /dev/bus/usb/001/028 and apparently fails because it isn't mounted to this container.
/dev/bus/usb devices in container
/dev/bus/usb devices on host
Disconnecting 028 device from host makes |
The Readme states you can use something like the following to connect each device to a separate container:
For some reason, when running a container using the described method to '--device /dev/bus/usb/XXX/YYY:/dev/bus/usb/XXX/YYY', the moment a second device is plugged in, ADB stops inside the first container. This basically means that multiple appium containers cannot run as adb fails the moment there is more than one.
Host: Ubuntu 22.04
Docker version 27.5.1, build 9f9e405
Steps:
One device connected via USB, lsusb lists it as /dev/bus/usb/002/042.
Docker run command:
adb kill-server && docker run --rm -p 4723:4723 --device=/dev/bus/usb/002/042 appium/appium:local
Check adb devices in container 1: running "docker exec -it CONTAINERID adb devices" correctly lists one device connected.
Plug in second ADB device via USB
repeat step 3 (check adb devices in container): adb to fail inside the first container:
Is this a bug, or does anyone have any ideas as to why this is happening?
The text was updated successfully, but these errors were encountered: