It would be much more convenient if we can develop our Android program without the annoying USB line, isn't it ?
Here's how we do it:
1. Connect your PC and your Android phone to the same Local Area Network
- For WiFi: Connect them to the same AP or make the PC the network sharing server, and vice versa.
- For Bluetooth: Share the network of the phone with PC via Bluetooth, and vice versa.
2. Connect your PC to your phone with USB line first
3. Open the command line (or simply Win + R) and type:
adb tcpip 5555
which means the connecting port is changed to port 5555
4. type:
ipconfig -all
which shows all your network connection, and find the IP of the phone.
(optional) If you've got Apps such as Airdroid which show the IP of your phone, that would even be better.
5. Unplug the USB line
6. type:
adb connect xxx.xxx.xxx.xxx:5555 (xxx is the IP of the phone)
and it's done!
And to undo all these, just simply type
adb usb
and the connection will be back to the USB way.