platform_system_core/adb
Josh Gao 74b7ec72f8 adb: don't close sockets before hitting EOF.
Reimplement commit ffc11d3cf3 using
fdevent. The previous attempt was reverted because we were blindly
continuing when revents & POLLIN == 0, which ignored POLLHUP/POLLERR,
leading to spinloops when the opposite end of the file descriptor was
shutdown when we had no data left to read.

This patch reimplements the functionality implemented by that commit
using fdevent, which gets us detection of spin loops for free.

Bug: http://b/74616284
Test: ./test_device.py
Change-Id: I1abd671fef4c29e99dad968aa66bb754ca382578
2019-01-31 23:36:41 -08:00
..
client Fix: Propagate cmd args to multi-package sessions. 2019-01-30 16:40:02 +00:00
daemon Merge changes If8747ba1,Id1943ebd 2019-01-31 21:19:45 +00:00
fastdeploy Disable dexpreopt for deployagent 2019-01-17 16:24:52 +00:00
sysdeps adb: implement fdevent_set_timeout. 2019-01-31 23:36:41 -08:00
.clang-format
adb.bash Adb and fastboot completion supports zsh users. 2018-07-17 14:19:35 +08:00
adb.cpp Add native vsock support to ADB. 2019-01-25 17:55:06 -08:00
adb.h adb: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08:00
adb_auth.h adb: stop using adbkey.pub. 2018-11-15 17:50:57 -08:00
adb_integration_test_adb.xml Add adb integration test to general-tests 2018-08-08 12:08:50 -07:00
adb_integration_test_device.xml Add adb_integration_test_device to general-tests 2018-10-12 13:48:14 -07:00
adb_io.cpp Adding Android Binder Bridge (abb) utility launched from adbd. 2019-01-07 15:45:11 +00:00
adb_io.h Adding Android Binder Bridge (abb) utility launched from adbd. 2019-01-07 15:45:11 +00:00
adb_io_test.cpp switch to using android-base/file.h instead of android-base/test_utils.h 2018-11-14 09:35:34 -08:00
adb_listeners.cpp adb: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08:00
adb_listeners.h
adb_listeners_test.cpp
adb_mdns.h
adb_trace.cpp adbd: compile for host. 2019-01-23 12:59:41 -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: Use a default _SC_GETPW_R_SIZE_MAX size 2018-10-24 15:23:55 -04:00
adb_utils.h adb: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08:00
adb_utils_test.cpp adb: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08:00
Android.bp adb: turn off fastdeploy. 2019-01-29 11:21:15 -08:00
benchmark_device.py adb: improve benchmark script a bit. 2018-10-12 18:03:50 -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: implement fdevent_set_timeout. 2019-01-31 23:36:41 -08:00
fdevent.h adb: implement fdevent_set_timeout. 2019-01-31 23:36:41 -08:00
fdevent_test.cpp adb: implement fdevent_set_timeout. 2019-01-31 23:36:41 -08:00
fdevent_test.h adb: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08: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 Revert "Revert "Revert "adb: append the libwinpthread COPYING to adb's NOTICE.""" 2018-11-29 23:14:02 +00:00
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: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08: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: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08:00
socket_spec.cpp Add native vsock support to ADB. 2019-01-25 17:55:06 -08:00
socket_spec.h Combine tcp_connect and socket_spec_connect. 2019-01-17 15:58:41 -08:00
socket_spec_test.cpp Combine tcp_connect and socket_spec_connect. 2019-01-17 15:58:41 -08:00
socket_test.cpp adb: don't close sockets before hitting EOF. 2019-01-31 23:36:41 -08:00
sockets.cpp adb: don't close sockets before hitting EOF. 2019-01-31 23:36:41 -08:00
sockets.dia
SYNC.TXT Fix typos in ADB documentation 2017-11-30 10:57:51 -08:00
sysdeps.h adb: switch unix_open to string_view. 2018-12-21 01:43:31 -08: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 Merge "adb: win32: improve console output on Windows 10" 2019-01-23 03:59:27 +00:00
sysdeps_win32_test.cpp switch to using android-base/file.h instead of android-base/test_utils.h 2018-11-14 09:35:34 -08:00
test_adb.py test_adb.py: silence ResourceWarning. 2018-10-16 11:00:39 -07:00
test_device.py adb: don't close sockets before hitting EOF. 2019-01-31 23:36:41 -08:00
trace.sh
transport.cpp Adding new feature to adb "abb". 2019-01-18 21:45:02 +00:00
transport.h adbd: fix TCP bind address. 2019-01-30 14:49:20 -08:00
transport_benchmark.cpp Revert "adb: make benchmarks build on the host." 2018-11-13 11:28:29 -08:00
transport_fd.cpp adb: fix NonblockingFdConnection's behavior with large writes. 2018-11-12 20:54:39 -08:00
transport_local.cpp adbd: fix TCP bind address. 2019-01-30 14:49:20 -08:00
transport_test.cpp adb: set main thread in transport tests. 2018-10-19 15:38:10 -07:00
transport_usb.cpp adb: remove incorrect use of RTTI. 2018-12-12 12:54:03 -08:00
types.h adb: fix zero-initialization in Block. 2018-11-12 20:54:39 -08:00
types_test.cpp Adapt to switch to libc++ for Windows 2018-09-21 10:46:25 -07:00
usb.h adb: get libusb compiling on Windows. 2017-12-08 13:11:15 -08:00