the device-id in the adb devices
commmand is actually using the serial number of the android usb devices.
So, if you get a null string from the serial number, it will display ???????????
In the adb server source code:
static size_t format_transport(atransport *t, char *buf, size_t bufsize,
int long_listing)
{
const char* serial = t->serial;
if (!serial || !serial[0])
serial = "????????????";
So, it could be that your adb server is not running at root privilege, or your usb devices does't not allow adb server to read. A simple check would be using lsusb -v | grep iSerial to see if you can get the iSerial field of your android device.
Also, there're chances the iSerial string is not prepared well in the device. I've seen a lot of engineering product doesn't have the iSerial at all, or all of the devices are displaying the same device id.
Some times, the driver will read a section of data in the flash which is programmed uniquely from device to device to make it iSerial/device id.