ADB over wireless

JavaAndroidAdb

Java Problem Overview


Hey i was wondering do you need root to do this any more? I want to install/run apps over wireless to stop all this cable switching. I have also read that it can cause some errors though? That was on old posts on this site, I was wondering is it reliable and easy to do now?

Java Solutions


Solution 1 - Java

Rooting is not required. With USB cable connected, port 5555 opened across all involved firewalls and debug mode enabled

adb tcpip 5555

then look into wireless properties of your device and the network you use, to see which IP address have been granted to device (or configure your DHCP always to use the same for the device mac address). Then

adb connect 192.168.1.133

(were 192.168.1.133 is a sample IP address).

This is all. You can now use adb shell or adb install or adb upload or the like with USB cable plugged out.

To switch back to USB mode,

adb usb

The device may also revert back to USB mode after reboot.

This mode is needed for development of applications that use attached USB devices directly (USB port is used by device so cannot be used by ADB). It is briefly covered in the USB debugging section of the Android website.

Solution 2 - Java

I ran into the same problem today and find that things are fine on my non-rooted 4.2 Galaxy Nexus device, but does not work on my older (again non-rooted) Samsung Galaxy Y (2.3) device.

I tried the steps given here but looks like one needs a rooted phone to work on some of the earlier models (and maybe other non-nexus devices too).

This is what I tried -

$ adb shell netstat | grep 5555

No socket was opened on this port.

Tried to manually set the steps that adb tcpip does -

$ adb shell setprop service.adb.tcp.port 5555
$ adb shell stop adbd
$ adb shell start adbd
$ adb shell getprop | grep adb

This does not show the property that was just set.

This is what it shows on my nexus device where it works without rooting -

$ adb shell getprop | grep adb
[service.adb.tcp.port]: [5555]

So depending on what phone/OS version u have, your mileage might vary.

:-)

Solution 3 - Java

For wireless adb on my Nexus 4 @ Android 4.4.2 (Kitkat) I usually do:

  1. Turn on usb debug in 'Developer options'

  2. Connect via usb cable, accept an RSA key dialog

  3. adb tcpip 5555

  4. adb connect 192.168.?.? (device IP on local wlan)

  5. Disconnect usb cable

  6. Test if connection is still on: adb devices

Solution 4 - Java

No root required

For wireless ADB without USB cable is possible but you need to use one time setup connection with PC using usb cable. make sure USB debugging mode should be on. Connect device on same wifi. then run

  • adb tcpip 5555
  • adb connect yourdeviceIP

To find current device IP and to setup adb wireless use app (without rooting device)

https://play.google.com/store/apps/details?id=com.freeappmakr.adb

Using this app you can setup your device with wireless adb.

If any error in setup use

adb kill-server

then try again

Solution 5 - Java

If you installed adbd Insecure on your device, it will prevent you from connecting to your device via WiFi. You have to uncheck the "Enable insecure adbd" in the app adbd Insecure.

See https://stackoverflow.com/questions/27790445/fixed-cant-connect-to-adb-over-wifi

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPaulView Question on Stackoverflow
Solution 1 - JavaAudrius MeškauskasView Answer on Stackoverflow
Solution 2 - JavaKumar RangarajanView Answer on Stackoverflow
Solution 3 - JavaDmitrySandalovView Answer on Stackoverflow
Solution 4 - JavaYogeshView Answer on Stackoverflow
Solution 5 - JavamatthieuView Answer on Stackoverflow