I have created a Docker image which contains the Android SDK and am trying to expose my Android phone in a container running this image. So I used the --privileged
Running with just --privileged -v /dev/bus/usb:/dev/bus/usb
did not work for me.
I tried forwarding the adb daemon's listening port using -p 5037:5037
, but that did not help either.
It worked only after I added --net host
.
This means the host machine's net interfaces are exposed to the docker so use it if you are fine with that. Maybe there are more ports that needed to be forwarded other than 5037....