I have been under windows and Ubuntu have encountered the Android device is not recognized, when the run as Android application, target display "??????", using ADB devices to view the status of the device, display
List of devices attached
???????????? No permissions
There are a lot of solutions on the internet for Ubuntu, some people say because of the USB permissions, the problem
Enter sudo lsusb to find your USB device, locate your device file in the/etc/udev/rules.d/directory, and add a piece of code.
I have tried many times to find that this is not the case, the actual reason, should be the same as Windows, port is occupied.
Workaround.
Input sudo adb kill-server
Then sudo adb start-server
The following paragraph appears
* Daemon not running. Starting it now on Port 5037 *
* Daemon started successfully *
Then enter ADB devices
Discover device online Problem solving!
Solutions for Ubuntu and Windows adb device no permissions