diff options
Diffstat (limited to 'adb')
-rw-r--r-- | adb/Android.mk | 13 | ||||
-rw-r--r-- | adb/adb.c | 7 | ||||
-rw-r--r-- | adb/usb_osx.c | 3 | ||||
-rwxr-xr-x | adb/usb_vendors.c | 9 |
4 files changed, 27 insertions, 5 deletions
diff --git a/adb/Android.mk b/adb/Android.mk index 44c3215..265c8f6 100644 --- a/adb/Android.mk +++ b/adb/Android.mk @@ -24,6 +24,7 @@ ifeq ($(HOST_OS),darwin) USB_SRCS := usb_osx.c EXTRA_SRCS := get_my_path_darwin.c LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit -framework Carbon + LOCAL_CFLAGS += -Wno-sizeof-pointer-memaccess -Wno-unused-parameter endif ifeq ($(HOST_OS),freebsd) @@ -84,6 +85,7 @@ ifeq ($(USE_SYSDEPS_WIN32),) LOCAL_STATIC_LIBRARIES += libcutils endif +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk include $(BUILD_HOST_EXECUTABLE) $(call dist-for-goals,dist_files sdk,$(LOCAL_BUILT_MODULE)) @@ -115,8 +117,13 @@ LOCAL_SRC_FILES := \ remount_service.c \ usb_linux_client.c -LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter -Werror -LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE +LOCAL_CFLAGS := \ + -O2 \ + -g \ + -DADB_HOST=0 \ + -D_XOPEN_SOURCE \ + -D_GNU_SOURCE \ + -Wall -Wno-unused-parameter -Werror -Wno-deprecated-declarations \ ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) LOCAL_CFLAGS += -DALLOW_ADBD_ROOT=1 @@ -129,6 +136,7 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN) LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED) LOCAL_STATIC_LIBRARIES := liblog libcutils libc libmincrypt libselinux +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk include $(BUILD_EXECUTABLE) @@ -171,5 +179,6 @@ LOCAL_STATIC_LIBRARIES := libzipfile libunz libcutils liblog LOCAL_SHARED_LIBRARIES := libcrypto +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk include $(BUILD_EXECUTABLE) endif @@ -329,6 +329,7 @@ static void send_msg_with_header(int fd, const char* msg, size_t msglen) { } #endif +#if ADB_HOST static void send_msg_with_okay(int fd, const char* msg, size_t msglen) { char header[9]; if (msglen > 0xffff) @@ -337,6 +338,7 @@ static void send_msg_with_okay(int fd, const char* msg, size_t msglen) { writex(fd, header, 8); writex(fd, msg, msglen); } +#endif // ADB_HOST static void send_connect(atransport *t) { @@ -414,6 +416,7 @@ void adb_auth_verified(atransport *t) send_connect(t); } +#if ADB_HOST static char *connection_state_name(atransport *t) { if (t == NULL) { @@ -437,6 +440,7 @@ static char *connection_state_name(atransport *t) return "unknown"; } } +#endif // ADB_HOST /* qual_overwrite is used to overwrite a qualifier string. dst is a * pointer to a char pointer. It is assumed that if *dst is non-NULL, it @@ -1554,8 +1558,6 @@ int handle_forward_request(const char* service, transport_type ttype, char* seri int handle_host_request(char *service, transport_type ttype, char* serial, int reply_fd, asocket *s) { - atransport *transport = NULL; - if(!strcmp(service, "kill")) { fprintf(stderr,"adb server killed by remote request\n"); fflush(stdout); @@ -1565,6 +1567,7 @@ int handle_host_request(char *service, transport_type ttype, char* serial, int r } #if ADB_HOST + atransport *transport = NULL; // "transport:" is used for switching transport with a specified serial number // "transport-usb:" is used for switching transport to the only USB transport // "transport-local:" is used for switching transport to the only local transport diff --git a/adb/usb_osx.c b/adb/usb_osx.c index 45ce444..5efb23b 100644 --- a/adb/usb_osx.c +++ b/adb/usb_osx.c @@ -197,7 +197,8 @@ AndroidInterfaceAdded(void *refCon, io_iterator_t iterator) kr = (*dev)->GetDeviceProduct(dev, &product); kr = (*dev)->GetLocationID(dev, &locationId); if (kr == 0) { - snprintf(devpathBuf, sizeof(devpathBuf), "usb:%lX", locationId); + snprintf(devpathBuf, sizeof(devpathBuf), "usb:%" PRIu32 "X", + (unsigned int)locationId); devpath = devpathBuf; } kr = (*dev)->USBGetSerialNumberStringIndex(dev, &serialIndex); diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c index 957e5db..1b8310f 100755 --- a/adb/usb_vendors.c +++ b/adb/usb_vendors.c @@ -38,6 +38,8 @@ /* Keep the list below sorted alphabetically by #define name */ // Acer's USB Vendor ID #define VENDOR_ID_ACER 0x0502 +// Alco's USB Vendor ID +#define VENDOR_ID_ALCO 0x1914 // Allwinner's USB Vendor ID #define VENDOR_ID_ALLWINNER 0x1F3A // Amlogic's USB Vendor ID @@ -118,6 +120,8 @@ #define VENDOR_ID_LGE 0x1004 // Lumigon's USB Vendor ID #define VENDOR_ID_LUMIGON 0x25E3 +// Micromax's USB Vendor ID +#define VENDOR_ID_MICROMAX 0x2A96 // Motorola's USB Vendor ID #define VENDOR_ID_MOTOROLA 0x22b8 // MSI's USB Vendor ID @@ -164,6 +168,8 @@ #define VENDOR_ID_SK_TELESYS 0x1F53 // Smartisan's USB Vendor ID #define VENDOR_ID_SMARTISAN 0x29a9 +// Sonim Tech's USB Vendor ID +#define VENDOR_ID_SONIM_TECH 0x1d9c // Sony's USB Vendor ID #define VENDOR_ID_SONY 0x054C // Sony Ericsson's USB Vendor ID @@ -198,6 +204,7 @@ /* Keep the list below sorted alphabetically */ int builtInVendorIds[] = { VENDOR_ID_ACER, + VENDOR_ID_ALCO, VENDOR_ID_ALLWINNER, VENDOR_ID_AMLOGIC, VENDOR_ID_ANYDATA, @@ -238,6 +245,7 @@ int builtInVendorIds[] = { VENDOR_ID_LENOVOMOBILE, VENDOR_ID_LGE, VENDOR_ID_LUMIGON, + VENDOR_ID_MICROMAX, VENDOR_ID_MOTOROLA, VENDOR_ID_MSI, VENDOR_ID_MTK, @@ -261,6 +269,7 @@ int builtInVendorIds[] = { VENDOR_ID_SHARP, VENDOR_ID_SK_TELESYS, VENDOR_ID_SMARTISAN, + VENDOR_ID_SONIM_TECH, VENDOR_ID_SONY, VENDOR_ID_SONY_ERICSSON, VENDOR_ID_T_AND_A, |