3

What's the difference between adb pair … and adb connect …? (When used to communicate with a device that's made itself available for debugging over Wi-Fi.)

The help page says:

  • adb connect: "connect to a device via TCP/IP"
  • adb pair: "pair with a device for secure TCP/IP communication"

From this is sounds like pair is better but … how? What are the pros and cons? (Aside from only being available on Android 11+ devices.)

mjs
  • 63,493
  • 27
  • 91
  • 122
  • Did some more investigation: on the phones I have access to, I need `pair` for Android 11 devices, but `connect` otherwise. However, Wear devices with Android 11 need `connect`. So, not sure if "Wear" is the only exception to the Android >= 11 rule or whether it can vary by OEM. – mjs Feb 03 '22 at 10:55

1 Answers1

2

adb pair is used for wifi pairing your device with Android >= 11, while adb connect can be used to connect directly to a device with Android <11 over wifi.

From the documentation for wifi pairing with Android >= 11 it says:

To use wireless debugging, you must pair your device to your workstation using a QR Code or a pairing code.

If your phone uses Android <11 then you can use the connect command and the steps from the documentation.

Stephan
  • 15,704
  • 7
  • 48
  • 63