adb devices -l
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
When I execute it I am getting like
padmakumar@padmakumar-desktop:~$ adb devices -l
List of devices attached
Medfield14ABxxxx device usb:2-1.5
Ztedfield14Axxxx device usb:2-1.6
emulator-5554 device
015d2994ec2xxx device usb:2-1.5 product:nakasi model:Nexus_7 device:grouper
Medfield14ABA072 device usb:1-1.1 ( changing to different port)
when I change to different port its displaying the bus number as 1 and 2 as displayed in lsusb
command
what is this device usb:2-1.5 ,1.6 ,1.1 ?
so what this -l will do,whats the exact meaning for the device qualifiers?
I tried with lsusb
but the information is different that adb device -l.
padmakumar@padmakumar-desktop:~$ lsusb
Bus 002 Device 008: ID 18d1:4e42 Google Inc.
Bus 002 Device 005: ID 17ef:7470 Lenovo
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.
On Android 5.0, go to Settings -> Storage -> menu -> USB computer connection and make sure 'Media device (MTP)' is disabled. When it's disabled 'adb devices' lists the device, when enabled not.
To disable USB Debugging mode: Go to Settings and scroll to the System section (on Android 8 and above, go to Settings > System) Tap Developer Options. Tap the button to toggle developer options Off.
To put it simply, adb is two different applications — one running on your computer (Windows, Linux or Mac) and one running on your phone. When your phone is connected, and USB debugging is enabled, you can issue commands and communicate with the phone using your computer screen and keyboard.
It's the path of the device in the USB subsystem. For example 2-1.5
means controller 2, port 1, port 5. Between the two ports there must be a hub. This seems to match up with your lsusb
output, which indicates Bus 002 Device 001
is a hub.
To find this out, I had a dig int the adb
source code, and found this is referred to as the devpath
. You can see how it is found in usb_linux.c
. In summary, when a device is found the code resolves the symbolic link at /sys/dev/char/<major>:<minor>
and takes the last path component as the devpath
. If you run:
$ ls -l /sys/dev/char |grep usb
you can see the links point to /sys/devices/platform/...
and you should see some of these paths end with components matching the devices. Finally I found a description of what these paths mean in this posting by Alan Stern.
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