commit | 2d91b225eccb284e7fd353bbc10a37f652966aec | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Tue Aug 17 00:57:04 2021 -0700 |
committer | Jack Pham <quic_jackp@quicinc.com> | Thu Dec 23 14:36:15 2021 -0800 |
tree | 60a362324d886591609251a598cee771fbf7fc94 | |
parent | 4959dded7135477395e8a5937738e540ba5bea03 [diff] [blame] |
Enable MS OS descriptors for adb. This change ported from https://android-review.googlesource.com/c/platform/hardware/google/pixel/+/1116495 Bug: 68993980 Test: check_ms_os_desc Change-Id: Ifb758f796e58ee648987a71c3aa6f2b4b8004273
diff --git a/usb/gadget/1.2/default/lib/UsbGadgetUtils.cpp b/usb/gadget/1.2/default/lib/UsbGadgetUtils.cpp index 8986556..fa50821 100644 --- a/usb/gadget/1.2/default/lib/UsbGadgetUtils.cpp +++ b/usb/gadget/1.2/default/lib/UsbGadgetUtils.cpp
@@ -190,6 +190,9 @@ Status addAdb(MonitorFfs* monitorFfs, int* functionCount) { ALOGI("setCurrentUsbFunctions Adb"); + if (!WriteStringToFile("1", DESC_USE_PATH)) + return Status::ERROR; + if (!monitorFfs->addInotifyFd("/dev/usb-ffs/adb/")) return Status::ERROR; if (linkFunction("ffs.adb", (*functionCount)++)) return Status::ERROR;