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
Excuse me for offtop. But I cannot answer to this question so I write it down here.
I am using ubuntu:18.04 and tried to connect my Samsung Galaxy A3 2016 and debug it with ADB. Devices was unauthorized and no dialog popped up on the screen!
How I solved the problem:
I was interested will the problem still occure inside a Docker container? The answer was "No!".
Inside a Docker container, that I invoked with following: (this is the answer for this topic :) )
docker run --name android-adb -it -d --privileged -v /dev/bus/usb:/dev/bus/usb ubuntu:16.04 bash
I downloaded platform-tools (distribution with ADB). Added its path to environment. And restarted bash
After restarting ADB server inside Docker container AND killing ADB server on host machine. I found out that confirmation dialog appeared on the smartphone's screen!
So on the host machine the problem was in .android
directory I think. Just move it to .android-backup
. The next adb start-server
command will create new one. Also I replaced platform-tools
folder with most recent