summaryrefslogtreecommitdiffstats
path: root/adb/adb.h
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-08-08 12:37:44 -0400
committerMike Lockwood <lockwood@android.com>2009-08-08 12:44:35 -0400
commit0927bf9690127bc45cf8837a1467759e9720399a (patch)
tree1c02586b698b43c2aac3e43518d6ae74394bd4cb /adb/adb.h
parent4e3fb8615639934fe2522c643c855ae1050c5e8e (diff)
downloadsystem_core-0927bf9690127bc45cf8837a1467759e9720399a.zip
system_core-0927bf9690127bc45cf8837a1467759e9720399a.tar.gz
system_core-0927bf9690127bc45cf8837a1467759e9720399a.tar.bz2
adb: On Linux, detect USB devices for which adb does not have permissions to communicate with.
adb devices will now list devices without adequate file system permissions in /dev/bus/usb as: List of devices attached ???????????? no permissions Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'adb/adb.h')
-rw-r--r--adb/adb.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/adb/adb.h b/adb/adb.h
index 8d57bf2..4789edf 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -33,7 +33,7 @@
#define ADB_VERSION_MAJOR 1 // Used for help/version information
#define ADB_VERSION_MINOR 0 // Used for help/version information
-#define ADB_SERVER_VERSION 22 // Increment this when we want to force users to start a new adb server
+#define ADB_SERVER_VERSION 23 // Increment this when we want to force users to start a new adb server
typedef struct amessage amessage;
typedef struct apacket apacket;
@@ -263,14 +263,17 @@ void kick_transport( atransport* t );
/* initialize a transport object's func pointers and state */
int init_socket_transport(atransport *t, int s, int port);
-void init_usb_transport(atransport *t, usb_handle *usb);
+void init_usb_transport(atransport *t, usb_handle *usb, int state);
/* for MacOS X cleanup */
void close_usb_devices();
/* cause new transports to be init'd and added to the list */
void register_socket_transport(int s, const char *serial, int port);
-void register_usb_transport(usb_handle *h, const char *serial);
+void register_usb_transport(usb_handle *h, const char *serial, unsigned writeable);
+
+/* this should only be used for transports with connection_state == CS_NOPERM */
+void unregister_usb_transport(usb_handle *usb);
int service_to_fd(const char *name);
#if ADB_HOST
@@ -384,7 +387,7 @@ int connection_state(atransport *t);
#define CS_DEVICE 2
#define CS_HOST 3
#define CS_RECOVERY 4
-#define CS_ERROR 5
+#define CS_NOPERM 5 /* Insufficient permissions to communicate with the device */
extern int HOST;