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

Commit b6117c43 authored by Josh Gao's avatar Josh Gao
Browse files

adb: bail out if wait_for_device fails in send_shell_command.

Bug: http://b/27166186
Change-Id: Ib7e9d7e6b909d67a3af94c3517a6a0b54cf17db7
(cherry picked from commit f56c3919)
parent b046e74b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1106,8 +1106,9 @@ static int send_shell_command(TransportType transport_type, const char* serial,
        }

        fprintf(stderr,"- waiting for device -\n");
        adb_sleep_ms(1000);
        wait_for_device("wait-for-device", transport_type, serial);
        if (!wait_for_device("wait-for-device", transport_type, serial)) {
            return 1;
        }
    }

    int exit_code = read_and_dump(fd, use_shell_protocol);