There are two devices connected with my computer.But when I start the adb, both of them have the serial number "0123456789ABCDEF".
When I try to install an APK, the installation fails with "more than one device" error message.
In addition, I am developing a Bluetooth app, I need to use both of the two devices simultaneously.
Two identifiers have a same serial number and using up additional license. Identifier assignment is primarily based on the serial number of the laptop. With some manufactures (Lenovo, Toshiba, etc) we use the entire long serial number, rather then the short serial number that is generally exposed to the customer.
If there\'s only one emulator running or only one device connected, the adb command is sent to that device by default. If multiple emulators are running and/or multiple devices are attached, you need to use the -d, -e, or -s option to specify the target device to which the command should be directed.
adb devices -l
command prints out some additional device parameters which can also be used with adb -s
. Obviously it would help only if any of those extra parameters are unique. Fortunately for linux
and osx
users adb devices -l
in those systems also reports unique USB
port numbers:
$ adb devices -l
List of devices attached
XXXXXXXXXX device usb:2-1.6.7.7 product:shamu model:Nexus_6 device:shamu
$ adb -s usb:2-1.6.7.7 shell
shell@shamu:/ $
Maybe I can help you, I was able to solve this issue by changing the device ID/Serial:
adb shell
cd /sys/class/android_usb/android0/
echo -n xxx > iSerial
(the xxx is the device id you want)cat iSerial
(check the new device id)To change each id, your PC should only be connected to one device via usb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With