问题
For example, Location Spoofer gives out a fake location by using the Access Mock Location permission and I can make my device send out a signal that it's present in any place that I desire.
In the same way, can I fake the Accelerometer data to mock the various situations that a user can be in?
Thanks in advance.
回答1:
You can use SensorSimulator to simulate acceleration in your android device or emulator (download link).
回答2:
As i answered in this question: Simulate accelerometer values on a real device
You can send the values you want directly from your app, but i am not sure if you need to be root to do that.
来源:https://stackoverflow.com/questions/17062749/how-to-send-fake-accelerometer-values-to-an-app-on-a-real-device