Be tolerant of devices that don't report serials.
The USB spec explicitly says this is optional, so we shouldn't be
relying on it.
Bug: http://b/20883914
Change-Id: Icf38405b00275199bcf51a70c47d428ae7264f2b
diff --git a/adb/transport.cpp b/adb/transport.cpp
index bb5be6b..29cf580 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -853,7 +853,8 @@
#if ADB_HOST
-static void append_transport_info(std::string* result, const char* key, const char* value, bool sanitize) {
+static void append_transport_info(std::string* result, const char* key,
+ const char* value, bool sanitize) {
if (value == nullptr || *value == '\0') {
return;
}
@@ -869,7 +870,7 @@
static void append_transport(atransport* t, std::string* result, bool long_listing) {
const char* serial = t->serial;
if (!serial || !serial[0]) {
- serial = "????????????";
+ serial = "(no serial number)";
}
if (!long_listing) {