From 34c20bbdfffe0475555d3028e6a441198c85cc62 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 21 Jul 2015 17:09:06 -0700 Subject: [PATCH] Show "(reverse)" in "adb reverse --list". Bug: http://b/17788586 Change-Id: I250a1459295ed38e8d962da8bea2a8d2f83c7ef0 --- adb/adb_listeners.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adb/adb_listeners.cpp b/adb/adb_listeners.cpp index 641b5379d..a15c513fe 100644 --- a/adb/adb_listeners.cpp +++ b/adb/adb_listeners.cpp @@ -142,8 +142,10 @@ std::string format_listeners() { continue; } // " " " " "\n" + // Entries from "adb reverse" have no serial. android::base::StringAppendF(&result, "%s %s %s\n", - l->transport->serial, l->local_name, l->connect_to); + l->transport->serial ? l->transport->serial : "(reverse)", + l->local_name, l->connect_to); } return result; }