Rotate adb in several docker containers

4

I have four phones connected via USB. I have two containers docker running on my machine and each of them has adb running. The adbs select the cell phones randomly, I'd like to map two cell phones to one docker and two cell phones to the other.

All devices are listed in% with% of

Is there a way to map the device to a specific docker? Or the opposite, docker recognize only certain devices?

What I tried so far was to mount the device individually, if I mount the /dev/ttyACM3/ for example, in a container, the 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.

    
asked by anonymous 18.07.2018 / 17:45

1 answer

2

You can create a udev rule with the name based on código serial of the usb port, and pass that code to docker.

    
18.07.2018 / 18:19