SDB: Added to support to detect android target on MAC OS
authorshingil.kang <shingil.kang@samsung.com>
Wed, 4 Mar 2015 14:17:28 +0000 (23:17 +0900)
committerDongkyun Yun <dk77.yun@samsung.com>
Tue, 21 Jul 2015 05:14:44 +0000 (14:14 +0900)
Change-Id: Iacaebcad4e7defad9a4b9c61ee0da254701569cb
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
src/device_vendors.c
src/device_vendors.h
src/sdb_usb.h
src/usb_darwin.c

index 5faa95e4c5369bc8e4103425a8fa4790bc6ac89d..75fcf910bd67872c426b862489f50b9940cf5ef5 100644 (file)
 #include <stdio.h>
 #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}
 };
 
 
index 476198b0903bfaea651e92aad510a0f06931ecaf..cce865d39d1bbd11d3806309795f6e67b5eeb69b 100644 (file)
@@ -23,6 +23,8 @@ typedef struct
 {
   const char *vendor;
   int id;
+  int subclass;
+  int protocol;
 } VENDOR;
 
 VENDOR tizen_device_vendors[VENDOR_COUNT_MAX];
index 2c3073382b74993acb495dd4e9056db31c3256dd..23cf6feb7ab406e11e1b274c769bc0600358311c 100755 (executable)
@@ -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
index 03c16e0c92480640f622e9e0c8a04b13ac5efe5f..3bb3ae92a3288bc1f798fc62c305bf71f47a5018 100755 (executable)
@@ -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