platform_system_core/adb
Elliott Hughes 09e794c05d Improve "adb sideload" error reporting.
Rather than quietly fall through to the legacy code with no explanation,
say why the first connection failed, and that the second attempt is only
going to be relevant for folks trying to sideload to a pre-KitKit device.

Before:

  $ adb sideload mysid-ota-424425.zip
  opening 'mysid-ota-424425.zip'...
  connecting...
  falling back to older sideload method...
  error: closed

After:

  $ adb sideload mysid-ota-424425.zip
  adb: sideload connection failed: no devices/emulators found
  adb: trying pre-KitKat sideload method...
  adb: pre-KitKat sideload connection failed: no devices/emulators found

Also switch the legacy code to just read+write blocks rather than trying to
load the whole OTA package into RAM (which is in short supply on Win32).
This is probably of no practical use other than that it lets us report a
better error message (better than "terminate called after throwing an
instance of 'std::bad_alloc'").

Bug: https://issuetracker.google.com/37139736
Test: "adb sideload" with no device/a mysid/an angler
Change-Id: Ia568044aac61bd054301ebfd7fcd5ad5d6f3147a
2017-05-02 14:41:04 -07:00
..
client adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
daemon Revert "adb: Lower EP_ALLOC retry count" 2017-04-27 15:00:13 -07:00
sysdeps adb: don't try to resolve 'localhost' 2017-04-12 16:07:49 -07:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
adb.cpp Merge "adb: fix two device offline problems." 2017-04-20 19:45:18 +00:00
adb.h adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
adb_auth.h adb: rationalize types. 2016-10-06 14:50:02 -07:00
adb_auth_host.cpp adb: check for and report inotify_init1 failure. 2017-01-20 15:26:00 -08:00
adb_client.cpp Merge "adb: fix two device offline problems." 2017-04-20 19:45:18 +00:00
adb_client.h Remove unused adb_set_transport. 2016-12-02 12:53:09 -08:00
adb_io.cpp adb: add sysdeps/chrono.h for chrono literals on Win32. 2016-11-16 12:14:59 -08:00
adb_io.h
adb_io_test.cpp adb: disable tests that are expected to fail on Win32. 2016-04-18 14:33:38 -07:00
adb_listeners.cpp adb: factor out socket specification. 2016-08-25 17:12:26 -07:00
adb_listeners.h adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
adb_listeners_test.cpp adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
adb_mdns.h Add mDNS device discovery for adb client 2017-03-07 14:45:51 -08:00
adb_trace.cpp adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
adb_trace.h adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
adb_unique_fd.h adb: extract the adb-specific unique_fd out into its own header. 2016-09-01 15:49:06 -07:00
adb_utils.cpp Fix various adb error reporting bugs. 2017-04-18 14:51:27 -07:00
adb_utils.h Fix various adb error reporting bugs. 2017-04-18 14:51:27 -07:00
adb_utils_test.cpp adb: allow symlinks to directories in directory_exists. 2017-03-23 16:19:55 -07:00
adbd_auth.cpp adb: rationalize types. 2016-10-06 14:50:02 -07:00
Android.mk adb: statically link libbase into the tests. 2017-04-12 17:38:09 -07:00
bugreport.cpp Fix various adb error reporting bugs. 2017-04-18 14:51:27 -07:00
bugreport.h DO NOT MERGE: Removed extra 'pulling file' message. 2016-08-30 13:06:30 -07:00
bugreport_test.cpp Don't display bugreport progress when it recedes. 2017-03-20 11:49:21 -07:00
commandline.cpp Improve "adb sideload" error reporting. 2017-05-02 14:41:04 -07:00
commandline.h Fix various adb error reporting bugs. 2017-04-18 14:51:27 -07:00
console.cpp adb: add helper to get the ~/.android directory. 2016-09-01 15:43:22 -07:00
CPPLINT.cfg
diagnose_usb.cpp
diagnose_usb.h
fdevent.cpp adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
fdevent.h adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
fdevent_test.cpp adb: kill adb_thread_{create, join, detach, exit}. 2017-04-12 17:12:32 -07:00
fdevent_test.h adb: kill adb_thread_{create, join, detach, exit}. 2017-04-12 17:12:32 -07:00
file_sync_client.cpp Move adb_dirname and adb_basename to libbase 2017-02-27 18:18:31 -08:00
file_sync_service.cpp Move adb_dirname and adb_basename to libbase 2017-02-27 18:18:31 -08:00
file_sync_service.h Revert "Revert "adb: extend sync protocol's stat support."" 2016-12-05 17:38:30 -08:00
framebuffer_service.cpp
jdwp_service.cpp adb: switch the jdwp control socket to SOCK_SEQPACKET. 2017-03-20 13:37:13 -07:00
line_printer.cpp adb: add missing newline when printing transfer rate. 2016-08-04 14:56:53 -07:00
line_printer.h
MODULE_LICENSE_APACHE2
NOTICE adb: append the libwinpthread COPYING to adb's NOTICE. 2017-03-08 21:27:59 -08:00
OVERVIEW.TXT
protocol.txt Precise command constants on adb/protoxol.txt 2016-08-30 01:30:12 +02:00
remount_service.cpp adb: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default() 2017-03-11 09:37:56 +08:00
remount_service.h
security_log_tags.h
services.cpp Merge "adb: fix two device offline problems." 2017-04-20 19:45:18 +00:00
services.h
SERVICES.TXT
set_verity_enable_state_service.cpp libcutils: compile with BOARD_VNDK_VERSION current 2017-04-17 14:44:17 -07:00
shell_service.cpp adb: kill adb_thread_{create, join, detach, exit}. 2017-04-12 17:12:32 -07:00
shell_service.h
shell_service_protocol.cpp
shell_service_protocol_test.cpp adb: fix undefined behavior 2016-10-19 19:39:44 -07:00
shell_service_test.cpp
socket.h
socket_spec.cpp adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_spec.h adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_spec_test.cpp adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_test.cpp adb: kill adb_thread_{create, join, detach, exit}. 2017-04-12 17:12:32 -07:00
sockets.cpp Merge "adb: fix two device offline problems." 2017-04-20 19:45:18 +00:00
sockets.dia
SYNC.TXT
sysdeps.h adb: kill adb_thread_{create, join, detach, exit}. 2017-04-12 17:12:32 -07:00
sysdeps_test.cpp adb: kill adb_thread_{create, join, detach, exit}. 2017-04-12 17:12:32 -07:00
sysdeps_unix.cpp
sysdeps_win32.cpp Revert "adb: check our socketpair ends in our win32 emulation." 2017-03-30 13:12:37 -07:00
sysdeps_win32_test.cpp adb: add script to trace adbd. 2016-12-13 14:31:17 -08:00
test_adb.py libcutils: try all addresses in socket_network_client_timeout. 2016-09-01 15:56:58 -07:00
test_device.py adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
trace.sh adb: add script to trace adbd. 2016-12-13 14:31:17 -08:00
transport.cpp adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
transport.h adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
transport_local.cpp adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
transport_mdns.cpp Make ADB over mDNS work on Windows 2017-03-07 14:45:52 -08:00
transport_mdns_unsupported.cpp Don't include mDNS support on platforms other than Linux 2017-03-07 14:45:52 -08:00
transport_test.cpp adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
transport_usb.cpp adb: fix two device offline problems. 2017-04-20 10:14:59 -07:00
usb.h adb: add adb host-features, report libusb status. 2017-02-22 18:19:21 -08:00