Manually flashing an OTA-update

I recently acquired a second-hand HTC One X. A week or two back HTC decided to release the JellyBean update for the phone, all was well. Yesterday, another update was sighted on XDA, and since it seems like this one gives better battery life, I didn’t feel like waiting another 3-5 weeks before it became available in my country, so I searched on how to manually flash an OTA.

As always, this procedure comes with no guarantees it will work for you. It might as well decide to eat your cat, or turn your blood into liquid metal (if you don’t have a cat).

Requirements to manually update your phone:

  • The Android SDK, and all necessary drivers configured if needed (for Windows, this is required, and left as an exercise to the reader)
  • HTC One X, with the correct CID. This goes without saying.
  • unlocked bootloader.
  • Clockworkmod Recovery (Touch) installed on the phone

This will wipe your phone. Making a backup is not optional.

Download the update. In my case it was 3.14.401.31. Unzip it somewhere. In the same directory, you’ll find a file called Unzip this too.

Get the CID of your phone: reboot the phone in bootloader/fastboot mode (adb reboot bootloader), and use fastboot getvar cid. Match this in the android-info.txt file found in the file. If it doesn’t match, don’t go any further.

If you’re still here, I guess your CID matched.

Now, in the extract of the OTA, find the file updater-script in the directory META-INF/com/google/android. In this we’ll need to remove some code that doesn’t work with recoveries other than the default HTC ones.

Open the file with any decent text editor that preserves newlines (for windows, Notepad++ springs to mind, on Linux/Mac just use vi), and look for a textblock like this:

assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
"22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
"77777777" , "88888888" , "99999999" , "HTC__001" , "HTC__E11" ,
"HTC__203" , "HTC__102" , "HTC__405" , "HTC__Y13" , "HTC__A07" ,
"HTC__304" , "HTC__M27" , "HTC__032" ,
"HTC__016") == "t");

Delete it. Eradicate it. Save the file, and re-add it to the zipfile (eg. zip -u META-INF/com/google/android/updater-script). This will update the OTA zip with the new script.

Next, reboot your phone into Clockworkdmod Recovery (or whatever recovery you have installed), make a nandroid backup of your phone, and copy the OTA zip file on the phone. As a safety measure, it’s recommended to make a backup of everything on the SD storage to your computer.

When the backups are completed, reboot your phone into bootloader/fastboot mode. It’s time to lock the bootloader again, so we can flash the firmware update. This can be done using the command fastboot oem lock. Your phone will reboot.

Reboot it once again, this time to OEM update mode: adb reboot oem-78

Flash the firmware update: fastboot flash zip If this complains without getting you a green progressbar on the screen, try it again – the second time it usually sticks.
Once this process completes, reboot the phone again in the new bootloader: fastboot reboot-bootloader.
Now you can unlock your bootloader again, using the Unlock_Code.bin file you got from fastboot flash unlocktoken Unlock_Code.bin.

At this point, you’d sure as hell wish you’d made a backup, if you didn’t. Because now your phone is wiped, reset to factory default. Don’t say I didn’t warn you upfront.

After the reboot finishes, you can once again boot in booloader/fastboot mode, and flash your recovery anew. For Clockworkdmod Recovery, the command is fastboot flash recovery recovery-clockwork-touch- Now you can boot the phone in the recovery (select the option from the bootloader menu).

Once in the recovery, it’s time to restore your nandroid backup. You did make one, did you?
If you finished restoring the backup, you can now flash the OTA zip on the phone, updating the ROM to the new version.

After this, you just need to reboot one more time, this time to the ROM itself. Let it finish upgrading all applications, and tadaa, your freshly upgraded phone.

This worked for me, might not work for you. No promises.

