How to Root HTC One M8!

Download this video for viewing in HD on your smartphone or computer.
Click Here to Download High-Quality HD video to your Smartphone or Computer.

For those of you who want to root your HTC One M8, the steps are nearly identical to the original HTC One M7 root method except different CWM/TWRP recovery file is used.  I will be using Windows computer in this tutorial but I have provided the code you need for Mac and Linux, also you can refer to HTC One M7 Mac video and HTC One M7 Linux video.

This will work on all Android 4.4.4 KitKat and Android 5.0/5.0.1/5.0.2 Lollipop.

For rooting Verizon HTC One M8, please see How to Root Verizon HTC One M7/M8 instead!

If you want to root the latest HTC One M8, here’s how to do it.  Before we begin, make sure to MAKE A BACKUP of EVERYTHING on your phone.  We will first unlock the bootloader, which will ERASE EVERYTHING on your HTC One M8, you’ve been warned!

Step 1. Go to Settings->Power and make sure “Fast boot” is checked OFF.


Step 2. Power off your HTC One M8 then hold down Volume Down and Power buttons for about 3 seconds until you see the bootloader menu like shown below:


Step 3. Hit the Power button once and you should now be in FASTBOOT mode.


Step 4. Connect a micro-USB cable from your HTC One M8 to your computer.


Step 5. Download and unzip the file, you should get a folder called “fastboot” in your Downloads directory.



Step 6. Next, go to the CWM/TWRP recoveries section of and download the appropriate CWM or TWRP recovery for your HTC One M8 model.



Step 7. Copy the downloaded CWM or TWRP recovery image (file ending in .img) to the fastboot folder you unzipped earlier.


Step 8. If using Mac or Linux, you can skip this step as no drivers are needed.  If using Windows, open Device Manager (If you don’t know how to open Device Manager, please Google it!) and check that you have “My HTC” or “Android ADB”.  If you don’t, you need to install HTC drivers, download HTC One M8 Drivers and run it then come back to this step.


Step 9. Open a command prompt or terminal.  For Windows, simply type “cmd” in the search bar.

For Windows:
fastboot oem get_identifier_token
For Mac:
./fastboot-mac oem get_identifier_token
For Linux:
sudo ./fastboot-linux oem get_identifier_token


Step 10. Copy the identifier token to your clipboard.  If you don’t know how to do this, see my video tutorial.



Step 11. Next, go to and choose “Unlock Bootloader” and hit “Get Started”.  You will need to register for the site first if this is the first time using the site.

Then choose “HTC One (M8)” and click on “Begin Unlock Bootloader”.


Step 12. Agree to the terms and click on “Proceed to Unlock Instructions”.


Step 13. Scroll all the way down and click on “Proceed To Step 5”.


Step 14. Scroll down and paste your identifier token you copied earlier in the box where is says, “My Device Identifier Token”.


Step 15. You should get a message like below if it was successful.  If not, try Step 10 again and watch my video tutorial that shows you how to copy it exactly.


Step 16. Check your e-mail inbox and you should have gotten an e-mail from HTC with an unlock code file.  Download this file and copy it to your fastboot folder.



Step 17. Next type in command prompt/terminal:

For Windows, type:
fastboot flash unlocktoken Unlock_code.bin

For Mac, type:
./fastboot-mac flash unlocktoken Unlock_code.bin

For Linux, type:
sudo ./fastboot-linux flash unlocktoken Unlock_code.bin


Step 18. Go to your HTC One M8 screen then use Volume key to choose “Yes” then hit the Power button.  Your HTC One M8 should reboot in couple seconds.


Step 19. Once rebooted, sign in to your HTC One M8.


Step 20. Repeat Step 1,go to Settings->Power and make sure “Fast boot” is checked OFF.


Step 21. Connect your HTC One M8 to your computer and copy over the SuperSU zip file.

Download SuperSU zip file


Step 22. Repeat Step 2 thru 4 and reboot your HTC One M8 into fastboot mode.


Step 23. Next, type:


fastboot flash recovery PutImageFileHere.img

Replace “PutImageFileHere.img” with the image file you downloaded earlier in Step 6 and 7.

Then Type:

fastboot erase cache

For Mac, replace “fastboot” with “./fastboot-mac”.

For Linux, replace “fastboot” with “sudo ./fastboot-linux”.


Step 24. Choose HBOOT and select Power button on your HTC One M8’s screen.


Step 25. Choose “RECOVERY” and hit the Power button.


Step 26. You should now be in CWM or TWRP Recovery.  For CWM Recovery, choose “install from zip” and for TWRP, choose “Install” then find the SuperSU zip file and install it.




Step 27. Once rebooted, you should find SuperSU app in your app drawer.  Congratulations, you’ve successfully rooted your HTC One M8!


You can verify you have full root by downloading and running a rooted app such as Titanium Backup app on Play Store.



Thanks to ChainFire for awesome SuperSU and TWRP Team for awesome TWRP recoveries.


Need Help? Follow/add me on Google+, Facebook, or Twitter!
Want to stay updated on latest HTC One Root news?
Sign up for our HTC One Root Newsletter here so you get ROM of the week and more!
HTC One Reference
You will need a rooted HTC One to install all ROM/kernels.

First time to rooting and custom ROMs?

Please see our HTC One Root FAQ FIRST!!!

146 thoughts on “How to Root HTC One M8!

  1. xunholyx

    For those that are new to ADB:

    If you opened the command prompt by going to the start menu and typing “cmd” and you getting this error, it is because you are not directing it to the fastboot folder.
    To fix it, and direct it to the proper folder, do this:

    If you unzipped it into your download folder, type:

    cd downloads(enter)
    cd fastboot(enter)
    THEN type:
    fastboot oem get_identifier_token(enter)

    If it’s not in your downloads folder, it’s cd (space) “whatever the folder is”.
    And if you renamed it something other than fastboot…..well, you can figure that one out yourselves.

    I hopes this helps anybody who is having any problems.
    CHEERS! and have fun flashing.

  2. jorge

    hi max thank you for all you video , i have a question can you make a video how to unroot sprint htc one m8 i need to get back to stock , let me know if you can thank you and keep the super good work


    target reported max download size of 1830318080 bytes
    error: cannot load ‘Unlock_code.bin’: Unknown error

    thats the error code i get when i try to send the unlock token bin ??? please advise thanks

      1. J

        Hi. I’m having the same problem. M7, Verizon. Paid for and ran Sunshine, continued from Step 5 up above. Then at step 9, I received the message

        error: cannot load ‘Unlock_code.bin’

  4. Sigran

    On attempting to run super user for the first time this error message pops up:

    “There is no SU binary installed and SuperSU can’t install it”

    I have tried updating SU in the market but the same error message persists.

    Any hints?

  5. holds920

    请教如何s-off htc one m8?
    Follow your course After unlocked. and How to s-off for htc one m8?Thanks!

    1. admin Post author

      You don’t need S-off unless you are doing something special like flash bootloader. I don’t recommend S-OFF as it’s easy to hard brick your phone while doing so. Is there any reason why you need S-OFF?

      With older HTC phones, you wanted S-OFF because otherwise you couldn’t install the kernel without fastboot but with newer HTC phones like all the HTC One, you can flash custom ROMs just fine on S-OFF.

  6. Alan

    This process is great and is more than likely useful to every htc one m8 owner…..BUT it does NOT work on Verizon Wireless htc one m8 it comes up error code 160 MID Not Allowed once submitted on the htc dev page.

      1. Joseph

        You should definitely update this to let people know that this doesn’t work for Verizon HTC One M8. I did everything up the cmd part, then got the same error the OP did. Then my phone went to a screen with a phone icon, red triangle and exclamation point. I thought I had fried the phone. Luckily, I found a website that told me how to reboot the phone, and that worked!

  7. gage1978

    Max thanks so much for all your tutorials. The question I have is that my Sprint HTC Harmon kardon phone updated to 4.4.3. Will this procedure still work? Thanks

  8. Theo

    When I opened the super su app, it told me that I need to update binary. So I tried re-doing from step 22. But now after installing the zip it says “unable to mount cache”. I tried again and it gave me the same error. Thanks in advance for the help!

  9. Colin Simpson

    Hi, I think I have made a mess of things.

    I have just noticed looking back at things that I got:

    C:\Users\csn01\Downloads\fastboot>fastboot flash recover openrecovery-twrp-2.7.0
    sending ‘recover’ (14818 KB)…
    OKAY [ 1.484s]
    writing ‘recover’…
    (bootloader) signature checking…
    FAILED (remote: signature verify fail)
    finished. total time: 2.036s

    In my CMD at step 23. I followed it through to go to TWRP recovery. I now just have a blank screen with a red triangle and an exclamation mark. Is there anywhere I can go from here to recover my phone or have I bricked it.


  10. Rami Pellumbi

    I followed the steps very precisely and have done so about 5 times, but my bootloader remains locked! I have made sure to select yes, but I have no clue what is happening.

    Htc One M8 4.4.3 International

    1. Danny

      I am having the same issue with my HTC one m8 from t mobile. Submitted token and device prompts for whether i want to unlock or not, I select yes and device stays locked. Please advise.

  11. Christopher

    I have the M8 Sprint and i tried to download the .img but it doesn’t show as a .img after downloading so i can’t do the step please help

  12. Charlie G

    Thank you. What you have taken the time to create is amazing. I salute you for your wonderful work.
    I’d like to show my appreciation for the help you’ve been to me. Where can I offer you a token of my gratitude, appreciation, and regard for the contribution you’ve made in my miserable life?

    Thank you, I appreciate, admire, and respect your work.

    With great appreciation and humility, Charlie G.

  13. OranN

    Thanks for the guide!
    It seems that everything is O.K, but when I am booting to recovery it still says “unloked” even thogh I pressed the “Yes” for unlocking…

    Any ideas?

  14. sagar

    i just had this question.. if i unlock the bootloader and then root.. it does void my warranty right? and if i simply un-root the phone using super su.. will the bootloader get back to normal again? and will i have my warranty again? thanks! and keep on with the good work! 🙂

  15. abc

    it says waiting for device when i enter the command
    besides i did not get any unlock bootloader on my phone though it said succesfull in comand prompt

  16. Scuttles

    I’m stuck on Step 26! After I select Recovery, CWM does not start. There is an error message that flashes really fast- something to the effect of ‘This build is for HTC deveopment only. Do not redistribute blah, blah’- then returns to Fastboot menu. SuperSU is copied on to phone memory. From your screenshots it didn’t look like it needed to be in any specific directory. Where did I go wrong?

    1. Scuttles

      Also, when I choose hboot in fastboot menu, I get this>

      SD Checking…
      No gift file…
      Loading []
      No Image!
      Loading [0P6BDIAG.nbh]
      No image or wrong image!
      Loading []
      Loading [0P6BIMG.nbh]
      No image or wrong image!

      No idea what that means…

      1. S13

        Mine is giving me the exact same error. I have to run an earlier version of twrp but I still receive the same error when I select HBOOT. No idea what to do from here.

  17. Jerry Foster

    Is there a way to get around the HTCDev website registration? I can even use the bootunlocker there until I register and I can’t get registered due to some error saying the information is incorrect.

  18. Roger

    This worked perfectly! The only problem i have is removing the bloat ware….. I can uninstall it with either Titanium or ROM Toolbox but once i reboot the phone it all comes back. Its a T-mobile phone so i dont know if that has anything to do with it. Is there a way around this problem or is the only way to install a custom ROM?

  19. aznballer


    I unlocked the bootloader. I failed doing the s-off so I decided to do a recovery (using HTC Sync to get my data back). Does this mean my bootloader is still unlocked? Thanks.

  20. Laurens

    Got stuck at step 23. Im getting this message after trying to flash the recovery file

    mbp-van-laurens:fastboot laurenssalcedovaldez$ ./fastboot-mac flash rerecovery openrecovery-twrp-
    sending ‘rerecovery’ (14818 KB)…
    OKAY [ 1.376s]
    writing ‘rerecovery’…
    (bootloader) signature checking…
    FAILED (remote: signature verify fail)
    finished. total time: 1.909s

    Any help??

    1. Laurens

      Never mind, fixed this by repeating the Bootloader unlock. It looks like it got locked again for some kind of reason.

      1. Wilson

        My htc one m Sprint says “tampered” unlocked. I flashed recovery img and when I tried to recovery it gets stuck on “entering recovery”. Any help please.

        1. wilson

          I allready have my bootloader unlock. I also install twrp.
          I flash viper rom and sais ok and when I reboot it keeps sending me to twrp.Help please

  21. kyle

    hey, I believe I have a rooted phone. Unfortunately I know nothing about the tech speak. I just want to be able to download from the Google Play store, and my phone doesn’t have it. Any thoughts on how to get it back?

    Any help would be amazing. thanks

  22. Lerprechaun

    Hi Max,
    I have two HTC One M8’s both Rooted. I only root for the added control features and as such, run only stock ROM’s.
    Could/Would you Please show how to get OTA updates on the One M8 rooted. I’m sure that if there is a way, you know it or can find out.

  23. Leon

    I got all the way through step 17 without issues but it never pops up another screen where you select yes…just sits there on the white bootloader page…what am I doing wrong? I tried a windows 7 pc and a windows 8.1 pc…

  24. Richard

    I have a htc one m8 4.4.4 for tmobile. I successfully unlock the boot loader but I’m stock on how to install recovery and supersu to successfully root the htc. Its possible to root or not? some guide or help to do it?

  25. varun

    I am having HTC one m8. I have two questions.

    Q1. If I root my phone will my warranty will be covered or broke
    Q2. Will I get further updates from HTC.
    Q3. Is it possible to just unlock the device. Using built in Rom …

    I am from India I am using kit Kat.

    1. Ampicillin

      1) Yes it may or may not depends on HTC. But, They won’t find out you have been rooted or not and you can always unroot your device before sending it to HTC

      2) Yes, root doesn’t stop you from getting HTC OTAs

      3) No, You cannot unlock the bootloader with any ROM. You will need to go though HTCdev or XDA

      I hope this helps

  26. Victor Limon

    I was rooted for awhile. I guess what I’m saying is I recently factory reset my phone the other day so now when I try and flash a Rom it fails. I checked Rom checker and it says I’m still rooted. I have an AT&T version HTC one m8. Would factory resetting cause the problem? I know cm12 is out and wanted to flash but no dice.

  27. Joshua Muniz

    Hello,I am planning on getting a HTC one and I’m wondering if this method will still work with lolipop.


  28. Laura

    That is also the question I’m looking an answer for…..found some links online but with comments.that rooting doesn’t happen…argh.

  29. Varun

    Hi all..

    i got htc lolipop update in my phone.. when i try to update i loads in root recovery mode.. so its not getting install.. how i can install offical lolipop in my phone.. ?

  30. Shydz

    Followed all the steps precisely and when I go to SuperSU, it says: “There is no SU binary installed, and SuperSU cannot install it. This is a problem!

    If you just upgraded to Android 5.0, you need to manually re-root – consult the relevant forums for your device!”

    What do I do now? Please please help! Thanks

  31. Michael Shuldman

    Thank you for the nice instructions. They worked fine for me, with the exception that none of the recovery images on the site referenced in the instructions ( were usable on my intarnational unlocked M8 dual sim.

    Some searching led me to this post:

    It references a site with images that worked on my dual sim m8:

  32. shivam garg

    i have updated my htc m8 to 5.0.1 and i can no more find any option of fastboot! the option is gone ! And so , i am unable to go in download or recovery mode

    please help

    1. Led

      Hi shivam garg, you can still go into recovery mode:

      1. Shut down your phone
      2. Hold down the volume down and the power button at the same time and wait till you get to the recovery mode


  33. Luciano

    When into my m8’s bootloader the RADIO and OpenDSP reads “invalid_ver_info”, but the OS is fine is that normal?; can I still flash custom roms?

  34. KOB531

    Hello, I’m just wondering in step #1 it says I must uncheck and disable fast boot mode in the power settings. But the problem is that in Android Lollipop it seems to have been removed as an option. I was just wondering is there a way around this? Or was the option possible moved to somewhere else in the settings? Thanks.

    1. Alcaloide

      you can still go into recovery mode:

      1. Shut down your phone
      2. Hold down the volume down and the power button at the same time and wait till you get to the recovery mode

  35. Tom

    I cant even get my indentifier token. When I run the command I get this error “(bootloader) [ERR] Command error !!!” Can anyone help!? please!?

  36. Heather

    Thanks for the help – worked great. I’ve finished what I was trying to do and am now trying to unroot but SuperSU is just sitting there saying ‘Uninstalling, please wait…’ Any suggestions?

  37. Remi

    Hi I did everything exactly as instructed and it all went well.However when i open Super SU i get a message saying there is no su binary installed .Please help 🙁

    1. Remi

      ok so i read some comments at the bottom and it seems i should have used a newer supersu file .please what can i do

      1. Remi

        not to worry guys.its fine.i dont know why it threw that error message i just downloaded root checker and it verifies im rooted.supersu isnt throwing the error again.Im currently installing titanium to be extra sure.just successfully rooted my first and only android phone (htc m8 lollipop) .Feels good.

  38. nicholas

    followed everything perfectly stuck on step 23
    it says sending recovery but it has not done anything
    i cant type in cmd and my phone buttons dont work.
    its like it froze or something
    what should i do

  39. Michael

    I get to step 17 no problem. However, nothing happens on my phone after I enter the command into command prompt. It says “unlock token check successfully”, but nothing happens. Any ideas?

  40. ahmed

    After I root my phone I couldn’t use the internal storage. Can you please help me to know my problem

  41. Jimmy

    Thank you so much, I just got a new laptop and have been desperate in wanting to root my phone. I will have too much fun yall. Thanks again!!!

  42. steve G

    Little nervous to try May I send to and pay you to root my HTC one HC from Sprint
    Please let me know.

  43. Jessica Green

    hi max, im having trouble on step 9, i did as shown but when i typed in >cd fastboot it told me that path was not specified, did i do something wrong? am i missing something? please help me, this is the first time rooting my m8, email me asap, thank you

  44. revon pereira

    How do i unroot my HTC One M8 international version to stock lollipop. Im using a custom lollipop rom now and I am looking for HTC 5.1 update in August to do this.

    Will this method work for me???

  45. revon pereira

    How do i unroot my HTC One M8 international version to stock lollipop. Im using a custom lollipop rom now and I am looking for HTC 5.1 update in August to do this.

    Will this method work for me???

  46. jeremy

    Ok guys . I get to the htcdev site, I registered and confirmed., account is active, however I select my device and it starts redirect . then a popup states “OOPS your not logged in” it does this everytime

  47. mohamed

    i have problem when im make recovery
    the system can’t load the img
    help please
    the file name // philz_touch_6.26.6-m8.img
    many thanks

  48. Allez

    I was up to step 26 where i should be entering the recovery but its taking really long to enter the TWRP recovery and its stuck on the entering recovery screen, is there any way to fix this? please help asap

  49. Sven

    After step 26 my phone didnt get to the recovery menu and now I cant use my phone anymore !

    What happened how can I fix this please answer thank you .

  50. Arturas

    Greetings from Lithuania.
    I’m owner of M8s
    Followed your procedure to root the phone. Everything was fine until last steps,
    Step 25. Choose “RECOVERY” and hit the Power button.
    where I had to boot to twrp.
    Then phone seems to have stuck on boot-loop or what it is called. orange light is blinking slowly and that’s it. Cannot access fast-boot menu or power down completely, will I have to wait until battery dies and then try to boot it again?
    If not is there anything I can do to save 500$ phone?

    C:\Users\The Big G\Downloads\fastboot>fastboot flash recovery openrecovery-twrp-
    sending ‘recovery’ (14818 KB)…
    OKAY [ 1.512s]
    writing ‘recovery’…
    OKAY [ 0.574s]
    finished. total time: 2.088s

    1. BranKo

      I am in same state as you were. But I don;t need to wait to empty battery. I can hold power and volume down about 20sec and I get FASTBOOT mode.
      But I can’t run in recovery mode. I tried some version of recovery image but without success.
      Have you any news with recovery mode ?

  51. xunholyx

    Two and a half weeks and my reply to Arturas is still awaiting moderation? I hope he figured out how to fix his phone on his own. Maybe trying to help here is a waste of my time?

  52. Mark

    Everything worked great up until the point of flashing the recovery. It seemed to flash fine, but then I select HBOOT, then RECOVERY, and it just goes back to the fastboot screen, and the RECOVERY option is gone. I can keep repeating the same 2 steps (HBOOT then RECOVERY), but it’s the same result every time.

    I tried both TWRP and CWP (was that a bad idea?), and had the same results both times. I even tried the non-Sprint version (my carrier is Ting, who leases time on the Sprint network, so wasn’t sure which version to go with — I assumed Sprint initially).

    Any idea what I’m doing wrong? Should I do a factory reset and start over?


  53. Victor

    I’ve rooted my m8 successfully. But when trying to get s-off it reset my phone and now my phone does not read my Sim. Card. I have AT&T. So I tried to uproot it and return to stock but couldn’t find the right tool tie do it. The Sim works on my old galaxy s4 but not the m8?

  54. eraxe

    Nice tutorial everything’s fine but if you on Android 6.0 (Marshmallow), this may not work. You have to flash a “modified Boot” image and “supersu 2.5…” through TWRP.

    www. eraxe. com

  55. Mark Dalton

    I followed your instructions to root my M8 to the “T”…except for unticking the fastboot option beforehand (as it doesn’t exist). Although my phone still works it is sketchy. I would like to undo all your steps and put it in its original operating status. How do I do this???

  56. Darth Vader

    Hi, I have a Verizon HTC One M8, but is already unlock to any GSM carrier, which method do I have to follow? I don’t want to brick my phone. Thanks!

  57. Arbaaz

    Max, hey. I have a HTC one m8. I tried unlocking the bootloader but my device says S-off instead of S-on. So the bootloader still says locked. Can i still flash a recovery when the phone says locked?

  58. Samsul

    After going into TWRP and flashing SuperSU my device is now stuck on the HTC startup screen, even after waiting 5 minutes it wont boot. I can get back into the TWRP by restarting but nothing else. What should I do to fix?

  59. Paolo

    Good evening everyone. I recently purchased a htc one m8, I wanted to unlock the bootloader but when I try to entrari in bootloader to enable fastboot I have only a black screen. How can I fix.
    Sincerely Paul.

  60. Nemat

    My HTC One M8 is not opening. In bootloader there appears
    wrong image or no image found.
    But, after I took off the SD Card and updated the firmware, it doesn’t come up. But still phone is not opening, it works when I put USB on, but when USB is off it shut down itself. Anyone can help?

  61. irshad amaks

    i have htcdev account.when logged in after a few seconds the site go back to home shows angain and again to log in. what should i do

  62. shiva

    for my htc m8 everything went as the tutorial but at the end while rebooting, it just freezes on the white screen with htc logo. I’ve tried power button and vol down but it’s only reboot and again freezes. what can i do?

  63. Ezuth

    Solved. Problem is solved with latest version of supersu. Download lattest version of supersu in your computer and push the files to your mobile through ADB push. Go to recovery -> Install latest supersu -> reboot system.. Will solve the problem.
    You can try copying the supersu into the memory card and install (I didnt try this option) if you find trouble in pushing through adb.
    *NOTE – This tutorial is very good but the files are older versions. Install latest version of TWRP to avoid probelms in restorijg nandroid back ups.

    1. Josquu1

      Hello, I’m just having the same problem but don’t know how to use ADB push and wich version of Supersu to use. Could you make a small step by step to explain what to do. Would be a nice christmas present 😀


  64. mike

    i have downloaded the latest version of TWRP the SuperSU i have is v2.46 – is there a newer one?”

    my phone restarts but doesnt load beyond the white htc logo screen

  65. Aman

    Hey my windows version 8 whenever I open command prompt Iam not able to type what you type in the video I can’t remove that c:\windows\system32> and cannot type c:\User\max\>CD dowbloads. I hope you will understand what Iam trying to stall please help me with that .

  66. Seb


    after Step 25 my Phone is now “stuck” in the shutting off screen. Any help or advice?

    So far everything went as smooth as you described.

  67. Jalil Ahmad Azizian

    Thanks for your well detailed instructions and pictures.
    after selecting recovery at fastboot it restarted with a twrp.img and with another it showed me errors, finally found the right twrp.img for my phone it showed me twrp (step 26)


Leave a Reply

Your email address will not be published. Required fields are marked *