summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2009-07-24 16:09:22 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-07-24 16:09:22 -0700
commit1fde31c8fbe746473e01238be652a9c29ebf37d9 (patch)
treea6e0a18ff1e32ead4a1280dd55bc6e69c8151371 /adb
parentd39e972831d45d4f8f8effd11691fd2c52d235c6 (diff)
parentde6f62a609120c3d9e4e53689c3b309842ec874b (diff)
downloadsystem_core-1fde31c8fbe746473e01238be652a9c29ebf37d9.zip
system_core-1fde31c8fbe746473e01238be652a9c29ebf37d9.tar.gz
system_core-1fde31c8fbe746473e01238be652a9c29ebf37d9.tar.bz2
am de6f62a6: Add support for Samsung and Motorola devices.
Merge commit 'de6f62a609120c3d9e4e53689c3b309842ec874b' * commit 'de6f62a609120c3d9e4e53689c3b309842ec874b': Add support for Samsung and Motorola devices.
Diffstat (limited to 'adb')
-rw-r--r--adb/usb_linux.c10
-rw-r--r--adb/usb_vendors.c6
2 files changed, 13 insertions, 3 deletions
diff --git a/adb/usb_linux.c b/adb/usb_linux.c
index 95c2ce6..537122d 100644
--- a/adb/usb_linux.c
+++ b/adb/usb_linux.c
@@ -318,9 +318,13 @@ static int find_usb_device(const char *base,
found_device = 1;
break;
} else {
- // skip to next interface
- bufptr += (interface->bNumEndpoints * USB_DT_ENDPOINT_SIZE);
- }
+ // seek next interface descriptor
+ if (i < interfaces - 1) {
+ while (bufptr[1] != USB_DT_INTERFACE) {
+ bufptr += bufptr[0];
+ }
+ }
+ }
} // end of for
adb_close(fd);
diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c
index 9a15146..f8c54d7 100644
--- a/adb/usb_vendors.c
+++ b/adb/usb_vendors.c
@@ -39,11 +39,17 @@
#define VENDOR_ID_GOOGLE 0x18d1
// HTC's USB Vendor ID
#define VENDOR_ID_HTC 0x0bb4
+// Samsung's USB Vendor ID
+#define VENDOR_ID_SAMSUNG 0x04e8
+// Motorola's USB Vendor ID
+#define VENDOR_ID_MOTOROLA 0x22b8
/** built-in vendor list */
int builtInVendorIds[] = {
VENDOR_ID_GOOGLE,
VENDOR_ID_HTC,
+ VENDOR_ID_SAMSUNG,
+ VENDOR_ID_MOTOROLA,
};
#define BUILT_IN_VENDOR_COUNT (sizeof(builtInVendorIds)/sizeof(builtInVendorIds[0]))