#917·stf

Remote Debug adb connect failed issue

Author: diaoqinCreated Jul 20, 2018Updated Mar 3, 2026

2.3.0 What is the issue or idea you have? I get ip:port from interface first, then use adb connect ip:port to connect device, but it failed sometimes with error connection refused; and sometimes I can't get ip:port from interface, the value of url is empty, but other parameters not empty; we use local area network Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row. it happens on random devices, not on a specific device Please provide the steps to reproduce the issue.

What is the expected behavior? I want to get a stable ip:port to connect remote device; BTW, what's the mechanism of device ip:port, how do to maintain the socket, how to do the socket validation ? When to close it, and create a new socket? Do you see errors or warnings in the stf local output? If so, please paste them or the full log here.

Please run stf doctor and paste the output here.