Android 11 developer preview came with lots of new and amazing features focusing on 5G integration, scoped storage, improved privacy and security, and more. One of my personal favorite feature is Wireless debugging. It is a new method for deploying and debugging your app wirelessly from your workstation.
- Device running with Android 11
- SDK platform-tools with version ≥ 30.0.0.
- Same Wi-Fi network for Android device and your PC
Android 11 supports deploying and debugging your app wirelessly from your workstation via Android Debug Bridge (adb). For example, you can deploy your debuggable app to multiple remote devices without physically connecting your device via USB and contending 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:Steps to pair:
-Go to the device Settings > Developer Options > Enable Wireless debugging
-Select Pair device with pairing code. (Currently, there are two options to pair it with your computer. Using a QR code or pairing a device using a six-digit code.)
- 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
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 should indicate that your device has been successfully paired.
Enter pairing code: 482924
Successfully paired to 192.168.1.130:37099 [guid=adb-235XY]
11. (For Linux or Microsoft Windows only) Run
adb connect ipaddr:port. Use the IP address and port under Wireless debugging (see image below).
Stay Home ! Stay Safe