I thought there was a way to test your applications in development over Wi-Fi. Is this possible?
I\'d love to be able to untether my phone and develop wirelessly.
With new Android 11 you can debug your apps over WiFi without using an USB cable at all.
Quoting from Android Studio User Guide
Connect to a device over Wi-Fi (Android 11+)
Android 11 and higher support deploying and debugging your app wirelessly from your workstation using Android Debug Bridge (adb). For example, you can deploy your debuggable app to multiple remote devices without physically connecting your device via USB. This eliminates the need to deal with common USB connection issues, such as driver installation.
To use wireless debugging, you need to pair your device to your workstation using a pairing code. Your workstation and device must be connected to the same wireless network. To connect to your device, follow these steps:
- On your workstation, update to the latest version of the SDK Platform-Tools.
- On the device, enable developer options.
- Enable the Wireless debugging option.
- On the dialog that asks Allow wireless debugging on this network?, click Allow.
- Select Pair device with pairing code. Take note of the pairing code, IP address, and port number displayed on the device (see image).
- On your workstation, open a terminal and navigate to
android_sdk/platform-tools
.- Run
adb pair ipaddr:port
. Use the IP address and port number from step 5.- When prompted, enter the pairing code that you received in step 5. A message indicates that your device has been successfully paired.
none Enter pairing code: 482924 Successfully paired to 192.168.1.130:37099 [guid=adb-235XY]
- (For Linux or Microsoft Windows only) Run adb connect ipaddr:port. Use the IP address and port under Wireless debugging.