title: ADB over ethernet
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>setprop service.adb.tcp.port 5555
  stop adbd
  start adbd
  </code></pre>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>Thanks</p>