NOTE: UNLOCKING BOOTLOADER WILL FACTORY RESET YOUR PHONE
1. Java must be installed on your PC since Android SDK needs it. java download
2. Download and install Android SDK and/or Minimal ADB and fastboot.
3. Download and install HTC Sync Manager or PdaNet and select HTC while installing the driver. Be sure you’re connected to the internet and only plug in your phone when asked to.
4. Enable USB Debugging
NOW WE BEGIN WITH BOOTLOADER UNLOCK
For steps 1 to 7 sign up at HTCDev to get your unlock token.
you will have to follow through these steps on the site.
First LOG IN then select UNLOCK BOOTLOADER
Select your phone model .. accept the terms and conditions and continue.
1. Disconnect your phone from your PC and power off the phone completely. Enter Bootloader by pressing the Volume Down button and Power button simultaneously for about 10 – 15 seconds.
Bootloader mode is the same as Download mode for HTC One M9 and newer devices. If you have difficulty, power up normally, go to Settings->Battery and deselect Fast boot. Power down and try again.
2. Use the Volume buttons to select up or down. Highlight Fastboot and press the Power button.
3. You should have FASTBOOT USB displayed as shown below:
4. Connect the device to the computer via a usb cable
NOTE: All new HTC devices shipped since One M9 support download mode instead of bootloader mode for this step. And for select HTC devices with Android Lollipop and all devices that receive Marshmallow, you will need to first manually enable OEM unlocking in Developer options in order to allow the bootloader to be unlocked and proceed with the next steps. To access the OEM unlocking setting on your device, open the Developer options in the system Settings. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About > Software information > More and tap Build number seven times. Return to the Settings screen to find Developer options and check OEM unlocking.
5. Open a command Prompt: Windows: Start->"cmd"
cd \ and press enter
Program Files\Minimal ADB and Fastboot - in front of C:\> and press enter.
It would then should look like
C:\Program Files\Minimal ADB and Fastboot>
fastboot oem get_identifier_token and press enter
6. You will see a long block of text. Copy and paste this text into the the token field below (in the Windows command prompt: Right Click > Mark > highlight the block of text > Right click to copy. Mac users can use cmd-option to mark and select text.).
You will see one of the following two screens:
When copying the token, start with this line:
<<<< Identifier Token Start >>>>
And end with this line:
<<<<< Identifier Token End >>>>>
(Note: Only copy the highlighted sections above. Do not copy the INFO or (bootloader) prefix)
7. Paste this example string of text form your phone into the token field [On HTCDev] and hit Submit in order to receive your unlock code binary file. You will receive this information in your email.
If you successfully completed all the instructions you will notice that the ‘Token Submitted Successfully!’ alert is now shown on the next web page. An email containing the Unlock Key has been sent to you.
Check your email account and open the message from HTC. Download the ‘Unlock_code.bin’ file that has been attached to the e-mail.
When the file is downloaded successfully you should copy and paste Unlock_code.bin file in the C:\Program Files\Minimal ADB and Fastboot folder.
Go back to the Command Prompt window and enter the following lines in order to unlock the bootloader of your HTC :
fasboot flash unlocktoken Unlock_code.bin and press enter
your HTC will get a request to Unlock Bootloader and you simply need to press Volume Up and select YES. Press Power button to confirm.
The device will now restart and it will complete the factory reset process.
That’s it, you’ve successfully unlocked your HTC bootloader using HTCdev site and our tutorial.
You can verify that the phone’s bootloader has been locked by powering off the device. After that you need to boot into Bootloader Mode by pressing Volume down and POWER. In Bootloader mode you will notice the ‘UNLOCKED’ text at the top of your phone’s display, which means that this guide was successfull.
YOU CAN NOW ROOT YOUR HTC USING ANY ROOTING APP AVAILABLE TO YOU
AFTER ROOTING WE CAN NOW CHANGE THE IMEI
IN THE COMMAND PROMPT
C:\Program Files\Minimal ADB and Fastboot>
fastboot getvar imei and press enter
This displays your original IMEI. It’s better to write this down somewhere.
Now type this or copy and paste and press Enter:
fastboot oem writeimei 35826xxxxxxxxxx
Be sure to change 35826xxxxxxxxxx to the BB IMEI number you generated earlier. You should get an OKAY message which signifies the process was successful.
RESTART YOUR PHONE TO SAVE CHANGES