sorccu / docker-adb

Dockerfile and instructions for ADB.
Other
200 stars 74 forks source link

fastboot can't see devices #14

Open davemackintosh opened 5 years ago

davemackintosh commented 5 years ago

I love having adb in a docker image, this works great but I couldn't get fastboot to work.

This is my script (that is in my $PATH) to run fastboot

#!/bin/bash

docker run --name=adbd --rm -d --privileged -v /dev/bus/usb:/dev/bus/usb sorccu/adb &&
docker run --rm -ti --net container:adbd -v $HOME:/home/$USER/ sorccu/adb fastboot $@

I don't see devices but when I use the system installed version I do. Any ideas?

andresmrm commented 5 years ago

Had the same problem here. But then it worked via:

docker exec -ti adbd sh

So it maybe some kind of network error caused by running another container via docker run.


The complete list of commands:

docker run -d --privileged -v /dev/bus/usb:/dev/bus/usb --name adbd sorccu/adb
docker exec -ti adbd sh

And then, from inside the container:

fastboot devices

This also works:

docker exec -ti adbd fastboot devices