9

I have an android device which I want to connect to using ADB. For reasons that don't matter here I need it to have an ethernet connection, not wifi. The device itself refuses to have both ethernet and wifi connections at the same time.

I have been using a third party app called ADB WiFi to connect to it with ADB when it is in WiFi mode, and I have found that I can connect to it in wifi, then switch the device into ethernet, and then reconnect to the new IP, and it works.

I would dearly like to be able to connect to my device (which is often remote and hard to reach) without first switching it into wifi and back, to which end I have written my own little app which uses SU and does:

setprop service.adb.tcp.port 5555
stop adbd
start adbd

It says that it is working when I run it and produces no error messages, but I can't connect afterwards. It doesn't work in wifi mode either. After setting up a connection once using the 3rd party app, I can then use stop adbd to prevent adb working, and I can use my application above to enable it again, without wifi or 3rd party intervention, which suggests that it is doing what it thinks it is doing, but missing a one off step.

Does anyone know if there is another thing that must be set / enabled / poked in order for adbd to work? Does anyone know what I'm missing?

Thanks

Andy Newman
  • 1,178
  • 2
  • 8
  • 23

2 Answers2

5

Have you tried this:

adb tcpip 5555
adb connect 192.168.1.1:5555

replacing the 192.168.1.1 with your phones IP Address?

Scott Wardlaw
  • 652
  • 1
  • 8
  • 13
  • 5
    Yes, of course, but it doesn't work until it is enabled on the phone also, and the question is how to do that? – Andy Newman Apr 22 '14 at 10:37
0

I was able to get both ADB (through USB) and Ethernet, but it was device specific. I used the Asus Transformer Pad TF701T with the keyboard dock. The dock allowed me to connect the ADB cable and provided a full size USB port. I connected a compatible USB to Ethernet adapter to get Ethernet.

Scott Wardlaw
  • 652
  • 1
  • 8
  • 13