开发者

Connecting to an Android emulator on another machine

开发者 https://www.devze.com 2023-01-12 23:14 出处:网络
I need to test my android app 24h a day and I have 3 ubuntu boxes to do it. I would like to connect my development system (MOTODEV Studio 1.3) to a Remote Device.

I need to test my android app 24h a day and I have 3 ubuntu boxes to do it. I would like to connect my development system (MOTODEV Studio 1.3) to a Remote Device.

The interface asks me for an IP a开发者_如何学运维ddress and port for the machine to connect to.

But it doesn't connect. I found that the adb sever on the remote machine doesn't seem to listen to external ports, only internal loopback, making machine-to-machine connections impossible.

Is this true? If so, why there is a section on Device to connect to Android Remote Device on MOTODEV Studio?

I've found an explanation and a workaround in this post (http://rxwen.blogspot.com/2009/11/adb-for-remote-connections.html) but it seems complicated and the post's links don't work, so I'm confused whether there is a solution to do that.

It seems so simple..... I can't believe there is not a way.


The Remote device feature of MOTODEV Studio is intended for TCP/IP connections to a remote phone. It requires a lot of manual intervention at this point to get things working and it's an area where we're definitely in need of better documentation.

I don't have the full workflow in front of me, but the steps you need go like this...

  1. Connect phone to remote host.
  2. Using adb shell on remote host, set the phone to connect over TCP/IP rather than USB. You'll need to find the IP address of the phone manually. If you're using a Motorola phone and the Motorola drivers, it's probably 192.168.16.x
  3. Set up port forwarding from the remote host to the phone for the debug ports (probably 5554 or 5555).
  4. From the local host, set up the address of the remote host in the IP field.
  5. When choosing "Run as" or "Debug As" from the local host, you need to choose the remote device as your target.

We intend to make this workflow more automated in the future, but for now you have to do this manually. It's my observation that remote debugging of embedded systems is still slow and prone to problems with latency and line quality, regardless of whether we're talking about phones or reference boards.

Good luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消