openstf / adbkit

A pure Node.js client for the Android Debug Bridge.
Other
833 stars 249 forks source link

Is it possible to connect to adb server running remotely? #71

Closed abhagupta closed 7 years ago

abhagupta commented 7 years ago

I have a mac-mini which is connected to couple of android devices. I am trying to run connect to the adb server running on this machine, so that I can run some tests on the devices using my local machine. Which means, I should be SSHing to the adb server running on MAC mini. I tried creating SSH tunnel and I could successfully do that.

Now I want to try the same thing with adbkit. I see that while creating client, there is an options object which has a host key. It obviously needs a SSH tunnel to access the host.... I am kinda lost here. Anyone has any ideas?

sorccu commented 7 years ago

Use environment variables to set them. I can't read the source code right now but I believe you can use ADB_HOST and ADB_PORT. Try to look into those.

Note that not all functionality may work as you expect (e.g. port forwarding).

On Thu, May 4, 2017 at 3:45 Abha Gupta notifications@github.com wrote:

I have a mac-mini which is connected to couple of android devices. I am trying to run connect to the adb server running on this machine, so that I can run some tests on the devices using my local machine. Which means, I should be SSHing to the adb server running on MAC mini. I tried creating SSH tunnel and I could successfully do that.

Now I want to try the same thing with adbkit. I see that while creating client, there is an options object which has a host key. It obviously needs a SSH tunnel to access the host.... I am kinda lost here. Anyone has any ideas?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openstf/adbkit/issues/71, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-_bQBtalLpnCm6e4l3k0PnctLfbayks5r2MtBgaJpZM4NPzJ4 .

sorccu commented 7 years ago

Please always define “it doesn’t work.” Are you getting an error? How do you know it’s not working? What should have happened, and what happened instead?

One thing I can think of is that when a device is added, it might not be usable immediately. Sometimes a device can appear in “offline” state and only become a “device” a bit later.

sorccu commented 7 years ago

Seems this issue is no longer relevant.