I don't have the M8 so @BD619 tested for me and passed. I originally made these for the Sprint HTC One M7 Sense 6.
Always make a back up. I am not responsible for bricked phones. Flash at your own risk. Must be on a stockish Sense 6 rom. Flash on TWRP 2.7.1.x
Edit: black downloads in post 4