【问题标题】:adb -s emu geo fix not works without using telnetadb -s emu geo fix 不使用 telnet 不起作用
【发布时间】:2014-06-13 21:11:09
【问题描述】:

我的应用在 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 信息时,它可以工作。我的应用程序可以正确定位位置。日食做了什么?如何使 adb 命令起作用?谢谢

【问题讨论】:

    标签: android eclipse android-emulator gps adb


    【解决方案1】:

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

    telnet localhost 5554
    

    然后可以使用geo命令发送纬度和对数:

    geo fix 121.4961236714487 31.24010934431376
    

    【讨论】:

    • 我不想使用telnet。对于某些操作系统(例如 windows 7),它没有被用作默认值。
    • 使用远程登录。它对 Windows 来说并不比 adb 更陌生。即使 Microsoft 不再提供客户端,也有很多其他的可供选择。
    • telnet 对我不起作用。我收到此消息“KO: unkown command try 'help”
    • 不起作用。我使用@user3712476(7.1 Emulator)得到相同的结果
    猜你喜欢
    • 2011-05-14
    • 2015-03-25
    • 1970-01-01
    • 2018-04-15
    • 2014-03-21
    • 2021-04-08
    • 2015-02-14
    • 1970-01-01
    • 2011-09-19
    相关资源
    最近更新 更多