Step 1: Unlock Bootloader
The first step in rooting your HTC One M9 is to ensure that the bootloader is unlocked. This will allow you to install a custom recovery on your device such as TWRP or CWM. In this example we will use TWRP.
First download Mini-SDK and extract this to your C: drive
Next create an account on the HTC Dev Website and confirm your registration through the verification email you will be sent.
Now, access this page and login with your account. From that page select the “Unlock bootloader” option and click on “Get Started”.
Select HTC One M9 on the right hand side then click ‘Unlock Bootloader’
Follow steps 1 – 4 provided by HTC Dev. When downloading the fastboot binary ensure you extract this to the same location as MiniSDK. Click ‘Proceed to Step 5’ Do not follow the instructions in Step 5 – 6 as we will be using MiniSDK.