android_system_core/adb
Spencer Low c8ad0ca69d adb: really make kill-server wait for server death
It doesn't seem like b3c14ec693 was really
waiting for adb server death because the server would write OKAY to the
socket, causing the client to return from ReadOrderlyShutdown() before
the socket was actually closed.

The fix is to read the OKAY and then call ReadOrderlyShutdown() which
will then wait for the socket to be closed.

Test: Made the server hang in adb_server_cleanup() during kill-server
and kill-server would hang (as desired).
Test: To test resilience, tried preventing the server from sending OKAY and
adb kill-server still worked properly.

Change-Id: I4f0f11b86bbdc983670273ef5d3bb1dff7ab3697
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2018-08-29 15:46:47 -07:00
..
client adb: really make kill-server wait for server death 2018-08-29 15:46:47 -07:00
daemon Merge "Add sideload, fastboot as reboot targets in init" 2018-08-14 21:25:50 +00:00
fastdeploy Integrate adb with fastdeploy 2018-08-06 13:57:47 +01:00
sysdeps adb: add better logging for connection failure. 2018-08-13 16:33:54 -07:00
.clang-format
adb.bash Adb and fastboot completion supports zsh users. 2018-07-17 14:19:35 +08:00
adb.cpp adb: clean up handle_host_request. 2018-08-07 14:24:36 -07:00
adb.h adb: clean up handle_host_request. 2018-08-07 14:24:36 -07:00
adb_auth.h adb: switch apacket over to a std::string payload. 2018-02-21 14:30:17 -08:00
adb_integration_test_adb.xml Add adb integration test to general-tests 2018-08-08 12:08:50 -07:00
adb_io.cpp [adb] Modernize codebase by replacing NULL with nullptr 2018-07-13 18:21:00 -07:00
adb_io.h
adb_io_test.cpp
adb_listeners.cpp adb: Remove most C-style allocations 2018-07-19 09:41:40 -07:00
adb_listeners.h adb: move all cleanup to a function with defined ordering. 2017-05-09 14:32:47 -07:00
adb_listeners_test.cpp
adb_mdns.h
adb_trace.cpp adb: don't spew to logcat when tracing is enabled. 2018-02-06 15:55:06 -08:00
adb_trace.h adb: don't spew to logcat when tracing is enabled. 2018-02-06 15:55:06 -08:00
adb_unique_fd.cpp adb: actually enable fdsan. 2018-08-06 18:50:10 -07:00
adb_unique_fd.h adb: actually enable fdsan. 2018-08-06 18:50:10 -07:00
adb_utils.cpp adb: move AdbCloser to its rightful place. 2018-08-06 18:50:10 -07:00
adb_utils.h Give a clear error message if we can't start the server. 2017-06-20 14:21:41 -07:00
adb_utils_test.cpp adb: fix escape_arg for multiple quotes 2018-07-10 23:32:09 -07:00
Android.bp Merge "Integrate adb with fastdeploy" 2018-08-21 06:28:49 +00:00
Android.mk adb: restore adb/adb.exe in the list of artifacts. 2018-03-28 12:57:48 -07:00
benchmark_device.py adb: add benchmark script. 2018-05-23 11:26:04 -07:00
bugreport_test.cpp Merge "Don't preserve file attributes when pulling bugreport file..." 2017-08-22 22:41:26 +00:00
fdevent.cpp [adb] Modernize codebase by replacing NULL with nullptr 2018-07-13 18:21:00 -07:00
fdevent.h adb: add an id field to fdevent. 2018-06-18 14:55:27 -07:00
fdevent_test.cpp adb: remove fdevent_install, fdevent_remove. 2018-05-22 14:54:49 -07:00
fdevent_test.h adb: move ownership of the fdevent thread into FdeventTest. 2018-03-30 14:57:09 -07:00
file_sync_protocol.h adb: split file_sync_service.h into client and daemon parts. 2018-07-25 18:08:32 -07:00
MODULE_LICENSE_APACHE2
NOTICE
OVERVIEW.TXT adb: fix obsolete documentation. 2018-06-22 13:12:19 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
protocol.txt adb: convert Connection to a nonblocking interface. 2018-03-05 13:00:28 -08:00
security_log_tags.h
services.cpp adb: split daemon services out of service_to_fd. 2018-07-25 18:49:37 -07:00
services.h adb: split daemon services out of service_to_fd. 2018-07-25 18:49:37 -07:00
SERVICES.TXT adb: fix obsolete documentation. 2018-06-22 13:12:19 -07:00
shell_protocol.h adb: split shell_service.h into client/daemon/protocol parts. 2018-07-25 18:08:44 -07:00
shell_service_protocol.cpp adb: split shell_service.h into client/daemon/protocol parts. 2018-07-25 18:08:44 -07:00
shell_service_protocol_test.cpp adb: split shell_service.h into client/daemon/protocol parts. 2018-07-25 18:08:44 -07:00
socket.h adb: add IOVector. 2018-05-23 11:26:04 -07:00
socket_spec.cpp Add std::string StartsWith*/EndsWith* overloads. 2017-12-20 09:42:22 -08:00
socket_spec.h
socket_spec_test.cpp
socket_test.cpp adb: switch apacket payload to a type that doesn't initialize its contents. 2018-04-11 12:54:07 -07:00
sockets.cpp adb: clean up handle_host_request. 2018-08-07 14:24:36 -07:00
sockets.dia
SYNC.TXT Fix typos in ADB documentation 2017-11-30 10:57:51 -08:00
sysdeps.h adb: add better logging for connection failure. 2018-08-13 16:33:54 -07:00
sysdeps_test.cpp adb: fix FdeventTest.invalid_fd on Windows. 2018-03-29 14:24:03 -07:00
sysdeps_unix.cpp
sysdeps_win32.cpp [adb] Modernize codebase by replacing NULL with nullptr 2018-07-13 18:21:00 -07:00
sysdeps_win32_test.cpp
test_adb.py adb: fix test_adb.py's adb server spawning on Windows. 2018-08-21 14:28:56 -07:00
test_device.py adb: disable test_device.FileOperationsTest.test_pull_symlink_dir. 2018-08-08 17:40:15 -07:00
trace.sh
transport.cpp adb: make disconnect stop reconnection immediately. 2018-08-13 16:33:54 -07:00
transport.h adb: report connection status when we're unauthorized. 2018-08-08 17:40:15 -07:00
transport_benchmark.cpp adb: add nonblocking fd Connection. 2018-06-12 17:04:34 -07:00
transport_fd.cpp adb: add nonblocking fd Connection. 2018-06-12 17:04:34 -07:00
transport_local.cpp adb: add better logging for connection failure. 2018-08-13 16:33:54 -07:00
transport_test.cpp adb: Remove most C-style allocations 2018-07-19 09:41:40 -07:00
transport_usb.cpp adb: Have device usb_handle return io size 2018-07-17 11:53:30 -07:00
types.h adb: Remove most C-style allocations 2018-07-19 09:41:40 -07:00
types_test.cpp adb: add IOVector. 2018-05-23 11:26:04 -07:00
usb.h adb: get libusb compiling on Windows. 2017-12-08 13:11:15 -08:00