查看模拟器序列号
>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://*.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://*.com/questions/7149432/unit-testing-location-service
http://*.com/questions/8573488/android-functional-test-send-geo-location-to-emulator