adb -s emu geo fix不能使用telnet工作

时间:2014-04-28 10:49:16

标签: android eclipse android-emulator gps adb

我的应用适用于Google Apis 17.我想在启动模拟器后设置gps位置。

我尝试按照how-to-emulate-gps-location-in-the-android-emulator进行操作。

第一。获取模拟器的序列号。

>adb devices
emulator-5554

第二轮

adb -s emulator-5554 emu geo fix 121.4961236714487 31.24010934431376

没有警告和错误。我在windows7上编程。

不起作用。但是当我在eclipse(ADT22.6)中手动发送gps信息时,它可以工作。我的应用可以正确找到位置。 eclipse做了什么?如何使adb命令工作?感谢

1 个答案:

答案 0 :(得分:2)

您是否尝试通过telnet发送?首先,您必须连接到模拟器:

telnet localhost 5554

然后您可以使用geo命令发送纬度和逻辑度:

geo fix 121.4961236714487 31.24010934431376