While developing an Android app, many of the times you need to test your app on actual devices. For that, you need to connect your device through a wire. But I feel, wired is weired.

The Alternative to that can be going with a wireless solution.

#### Temporary solution

Step 1 : Connect your laptop/computer and smartphone on the same WiFi network.

Step 2 : Get your smartphone’s local IP address. You can install this for knowing your local IP address if you have no clue.

Step 3 : Connect your smartphone using USB cable.

Step 4 : Run these commands one after another.

adb tcpip 5000


Step 5 : Disconnect your smartphone from USB cable.

For switching back to USB mode

adb usb


#### Permanent solution

This solution is similar to the previous one. Here we are trying to do the same thing with the help of shell scripting.

Follow these steps once and you are done.

Step 1 : Create a file called con inside the home[~] directory. and paste these commands inside it.

#!/bin/bash

sleep 3

chmod a+x con

./con YOUR_SMARTPHONE_S_IP_ADDRESS