Skip to content Skip to sidebar Skip to footer

Adb Over Wifi Killed Off After Usb Disconnect?

So with my nexus 5 im easily able to do something like this to connect adb over wifi: adb tcpip 5555 adb connect 192.xxx.x.xx and then disconnect the usb cable. I have another dev

Solution 1:

For some reason, connecting the device in Charge only mode solved the problem. Just make sure "Allow ADB debugging in charge only mode" is enabled before connecting the device.

https://stackoverflow.com/a/51904546/4470297

Solution 2:

Try to connect to it without the usb cable.

  • Step 1. Use wifi adb on your phone to get the ip (needs rooted phone, but because your on stackoverflow I guess you have one).
  • step 2. Type in your console adb connect (ip shown in wifi adb)

If this dosnt work please post the exact message you get in your console when trying to connect.

Non-Rooted Answer :

  • Enable USB-debugging in the developer setting and connect your phone to your computer via USB.
  • Run the adb command, adb tcpip 5555 (Make sure port 5555 is not blocked by any firewall programs)
  • Get your Wi-Fi IP address assigned to your device and run the adb command

    adb connect <IP_ADDRESS>.For example, adb connect 192.168.1.133

  • Now you can disconnect the usb cable and run adb shell, adb install, or adb push commands via your Wi-Fi.

  • Inorder to switch back to USB mode and disable the Wireless mode, run the following adb command.

    adb usb

  • You can also simply reboot your phone to switch back to the USB mode.

Solution 3:

Prerequisites

Android device and computer should be connected in same network. (If you don't have any network than you can create your own by enabling Wifi hotspot available in your device)

Step 1:

Connect Android device with USB cable to computer

Step 2: Use following command in terminal to make sure adb is running in USB mode.

$adb usb

restarting in USB mode Connect to the device over USB.

Step 3:

Execute following command in terminal to make sure adb identify/list gets connected with the device.

$adb devices

Step 4: Change adb mode from USB to tcpip using following command.

$adb tcpip 5555

restarting in TCP mode port: 5555

Step 5: Now, adb is running over TCP/IP mode, Let’s find IP address of Android device.

Go to Settings in Android device -> About -> Status -> IP address. note down the IP address of connected Android Device.

Step 6: Use following command to connect ADB with IP address

$adb connect #.#.#.#

connected to #.#.#.#:5555

Step 7: Now adb is working over Wi-fi, You can remove USB cable from Android device.

Step 8: To confirm adb is working over Wi-fi and your device is still connect. you can use following command

$adb devices

#.#.#.#:5555 device

You’re now ready to go!, Enjoy ADB over Wi-fi.

Use following command to change ADB mode to USB

$adb usb

Solution 4:

For me, it looks like this was a bug with ADB server version (39). I updated to (41) and the issue went away.

It's super weird, because I was using version 39 on two different PCs and on one adb/wi-fi worked, and on the other, as soon as I unplugged the USB cable the Wi-Fi device would become disconnected as well. 🤷🏻‍♂️

Solution 5:

I would suggest to:

  1. Make sure both of your devices are on the same network.
  2. While running adb connect give the port number too
  3. Make sure the default port 5555 is not used by any other service
  4. When you changed the device did you double check on the ip (In wifi connection IP keeps changing)

Post a Comment for "Adb Over Wifi Killed Off After Usb Disconnect?"