Saturday, 23 July 2016

[XPOSED] VirtualSensor - Emulate a gyroscope from the accelerometer and compass



Introduction

VirtualSensor is an Xposed module that creates a virtual gyroscope and injects values read from the accelerometer and the compass.
This allows anyone to use a whole lot of apps that require the use of a gyroscope.
Its accuracy strongly depends on the accuracy of both the accelerometer and the compass.

Changelog

Code:


v1.0 - 23/07/2016:
Initial release.


Known issues
  • Right now, the Z-axis is not emulated as it always returned wrong values (Investigating this right now)

  • Some applications use the NDK instead of the SDK to access the sensors, the workaround is to hook them seperately, but that isn't done yet

  • There is some jitter even though the values are smoothed using a lowpass filter and a mean


Disclaimer


Code:


Please be aware that this is the first release and this module was only tested on my device. Therefore, it might not work on yours.
Moreover, though it is unlikely this could happen given the modifications it does, the responsibility is yours for whatever happens after installing and using this module.


Download
Contributing

There is a Github project for this module so I'll please do not hesitate to contribute to it. I'll be glad to share knowledge and code. Please know that I'm not (yet? :p) a professional coder and that errors are quite likely to happen.

XDA:DevDB Information
VirtualSensor, Xposed for all devices (see above for details)

Contributors
Frazew
Source Code: https://github.com/Frazew/VirtualSensor

Xposed Package Name: fr.frazew.virtualgyroscope

Version Information
Status: Testing
Current Stable Version: v1.0
Stable Release Date: 2016-07-23

Created 2016-07-23
Last Updated 2016-07-23



No comments:

Post a Comment