With GyroEmu Xposed module, you can simulate Gyroscope on any Android phone, if the phone has built-in Accelerometer and Magnetometer. Thanks to XDA developer Mourdraug, his GyroEmu Xposed module replicates Gyroscope (virtual Gyroscope) by utilizing your phone’s accelerometer and magnetometer.
The Xposed module ‘GyroEmu’ is still in developing stage, so it may not give pure output at present, but the developer is working on it to make a perfect Gyroscope emulator for any Android phone. Here is how GyroEmu simulate Gyroscope on an Android phone: You can follow the development of this app at here and if you would like to tryout this Xposed module, download its APK [HERE], install it and activate in Xposed Framework. (Source) Module registers then SensorEventListeners for accel and magnet sensors and does it’s calculations on accelerometers update and calls onSensorChanged of listener that uses it’.