Android ADB connect empty host name

10k views Asked by At

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

adb connect <device ip>

I get error

empty hostname
2

There are 2 answers

0
Varun Garg On BEST ANSWER

For me, simply restarting adb solved the problem

adb kill-server
adb start-server
0
naXa stands with Ukraine On

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 temporary solution, the problem repeats again some time later.