Run adb in multiple Docker containers

Asked

Viewed 76 times

3

I have four phones connected via USB. I have two containers docker running on my machine and each of them has a adb spinning. Adbs select cell phones randomly, I would like to map two cell phones to one Docker and two cell phones to the other.

All devices are being listed on /dev/ttyACM3/

Is there a way to map the device to a specific Docker? Or the other way around, make Docker recognize only certain devices?

What I’ve tried so far is to assemble the device individually, if I assemble the /dev/ttyACM3/001 for example, in a container, adb recognizes, but when it is reconnected the file can change from 001 to 002, or 003, or 004, depends on how the operating system mounts the devices, or in what order.

1 answer

0


You can create a rule udev with the name based on código serial from the usb port, and pass this code to the Docker.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.