问题
I like being able to work with my android phone using ADB over WIFI.
After connecting it via USB, I run adb tcpip 5555
, and then I can disconnect the USB and run adb connect {phone's IP}:5555
.
What I don't like is that every time I have to restart my phone, I have to reconnect the USB and rerun adb tcpip 5555 command.
Is there any way to make it remember the 5555 setting so it's always in "TCP mode port 5555"?
Thanks
EDIT: my phone is Android 9 limited. Is not rooted. Tried ADB over WIFI and it didn't work out.
回答1:
In the latest developer preview of Android 11, Android supports pairing your device to Android Studio via the new Wireless Debugging feature.
See https://developer.android.com/preview/features#wireless-adb
For older devices, you can use an Android Studio plugin "Wifi ADB" as a temporary workaround. It imitates this feature and works fairly very well.
来源:https://stackoverflow.com/questions/61702067/avoid-having-to-do-adb-tcpip-5555-every-time