android_system_core/adb/client
Joshua Duong 5cf7868b7e [adbwifi] Add A_STLS command.
This command will be sent by adbd to notify the client that the
connection will be over TLS.

When client connects, it will send the CNXN packet, as usual. If the
server connection has TLS enabled, it will send the A_STLS packet
(regardless of whether auth is required). At this point, the client's
only valid response is to send a A_STLS packet. Once both sides have
exchanged the A_STLS packet, both will start the TLS handshake.

If auth is required, then the client will receive a CertificateRequest
with a list of known public keys (SHA256 hash) that it can use in its
certificate. Otherwise, the list will be empty and the client can assume
that either any key will work, or none will work.

If the handshake was successful, the server will send the CNXN packet
and the usual adb protocol is resumed over TLS. If the handshake failed,
both sides will disconnect, as there's no point to retry because the
server's known keys have already been communicated.

Bug: 111434128

Test: WIP; will add to adb_test.py/adb_device.py.

Enable wireless debugging in the Settings, then 'adb connect
<ip>:<port>'. Connection should succeed if key is in keystore. Used
wireshark to check for packet encryption.

Change-Id: I3d60647491c6c6b92297e4f628707a6457fa9420
2020-02-21 21:07:13 +00:00
..
pairing [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation. 2020-02-21 21:06:40 +00:00
adb_client.cpp Revert "Revert "Support socket activation of adb server"" 2019-12-11 08:20:20 +00:00
adb_client.h [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation. 2020-02-21 21:06:40 +00:00
adb_install.cpp Incremental installations in adb, client/host side. 2020-02-19 08:01:06 -08:00
adb_install.h Adds atomic install support to adb 2019-01-11 18:13:36 +00:00
adb_wifi.cpp [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation. 2020-02-21 21:06:40 +00:00
auth.cpp [adbwifi] Add A_STLS command. 2020-02-21 21:07:13 +00:00
bugreport.cpp adb: don't use <error.h>. 2018-10-22 17:04:32 -07:00
bugreport.h adb: switch over to Android.bp. 2018-02-28 15:29:50 -08:00
commandline.cpp [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation. 2020-02-21 21:06:40 +00:00
commandline.h adb: report error in copy_to_file. 2020-02-04 13:47:57 -08:00
console.cpp NFC: Fix potentially uninitialized 'port' variable. 2019-05-09 12:55:41 -07:00
fastdeploy.cpp Incremental installations in adb, client/host side. 2020-02-19 08:01:06 -08:00
fastdeploy.h FastDeploy refactor: 2+GB APK support, optimizations, tests. 2019-10-02 13:25:03 -07:00
fastdeploycallbacks.cpp FastDeploy refactor: 2+GB APK support, optimizations, tests. 2019-10-02 13:25:03 -07:00
fastdeploycallbacks.h FastDeploy refactor: 2+GB APK support, optimizations, tests. 2019-10-02 13:25:03 -07:00
file_sync_client.cpp adb: make the push summary fit in 80 columns. 2020-01-27 10:05:36 -08:00
file_sync_client.h adb: split file_sync_service.h into client and daemon parts. 2018-07-25 18:08:32 -07:00
incremental.cpp Fix the MacOS build of incremental* 2020-02-20 15:39:36 -08:00
incremental.h Incremental installations in adb, client/host side. 2020-02-19 08:01:06 -08:00
incremental_server.cpp Initialize |sentBlocksCount| 2020-02-20 16:03:10 -08:00
incremental_server.h Incremental installations in adb, client/host side. 2020-02-19 08:01:06 -08:00
line_printer.cpp adb: win32: LinePrinter Unicode support 2018-09-02 16:27:12 -07:00
line_printer.h adb: don't spew push/pull progress to dumb terminals. 2018-08-22 17:28:33 -07:00
main.cpp [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation. 2020-02-21 21:06:40 +00:00
transport_mdns.cpp [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation. 2020-02-21 21:06:40 +00:00
usb_dispatch.cpp adb: make adb reconnect perform a USB reset. 2019-03-28 15:47:44 -07:00
usb_libusb.cpp adb: make adb reconnect perform a USB reset. 2019-03-28 15:47:44 -07:00
usb_linux.cpp Properly finish daemon init when initial USB scan complete 2019-11-04 11:43:20 -08:00
usb_osx.cpp Properly finish daemon init when initial USB scan complete 2019-11-04 11:43:20 -08:00
usb_windows.cpp Properly finish daemon init when initial USB scan complete 2019-11-04 11:43:20 -08:00