Bookmark the permalink.


  1. Hi I’m having htc one x with htc_38 (india) cid. I on currently ARHD 18.1 with latest firmware 1.36. I’ve the latest OTA for this cid “OTA_ENDEAVOR_U_JB_45_S_hTC_Asia_India_3.14.720.24-2.17.720.2_release_2964626volqgaijim8f8zh”

    I tried using your method but got the error “failed to stat”system/build.prop”

    I erased the system in full.

    Any idea where i could have gone wrong. I dont have the RUU for this built.

  2. At what point did it fail? You can’t flash the OTA (except for the on a wiped phone. OTA applies to a stock phone only, firmware can be applied to all.

  3. I think I may have the same problem.. I have the RUU, but the zip fails when we’re in recovery at the very last step. It mentions in the error; what info could help for figuring this out?

  4. Could you give me the error it gives exactly? And you’re trying to flash

  5. hi. i have htc one s ville c2.
    i cant install ota update 4.1 :(
    how manually instal update !
    plsss help

  6. Really depends on what happens. Usually you need to find the download (check to find a link), download it, extract it, and flash it manually.

    You should find all info on XDA.

  7. i have an htc evo 3d x515m…

    I flashed the
    green bar was there it stopped very near to the end for a long time..
    I continued to the next step….
    I cant install (the OTa one) in recovery..
    it says installing update and then installation aborted…. Why?

  8. Hi Jan.

    Yesterday i got new OTA update for JB (should fix some bugs)
    I have rooted one X, s-off. so I try this method, but after flashing i stuck, cause
    1)my recovery(TWRP not working after flashing firmware
    2)CWM recovery ( couldnt install OTA

    how can I get back to old firmware, cause now network not working. also WIFI cent turn ON.
    I made backup with TWRP, but cant restore cause after new firmware not working and CMW dont accept backup of TWRP

    help pls.

  9. Hello,

    It can depend on so many factors – what does the recovery give for error? It should tell you something. If it’s about asserts, you need to modify the zip updater_script file, and remove the the check for the CID – the commands in there are not understood by clockworkmod/TWRP recoveries.

  10. Hello,

    First off – if you have an S-OFF hboot, you should *never* just flash the file – this will (most likely) overwrite the hboot with an S-ON one.

    That being said, do you mean you’re actually S-OFF or just unlocked your hboot through htc-dev? In case it’s the latter, you should be fine.

    As to why TRWP doesn’t work: this is known, you should either go back to an older TWRP, which was a special compile when the touchscreen driver broke last time.
    openrecovery-twrp- You can find this on the download site at .

    Installing the OTA isn’t possible just “as is” through any custom recovery. You need to edit the installer script in the zip, as I detailed in my blog post.

  11. when i try to flash the zip i get this error
    (bootloader) signature checking…
    FAILED (remote: 12 signature verify fail)
    finished. total time: 84.916s

  12. Are you sure the zip you downloaded is correct? You can check the md5 hash of it with several tools that can be found all over the net.

  13. yes when i went to software update on my phone it downloaded that to my sd card and when i try to update it normally it just reboots and doesnt install it

  14. You can only install the downloaded zips (the original OTA’s) if you have HTC’s One X default recovery installed. Not with any other.

  15. i get :error: device not found when i try to “adb reboot oem-78″…

    please help

  16. Do you have USB debugging activated on your phone? And the drivers correctly installed in windows (if using windows)

  17. I have wrong ota from official site…. I downloaded from phone software update and it give me cid__621 , actually my cid is 622. How do I do?

  18. Good instructions, and following them almost worked for me. However still had to add 2 missing steps.

    1.) Needed to extract the boot.img from the ota zip and run “fastboot flash boot boot.img”

    2.) Needed to perform a system wipe in clockwork recovery.

    Without performing those steps, got a bunch of “Unfortunately proceess x has stopped.” messages when attempting to restart with the update.

  19. I have erased all my system and data everything..
    i cant open the device all i have left is
    the bootloader, and the recovery
    what can i do to recover anything like system or Rom, RUU
    anything to open the mobile
    my Mobile is HTC One X+ (international)
    please anyone email me or replay to me Thanks

  20. If you are running a custom rom, then after you lock your bootloader with `fastboot oem lock` you will no longer be able to boot the rom (nor recovery), so you will not have access to `adb` to do `adb reboot oem-78`.
    But you are in the bootloader, and you still have `fastboot`, so running `fastboot oem rebootRUU` instead does the trick.

  21. Pingback: Need Assistance - Android Forums

  22. when i try to flash the zip i get this error
    (bootloader) signature checking…
    FAILED (remote: 12 signature verify fail)
    finished. total time: 84.916s

  23. What recovery? What zip? Did you unpack it, remove the checks, and reflash it?

  24. i tried to install CMW &TRPW but i got error every time “oem-00..”
    piease can anybody help me out

  25. HTC one v primou

  26. Please, how I can update?
    I successfully installed OTA_VILLEC2_U_JB_45_S_HTC_Europe_3.19.401.101 on my HTC One S (villec2) and when I started the phone, it found update to version 3.19.401.103, but when I click on “Update now” it download update and reboot to recovery mode and then, after manually restart, it reboot back to system without update.
    (Sorry for my english)
    Can anybody help?

  27. Are you using the stock recovery? The OTA probably won’t apply directly without the stock recovery. You should not need to manually reboot after the OTA applies.
    It could fail if your device is rooted or for a plethora of other reasons…

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.