android_system_core/adb
Siva Velusamy 9f2d1a9cfc adb start-server: Use a separate fd for sending initial OK
When "adb start-server" is issued, and a server needs to be launched,
adb client forks itself and the child process runs the server routine.
Once the server initializes its various components, it sends an "OK\n"
back to the client via its stderror (or stdout on Windows).

This sequence breaks down if before sending the "OK\n", the server
happens to log something on its stderr. In order to avoid this, the
client now expects the ack to come on a different fd rather than one
of the standard streams.

Bug: https://code.google.com/p/android/issues/detail?id=182150

Change-Id: I9d58a08068d71eb3b77e8a7377e934631c016466
2015-08-07 11:31:07 -07:00
..
client adb start-server: Use a separate fd for sending initial OK 2015-08-07 11:31:07 -07:00
daemon adb: poll for emulator connection. 2015-07-31 14:25:19 -07:00
.clang-format Fix clang-format file for correct indent settings. 2015-03-19 13:27:20 -07:00
__init__.py Create adb Python package. 2015-07-27 15:52:15 -07:00
adb.cpp adb start-server: Use a separate fd for sending initial OK 2015-08-07 11:31:07 -07:00
adb.h adb start-server: Use a separate fd for sending initial OK 2015-08-07 11:31:07 -07:00
adb_auth.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
adb_auth.h Ignore ro.adb.secure in user builds. 2015-06-18 10:19:30 -07:00
adb_auth_client.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
adb_auth_host.cpp adb: win32: call SystemErrorCodeToString() from more places 2015-08-02 18:50:17 -07:00
adb_client.cpp adb: fix killing of old version of adb process 2015-08-05 19:26:50 -07:00
adb_client.h Fix error handling/reporting for "adb forward" and "adb reverse". 2015-05-29 18:03:57 -07:00
adb_io.cpp Add WriteFdFmt and clean up more code. 2015-05-01 17:36:46 -07:00
adb_io.h Revert "Turn on -Wformat-nonliteral." 2015-07-09 20:35:09 +00:00
adb_io_test.cpp adb_test/libbase_test: win32: get some tests working 2015-08-03 12:44:43 -07:00
adb_listeners.cpp adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
adb_listeners.h adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
adb_trace.h Improve logging. 2015-05-21 16:25:57 -07:00
adb_utils.cpp adb: fix mkdirs / adb pull with relative paths, fix win32 issues 2015-08-03 13:24:18 -07:00
adb_utils.h adb: fix mkdirs / adb pull with relative paths, fix win32 issues 2015-08-03 13:24:18 -07:00
adb_utils_test.cpp win32: adb_test/libbase_test fixes 2015-08-06 18:09:32 -07:00
Android.mk Merge "adb: win32: define UNICODE/_UNICODE, Unicode error messages, misc" 2015-08-03 21:16:26 +00:00
commandline.cpp adb start-server: Use a separate fd for sending initial OK 2015-08-07 11:31:07 -07:00
console.cpp adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
CPPLINT.cfg Ignore whitespace/indent issues from cpplint. 2015-05-18 16:49:07 -07:00
device.py Enable perfboot.py to install APKs before measurement. 2015-08-06 11:02:17 +09:00
fdevent.cpp Use _WIN32 rather than HAVE_WINSOCK. 2015-07-29 17:45:24 -07:00
fdevent.h Remove extern "C" barriers to using C++. 2015-04-17 09:47:42 -07:00
file_sync_client.cpp More adb cleanup. 2015-07-30 17:46:58 -07:00
file_sync_service.cpp More adb cleanup. 2015-07-30 17:46:58 -07:00
file_sync_service.h More adb cleanup. 2015-07-30 17:46:58 -07:00
framebuffer_service.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
get_my_path_darwin.cpp Move get_my_path_darwin to C++. 2015-04-16 13:24:58 -07:00
get_my_path_linux.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
jdwp_service.cpp Report getaddrinfo failures correctly. 2015-07-23 21:14:38 -07:00
MODULE_LICENSE_APACHE2 eclair snapshot 2009-11-12 18:46:23 -08:00
mutex_list.h adb: fix mkdirs / adb pull with relative paths, fix win32 issues 2015-08-03 13:24:18 -07:00
NOTICE eclair snapshot 2009-11-12 18:46:23 -08:00
OVERVIEW.TXT Fixing spelling errors in adb docs 2010-04-28 11:38:39 -04:00
protocol.txt Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
qemu_tracing.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
qemu_tracing.h Revert "Turn on -Wformat-nonliteral." 2015-07-09 20:35:09 +00:00
remount_service.cpp Fix "adb remount" for when the root directory is in system.img 2015-07-08 19:36:19 +00:00
remount_service.h Failure to find an oem partition should not be a remount failure. 2015-05-11 13:28:22 -07:00
services.cpp adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
SERVICES.TXT adb: implement "adb reverse <local> <remote>" 2014-05-27 16:42:13 +02:00
set_verity_enable_state_service.cpp Failure to find an oem partition should not be a remount failure. 2015-05-11 13:28:22 -07:00
sockets.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
sockets.dia auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
SYNC.TXT Adding documentation on the sync part of the adb protocol previously missing. 2014-03-20 20:36:46 +01:00
sysdeps.h adb: win32: Unicode path names, env vars, some console support 2015-07-31 13:30:41 -07:00
sysdeps_win32.cpp Merge "Fix a comment typo." 2015-08-04 00:51:38 +00:00
test_adb.py Create adb Python package. 2015-07-27 15:52:15 -07:00
test_device.py Leave the evidence lying around if an adb test fails. 2015-08-03 13:58:49 -07:00
test_track_devices.cpp Make test_track_devices.cpp output easier to read. 2015-05-04 15:51:50 -07:00
transport.cpp Make clear of the data length sent by write_packet. 2015-07-30 20:01:10 -07:00
transport.h Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
transport_local.cpp adb: poll for emulator connection. 2015-07-31 14:25:19 -07:00
transport_test.cpp adb_test/libbase_test: win32: get some tests working 2015-08-03 12:44:43 -07:00
transport_usb.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
usb_linux.cpp Fix const-ness of strrchr callers. 2015-07-28 08:07:21 -07:00
usb_linux_client.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
usb_osx.cpp Include the error code if GetPipeProperties fails. 2015-08-06 10:48:19 -07:00
usb_windows.cpp Don't limit Windows USB reads. 2015-07-22 15:59:06 -07:00