I'm running Android Things on a Raspberry Pi 3 which has been working well with ADB over WiFi and everything. Just recently I've encountered an issue where ADB initially can't connect to the device, but shows the device as connected [offline].
C:\WINDOWS\system32>adb connect 192.168.1.111
failed to connect to 192.168.1.111:5555
Then when I'm running adb connect
again, I'm getting
C:\WINDOWS\system32>adb connect 192.168.1.111
already connected to 192.168.1.111:5555
The device list in ADB shows
C:\WINDOWS\system32>adb devices
List of devices attached
TA3640525I device
192.168.1.5:5555 offline
Android Studio also treats the device as offline. Pinging works as;
C:\WINDOWS\system32>ping 192.168.1.5
Pinging 192.168.1.5 with 32 bytes of data:
Reply from 192.168.1.5: bytes=32 time=10ms TTL=64
Reply from 192.168.1.5: bytes=32 time=5ms TTL=64
Reply from 192.168.1.5: bytes=32 time=5ms TTL=64
Reply from 192.168.1.5: bytes=32 time=5ms TTL=64
Restarting the ADB daemon does not work either
C:\WINDOWS\system32>adb kill-server
I've not encountered this before, and it appeared all suddenly without any changes made to the system. I've tried to re-install ADB (ensuring that the SDK tools get removed), Android Studio and even device drivers. Any idea on what might have caused this?
Edit: I'm running Microsoft Windows 10 Enterprise Version 10.0.16299 Build 16299
Edit: Other computers on the network work very well without any issues.
Have you considered that the device IP may have changed? The IP may be in use by another device that did not have adb.