Wednesday, 1 July 2020

How to do Wireless debugging in Android?

In this tutorial we will be learning a new way of debugging which reduces the headache of USB cable connection.

For this, we have two options: either we can follow the Google's documentation or attach a plugin. This blog is about attaching a third party plugin into your project.

You will have to keep the debugging ON in your device.
If you are not sure how to do that, please refer to this link:
http://whatanandroid.blogspot.com/2020/07/how-to-download-install-and-run-android.html

What is mandatory?
Your device (Phone, Tablet, etc) and the laptop/PC must be connected to a common WIFI.

Just follow these steps and all will be set:



Step 1: For the first time attach the device with USB cable by setting the developer's option ON 


Step 2: Keep the internet connection ON and Go to File->Settings


Step 3: There are many plugins available on the net. I had tried the Android WifiADB plugin and it worked. So select this plugin and click on install. After that a pop up will appear to ask restarting the IDE'. Click on Restart option.

Please note: 
Check if your ADB path is set by typing 'adb' in the command prompt.
If you have already set the ADB path, SKIP the Steps 4, 5, 6 & 7.


Step 4: Right click 'This PC' and go to 'Properties' option.


Step 5: Click on 'Advanced system settings'


Step 6: Click on Environment Variables


Step 7: In the path of User variables and System variables paste the path of your adb.exe file which is (in windows) by default located at 'C:\Users\[user]\AppData\Local\Android\sdk\platform-tools'. So in this case you should paste this in your both paths mentioned above (Do not forget to add a ; at end)  C:\Users\[user]\AppData\Local\Android\sdk\platform-tools;


Step 8: Keep your device connected and go to Tools -> WifiADB



Step 9: The final step is to connect your device by clicking on the 'connect' option.
The device name will be shown under 'name' section.


You can disconnect the connection by clicking on the red colored option 'disconnect'.


Here is the final output.

No comments:

Post a Comment