查看模拟器序列号
>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
/guide/topics/location/strategies.html#MockData
/questions/2279647/how-to-emulate-gps-location-in-the-android-emulator
/tools/debugging/ddms.html#ops-location
/dpdearing/android-gps-emulator
/questions/7149432/unit-testing-location-service
/questions/8573488/android-functional-test-send-geo-location-to-emulator