How to fix “adb pair” error: unknown host service


While trying to adb pair to your device, you see an error message like

$ adb pair
Enter pairing code: 232521
error: unknown host service

and the pairing fails


You are not running the (correct version?) of the ADB server.


adb kill-server

and then retry your adb pair command.

If that doesn’t work, reboot your device.