android_system_core/adb
David Pursell a76e5f035e adb: use TCP keepalive.
Currently adb only realizes a TCP transport has gone away when it tries
to send a packet, which caused problems in particular for `adb reboot`
since no packets are sent, leading to the client hanging until Ctrl+C.

This CL turns on TCP keepalive packets to send 1 packet every second,
allowing up to 10 failures before disconnecting. Using built-in TCP
functionality turns out to be much cleaner in this case than trying to
implement our own keepalive packets at the application layer, and
should be more lightweight since it's all done in the TCP stack.

Bug: http://b/23093474

Change-Id: Ifb41cbb85b9752a9f394e1eed3c6ac4da47a4e4d
(cherry picked from commit bfd9503d1d)
2016-03-03 15:42:11 -08:00
..
client adb: setsid() for adb host server. 2016-02-22 15:57:08 -08:00
daemon adbd: Remove check for set_supplementary_gids. 2016-01-08 10:56:20 -08:00
.clang-format adb: fix clang-format for access modifier dedent. 2016-02-22 15:57:08 -08:00
adb.cpp adb: setsid() for adb host server. 2016-02-22 15:57:08 -08:00
adb.h adb: tag fatal, fatal_errno with printf attribute. 2016-01-15 15:25:31 -08:00
adb_auth.cpp Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
adb_auth.h Ignore ro.adb.secure in user builds. 2015-06-19 13:26:02 -07:00
adb_auth_client.cpp adb: fix leak of framework_fd. 2016-02-25 11:01:59 -08:00
adb_auth_host.cpp base: add SystemErrorCodeToString() function. 2016-02-01 12:18:26 -08:00
adb_client.cpp adb: add adb_get_feature_set. 2016-01-31 19:12:26 -08:00
adb_client.h adb: add nullability specifiers to adb_client.h. 2016-01-31 19:22:04 -08:00
adb_io.cpp Increase the maximum shell command length to 4096ish. 2016-01-15 15:02:19 -08:00
adb_io.h adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
adb_io_test.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_listeners.cpp Merge "Switch from using sockaddr to sockaddr_storage." 2015-12-08 01:41:38 +00:00
adb_listeners.h adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
adb_trace.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_trace.h Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_utils.cpp adb: don't emulate fdevent or socketpair on Windows. 2016-02-22 15:57:08 -08:00
adb_utils.h base: add network address parsing function from adb. 2016-01-21 20:03:33 -08:00
adb_utils_test.cpp adb: mkdirs fixes 2016-02-22 15:57:08 -08:00
Android.mk adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
commandline.cpp Merge "Only debuggable packages can be downgraded." into nyc-dev 2016-02-25 20:26:54 +00:00
console.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
CPPLINT.cfg Ignore whitespace/indent issues from cpplint. 2015-05-18 16:49:07 -07:00
diagnose_usb.cpp Share the new adb USB diagnostic code with fastboot. 2015-12-14 10:50:21 -08:00
diagnose_usb.h Share the new adb USB diagnostic code with fastboot. 2015-12-14 10:50:21 -08:00
fdevent.cpp adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
fdevent.h adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
fdevent_test.cpp adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
fdevent_test.h adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
file_sync_client.cpp adb: check for an error response from adbd between each write. 2016-02-22 15:57:09 -08:00
file_sync_service.cpp adbd: restore the old error handling behavior. 2016-02-22 15:57:09 -08:00
file_sync_service.h adb: change unsigned to uint32_t in sync struct definitions. 2016-02-22 15:57:09 -08: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 Switch from using sockaddr to sockaddr_storage. 2015-12-07 16:07:46 +09:00
line_printer.cpp Improve dumb terminal support (emacs is dumb). 2016-01-08 15:47:07 -08:00
line_printer.h Simplify adb LinePrinter newline handling. 2015-12-09 18:42:41 -08:00
MODULE_LICENSE_APACHE2
mutex_list.h adb: add basename_lock to mutex_list.h. 2015-11-06 12:19:23 -08:00
NOTICE
OVERVIEW.TXT
protocol.txt Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
remount_service.cpp adb: remove exit-time destructors. 2015-11-12 11:20:19 -08:00
remount_service.h Failure to find an oem partition should not be a remount failure. 2015-05-11 13:36:13 -07:00
security_log_tags.h ADB security logging 2016-01-21 15:57:02 +00:00
services.cpp adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
services.h adb: put legacy shell: service back in. 2015-09-30 15:40:09 -07:00
SERVICES.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
set_verity_enable_state_service.cpp adb: use libfec in disable-verity 2015-10-20 13:55:24 +01:00
shell_service.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00
shell_service.h Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
shell_service_protocol.cpp adb: create shell protocol class (take 2). 2015-09-08 10:04:10 -07:00
shell_service_protocol_test.cpp adb: fix shell_service_protocol_test for Windows. 2015-09-11 18:28:27 -07:00
shell_service_test.cpp adb: fix subprocess termination for legacy shell. 2016-01-27 17:13:41 -08:00
socket.h Add unit tests for local socket. 2015-09-16 15:00:59 -07:00
socket_test.cpp adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
sockets.cpp Increase the maximum shell command length to 4096ish. 2016-01-15 15:02:19 -08:00
sockets.dia
SYNC.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
sysdeps.h adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
sysdeps_test.cpp adb: sysdeps_test: improve smoke test. 2016-02-22 15:57:09 -08:00
sysdeps_unix.cpp adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
sysdeps_win32.cpp adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
sysdeps_win32_test.cpp adb: allow wine's output for sysdeps_win32 strerror test. 2016-02-22 15:57:08 -08:00
test_adb.py adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
test_device.py adb: check for an error response from adbd between each write. 2016-02-22 15:57:09 -08:00
test_track_devices.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
transport.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00
transport.h adb: fix leak of framework_fd. 2016-02-25 11:01:59 -08:00
transport_local.cpp Emulator: fix adbd qemu pipe partial write 2016-03-01 17:39:31 -08:00
transport_test.cpp adb: fix leak of framework_fd. 2016-02-25 11:01:59 -08:00
transport_usb.cpp Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
usb_linux.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00
usb_linux_client.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00
usb_osx.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00
usb_windows.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00