Wireless debugging using ADB over a Wi-Fi network
In this article, we are going to see how to set up debugging in your Android device over Wi-Fi.
So you are looking to debug your Android application and I know how frustrating this process can at times become when you are using a USB cable. If you don't have a USB cable or have borrowed it from someone else for a few moments, and are looking for an alternative. You have arrived at the right place.
It takes only a few steps to quickly enable Wireless debugging. Let's get started!
Step 1: Connect your Android device to your PC/laptop
I know it sounds rhetoric! You are wondering, why we need cable to go wireless. For the first time when setting wifi debugging, you will require a USB cable to connect to your workstation.
Remember to disconnect Bluetooth connectivity, if enabled.
Step 2: Locate your Android SDK
Navigate to 'Sdk/Platform-tools' inside the SDK folder.
Open Command Prompt at this location
Step 3: Connect the host computer and mobile device to the same Wi-Fi network
Ensure both the mobile and PC are connected to the same network to enable wireless debugging.
Check if the devices are properly connected. Paste the command provided below and run it in your terminal or command prompt. It will show the list of connected devices.
adb devices
Step 4: Set the target device to listen on port 5555
Run the below provided command to set up the device to listen on port.
adb tcpip 5555
A prompt pops up on your Android device. Allow connection to continue.
Step 5: Access developer options on Android device
Developer options can be found by tapping 'Device version', which can be found at 'Settings -> About phone -> MIUI version' multiple times. I am using a Mi device. This can vary a bit from device to device.
Enable wireless debugging and copy IP address.
adb connect <ipaddress>:<port>
Step 6: Safely remove the USB cable
Cheers! You are now connected via wireless. You can simply plug out the USB cable from the mobile device.
If you ever face disconnection, restart the adb server.
adb start-server
adb connect <ipaddress>:<port>
Stop the adb server.
adb kill-server
You can repeat these steps as necessary.
Hope this helps you out. Feel free to post your query in the comment section.
Share: