Hard reset HTC One M9
How to Manually Wipe data Factory reset the HTC One M9 in Recovery
How to Remove Pattern in HTC Desire 728G - Hard Reset in HTC
Factory Reset HTC Desire 728G - How to Hard Reset HTC Desire
Hard Reset will erase all of your data
All described operations you are doing at your own risk.