Comprehensive Guide on Unbricking the HTC One X

This guide is for HTC One X Endeavoru and not HTC One X Evita. You can see which one you have in the HBoot menu.

[toc]Someone from Iraq posted in our group that he needs some help with his HTC One X as he wiped the system folder via CWM on his device. Since there is no system, the phone stays on HTC logo and doesn’t go past that. It boots but it has no system to start. To make it work, all I did was:

  • Boot into CWM and mount USB storage.
  • Copy the CyanogenMod 10 zip file in the phone’s storage but before that I extracted the boot.img from the zip file and placed it in the folder where we had the ADB files.
  • Unmount and flash the CyanogenMod 10 zip file via CWM.
  • Boot into fastboot mode and flash the boot.img using the command fastboot flash boot boot.img
  • Reboot the phone using the command fastboot reboot

The phone booted with  CyanogenMod 10 Android 4.2.2 – smooth as butter! That is all he needed. Pretty easy, isn’t it?

But that is not all. Sometimes you may not be able to boot into CWM but you should always be able to boot into fastboot. Or, it may be possible that you don’t have enough charge on your phone that makes it impossible to flash files to your phone. There’s  workaround for that.

Charge HTC One X in Fastboot Mode

floepie from XDA-Developers forum has made a script that charges your HTC One X when you are stuck in fastboot mode.

Copy the following code in a text file and save it as charge.bat Make sure you save it in the folder where you have ADB files.

" @echo off
fastboot getvar battery-voltage

fastboot reboot-bootloader

ping /n 6 localhost >nul

goto start

Open Command Prompt in the same folder, type charge.bat and hit enter button. The script executes continuously and shows the voltage battery. Once it crosses 3680 mV (10% charge) you can start flashing files to your phone. However, I recommend you to charge it up to 3700 mV so you are sure it will last longer.

HTC One X charging in fastboot

Unbrick the HTC One X

Disclaimer: Hack My Android is not responsible for what you do to your phone or if it goes to a state worse than it already is. The developers are also not responsible for the same!

Download the nandroid backup: (Source)

Place both files ending with .7z.001 and .7z.002 in a separate folder and join them using HJ Split so that you get a single zip file. Extract the contents of the zip file to get a folder which has the date of the backup as its name.

Boot into HBoot of your device by pressing the Volume up key while turning your phone ON. On the top, you will see the version of HBoot. It should be 1.39 as seen below:

HTC One X HBoot 1.39

If it is not, update it using the following method:

  1. Download and place it in the folder where you have the ADB files. If you do not understand this, you have not read this post from the beginning.
  2. Boot into HBoot and select Fastboot mode.
  3. When your phone is in Fastboot mode, enter the following command to lock the bootloader. If it is already locked, skip this step:
     fastboot oem lock
  4. The device will reboot. Go into fastboot mode again and type:
     fastboot oem rebootRUU
  5. A black screen with silverish HTC logo appears.
  6. Enter the command:
     fastboot flash zip
  7. The green bar under the logo should go to 100%. If it doesn’t enter the same command again.
  8. Enter the command:
     fastboot reboot-bootloader
  9. You should be in fastboot mode now.
  10. Unlock the bootloader from You will get a file called Unlock_code.bin. To unlock the bootloader, you need to enter the command:
     fastboot flash unlocktoken Unlock_code.bin
  11. Your bootloader is unlocked.

Restoring the nandroid backup

Please note that all files you flash must be in the same folder where you have the ADB files.

  1. Download CWM for your phone and rename it has recovery.img
  2. Boot your phone in fastboot mode and use this command to flash it:
     fastboot flash recovery recovery.img
  3. Extract the boot.img from the nandroid backup and flash it using the command
     fastboot flash boot boot.img
  4. Now boot into HBoot and select “Recovery” option.
  5. In recovery mode, go to Mounts and Storage>Mount USB Storage.
  6. Your phone’s storage shows up on the PC. There should be a folder called “clockworkmod” in it. If it is not, create it.
  7. Inside the folder clockworkmod, create a new folder called “backup” and place the folder you obtained from the nandroid backup into this newly created folder.
  8. Unmount USB Storage in CWM and go back.
  9. Select “Backup and restore”>”Restore” and select the folder you copied in Step 7.
  10. Restore it, go back and select “Reboot system now”.

Your phone must reboot fine. If you are stuck in HTC logo, try to wipe data, cache and dalvik cache from CWM and reboot again.

If you face any issues, feel free to comment below.

Thanks Dlovan Kocher

  • Danny

    Thanks for this simple version. Worked a treat after I borked my phone. There’s a lot of info on XDA but sometimes too much to pick out the bits you actually need.

  • ABDO

    I have this msg (remote: 42 custom id check fail) after this cmd “fastboot flash zip”

    help me plz

    • Guest

      Did you find a fix??

    • Ravish

      I also see the same problem. And after completing the process successfully, touch doesn’t work. Request Dlovan to look into this problem please

  • Vineel

    Download and place it in the folder where you have the ADB files. – Can I use this firmware for my HTC one X CID: HTC__038?

    • Vineel

      I have installed ViperX using TWRP. It has been successfully installed. But the system is hanging on Logo Screen. I guess the problem is with HBOOT version.

      The Viperx pre requisite is 1.33 version but mine is 1.12.0000. Please guide me.

  • jem

    hello sir, what happened to my phone is that the battery got drained in fastboot mode, i have to use the script in order to have enough charge to unlock the bootloader and flash a recovery, but after doing so, my phone still does not charge and it wont turn on, the led light blinks 3 times only then its gone, pls help=)

    • That charging should go on until you reach a 3680 mV. If not, the phone will not boot.

      • Eric

        So for a dead phone that I couldn’t add the text file to in time what are my options?

        • The text file shouldn’t be added to the phone, it rests in the PC. You save the file as a .bat file and run it on your Windows PC while the phone is connected to it via a USB cable. The loop keeps executing and the phone gets charged in the fastboot mode.

        • Yoshidasun

          Hi Every one,
          I have the same here: the script Batch file is running well 3 to 4 times in a row but after that it fails 4 times in a row which make My HTC ONEX charging/discharging and never goes beyond 3280mV. Any Help please!!!!

  • rafa

    to charge in fastboot mode.. how I create a “text file”?

    • The text file has to be created on your PC. You can use any program like Notepad to do that!

  • imthy

    i have completed all the procedures but after completion the phone gets on and but touch is not working help me please..even recovery touch also not working..

  • imthy

    but its not hardware issue bcoz touch is working with custom rom

  • Crakan

    Hi there,
    I have a HTC One x with endeavoru and HBOOT 1.36. I have CWM recovery installed. Recently tried to update using CWM 10.2 but it went nowhere and got stuck on the cyanogen logo screen. Tried with 10.2 and same thing. Now the phone is useless and cant do anything with it. Can you please help and tell me what I can do to get it working again? Have tried various fastboot/hboot/recovery steps. Even tried using the all in one root kit but didnt quite get what I am supposed to be doing.

  • would this work with an HTC One X+?

  • cyberjacob

    You sir, are awesome!

  • Daniyal Maqsood

    Do you have any idea what you did !?
    You just saved my life !
    I’ve been searching the internet for a week because of this issue !
    I’ve updated my HTC One X via ota and it got stuck on the HTC Logo and it kept restarting (reboot loop)
    I’ve tried many things and they failed !
    But this GUIDE helped me ! Thank you …..
    I specially made an account here to THANK YOU Sir, You’re Amazing =D