Android终端--telnet缺少命令,收到此错误: KO:未知命令,请尝试"help".

20

我正在尝试在模拟设备上设置坐标。

XXXX-MacBook-XXXXX XXXX$ telnet localhost 5554
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: Authentication required
Android Console: type 'auth <auth_token>' to authenticate
Android Console: you can find your <auth_token> in 
'/Users/XXXXX/.emulator_console_auth_token'
OK

问题是...

geo fix 77.9888 34.0000
    KO: unknown command, try 'help'

我好像没有geo命令

help
Android console command help:

    help|h|?         print a list of commands
    auth             use 'auth <auth_token>' to get extended functionality
    avd              control virtual device execution
    quit|exit        quit control session

try 'help <command>' for command-specific help
OK

实际上,我的大部分命令都不见了。

有人知道为什么命令会消失吗?

2个回答

35

你没有通过身份验证。

获取/Users/XXXXX/.emulator_console_auth_token的内容,在OK提示符后输入。

auth <auth_token>

此答案中的路径适用于OS X用户。对于更通用的*nix操作系统(如Linux和OS X),请使用~/.emulator_console_auth_token - logoff

9
对于像我这样的菜鸟,diego-torres-milano 的意思是什么:
cat /Users/XXXXX/.emulator_console_auth_token
<copy the above contents - auth_token>
telnet localhost <portnumber> (mostly 5554)
auth auth_token

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接