1. enter adb shell
2. execute command "getevent"
o/p shows like this :
add device 1: /dev/input/event8
name: "qt602240_ts_input"
could not get driver version for /dev/input/mouse0, Not a typewriter
add device 2: /dev/input/event7
name: "melfas-touchkey"
add device 3: /dev/input/event6
name: "light_sensor"
add device 4: /dev/input/event5
name: "proximity_sensor"
add device 5: /dev/input/event4
name: "aries-keypad"
add device 6: /dev/input/event3
name: "orientation_sensor"
add device 7: /dev/input/event0
name: "accelerometer_sensor"
could not get driver version for /dev/input/mice, Not a typewriter
add device 8: /dev/input/event2
name: "raw_magnetic_sensor"
add device 9: /dev/input/event1
name: "magnetic_sensor"
3. example if you want to verify the proximity sensor execute below command.
echo 1 > /sys/class/input/input5/enable //for proximity sensor
4. sense the particular sensor and verify behaviour the output w.r.t sensor you enabled for shell.