ADB is not starting (no error message)

后端 未结 11 1640
眼角桃花
眼角桃花 2021-01-04 11:32

I am trying to run adb. When I run : \"adb start-server\" it hangs during a while, and then no message.

After that the command \"adb get-state\" receive the answer \

11条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-04 12:01

    The output can be pinned down to transport code:

    D("readx: fd=%d wanted=%d\n", fd, (int)len);
    
    while(len > 0) {
        r = adb_read(fd, p, len);
        if(r > 0) {
            len -= r;
            p += r;
        } else {
            if (r < 0) {
                D("readx: fd=%d error %d: %s\n", fd, errno, strerror(errno));
                if (errno == EINTR)
                    continue;
            } else {
                D("readx: fd=%d disconnected\n", fd);
            }
            return -1;
        }
    

    this might mean adb_read() returns 0 (EOF), while transport tries to read next 4. So, looks like the transport is not being able to read anything but EOF, and simply disconnects. This maybe a USB Driver issue.

    Try using Linux, or running commands with root/admin privilege.

提交回复
热议问题