diff options
author | Joshua Duong <joshuaduong@google.com> | 2018-12-03 15:21:46 -0800 |
---|---|---|
committer | Joshua Duong <joshuaduong@google.com> | 2020-02-22 15:15:10 +0000 |
commit | f24fb19dbf0ea4305de79cfddeb45ca1f7baa41f (patch) | |
tree | 5b515fe15368fd58f7b8742fd92c210d811d2efa /services/usb/java | |
parent | a1fb6f5b1d9c93f9aeb4086beed753e644ca1a47 (diff) |
[adbwifi] Make AdbManager changes for adb over WiFi.
This CL has a couple of notable changes:
- Add communication layer between adbd, system server, and Settings UI
- Add system notification (Wireless debugging connected) when at least
one device is connected.
- Add trusted networks (BSSID) to the keystore.
- Changed the keystore format to:
<keyStore version="1">
<adbKey ... />
<wifiAP ... />
</keyStore>
- Currently, trusted networks don't have a expiration time. Also, only
way to clear it is by blowing up the keystore (revoke permissions).
- Add pairing mechanism:
- Using libadbwifi_pairing_connection C++ library to pair a device
using SPAKE2 protocol over TLS.
- Register MDNS service for client discovery.
- Removed ability to ctl.start/stop adbd from UsbDeviceManager
- AdbService now controls when to do this
Bug: 111434128, 119490154, 119492574
Test: Manual. From developer options:
1) USB debugging off, WiFi Debugging off
- Ensure both transports are disabled by trying to connect via WiFi and
USB.
2) USB debugging on, WiFi Debugging off
- Connections via USB are available, WiFi is disabled
3) USB debugging off, WiFi Debugging on
- Connections via WiFi are available (IP + port), USB is not available
4) USB debugging on, WiFi Debugging on
- Check both transports work
Change-Id: I9f87679d195da99a55b6faf7131da1f1af65fe01
Exempt-From-Owner-Approval: approved in aosp master
(cherry picked from commit a5969b5a1d9fe08783c32ea23bead56252a74383)
Diffstat (limited to 'services/usb/java')
-rw-r--r-- | services/usb/java/com/android/server/usb/UsbDeviceManager.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 84f411f33157..07cc2d49d9e5 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -1720,21 +1720,6 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser private static final int ENUMERATION_TIME_OUT_MS = 2000; /** - * Command to start native service. - */ - protected static final String CTL_START = "ctl.start"; - - /** - * Command to start native service. - */ - protected static final String CTL_STOP = "ctl.stop"; - - /** - * Adb native daemon. - */ - protected static final String ADBD = "adbd"; - - /** * Gadget HAL fully qualified instance name for registering for ServiceNotification. */ protected static final String GADGET_HAL_FQ_NAME = @@ -1932,17 +1917,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser return; } try { - if ((config & UsbManager.FUNCTION_ADB) != 0) { - /** - * Start adbd if ADB function is included in the configuration. - */ - setSystemProperty(CTL_START, ADBD); - } else { - /** - * Stop adbd otherwise. - */ - setSystemProperty(CTL_STOP, ADBD); - } + // Adbd will be started by AdbService once Global.ADB_ENABLED is set. UsbGadgetCallback usbGadgetCallback = new UsbGadgetCallback(mCurrentRequest, config, chargingFunctions); mGadgetProxy.setCurrentUsbFunctions(config, usbGadgetCallback, |