Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d91b225 authored by Josh Gao's avatar Josh Gao Committed by Jack Pham
Browse files

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
parent 4959dded
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -178,6 +178,9 @@ Status addGenericAndroidFunctions(MonitorFfs* monitorFfs, uint64_t functions, bo

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;
+3 −0
Original line number Diff line number Diff line
@@ -190,6 +190,9 @@ Status addGenericAndroidFunctions(MonitorFfs* monitorFfs, uint64_t functions, bo

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;