Skip to content

Instantly share code, notes, and snippets.

@vxhviet
Last active April 20, 2016 01:56
Show Gist options
  • Save vxhviet/173b4914cd0c49e642f449576037ecba to your computer and use it in GitHub Desktop.
Save vxhviet/173b4914cd0c49e642f449576037ecba to your computer and use it in GitHub Desktop.
How to connect with phone for debug, build... via Wifi

Question: How to connect with phone via wifi?

Answer:

Connect the phone via usb cable.

Open text editor put in the following and save it as wifiConnect.bat:

cd C:\Users\Viet\AppData\Local\Android\sdk\platform-tools

adb devices

adb tcpip 5555

adb connect 192.168.0.113

The path is your Android SDK's path.

Port is random.

With Nexus phone, you can find out the IP address by System settings / About phone / Status - IP address. (Important: IP address can change everytime the device is reconnected to the network so edit wifiConnect.bat with appropriate IP address).

Connect the phone via a USB cable and rerun wifiConnect.bat everytime restarting Android Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment