[HTC One X] victorhooi:
Hi,

I have a HTC One X that I'm trying to restore to stock - it seems pretty borked at the moment, /sdcard won't mount in recovery (CWM), wifi/mobile aren't working etc.

I've also tried partitioning the SDCard through CWM, and I think I may have used the wrong options (1024 Mb, and 128Mb swap?). I have no idea how to restore partition layouts on HTC phones? (Do they use a .PIT file?).

Anyhow, on bootup, it shows the following:

*** UNLOCKED ***
ENDEAVORU PVT SHIP S-ON RL
HBOOT-1.36.0000
CPLD-None
RADIO-5.1204.162.29
eMMC-bootmode: disabled
CPU-bootmode: disabled
HW SEcure boot: enabled
MODEM PATH : OFF
Nov 16 2012,18:32:39

FASTBOOT USB
...

My fastboot variables:

(bootloader) version: 0.5a
(bootloader) version-bootloader: 1.36.0000
(bootloader) version-baseband: 5.1204.162.29
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 3.14.980.27
(bootloader) product: endeavoru
(bootloader) platform: HBOOT-T30S
(bootloader) modelid: PJ4610000
(bootloader) cidnum: OPTUS001
(bootloader) battery-status: good
(bootloader) battery-voltage: 4008mV
(bootloader) devpower: 92
(bootloader) partition-layout: None
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: None
(bootloader) hbootpreupdate: 2
(bootloader) gencheckpt: 0
all: Done!

If I'm reading the above correctly, it's on HBoot 1.36, with a Optus CID, so I tried looking for a RUU here

http://www.androidruu.com/index.php?developer=Endeavor

and unfortunately couldn't find anything matching it - the newest is 1.29 for Optus.

I'm then thought I'd try following the instructions here for restoring from Nandroid:

http://xdaforums.com/showthread.php?t=1975140

I downloaded the Nandroid backup from here:

Nandroid Backup / Mirror 3.14.980.27 CID OPTUS001 thanks to mafia187

http://uploaded.net/file/bvcpzcgl

The RAR file from this download doesn't contain a zipfile, however, it does contain a folder with the following:

nandroid.md5

cache.ext4.tar

data.ext4.tar

system.ext4.tar

boot.img

recovery.img

I tried flashing this with adb restore as a folder, and also compressing it to a zipfile, and flashing it, and it didn't seem to do anything, but simply returned right away both times with:

192-168-1-102:platform-tools victorhooi$ ./adb restore ~/Downloads/Stock\ JB\ Optus\ Australia\ 3.14.980.27/2012-12-19.21.27.47
2012-12-19.21.27.47/ 2012-12-19.21.27.47.zip
192-168-1-102:platform-tools victorhooi$ ./adb restore ~/Downloads/Stock\ JB\ Optus\ Australia\ 3.14.980.27/2012-12-19.21.27.47.zip
Now unlock your device and confirm the restore operation.

I then thought I'd try to erase/flash the partitions manually.

When I try to erase them I get a "remote: not allowed" error:

192-168-1-102:platform-tools victorhooi$ ./fastboot erase system
erasing 'system'...
FAILED (remote: not allowed)
finished. total time: 0.136s

When I try to flash, I get a "heap not enough" error:

192-168-1-102:platform-tools victorhooi$ ./fastboot flash system ~/Downloads/Stock\ JB\ Optus\ Australia\ 3.14.980.27/2012-12-19.21.27.47/system.ext4.tar
sending 'system' (1100991 KB)...
FAILED (remote: Heap not enough)
finished. total time: 0.098s

I thought maybe the bootloader was still locked (I was actually a bit confused, as it says UNLOCKED at the top, but it says S-ON for getvar?).

I tried to following the official unlock procedure on the HTCDev site.

192-168-1-102:platform-tools victorhooi$ ./fastboot flash unlocktoken ~/Downloads/Unlock_code.bin
sending 'unlocktoken' (0 KB)...
OKAY [ 0.141s]
writing 'unlocktoken'...
(bootloader) unlock token check successfully
OKAY [ 0.222s]
finished. total time: 0.364s

and I don't get the unlock screen, as they mention in the HTC instructions?

What are your thoughts on what to try next? Any help at all greatly appreciated.

Cheers,

Victor