Unlocking Your Bootloader
First manually enable OEM unlocking in Developer options in order to allow the bootloader to be unlocked
Login to the https://www.htcdev.com/bootloader/ & create a account & log int to the dev site.
you have to select the phone model from here
First manually enable OEM unlocking in Developer options in order to allow the bootloader to be unlocked
Login to the https://www.htcdev.com/bootloader/ & create a account & log int to the dev site.
you have to select the phone model from here
since HTC U Ultra is not listed there you have to go with the All Other Suported Model option
Click on begin to unlock your boot loader & click yes
Make sure to download android SDK & Java runtime & usb drivers before proceed
Step 1
After powering down, press Volume Down and while pressing Volume Down, press Power holding both buttons to start the device into Bootloader mode (now Download mode for 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.
Step 2
Use the Volume buttons to select up or down. Highlight Fastboot and press the Power button.
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
Step 3
Connect the device to the computer via a usb cable
Step 4
Download these bineries from the below link
https://www.htcdev.com/process/legal_fastboot_win <- for Windows computer
https://www.htcdev.com/process/legal_fastboot_mac <- For Mac computer
Step 5
Open a command Prompt: Windows: Start->"cmd" Mac: Applications->Utilities->Terminal.app Linux: Terminal
Type in Command Prompt: fastboot oem get_identifier_token
PS: If this doesn't work you have to set android environment variables in your PC correctly
Step 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 :
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)
Step 7
Paste this string of text into the token field and hit Submit in order to receive your unlock code binary file. You will receive this information in your email.
Submit the toke to below link
https://www.htcdev.com/bootloader/unlock-instructions/page-2#
you will get a email from HTC dev with a unique token
Step 8
You will receive an email with the attachment: Unlock_code.bin. Save this file in the same folder as your fastboot files (For Example: C:\Android).
If, after a short period of time, you have not yet received the mail, or you have received an email from HTC, but does not contain an attached file, it is possible that more stringent spam filters and anti-virus programs will block this mail or attachment.
In order to ensure that you receive the email with the attachment, we suggest you consider using a non-corporate email server as corporate servers tend to have more stringent attachment policies. If you have not received the email at all, please check your spam folder in your email client to check if the email was filtered out.
Step 9
In the command prompt type: fastboot flash unlocktoken Unlock_code.bin. In the command prompt you will see the following message:
Step 10
On your phone you will now see the disclaimer. Please read this carefully as this action may void your warranty. Use the Volume buttons to highlight your choice, and the Power button to make your selection. If you select Yes, your phone will be reset to its’ factory default settings, and your bootloader will be unlocked. If you select No, your phone will reboot and no modifications will have been made.
Step 11
To re-lock your bootloader, in the command prompt, type: fastboot oem lock.
Note: This will not restore the factory default lock, but will simply re-lock the bootloader so no further changes can be made. Furthermore, if you want to unlock your bootloader again, simply repeat step 9 with your original unlock key file to unlock your phone again.
You're Ready To Go!
Congratulations! You have successfully unlocked your bootloader. Browse this site for further sample codes, examples, and tips.
Credits (ref): https://www.htcdev.com