This method only works with api up to 15
For accelerator tests and other similar gravity, a gyroscope, ... can use this application.
Download sensorsimulator first
These are 2 applications. One installation (SensorSimulatorSettings-2.0-rc1.apk) in the second emulator (sensorimulator-2.0-rc1.jar) is performed on your PC.
Additional information and a complete tutorial

Genymotion does not support this feature:
Additional Information Genymotion Shell
Another way:
You can use the Android Studio Android 6.0 emulator (Google APIS) x86.
This emulator (all x86 / x64 bits) is very fast and supports all sensors. 
Like this: 
source share