| Index: tools/android/common/adb_connection.cc
|
| ===================================================================
|
| --- tools/android/common/adb_connection.cc (revision 122347)
|
| +++ tools/android/common/adb_connection.cc (working copy)
|
| @@ -83,8 +83,17 @@
|
| kBufferMaxLength, 0));
|
| if (response_length < kAdbStatusLength ||
|
| strncmp("OKAY", response, kAdbStatusLength) != 0) {
|
| + char fail_msg_buffer[kBufferMaxLength * 3 + 1];
|
| + char* p = fail_msg_buffer;
|
| + for (int i = 0; i < response_length; ++i) {
|
| + snprintf(p, 3, "%02x,", static_cast<unsigned char>(response[i]));
|
| + p += 3;
|
| + }
|
| +
|
| + if (p > fail_msg_buffer)
|
| + *(--p) = 0; // Eliminate the last comma.
|
| LOG(ERROR) << "Bad response from ADB: length: " << response_length
|
| - << " data: " << DumpBinary(response, response_length);
|
| + << " data: " << fail_msg_buffer;
|
| HANDLE_EINTR(close(host_socket));
|
| return -1;
|
| }
|
|
|