Power off your device and wait for 5-10 seconds until the device is fully switched off. Press and hold Volume Down button, then press the Power button to switch on your phone and release it, but keep holding the Volume Down button. └ This will boot your HTC One into bootloader mode. You’ll see a screen with option to boot into Recovery mode
If you see the phone image press Volume Up + Power button. In Recovery Mode select wipe data/factory reset. Use Volume keys to navigate and the Power button to accept it. Then choose yes from the menu and click the Power key once. At the end choose reboot system now with the Power button. Well done! As a result your HTC One M8 Dual SIM will be as new and your Snapdragon 801 cores will run faster. First method: First of all, switch off your device. Afterwards press and hold Volume Down + Power button for a while. Release held keys when you see an Android menu on your screen.. Then press Volume Down to select option "Factory reset", and Factory Reset HTC One M8s. At the very beginning hold down the Power key for a short while in order to switch the device off. In the next step press and hold the Volume Down + Power button for a several seconds. When you see the three Android images, then release held keys. Afterwards press Volume Down to select option "Factory reset", and