summaryrefslogtreecommitdiff
path: root/adb/libs/adbconnection/adbconnection_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adb/libs/adbconnection/adbconnection_client.cpp')
-rw-r--r--adb/libs/adbconnection/adbconnection_client.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/adb/libs/adbconnection/adbconnection_client.cpp b/adb/libs/adbconnection/adbconnection_client.cpp
index c13234218..7e1614835 100644
--- a/adb/libs/adbconnection/adbconnection_client.cpp
+++ b/adb/libs/adbconnection/adbconnection_client.cpp
@@ -140,7 +140,13 @@ AdbConnectionClientContext* adbconnection_client_new(
int rc = connect(ctx->control_socket_.get(), reinterpret_cast<sockaddr*>(&addr), addr_len);
if (rc != 0) {
- PLOG(ERROR) << "failed to connect to jdwp control socket";
+ if (errno == ECONNREFUSED) {
+ // On userdebug devices, every Java process is debuggable, so if adbd is explicitly turned
+ // off, this would spew enormous amounts of red-herring errors.
+ LOG(DEBUG) << "failed to connect to jdwp control socket, adbd not running?";
+ } else {
+ PLOG(ERROR) << "failed to connect to jdwp control socket";
+ }
return nullptr;
}