Android Device Wireless Debugging
Go Up to Running and Debugging Your Android Application On a Remote Android Device
You can run or debug an Android application directly to a real Android device using Wireless Network. This way you don't have to connect your device to a USB port all the time. This is specially useful and easier when developing on a Virtual Machine.
To enable wireless debugging, you must make sure your device is connected to the same network with your computer, and can connect each other.
Developer Options - Wireless Debugging
Steps to pair below Android 11
- For an Android device prior to Android 11 version, you must first pair the device using USB connection.
- Note: To enable USB Debugging on Android, please see: Enable USB debugging on your Android device.
- After successfully enable USB Debugging for your Android device, perform these steps from your
Android SDK
platform-tools
folder to pair the device:adb tcpip 5555
adb connect 192.168.1.10:5555
- Note: Replace
192.168.1.10
with your device IP address.
- Use this command to make sure your device is connected successfully:
adb devices
- Note: It will show your device IP address and Port with the connection state. It should be showing
device
if connected.
- You can unplug the USB connection
Steps to pair Android 11 and above
As of Android 11 version, you can directly pair an Android device over a wireless network without using USB connection. Before you can pair the device, you need to make sure a few things as the requirement:
- Android device running Android 11 or newer
- SDK Platform-Tools version 30.0.0 or newer
On your Android device:
- Go to Device Settings | Developer Options
- Find the Wireless Debugging option
- Set to enable, it will show a confirmation dialog to allow debugging on current wireless network, click allow to enable it
- Click the Wireless Debugging option, this will bring Wireless Debugging Configuration
- Click Pair Device with pairing code, this will show a wifi Pairing Code with device ip address and port to be used by the pc to pair
On your computer:
- open the
Android SDK
platform-tools
folder - Run this command:
adb pair 192.168.1.10:47539
- Note: Replace
192.168.1.10
with your device IP address and47539
with your device port as mentioned in step 5 above. You will be prompted for a Pairing Code, enter the Pairing Code mentioned in the step 5 above.
adb connect 192.168.1.10:47539
- Note: Replace
192.168.1.10
with your device IP address and47539
with your device port as mention in step 5 above.
- Use this command to make sure your device is connected successfully:
adb devices
- Note: It will show your device IP address and Port with the connection state. It should be showing
device
if connected.
After you successfully connected the device, you can see the list of your connected device in the Delphi IDE Android Device List, then you can directly run or debug your project to the device from the IDE.