Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc8e2418 authored by Android (Google) Code Review's avatar Android (Google) Code Review Committed by The Android Open Source Project
Browse files

am 0469d2c3: Merge change 2282 into donut

Merge commit '0469d2c3'

* commit '0469d2c3':
  Support for 3rd party USB Vendor IDs in adb.
parents 121f3b48 0469d2c3
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -919,9 +919,6 @@ int adb_main(int is_daemon)
    fdevent_loop();

    usb_cleanup();
#if ADB_HOST
    usb_vendors_cleanup();
#endif

    return 0;
}
+3 −4
Original line number Diff line number Diff line
@@ -357,11 +357,10 @@ typedef enum {
#define ADB_PORT 5037
#define ADB_LOCAL_TRANSPORT_PORT 5555

// Google's USB Vendor ID
#define VENDOR_ID_GOOGLE        0x18d1
#define ADB_CLASS              0xff
#define ADB_SUBCLASS           0x42
#define ADB_PROTOCOL           0x1

// HTC's USB Vendor ID
#define VENDOR_ID_HTC           0x0bb4

void local_init();
int  local_connect(int  port);
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ int adb_connect(const char *service)
            fprintf(stdout,"* daemon started successfully *\n");
        }
        /* give the server some time to start properly and detect devices */
        adb_sleep_ms(2000);
        adb_sleep_ms(3000);
        // fall through to _adb_connect
    } else {
        // if server was running, check its version to make sure it is not out of date
+3 −5
Original line number Diff line number Diff line
@@ -135,12 +135,10 @@ int is_adb_interface(int vid, int pid, int usb_class, int usb_subclass, int usb_
    unsigned i;
    for (i = 0; i < vendorIdCount; i++) {
        if (vid == vendorIds[i]) {
            /* class:vendor (0xff) subclass:android (0x42) proto:adb (0x01) */
            if(usb_class == 0xff) {
                if((usb_subclass == 0x42) && (usb_protocol == 0x01)) {
            if (usb_class == ADB_CLASS && usb_subclass == ADB_SUBCLASS &&
                    usb_protocol == ADB_PROTOCOL) {
                return 1;
            }
            }

            return 0;
        }
+0 −3
Original line number Diff line number Diff line
@@ -32,9 +32,6 @@

#define  DBG   D

#define ADB_SUBCLASS           0x42
#define ADB_PROTOCOL           0x1

static IONotificationPortRef    notificationPort = 0;
static io_iterator_t*           notificationIterators;

Loading