如何从序列号的Andr​​oid AVD名 [英] How to get Android AVD name from serial number

查看:101
本文介绍了如何从序列号的Andr​​oid AVD名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在命令行中使用Android的SDK,我可以利用现有的运行设备的列表:

Using the Android SDK from the command line, I can get a list of the running devices available using:

./adb device

这给我提供设备的序列号。我怎样才能获得该序列号模拟器设备(如Eclipse的ADT插件呢)?

This gives me the serial number of available devices. How can I get the AVD name of the emulator device from that serial number (like the Eclipse ADT plugin does)?

推荐答案

的Eclipse插件以通过TCP / IP连接到仿真器做的。要连接,(对于Linux),键入

The Eclipse plugin does it by connecting to the emulator via tcp/ip. To connect, (for linux), type

〜/ code $远程登录本地主机5554
  尝试:: 1 ...
  尝试127.0.0.1 ...
  连接到本地主机。
  转义字符为^]。
  Android的控制台:键入help以命令列表
  OK

~/code$ telnet localhost 5554
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: type 'help' for a list of commands
OK

替换5554与任何号码,当你键入亚行设备来连字符后 - 模拟器-5554,例如,将有telnet端口5554打开

Replace "5554" with whatever number comes after the hyphen when you type "adb devices" - "emulator-5554", for instance, would have telnet port 5554 open.

然后,键入AVD名,按回车键,你应该看到类似下面的内容:

Then, type "avd name", hit enter, and you should see something similar to the following:

AVD名
  GB10
  OK

avd name
GB10
OK

在这个例子中,仿真器的名字是GB10。

In this example the emulator's name was "GB10".

这篇关于如何从序列号的Andr​​oid AVD名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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