docker-android-sdk / android-30

Docker for Android SDK 30 with preinstalled build tools and emulator image
87 stars 51 forks source link

remove the need for privileged container #8

Closed x29a closed 3 years ago

x29a commented 3 years ago

to access devices via adb from within the docker container.

Thanks to the information here: http://marc.merlins.org/perso/linux/post_2018-12-20_Accessing-USB-Devices-In-Docker-ttyUSB0-dev-bus-usb--for-fastboot-adb_-without-using-privileged.html

Verified on Ubuntu 20.10 with an Android 8 device, after authorization, e.g. installing an APK via adb install test.apk works just fine.

This is also true for the other versions, just not sure if a PR would be needed for all of them or if there is a central template.

ppoffice commented 3 years ago

@x29a The --privileged flag is used for running the emulator inside the docker container (the emulator needs to access host's KVM). Well, I have to test if we can achieve it with out that flag. Accessing devices on the host from the container is not something we have planned. But thank you anyway.