Requirements for Wireless Debugging
- Ensure that your workstation and device are connected to the same wireless network.
- Your device must be running Android 11 (API level 30) or higher for phones or Android 13 (API level 33) or higher for TV and Wear OS.
Pairing Your Device with Your Workstation
-
- Enable developer options on your device.
Device Setting Google Pixel Settings > About phone > Build number Samsung Galaxy Settings > About phone > Software information > Build number LG G6 and later Settings > About phone > Software info > Build number HTC Settings > About > Software information > More > Build number or Settings > System > About phone > Software information > More > Build number OnePlus Settings > About phone > Build number Tap the Build Number option seven times until you see the message
You are now a developer!
This enables developer options on your device.
- Enable developer options on your device.
- Open Android Studio and select "Pair Devices Using Wi-Fi" from the run configurations menu.
- Follow the on-screen instructions to pair your device with a QR code or a pairing code.
- Your device is now paired, and you can deploy your app wirelessly.
Using adb Wirelessly via Command Line
- Enable developer options on your device.
- Enable Wireless debugging on your device.
- Open a terminal window on your workstation and navigate to the platform-tools directory.
- Find your device's IP address, port number, and pairing code.
- Run the command
adb pair ipaddr:port
using the IP address and port number obtained. - Enter the pairing code when prompted to establish the connection.
Troubleshooting Wireless Connection Issues
- Check that your workstation and device meet the prerequisites for wireless debugging.
- Verify that your Wi-Fi network allows p2p connections for wireless debugging.
- If adb over Wi-Fi turns off automatically, reconnect to the network to resolve the issue.
- If the device does not connect after pairing successfully, manually connect using
adb connect ip:port
due to mDNS restrictions.
By following these steps, developers can leverage adb wirelessly to streamline app deployment and debugging processes without the constraints of USB connections. Embracing wireless debugging can enhance efficiency and flexibility in Android development workflows.
Remember to stay updated with the latest Android Studio and SDK Platform Tools versions to ensure seamless wireless debugging experiences.