使用亚行(android平台,工具)远程运行设备上如何我可以部署/执行的应用程序? [英] How I can deploying/execute application on a remotely running device using adb (android platform-tools)?

查看:119
本文介绍了使用亚行(android平台,工具)远程运行设备上如何我可以部署/执行的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,部署一个测试应用程序,并发出命令在同一网络连接有一台机器的IP xxx.yyy.zz.pp的设备上。

我通过 http://developer.android.com/tool​​s/help阅读/adb.html#directingcommands 的,但我没能得到答案。

我试图用平台工具/ ADB连接<远程计算机的IP> ,但没有我得无法连接错误。

有没有一种方法来部署并使用ADB工具在远程运行模拟器或设备上执行命令?

解决方案

亚洲开发银行标记维基

  

安卓调试桥(ADB)是一种多用途的命令行工具,可以让   你有一个模拟器实例通信或连接Android系统   设备。它是一个包括三个分量的客户机 - 服务器程序:

     
      
  1. 在客户端,它运行在您的开发机器。您可以通过发出ADB命令调用从壳客户端。其他Android工具,如ADT插件和DDMS也创造了亚洲开发银行的客户。
  2.   
  3. 的服务器,这是在开发机器后台进程运行。服务器管理客户端和仿真器或设备上运行adb的守护进程之间的通信。
  4.   
  5. 系统守护进程,它为每个模拟器或设备实例上的一个后台进程运行。
  6.   

ADB连接命令用于连接本地服务器守护连接至网络设备。但是,你想要的是一个当地的客户端连接到远程服务器。为了实现这个目标,你需要安装在本地和远程系统的最新亚洲开发银行版本。启动远程系统(一个你会被堵塞设备分成)的 ADB服务器的一个实例,使用此命令 ADB -a -P&LT ; PORT_NUMBER> nodaemon服务器。然后,你就可以用prepending从本地系统命令发送到远程运行服务器 -H< REMOTE_IP> -P< PORT_NUMBER> 来你所有的亚洲开发银行命令:

  ADB -H< REMOTE_IP> -P< PORT_NUMBER>设备
 

I have a requirement to deploy a test application and issue commands on a device connected with a machine with IP xxx.yyy.zz.pp in the same network.

I read through http://developer.android.com/tools/help/adb.html#directingcommands but I am not able to get answers.

I tried using platform-tools/adb connect <remote machine IP> but no I got unable to connect error.

Is there a way to deploy and execute commands on a remotely running emulator or device using adb tool ?

解决方案

From the adb tag wiki:

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components:

  1. A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
  2. A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
  3. A daemon, which runs as a background process on each emulator or device instance.


adb connect command is used to connect the local server with a daemon on a network connected device. But what you want is to connect a local client to a remote server. To achieve that you need the latest adb version installed on both local and remote systems. Start an instance of adb server on the remote system (the one which you will be plugging the devices into) with this command adb -a -P <PORT_NUMBER> nodaemon server. Then you will be able to send commands to that remotely running server from your local system by prepending-H <REMOTE_IP> -P <PORT_NUMBER> to all your adb commands:

adb -H <REMOTE_IP> -P <PORT_NUMBER> devices

这篇关于使用亚行(android平台,工具)远程运行设备上如何我可以部署/执行的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