Debug Android App over WIFI in Android Studio

Most of the Android App developers uses Data Cable to Debug or Run App on Android device. Here I will explain how to avoid data cable to run the app using WIFI connection.

Step 1:

Set Static IP to your mobile. 
WIFI Setting -> Modify Network -> Advanced Option -> IP Setting -> Change DHCP to Static,  Fill IP Address for eg. 192.168.1.51, DNS for eg. 8.8.8.8

Step 2:

Enable adb command

By default adb is not in your PATH This is where the shell looks for executables. You can check your current PATH with echo $PATH.

Otherwise, you should add platform-tools to your PATH, by adding the path in your shell profile.

  • Linux: ~/.bashrc
  • OS X / macOS: ~/.profile or ~/.bash_profile

Add the following line there and replace the path with the one where you installed platform-tools:

export PATH=/Users/sheetalkumar/Library/Android/sdk/platform-tools:$PATH

Use the path of your system platform-tools and save the profile file, then, re-start the Terminal or run source ~/.bashrc (or whatever you just modified).

Now type adb in the terminal to test adb command is working or not.

Step 3:

Connect your device with USB and run the following commands:

adb usb

 restarting in USB mode

adb devices

List of devices attached

ZY2222KVF8 device

adb tcpip 5556

Now connect your device using device IP Address

adb connect 192.168.1.51:5556

connected to 192.168.1.51:5556

 

Now your device is ready to debug over WIFI. Remove your data cable and forget it. Enjoy wireless debugging.

 

Keywords: