docker-android icon indicating copy to clipboard operation
docker-android copied to clipboard

How to use /dev/video0

Open alirezadigi opened this issue 3 years ago • 2 comments

Hi. I', trying to use /dev/video0 webcam for my emulator but it doesn't work. Please help me.

$ export EMULATOR_ARGS="-camera-back video0" 
$ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-5.1.1

alirezadigi avatar Aug 12 '21 05:08 alirezadigi

Ensure you have the EMULATOR_ARGS environment variable set.

e.g.

-e EMULATOR_ARGS=-camera-back webcam0

scottwallacesh avatar Feb 04 '22 17:02 scottwallacesh

Hi! Make sure you have the following in your docker run: EMULATOR_ADDITIONAL_ARGS="-camera-back webcam0" --device /dev/video0:/dev/video0 --group-add video

If it still doesn't work go into the container's shell and test webcam access with: emulator -webcam-list If your webcam is not listed you have another issue.

AndreasWJ avatar Aug 11 '23 11:08 AndreasWJ