adb 命令行模拟GPS位置信息

 查看模拟器序列号

>adb devices
List of devices attached device
emulator-5554	
然后用adb emu命令执行设备的console命令geo fix
>adb -s emulator-5554 emu geo fix 121.49612 31.24010


参考:

http://code.metager.de/source/xref/android/4.2/system/core/adb/commandline.c

http://developer.android.com/guide/topics/location/strategies.html#MockData

http://stackoverflow.com/questions/2279647/how-to-emulate-gps-location-in-the-android-emulator

http://developer.android.com/tools/debugging/ddms.html#ops-location

https://github.com/dpdearing/android-gps-emulator

http://stackoverflow.com/questions/7149432/unit-testing-location-service

http://stackoverflow.com/questions/8573488/android-functional-test-send-geo-location-to-emulator

你可能感兴趣的:(Android,测试)