[HTC One X] ClydeB1:
This guide is intended to help you to return your One X device back to stock in order to either return the device for a warranty claim, or to be in a position to receive an official OTA (Over The Air) update. There may be other guides, but the intention of this guide is to be as simple to perform as is possible given the challenges facing us without having s-off for the One X.

There are 2 methods that can be used to restore back to stock from a custom rom:

1. Using a nandroid backup (if you took one when you first unlocked your bootloader)

2. Flashing a stock ruu

BEFORE STARTING

1. Charge your device. It is advisable to have at least 60 - 70% battery charge on your device before attempting this process

2. Install

HTC Sync software and drivers

on your pc.

3. You also need to have the

fastboot folder and files

installed on your pc.

Refer

here

for guidance on using adb and fastboot commands

OPTION 1 - Restoring stock rom from nandroid backup

If you followed the advice when first unlocking your bootloader, you should have a nandroid backup of your original rom ;). It is easier to restore your backup than going through the process of flashing from an ruu

NB! If you don't have a nandroid backup have a look

HERE

to see if one has been uploaded that you can use, or you can ask another user to possibly upload one for you.

1. Copy the boot.img file from your backup (/sdcard/clockworkmod/backup) to the fastboot folder on your pc and flash this via fastboot: (If you use a nandroid backup from another user from the link above, then extract the backup.zip and copy the main folder (should have the date of the backup in the foder name) to /sdcard/clockworkmod/backup/.

If the backup is made using TWRP then you will need TWRP Recovery to restore it. Copy the main folder to /sdcard/TWRP/Backups/Your phones Serial Number/. The boot file for a backup made using TWRP will be named boot.emmc.win, but you can flash it the same way as flashing the boot.img file.)

fastboot flash boot boot.img (or fastboot flash boot boot.emmc.win if using TWRP backup)
fastboot erase cache

2. Boot into Recovery and restore the backup

3. Boot back to bootloader and flash the appropriate recovery file to match your stock rom which you are restoring (See links below)

fastboot flash recovery [I]nameofrecoveryfile[/I].img
fastboot erase cache

Links to stock recovery versions can be found below:

Stock HTC Recovery (1,26 - 1.29) Use right mouse click > save as! otherwise it will just open in your browser

Stock 2.17 recovery (Courtesy of Mike1986) (MD5: 85D544EE5D2F29E13DB3690FB4983672) OR HERE

Stock Recoveries for 3.14.xxx roms

OPTION 2 - Restoring stock rom by flashing stock ruu

Get the RUU file required for your device:

Make sure that USB debugging is enabled (Settings/Developer options). In order to determine which ruu file you require, boot your device into bootloader mode (Power off and then restart device by holding Power and Volume Down button together). Connect to pc via USB and check that device shows FASTBOOT USB on screen. Enter the following command in command prompt:

fastboot getvar version-main

If for example this command returns the value 1.29.401.x then you need to use that file or you can use a higher numbered file from the same region eg 2.17.401.x. NOTE: You can't use a lower numbered file eg 1.26.401.x and you also can't use a file from a different region eg 2.17.707.x.

You can find many of the ruu files here:

Android Files

RooMyShare

PROCESS :

1. Boot your phone to fastboot mode by holding power+vol down button for 10 secs..(if your phone keeps restarting in normal phone mode, go to Setting>Power and untick Fast boot)

2. 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)

3. cd to the location of your fastboot files folder

4. Relock bootloader - type command:

fastboot oem lock

The phone will then restart into fastboot again showing "RELOCKED"

6. On your pc run the RUU that you downloaded earlier, follow the steps as prompted and patiently wait for it to finish.

REMEMBER your phone should be charged ABOVE 50% AND if the ruu or restore is INTERRUPTED 4 any reason during restore your

phone MAY be PERMANENTLY BRICKED..​

all the best..:fingers-crossed: