[Tutorial] Root, Unlock, Recovery and flashing a Custom ROM

Search This thread

torxx

Senior Member
Mar 20, 2011
8,075
21,600
trickdroid.org
Just a quick step by step tutorial to get a Custom ROM working on your HTC One or if you just want to unlock and root!

This guide is especially for the new users, experienced HTC users should already be familiar with this process.

Step 1: Unlock

  • Go on http://www.htcdev.com and create yourself an account on HTCDEV.
  • Download these adb/fastboot files
  • Make a new folder on your C:/ drive called fastboot for example.
  • Extract the zip downloaded in step 2 to the new folder
  • Go Here http://www.htcdev.com/bootloader/ and select "All Other Supported Models" and "then begin unlock bootloader"
  • Yes, Tick both Boxes, Proceed
  • Skip up to step 8 as we have all we need for the first 7 steps
  • Power off your phone by holding the power button down for 10 seconds
  • Power your phone on by holding power and volume down
  • Highlight Fastboot With Volume+or- then press Power
  • Plug your phone into your PC and open a Command Prompt.
  • (windows XP - Click Start > Run > type CMD in box then press OK
  • (Windows 7 - Click Start > type CMD in search box then press Enter)
  • Change directory to your folder where we put fastboot files cd c:\fastboot
  • Type this into your command prompt window fastboot oem get_identifier_token
  • Select & copy the text as per step 9 on the HTCDev website
  • Paste your identifier token into the box at the bottom and submit
  • You Will Very Shortly Receive an email from HTCDev with a link to the second part of the instructions and your "Unlock_code.bin" attached
  • Download the "Unlock_code.bin" from the email and save it to the same folder that we extracted fastboot files to in step 2
  • Type this into your command prompt window fastboot flash unlocktoken Unlock_code.bin
  • The Display Will change on your phone, press Vol + to accept and power to confirm.

Step 2: Recovery

  • Download the Android SDK (optional)
  • Download the recovery of your choice, here a few links:

    - CWM

    - CWM 2

    - TWRP

  • Place the Recovery file you downloaded where the fastboot.exe is (Either in the location of your downloaded fastboot drivers or in the Android SDK directory)
  • Now open the cmd and navigate to the folder where the Recovery File is located or just open a cmd with shift and right click at the correct directory
  • Now type:

    fastboot flash recovery name_of_the_recovery.img

    For example:

    fastboot flash recovery recovery-clockwork-touch-6.0.2.8-m7.img

Now your recovery is installed

Step 3: Root

This step is only needed if you want a stock rooted ROM, if you want a custom ROM, skip this step.

  • Now root your phone with SuperSU by Chainfire or SuperUser by koush
  • Download SuperSU from this link or SuperUser from this link
  • Flash it with the Recovery:
  • Power off your device and then hold the VOL DOWN + Power to boot into the Bootloader
  • Navigate with VOL and Power to Recovery
  • Now flash the .zip:

    - install zip from sdcard
    - choose zip from sdcard
    - select the downloaded SuperSU/SuperUser zip file and flash it
    - Reboot now

Now you are able to flash any Custom ROM.

Step 4: Custom ROM

With htcdev unlock you need to flash the boot.img after every ROM installation

Note: Most of the custom ROMs have a script which lets the boot.img flash automatically with the ROM, so probably the steps after flashing the ROM are not needed.
If you are in a bootlop though, I recommend you to perform these steps and flash the boot.img with fastboot


  • Download the ROM you want to flash
  • Open the ROM zip with an archive manager and extract the boot.img out of it and place it in your fastboot directory
  • Copy the ROM to your sdcard
  • Now boot into bootloader again (explained above) and choose recovery with your volume keys and power button
  • In recovery wipe data and cache aka fullwipe before flashing your ROM if you are moving to a new base (for example from CyanogenMod to a Sense ROM, don't forget to backup your data files, like apps) (Often ROM chefs leave a note in their thread if a fullwipe is needed or not, just follow their advices)
  • Now flash your ROM by installing zip from sdcard
  • If this is finished, reboot and reboot into bootloader again
  • Connect your phone to your PC in fasboot mode (choose in bootloader with power button)
  • Open a cmd in your fastboot folder with your boot.img and type these two commands:

fastboot flash boot boot.img

fastboot erase cache


  • Then reboot your phone and wait some minutes to see your ROM booted
  • Enjoy


Video tutorials (for One S but the steps are the same):


Video-Tutorial by Flow-Wolf:

Bootloader Unlock:


Recovery Installation:


Root:


Custom ROM Installation:


 
Last edited:

noob.fl

Senior Member
Dec 20, 2011
256
74
Vöhringen
www.facebook.com
I have modified boot.img but it's from .401 ROM. You want to try?


im since a longer time no more so familar with htc... can it harm my device or it does not care and the one will run? if cot my one since to day, and its a damn expensive device to brick it at first time... but if it works - je i will try

its like all other androiddevices to flash? fastboot flash boot boot.img?
 

mike1986.

Senior Member
im since a longer time no more so familar with htc... can it harm my device or it does not care and the one will run? if cot my one since to day, and its a damn expensive device to brick it at first time... but if it works - je i will try

its like all other androiddevices to flash? fastboot flash boot boot.img?

There is no chance to brick but there is a chance for bootloop :)
 
  • Like
Reactions: elhokouma

torxx

Senior Member
Mar 20, 2011
8,075
21,600
trickdroid.org
Simply go to your adb dir and type that in terminal:

adb pull /system ./system

optional:

adb kill-server

7za a -tzip system.zip system\ -r (needs the 7za file)

rmdir system /s /q


to pack a zip
 

Top Liked Posts

  • There are no posts matching your filters.
  • 170
    Just a quick step by step tutorial to get a Custom ROM working on your HTC One or if you just want to unlock and root!

    This guide is especially for the new users, experienced HTC users should already be familiar with this process.

    Step 1: Unlock

    • Go on http://www.htcdev.com and create yourself an account on HTCDEV.
    • Download these adb/fastboot files
    • Make a new folder on your C:/ drive called fastboot for example.
    • Extract the zip downloaded in step 2 to the new folder
    • Go Here http://www.htcdev.com/bootloader/ and select "All Other Supported Models" and "then begin unlock bootloader"
    • Yes, Tick both Boxes, Proceed
    • Skip up to step 8 as we have all we need for the first 7 steps
    • Power off your phone by holding the power button down for 10 seconds
    • Power your phone on by holding power and volume down
    • Highlight Fastboot With Volume+or- then press Power
    • Plug your phone into your PC and open a Command Prompt.
    • (windows XP - Click Start > Run > type CMD in box then press OK
    • (Windows 7 - Click Start > type CMD in search box then press Enter)
    • Change directory to your folder where we put fastboot files cd c:\fastboot
    • Type this into your command prompt window fastboot oem get_identifier_token
    • Select & copy the text as per step 9 on the HTCDev website
    • Paste your identifier token into the box at the bottom and submit
    • You Will Very Shortly Receive an email from HTCDev with a link to the second part of the instructions and your "Unlock_code.bin" attached
    • Download the "Unlock_code.bin" from the email and save it to the same folder that we extracted fastboot files to in step 2
    • Type this into your command prompt window fastboot flash unlocktoken Unlock_code.bin
    • The Display Will change on your phone, press Vol + to accept and power to confirm.

    Step 2: Recovery

    • Download the Android SDK (optional)
    • Download the recovery of your choice, here a few links:

      - CWM

      - CWM 2

      - TWRP

    • Place the Recovery file you downloaded where the fastboot.exe is (Either in the location of your downloaded fastboot drivers or in the Android SDK directory)
    • Now open the cmd and navigate to the folder where the Recovery File is located or just open a cmd with shift and right click at the correct directory
    • Now type:

      fastboot flash recovery name_of_the_recovery.img

      For example:

      fastboot flash recovery recovery-clockwork-touch-6.0.2.8-m7.img

    Now your recovery is installed

    Step 3: Root

    This step is only needed if you want a stock rooted ROM, if you want a custom ROM, skip this step.

    • Now root your phone with SuperSU by Chainfire or SuperUser by koush
    • Download SuperSU from this link or SuperUser from this link
    • Flash it with the Recovery:
    • Power off your device and then hold the VOL DOWN + Power to boot into the Bootloader
    • Navigate with VOL and Power to Recovery
    • Now flash the .zip:

      - install zip from sdcard
      - choose zip from sdcard
      - select the downloaded SuperSU/SuperUser zip file and flash it
      - Reboot now

    Now you are able to flash any Custom ROM.

    Step 4: Custom ROM

    With htcdev unlock you need to flash the boot.img after every ROM installation

    Note: Most of the custom ROMs have a script which lets the boot.img flash automatically with the ROM, so probably the steps after flashing the ROM are not needed.
    If you are in a bootlop though, I recommend you to perform these steps and flash the boot.img with fastboot


    • Download the ROM you want to flash
    • Open the ROM zip with an archive manager and extract the boot.img out of it and place it in your fastboot directory
    • Copy the ROM to your sdcard
    • Now boot into bootloader again (explained above) and choose recovery with your volume keys and power button
    • In recovery wipe data and cache aka fullwipe before flashing your ROM if you are moving to a new base (for example from CyanogenMod to a Sense ROM, don't forget to backup your data files, like apps) (Often ROM chefs leave a note in their thread if a fullwipe is needed or not, just follow their advices)
    • Now flash your ROM by installing zip from sdcard
    • If this is finished, reboot and reboot into bootloader again
    • Connect your phone to your PC in fasboot mode (choose in bootloader with power button)
    • Open a cmd in your fastboot folder with your boot.img and type these two commands:

    fastboot flash boot boot.img

    fastboot erase cache


    • Then reboot your phone and wait some minutes to see your ROM booted
    • Enjoy


    Video tutorials (for One S but the steps are the same):


    Video-Tutorial by Flow-Wolf:

    Bootloader Unlock:


    Recovery Installation:


    Root:


    Custom ROM Installation:


    6
    I recommend using SuperUser by koush insted of SuperSU. I also made Super Boot to root stock ROM but I need someone with WWE HTC One...
    4
    I added a link for koush's SuperUser
    3
    hi

    i done everything like its writen here, but i cant boot into recovery.. it cames the screen "entering recovery" and then the device is reboot :(

    Yes currently the recoveries are not working, be patient until they work, I will leave a note in the OP
    3
    http://d-h.st/2DO

    Unpack and run the runme.bat

    Dumping may need a while, upload it to dropbox for example

    Imho all devs should work together here instead of trying to be the first guy with a deodexed stock ROM