The wireless adb connection works fine on my Android 11 phone + Windows workstation.
But it's not convenient, as every time the phone Wifi disconnects/reconnects, I have to:
- Turn on wireless debugging in Android settings.
- Take note of the port number XXXXX, which changes every time!
- Run
adb connect 192.168.1.10:XXXXX
on the computer.
Is there a way to skip step 2, by either:
- making the port fixed?
- making Windows automatically detect the phone on the new port? (documentation seems to imply that step 2 and 3 are not needed on MacOS, once the pairing is done, I wonder how this works)
The problem is now solved thanks to a recent update of Android Studio.
All steps can now be automated:
Or if you don't need full automation, you can probably add a quick switch for convenience. On a Pixel 3 it can be done in
Settings > System > Developer options > Quick settings developer tiles > Wireless debugging