VirtualSensor is a module built on Xposed that creates several sensors on devices which do not have them. It does sensor fusion using the values from the accelerometer and the compass which are the two main requirements for this module.
There are currently 5 sensors emulated :
Being the most useful sensor for many applications, the gyroscope is the main sensor this project is about.
This module is born as an answer to personal frustration from not being able to use some applications after updating from my older Moto G (i.e. Photo Sphere) and later also as an answer to this thread.
v1.5.1 - 02/08/2017: This minor version fixes the module for Nougat devices. See the changelog of v1.5.1 for the more information on what has changed for the major version 1.5. v1.5 - 02/08/2017: Finally a new release after (quite) a while. This release should fix the majority of bugs encountered on current and previous versions of Android. With the precious help of people on Github, the cardboard hook has been (hopefully) improved. The overall stability and reliability should be better now. This release will stay marked as beta until relevant and good feedback is received, to please head over to Github if you can and report issues if any (or add to the exising issues to check wether they still exist) v1.41 - 01/08/2016: * Fixed the module, previous version broke it because of proguard minify, do not use version v1.4 v1.4 - 31/07/2016: /!\ This version is broken, avoid it /!\ * Added a check for already existing native sensors so that they don't get overridden by the module * Now checks the values of the accelerometer and magnetic sensor against their accuracy. This means that the output values contain less noise without loosing too much precision * Added a simple GUI to quickly get informations about the module. This part also calculates the values the gyroscope should return and compares them against the one the module actually returns * Some hooks are now made on higher-level API (public available functions for apps), which means that specific device code should no longer break them * Fixed a recurrent exception (ConcurrentModificationException) v1.32 - 29/07/2016: * Fix the mRequiredPermssion field no available on SDK < 20 Hotfix #2 for v1.3 v1.31 - 29/07/2016: * Fixes the issue with SDK <= 18 where mStringType doesn't exist in the Sensor class Hotfix for v1.3 v1.3 - 29/07/2016: * Sensors are now added in a proper way. They should no longer accidentally override existing sensors / cause compatibility issues * All gyroscope axes are fully functional ! * If it didn't work before for you on JellyBean-Lollipop, try now, it might (fixed the check for initialisation of SystemSensorManager) * Started to work on a new filter system for the gyroscope mainly v1.21 - 25/07/2016: Hotfix for v1.2 to avoid crashes on JB devices. v1.2 - 26/07/2016: * Fixed compatibility with SDK18-22 (Android JellyBean 4.3 - Android Lolipop 5.1) * Added a little more log * Calculation for the gyroscope is now based on the calculated gravity sensor data, which (should) makes it work as intended in any orientation * The virtual sensors now have a little more information in the created Sensor class, just to make sure this isn't an issue v1.11 - 25/07/2016: Hotfix for v1.1, fixes an exception raised in some cases when trying to get the accelerometer's min delay. v1.1 - 25/07/2016: * Added support for all SDK versions from SDK16 to SDK23+, this means all android versions starting from Jelly Bean should be supported * Added a lot of new sensors : TYPE_ROTATION_VECTOR, TYPE_GEOMAGNETIC_ROTATION_VECTOR, TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION * Still no support for Pokémon GO though, working on it * Some exceptions fixed * Code refactored a lot v1.0 - 23/07/2016: Initial release.
Right now, the Z-axis is not emulated as it always returned wrong values (Investigating this right now)Fixed
- 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 averaged out
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.
- Github : https://github.com/Frazew/VirtualSensor/releases/
- Xposed Repository : http://repo.xposed.info/module/fr.fr...rtualgyroscope
There is a Github project for this module so please do not hesitate to contribute to it. I'll be glad to share knowledge and code. Please know that I'm not (yet? ) a professional coder and that errors are quite likely to happen.
VirtualSensor, Xposed for all devices (see above for details)
Source Code: https://github.com/Frazew/VirtualSensor
Xposed Package Name: fr.frazew.virtualgyroscope
Current Stable Version: v1.5.1
Stable Release Date: 2017-08-02
Last Updated 2017-08-02