ADB pair troubleshooting: pairing code, refused and unauthorized
Almost every ADB failure on a modern Android TV comes down to two ports being confused, or two devices not actually being on the same network. Work through these in order.
Pair first, then connect
Android 11 and newer split wireless debugging into two ports: a pairing port shown in the pairing dialog, and a connection port shown on the debugging screen. They are different numbers, and the connection port is usually not 5555.
Run the pair command with the pairing port and the six-digit code from the TV, then connect using the port on the debugging screen.
adb pair <TV_IP>:<PAIRING_PORT> adb connect <TV_IP>:<PORT> adb devices
Connection refused on the same network
The TV and the computer must be on the same subnet. Guest networks and router AP isolation block ADB even when both devices show as online and can reach the internet.
If the pair step succeeded but connect is refused, re-open the debugging screen on the TV — the connection port changes when wireless debugging is toggled off and on.
Device shows as unauthorized
An authorization prompt must be accepted on the TV. If no prompt appeared, toggle wireless debugging off and on, then restart the ADB server on the computer before retrying.
adb kill-server adb start-server adb devices
Before you change anything
Once the device list shows an entry ending in "device", record the current package list and keep it. That output is the only reliable reference if you need to reverse a change later.
adb shell pm list packages
Usually a stale connection on a changed port. Toggle wireless debugging on the TV, restart the ADB server, and connect again with the current port.
Only on older devices with classic network debugging. Android 11 and newer use a randomly assigned port shown on the wireless debugging screen.