简体   繁体   English

如何为穿戴式OS设备伪造位置?

[英]How can I fake a location for my wear OS device?

I am looking for a way to fake the location for my android wear OS device in order to debug my app. 我正在寻找一种方法来伪造我的Android Wear OS设备的位置,以便调试我的应用程序。 I am talking about a real physical device, not the emulator. 我说的是真正的物理设备,而不是仿真器。

You may connect with adb to your Wear device and then mock location : 您可以将adb连接到Wear设备,然后模拟位置

adb shell appops set <PACKAGE> android:mock_location allow

There is a ready solution on github github上有一个现成的解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM