如何从序列号的Andr​​oid AVD名序列号、Andr、AVD、oid

2023-09-13 01:50:20 作者:妳愛她毀我

在命令行中使用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".