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 device im trying to connect (Dell venue 8 tablet) but it seems to disconnect from the adb wifi connection a split second after the usb is pulled.
I use the same commands:
adb tcpip 5555 (<- without another device connected)
adb connect 192.xxx.x.xx (tablet ip here)
Executing adb devices after this shows both the wifi adb connection as well as the usb connection, but with the tablet, as soon as I kill the usb connection, the wifi adb connection also terminates.
Does anyone have any thoughts on why this may be happening?
My research results that it is some bug or unexpected behavior in Android Studio 2.3.1, which kills running adb server (with all open connections) in some situations. In example when you disconnect USB cable or close Android Studio application.
Steps to reproduce:
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)
Connect Android device with USB cable to computer
$adb usb
restarting in USB mode Connect to the device over USB.
Execute following command in terminal to make sure adb identify/list gets connected with the device.
$adb devices
$adb tcpip 5555
restarting in TCP mode port: 5555
Go to Settings in Android device -> About -> Status -> IP address. note down the IP address of connected Android Device.
$adb connect #.#.#.#
connected to #.#.#.#:5555
$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
Try to connect to it without the usb cable.
If this dosnt work please post the exact message you get in your console when trying to connect.
Non-Rooted Solution:
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
, oradb 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.
I would suggest to: