FORUMS
Remove All Ads from XDA

[GUIDE] Complete Flashing Guide | Rooting | Going Back To Stock | 05.05.2013

38,806 posts
Thanks Meter: 77,191
 
Post Reply Email Thread






Hello User! Before you start reading, I must warn you. First of all, flashing your first custom ROM might end up having ORD. What is ORD you can read here.

Secondly, keep in mind whatever you do, you do it at your own risk. Probability that you will brick your device is very, very small, and if you will follow proper guides, read carefully first post of the thread you are going to use ROM/kernel/recovery/other from, it is almost impossible to brick the device. No, my intention is not to encourage you. Don't even enter bootloader mode on your device if you can't/not going to read what others (probably more experienced) users got to say. Unlocking/flashing process is a very easy and short process, but it requires your attention, reading, thinking and understanding ability.

The best place to start is this thread and this video - click here

I think you are ready now. So where should you start? You probably don't know yet. So let me briefly tell you what options you have:
  • You might want to root your device and keep 100% stock ROM
  • You might want to flash custom recovery to be able to create nandroid backups
  • You might want to flash custom kernel
  • You might want to flash custom ROM
  • You might want to have a custom ROM with ability to make you a coffee <--- forget about that one!
  • You might want to use some UI modifications like % battery
  • ...

Whatever your option is, you need to start from unlocking your bootloader. Unlocking bootloader doesn't mean disabling all security. Your device will remain S-ON, however instead of "LOCKED" from now on it will be "UNLOCKED" or "RELOCKED" (if you decide to lock it back later). What does it mean? Basically you will be able to change content of system, recovery and boot partitions on your device. So let's unlock your device first.


Unlocking bootloader

What you need to know before unlocking the bootloader:
  1. Download this mini-sdk package and extract it to c:\mini-sdk
  2. Visit htcdev.com site and create your account
  3. Log in into newly created account and on the main site click "Unlock Bootloader" image <click here to see the image>
  4. Click on "Get started" button <click here to see the image>
  5. Expand the list of supported devieces and search for your device model name <click here to see the image>
  6. If you can not find your device on the list, select "All Other Supported Models" <click here to see the image>
  7. Click on "Begin Unlock Bootloader" button
  8. On the "Are you sure you want to continue?" screen click on "Yes" button <click here to see the image>
  9. Tick both boxes and click on "Procced to Unlock Instructions" <click here to see the image>
  10. Follow carefully first 4 steps and click on "Proceed To Step 5" button. Ignore "Required Resources" section on the right side of the screen
  11. Skip Step 5, 6, 7 and click on "Proceed To Step 8" button.
  12. Open up command prompt ( Start > Run > type cmd and hit enter ). The window that appears is called Command Prompt. <click here to see the image>
  13. Navigate to where you unzipped "mini-sdk" package (type in Command Prompt: cd c:\mini-sdk). Note: make sure the path is not c:\mini-sdk\mini-sdk
  14. Follow very carefully steps 8 and 9. At the end click on "Submit" button.
  15. You will receive an e-mail from HTCDev with Unlock_code.bin file attached and a link to the second part of the instructions.
  16. Download Unlock_code.bin file from the e-mail you received and save it to c:\mini-sdk location.
  17. In the Command Prompt type following command: fastboot flash unlocktoken Unlock_code.bin
  18. On your device screen you will be now asked if you are sure that you want to unlock your bootloader. With volume keys navigate to proper answer and press power button to confirm. Keep in mind this procedure will wipe content of your data partition, including virtual SD card.
  19. After it's done, your bootloader should have "UNLOCKED" text at the top.


Your bootloader is now unlocked. Whatever you want to do next, you need custom recovery for it. Every Android device has recovery partition, but with stock Android recovery you can't do much. Custom recoveries allows you to perform nandroid backup (backup content of your system, userdata and boot partitions) flash .zip packages (custom ROMs, mods, themes etc.) wipe content of your device and more. So let's flash custom recovery first. There are plenty of recoveries, including 4EXT, CWM, TWRP and more. Find the one you believe is best for you (make sure it's compiled for your device model!) and


Flashing custom recovery

What you need to know before flashing custom recovery:
  • After flashing custom recovery you can always revert to your stock recovery. This procedure will be described later.
  • Your bootloader needs to be "UNLOCKED". "LOCKED" or "RELOCKED" bootloaders can't flash custom recovery.
  • This operation will cause your bootloader to show "TAMPERED" text below "UNLOCKED".
  • For safety reasons, first what you should do is nandroid backup inside recovery. You might need it during "going back to stock" procedure.
  1. Download custom recovery of your choice and rename it to recovery.img
  2. Move recovery.img to c:\mini-sdk location
  3. Connect your device to the PC
  4. Boot your device in fastboot mode (like you did during unlocking bootloader - power off the device and turn it on using power + vol down buttons and select "FASTBOOT")
  5. Open up command prompt ( Start > Run > type cmd and hit enter ). The window that appears is called Command Prompt. <click here to see the image>
  6. Navigate to where you unzipped "mini-sdk" package (type in Command Prompt: cd c:\mini-sdk). Note: make sure the path is not c:\mini-sdk\mini-sdk
  7. In the Command Prompt type following command: fastboot boot recovery.img (this command might not with newer hboots)
  8. Command above will not permantently flash custom recovery, but it will just boot it. Why? Because that way we can backup your original, stock recovery image before we replace it with custom one.
  9. Perform a nandroid backup.
  10. After nandroid backup is done, reboot the device in fastboot mode again.
  11. In the Command Prompt type following command: fastboot flash recovery recovery.img


Now that your bootloader is unlocked and you have custom recovery flashed, you should decide what you want to do next. Let's assume you want to flash a custom ROM.


Flashing custom ROM

What you need to know before flashing custom ROM:
  • There are many custom ROMs out there. Some of them are more or less modified versions of HTC stock ROMs with HTC Sense. You might also find some AOSP, AOKP or CM ROMs based on pure Android UI without any HTC software on it. Choice is yours. Personally, I recommend you optimized ROMs with HTC Sense on board.
  • After flashing custom ROM you can always revert to your stock ROM. This procedure will be described later.
  1. Download custom ROM of your choice and copy it to the internal memory of your device (virtual SD card or other)
  2. Boot your device in recovery mode (power off the device and turn it on using power + vol down buttons and select "RECOVERY")
  3. In main menu, select "install zip from sdcard" and "choose zip from sdcard".
  4. Navigate to the location of custom ROM (zip) package and confirm flashing procedure.
  5. Follow the steps on the screen. Every developer use slightly different options in his ROM installer, so just make sure you read it carefully.
  6. If you can't flash custom ROM due to AROMA freezes, there is nothing to be worried about. Just ask for help the developer of your custom ROM.
  7. After flashing process is complete, reboot the device.


However, you might not want to use any of the custom ROMs available, but just be able to have root access on your device. This also can be easily done!


Rooting stock ROM

What you need to know before rooting stock ROM:
  • You can "un-root" it easily.
  • As long as you won't change any files on system partition, you still will be able to download and install official OTA updates.
  1. Download Rooting Tools
  2. Boot your device in recovery mode (power off the device and turn it on using power + vol down buttons and select "RECOVERY")
  3. In main menu, select "install zip from sdcard" and "choose zip from sdcard".
  4. Navigate to the location of Rooting Tools (zip) package and confirm flashing procedure.
  5. After flashing process is complete, reboot the device. Your device has now SuperUser.apk, su binary and busybox installed.


If you are not happy with being rooted, or you can't find any custom ROM for your needs, or you need to sell/return your device and you want it to have stock software on board, it's very easy operation.


Going back to stock

What you need to know before going back to stock:
  • Your bootloader will never be "LOCKED" again. You can't restore it. You can only relock it.
  • "TAMPERED" text in bootloader will disappear only after proceeding method 2.
  • There are 3 main methods. All three will be described below.

Method 1 - only for users with .401 devices (for more info click here - RUU variants)
  1. Visit this thread - [ROM] HTC One *STOCK* ROM
  2. Download stock odexed version of most recent firmware and recovery.img
  3. Move recovery.img to c:\mini-sdk location
  4. Boot your device in recovery mode (power off the device and turn it on using power + vol down buttons and select "RECOVERY")
  5. In main menu, select "install zip from sdcard" and "choose zip from sdcard".
  6. Navigate to the location of stock ROM (zip) package and confirm flashing procedure.
  7. After flashing process is complete, reboot the device in bootloader mode.
  8. Connect your device to the PC
  9. Boot your device in fastboot mode (like you did during unlocking bootloader - power off the device and turn it on using power + vol down buttons and select "FASTBOOT")
  10. Open up command prompt ( Start > Run > type cmd and hit enter ). The window that appears is called Command Prompt. <click here to see the image>
  11. Navigate to where you unzipped "mini-sdk" package (type in Command Prompt: cd c:\mini-sdk). Note: make sure the path is not c:\mini-sdk\mini-sdk
  12. In the Command Prompt type following command: fastboot flash recovery recovery.img
  13. You have now stock boot, system and recovery partitions. Time to relock your bootloader.
  14. In the Command Prompt type following command: fastboot oem lock

Method 2 - flashing RUU (ROM Update Utility)
  1. Visit this or this thread.
  2. Find proper RUU for your device
  3. Connect your device to the PC
  4. Boot your device in fastboot mode (like you did during unlocking bootloader - power off the device and turn it on using power + vol down buttons and select "FASTBOOT")
  5. Open up command prompt ( Start > Run > type cmd and hit enter ). The window that appears is called Command Prompt. <click here to see the image>
  6. Navigate to where you unzipped "mini-sdk" package (type in Command Prompt: cd c:\mini-sdk). Note: make sure the path is not c:\mini-sdk\mini-sdk
  7. In the Command Prompt type following command: fastboot oem lock
  8. Flash RUU and follow on screen instructions.
  9. You have now completely stock software on your device.

Method 3 - flashing nandroid backup
  1. In custom recovery restore nandroid backup you did after flashing custom recovery for the first time.
  2. If you performed nandroid backup before permanently flashing custom recovery, your stock recovery should be now flashed.
  3. If you still have custom recovery, extract recovery.img from your nandroid backup.
  4. Move recovery.img to c:\mini-sdk location
  5. Connect your device to the PC
  6. Boot your device in fastboot mode (like you did during unlocking bootloader - power off the device and turn it on using power + vol down buttons and select "FASTBOOT")
  7. Open up command prompt ( Start > Run > type cmd and hit enter ). The window that appears is called Command Prompt. <click here to see the image>
  8. Navigate to where you unzipped "mini-sdk" package (type in Command Prompt: cd c:\mini-sdk). Note: make sure the path is not c:\mini-sdk\mini-sdk
  9. In the Command Prompt type following command: fastboot flash recovery recovery.img
  10. You have now stock boot, system and recovery partitions. Time to relock your bootloader.
  11. In the Command Prompt type following command: fastboot oem lock
Here are some videos you might find helpful:

1) by Flow-Wolf

How to Unlock the bootloader

How to Flash the recovery

How to root the HTC One

2) by udimars30

How to Unbrick/Unroot/Flash stock Rom Back on HTC ONE
The Following 291 Users Say Thank You to mike1986. For This Useful Post: [ View ] Gift mike1986. Ad-Free
 
 
5th May 2013, 06:46 PM |#2  
langer hans's Avatar
Senior Member
Thanks Meter: 4,021
 
Donate to Me
More
General FAQ
General FAQ

1. The zip installation just freezes in AROMA, what should I do?
This is a well known issue involving the AROMA installer, and this will occur with any ROM zip in any recovery. If it freezes, hold Power and Vol-Down until your phone reboots (If this fails, plug your phone into your PC and in CMD type 'adb reboot') Now go back into recovery and start the installation again. It is reported by many users that the installation works better if you don't use the touchscreen for navigation through AROMA - instead, use Vol-Up/Down to navigate and the Power button to select
UPDATE: Please make sure you have the latest recovery version. It is reported that CWM 6.0.3.2 fixes the freezes!
2. When I try to enter recovery it just blinks for a second and the phone reboots. How do I get into recovery?
Use Vol-Down + Power to enter fastboot mode. Now connect the phone to the PC and use 'fastboot erase cache'. After that it should be able to boot recovery correctly.
3. The phone rebooted itself while installing a ROM, now it just bootloops. How should I recover my phone?
Reboot into recovery and flash again. If recovery won't load, check FAQ 2.
4. Do I need to wipe my data everytime I flash a new version of a ROM?
No, a data wipe is only needed when you come from stock or another custom ROM. It is also recommended but not manadtory to wipe when there is a base update. For a more specific answer, please check the Thread of the ROM you are using. The developers will tell you, when a wipe is mandatory.
5. Do I need to flash boot.img seperately?
The majority of ROM installers will flash the boot.img for you. Yes, even when you are S-ON. This is possible on the One. Make sure to read the instructions for your ROM.
6. Do I need to update my radio to flash a ROM?
It is not needed. You can do it if you want to. Newer radios can improve signal, bluetooth, WiFi... Refer to the following thread for more information: Link And also check this thread for a method to update radio in recovery: Link
7. My device is not recognized by adb and fastboot. What should I do?
Make sure you have the latest HTC Drivers (Thread) running and your SDK is up-to-date. Try another USB Port and make sure your cable is working.
8. What is S-OFF and do I need it to flash a ROM/Kernel/Recovery/Radio?
S-OFF means that your bootloader is fully unlocked and allows you to write to more partition than you usually can. You would also be able to flash unsigned firmware. You don't need S-OFF for ROMs, kernels, recoveries and also not for radios (Check FAQ 6)
9. What is the best ROM/Kernel/Recovery?
I really can't answer that question. It greatly depends on what you like. As mentioned in the first post there are Sense, AOKP, AOSP, CM... ROMs. Also there are several kernels, some focusing on performance, some focusing on battery life. Go on and try a few to see what fits you best. You should always make a nandroid backup, so you can go back to another ROM later.
10. I forgot to put a ROM on my sdcard before wiping/flashing kernel and my phone won't boot now. How do I get a ROM on there?
If you have a nandroid backup on the phone, resore it. If you don't have a backup, copy the ROM you wanted to install to the phone via 'adb push rom-name.zip /data/media/rom-name.zip' Then flash as described above.
11. Will unlocking or relocking wipe my device?
Unlocking will wipe your device. So please backup your data! Relocking will NOT wipe it, just when you unlock again.
12. My issue is not mentioned here and/or my phone is still not working after trying to recover. What should I do?
You are always free to post in this thread or the ROM/Kernel/Recovery/Radio thread. You will find helpful members who will support you in solving your problem.


Note: The FAQ are always under construction. New QAs will be added when the get F(requent) (You can also contact me if you find a Q that is not covered here)
The Following 67 Users Say Thank You to langer hans For This Useful Post: [ View ] Gift langer hans Ad-Free
5th May 2013, 06:55 PM |#3  
mike1986.'s Avatar
OP Senior Member
XDA-Developers
Thanks Meter: 77,191
 
Donate to Me
More
Reserved.
The Following 14 Users Say Thank You to mike1986. For This Useful Post: [ View ] Gift mike1986. Ad-Free
5th May 2013, 06:55 PM |#4  
mike1986.'s Avatar
OP Senior Member
XDA-Developers
Thanks Meter: 77,191
 
Donate to Me
More
There was no complete guide, so I decided to write one myself I hope users will enjoy it!
That was a lot of text for me to write, so if I made mistake somewhere, please feel free to correct me! This thread is generally still under construction and I will improve first post in time
The Following 34 Users Say Thank You to mike1986. For This Useful Post: [ View ] Gift mike1986. Ad-Free
5th May 2013, 07:01 PM |#5  
konsti23's Avatar
Senior Member
Flag Western part of CH
Thanks Meter: 790
 
More
Great work
Hey Mate

Great work... very well done!

Now everything should be clear...

CHeers

K.
The Following User Says Thank You to konsti23 For This Useful Post: [ View ] Gift konsti23 Ad-Free
5th May 2013, 07:05 PM |#6  
ste1164's Avatar
Senior Member
Flag Darlington
Thanks Meter: 318
 
More
Fantastic guide, is tampered a new thing for the HTC One? I don't remember the One X having the issue?
5th May 2013, 07:11 PM |#7  
Member
Thanks Meter: 1
 
More
Thanks so much for this
5th May 2013, 07:11 PM |#8  
mike1986.'s Avatar
OP Senior Member
XDA-Developers
Thanks Meter: 77,191
 
Donate to Me
More
Quote:
Originally Posted by ste1164

Fantastic guide, is tampered a new thing for the HTC One? I don't remember the One X having the issue?

Yes, it's sort of new sign for HTC that user did something more then just unlocking.
The Following User Says Thank You to mike1986. For This Useful Post: [ View ] Gift mike1986. Ad-Free
5th May 2013, 07:12 PM |#9  
ste1164's Avatar
Senior Member
Flag Darlington
Thanks Meter: 318
 
More
Quote:
Originally Posted by mike1986.

Yes, it's sort of new sign for HTC that user did something more then just unlocking.

Ah right okay still thinking about rooting mine :P
5th May 2013, 07:16 PM |#10  
Member
Thanks Meter: 1
 
More
sorry for asking but what is mini-sdk? unlocked the bootloader with all-in-one tool. is it something in the android sdk? where to get it? thanks
5th May 2013, 07:18 PM |#11  
mike1986.'s Avatar
OP Senior Member
XDA-Developers
Thanks Meter: 77,191
 
Donate to Me
More
Quote:
Originally Posted by ggp759

sorry for asking but what is mini-sdk? unlocked the bootloader with all-in-one tool. is it something in the android sdk? where to get it? thanks

It's the package of needed files I created. You can download it by clicking on the link.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes