[AT&T HTC One (M8)] devbro:
Sure. These instruction were used on a htc m8 ATT phone that was S-ON. the bootloader was unlocked.

1. first boot the phone into fastboot by holding power+vol-up(to force shutdown) immediately followed by (power+vol-down) to go into hboot.

2. in hboot use volumen buttons for up and down and power button for selection. Select fastboot

3. lock the bootloader -> fastboot oem lock

3.1 at this point if you reboot the phone it will not go anywhere except for fastboot mode. no worries. if you unlock your phone you are back to your normal phone

4. we will not attempt to install new firmware

5. in fastboot command enter RUU mode: fastboot oem rebootRUU

6. phone will reboot and you get a different screen with grey picture. This mode is specially made for updating roms and other parts of phone.

7. download http://1drv.ms/1ClUXtt firmware.zip file (big thank you to krazyace35)

8. flash the firmware.zip : fastboot flash zip firmware.zip

9. at this point your phone may restart, do no worry.

9.1 you WILL get the following error in the command line: FAILED (remote: 90 hboot pre-update! please flush image again immediately)

9.2 if you get the error in 9.1 then you are in the right path. it means that S-ON has checked and accepted the firmware.zip if you get any other error it may be either because bootloader is unlocked or the firmware.zip file is not signed for your device. open the firmware.zip file using winrar and check android-info.txt file for CID and modelID to be a match to your phone. if not do not bother as any changes to the firmware of any kind (re-zipping) will invalidate it.

10. if you got the remote: 90 hboot pre-update! error from 9.1 then do the command again: fastboot flash zip firmware.zip

10.1 make sure your computer is on reliable power. the cable and phone is not moved or require moving. As the next few minutes the firmware.zip will be updating the radio and other parts of the phone.

11. once the process is done, you will get a success/OKAY message which points to completion of firmware update

12. you may reboot the phone by: fastboot reboot

12.1 you may also use power+vol-up to reboot.

12.2 your phone should be able to pass through and enter the rom

13. we will now attempt to update to latest sense6/ATT rom

14. get this file: http://dl3.htc.com/application/RUU_...40.45.C33065.00_F_release_426617_signed_2.exe

14.1 I do not remember who posted the link on XDA forum but the link was not on htc website.

15. again make sure your phone does not require moving and the cable is good. having more than 30% power is also an strong recommendation

16. enter fastboot again(step 2)

17. run the RUU file on your computer

18. follow steps

19. once your phone restarts you are in semi-safe zone. go for a 10 to 15 minute walk.

20. once you are back the RUU set up should be done.

21. restart your phone and wait for it to go to rom and you are satisfied.

OPTIONAL: unlocking bootloader:

22. reboot into fastboot

23. fastboot flash unlocktoken unlock_code.bin (obtained from htcdev.com the file differs from phone to phone but easy and legal to obtain from HTC directly)

24. on your phone press volume up then power button to accept.

25. you now have unlocked bootloader

OPTIONAL: flash new recovery

26. find the following file: openrecovery-twrp-2.7.0.2-m8.img (http://downloadandroidrom.com/file/HTCOne/M8TWRP/openrecovery-twrp-2.7.0.2-m8.img)

27. in fastboot run this command: fastboot flash recovery openrecovery-twrp-2.7.0.2-m8.img

28. you are done