If you want to test on your HTC One M8 whether the installed hardware sensors work properly, then you can use the secret diagnostic menu from HTC for it. This test menu, also called service menu can be accessed via a code. We tell you now in this post, where you must enter on the HTC One M8 this code and thus can open the diagnostic menu from HTC.
For this purpose, please open as first thing the phone application on your HTC One M8. Switch within this to the keypad. Through this you can now enter the following code:
*#*#3424 #*#*
Now the Diagnostic Tool opens on your HTC One M8. Confirm the information message with "Accept" and then you can use the functions within this menu. Set a tick in the checkbox of the tests which you want to perform. Click on the button "Run" to start the marked tests. You can now run these tests on your HTC One M8 and see the results afterwards. The tests are ideal to check the sensors of the HTC One M8.
You know now how to open the secret service menu on the HTC One M8 and how to start a test.