Is there any difference between adb wait-for-device and adb wait-for-devices?

前端 未结 1 1875
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 03:37

There are two commands that I used wait for a device to come up: adb wait-for-device and adb wait-for-devices. Both seem to wait for a device to boot up, I din\'t find any d

1条回答
  •  不思量自难忘°
    2021-01-18 04:20

    This is how adb handles the command:

     /* handle wait-for-* prefix */
    if (!strncmp(argv[0], "wait-for-", strlen("wait-for-"))) {
        const char* service = argv[0];
        if (!strncmp(service, "wait-for-device", strlen("wait-for-device"))) {
            if (ttype == kTransportUsb) {
                service = "wait-for-usb";
            } else if (ttype == kTransportLocal) {
                service = "wait-for-local";
            } else {
                service = "wait-for-any";
            }
        }
    

    So any string starting with wait-for-device would have the same effect

    0 讨论(0)
提交回复
热议问题