7

I use ADB over WiFi to connect to an Android device. When I type

adb connect <device ip>

I get error

empty hostname
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259

2 Answers2

13

For me, simply restarting adb solved the problem

adb kill-server
adb start-server
Varun Garg
  • 2,464
  • 23
  • 37
3

You need to change net.hostname property on your device. The easiest way is to use the setprop command via a root shell on the device.

setprop net.hostname TypeAnyHostName

If this is not working for you, see other solutions here. This is a temporal solution, the problem repeats again some time later.

Community
  • 1
  • 1
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259