I use ADB over WiFi to connect to an Android device. When I type
adb connect <device ip>
I get error
empty hostname
Go to > System Preferences > Sharing. Check your computer name at the top of Sharing Preferences.
On Android 5.0, go to Settings -> Storage -> menu -> USB computer connection and make sure 'Media device (MTP)' is disabled. When it's disabled 'adb devices' lists the device, when enabled not.
Connect your Android device and adb host computer to a common Wi-Fi network accessible to both. Beware that not all access points are suitable; you might need to use an access point whose firewall is configured properly to support adb. If you are connecting to a Wear OS device, turn off Bluetooth on the phone that's paired with the device.
adb usually communicates with the device over USB, but you can also use adb over Wi-Fi given the following: To connect to a device running Android 11 (and later), see the Wi-Fi section in Run Apps on a Hardware Device. To connect to a device running earlier versions of Android, there are some initial steps you must do over USB.
Try: Connect/disconnect device from USB. Kill adb server (adb.exe) from DeviceManager, and then run "adb devices" again. Also make sure that correct USB drivers are installed for your device. Try: Connect/disconnect device from USB. Kill adb server (adb.exe) from DeviceManager, and then run "adb devices" again.
Enable adb debugging on your device To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options. To use adb with a device connected over Wi-Fi, see Connect to a device over Wi-Fi. On Android 4.2 and higher, the Developer options screen is hidden by default.
For me, simply restarting adb solved the problem
adb kill-server
adb start-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With