3
votes

Hi i am using a MotoG2nd Generation updated to Android Lolliop,

Under Android adb Section from google's guide , it says

$ adb usb restarting in USB mode

$ adb devices
List of devices attached
######## device

$ adb tcpip 5555
restarting in TCP mode port: 5555

$ adb connect #.#.#.#
connected to #.#.#.#:5555

$ adb devices
List of devices attached
#.#.#.#:5555 device

I followed these steps and ADB over WiFi works perfectly ,

However the problem is once i restart android studio or turn off and turn on my wifi in my device the connection is lost and ADB connect DEVICE IP command no longer works , i need to use the USB cable and walk through the entire process again , i would like adb to always listen to my phone in my Home Wifi network ,

Any other cons in using ADB over WiFi rather than USB , i find WiFi better cause the USB cable is sometimes flaky and Cables seem old fashioned considering the fact that most file transfers or other operations can be accomplished over LAN (WiFi) instead these days ,

Please help!

1
PS:I dont want to root my deviceSainath S.R

1 Answers

3
votes

It works as it should be. The device will keep the adb daemon in TCP/IP mode until it is restarted or until you run the command adb usb, which restarts the adb daemon in USB mode. Connecting adb over WiFi is not guaranteed to work on all devices. Also, the communication performance with the device is much worse, which can be annoying when you need to deploy a large application.