From: shingil.kang Date: Wed, 4 Mar 2015 14:17:28 +0000 (+0900) Subject: SDB: Added to support to detect android target on MAC OS X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f854bcf13ac911324a124ce897db060313625b3b;p=sdk%2Ftools%2Fsdb.git SDB: Added to support to detect android target on MAC OS Change-Id: Iacaebcad4e7defad9a4b9c61ee0da254701569cb Signed-off-by: shingil.kang --- diff --git a/src/device_vendors.c b/src/device_vendors.c index 5faa95e..75fcf91 100644 --- a/src/device_vendors.c +++ b/src/device_vendors.c @@ -16,10 +16,12 @@ #include #include "device_vendors.h" #include "log.h" +#include "sdb_usb.h" VENDOR tizen_device_vendors[] = { - {"samsung", 0x04e8} //1256 + {"samsung", VENDOR_ID_SAMSUNG, SDB_INTERFACE_SUBCLASS, SDB_INTERFACE_PROTOCOL}, //1256 + {"samsung adb", VENDOR_ID_SAMSUNG, ADB_INTERFACE_SUBCLASS, ADB_INTERFACE_PROTOCOL} }; diff --git a/src/device_vendors.h b/src/device_vendors.h index 476198b..cce865d 100644 --- a/src/device_vendors.h +++ b/src/device_vendors.h @@ -23,6 +23,8 @@ typedef struct { const char *vendor; int id; + int subclass; + int protocol; } VENDOR; VENDOR tizen_device_vendors[VENDOR_COUNT_MAX]; diff --git a/src/sdb_usb.h b/src/sdb_usb.h index 2c30733..23cf6fe 100755 --- a/src/sdb_usb.h +++ b/src/sdb_usb.h @@ -25,6 +25,7 @@ void kick_disconnected_devices(); #define SDB_INTERFACE_CLASS 0xff #define SDB_INTERFACE_SUBCLASS 0x20 +#define ADB_INTERFACE_SUBCLASS 0x42 #define SDB_INTERFACE_PROTOCOL 0x02 #define ADB_INTERFACE_PROTOCOL 0x01 // Samsung's USB Vendor ID diff --git a/src/usb_darwin.c b/src/usb_darwin.c index 03c16e0..3bb3ae9 100755 --- a/src/usb_darwin.c +++ b/src/usb_darwin.c @@ -431,11 +431,10 @@ void do_lsusb(void) { return; } usbVendor = tizen_device_vendors[i].id; - subClass = SDB_INTERFACE_SUBCLASS; - protocol = SDB_INTERFACE_PROTOCOL; + subClass = tizen_device_vendors[i].subclass; + protocol = tizen_device_vendors[i].protocol; - LOG_DEBUG( - "Looking for devices matching vendor ID=%0x(%0x, %0x)\n", usbVendor, subClass, protocol); + LOG_DEBUG("Looking for devices matching vendor ID=%0x(%0x, %0x)\n", usbVendor, subClass, protocol); // We are interested in all USB Devices (as opposed to USB interfaces). The Common Class Specification // tells us that we need to specify the idVendor, idProduct, and bcdDevice fields, or, if we're not interested