summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2019-09-05 16:07:24 -0700
committerJosh Gao <jmgao@google.com>2019-09-05 16:07:39 -0700
commit6845640ea0fbcac974f202504c61bf2a140a3046 (patch)
tree2d6490a5195eec411441d57465c86e35c309b8fe /usb
parent1ec5aed448c480f1435e0f8c3c0e78bd60e931b9 (diff)
Enable MS OS descriptors for adb.
Bug: http://b/68993980 Test: none Change-Id: I3e4a6aac27c5fd123b82ff27946dfe5a84dad4fb
Diffstat (limited to 'usb')
-rw-r--r--usb/UsbGadget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/usb/UsbGadget.cpp b/usb/UsbGadget.cpp
index 82916a22..661669f6 100644
--- a/usb/UsbGadget.cpp
+++ b/usb/UsbGadget.cpp
@@ -527,6 +527,8 @@ V1_0::Status UsbGadget::setupFunctions(
if ((functions & GadgetFunction::ADB) != 0) {
ffsEnabled = true;
ALOGI("setCurrentUsbFunctions Adb");
+ if (!WriteStringToFile("1", DESC_USE_PATH))
+ return Status::ERROR;
if (inotify_add_watch(inotifyFd, "/dev/usb-ffs/adb/", IN_ALL_EVENTS) == -1)
return Status::ERROR;