Debug Android App over wifi

So you are here, that’s because you are too much worried about your Android data-cable. Right ? Just kidding.

Now we have 2 solutions for this. I hope, you all like the solutions-2 – As solution-2 is the quickest way to do this .

Solution-1 (Required USB cable for first 2 steps, then do everything without cable)

 

​1. Connect your phone to your computer using data cable and open command prompt and type the following​. (Make sure your phone is already connected to wifi of the network that your computer is already connected as LAN or wifi)

 

adb devices

Above command should return something.

​In-case it not returning any device IP or ID, then check your cable or contact your nearest service center :)​

2. Now type the following command, and after typing the command wait for 4 second, then disconnect the cable from your computer
adb tcpip 5555
3. Now it’s time to know the IP address of the Phone. For this goto following path on your phone

Settings -> About phone -> Status

​(​There you can find a section called “IP address”)​. Just note-down that IP address.

​4. Now again open the command prompt and type the following. (Please note “PHONE_IP_ADDRESS” should be replaced by your phone IP address)
adb connect IP-ADDRESS:5555
​For example
adb connect 192.168.1.5:5555​​
​5. Now you can type following command to check, whether you computer is able to ping/connect to your phone or not.
​adb devices
​Above command should return a device IP/Name.
From now onwards, if you will do ionic run android or cordova run android. it should install the app directly on device. Even on editor like Android studio or eclipse directly you can find your device name to debug. Even on Appcelerator editor too.
Solution-2 (Do everything without cable) – But your computer and your android phone must be in same network. Phone must connected to wifi.

Step-1:
Download and install one app from playstore – App name is “WiFi ADB – Debug Over Air

Step-2:
After installing the app open the app and you must find a command on the app screen, showing something like following

 

adb connect 192.168.1.5:5555

 

So basically open the command prompt on your computer & type the above displayed command and hit enter. You are done. !!!!! Yooo.
From now onwards, if you will do ionic run android or cordova run android. it should install the app directly on device. Even on editor like Android studio or eclipse directly you can find your device name to debug. Even on Appcelerator editor too.
Problem you might face
  • In-case you will move for tea or Cigarate or out-side party. Then your phone may lost the wifi connect and again reconnect to wifi, your ph’s IP address might change. So don’t forget to type the “adb connect XXXXXX” command with the new IP address. You can repeat the above mention steps to know the latest IP address to re-connect your computer ADB with the phone.
  • ADB command is unrecognized on Windows. So for this you need to do the path setting for the installed Android SDK on your computer. So basically if will go inside the SDK folder, you can find a folder called platform-tools”. So basically you need to set the path for this folder. For the proof, you can check for a executable file must be present in-side “platforms-tools” folder (adb.exe).