[cmd/adb] Make devices -l look more like the official command's output.

This commit is contained in:
Zach Klippenstein 2015-12-27 17:37:17 -08:00
parent 9e134f40b3
commit 64750956ff

View file

@ -46,7 +46,13 @@ func listDevices(long bool) int {
for _, device := range devices {
if long {
fmt.Printf("%s\t\t%s\t%s\n", device.Serial, device.Product, device.Model)
if device.Usb == "" {
fmt.Printf("%s\tproduct:%s model:%s device:%s\n",
device.Serial, device.Product, device.Model, device.DeviceInfo)
} else {
fmt.Printf("%s\tusb:%s product:%s model:%s device:%s\n",
device.Serial, device.Usb, device.Product, device.Model, device.DeviceInfo)
}
} else {
fmt.Println(device.Serial)
}