[HTC One X] magister_maciak:
Hi, similar to couple of threads, but - I believe - specific enough to start a new dedicated one. I have endeavoru HOX, cid HTC__032. Some time ago I damaged partition layout. It was complete ignorant era - I was doing things I should have read about before ;) I bought used HOX with stock 3.14.401.31 (OTA update applied in the meantime as far as I rmember), I was experiencing some problems with it so unlocked, pushed CWM recovery and installed CM 10.1.3. Unfortunately, gapps kept crashing so I decided to do some cleaning and apparently did the factory reset in custom recovery. I guess this brought me to the state my HOX is in now.

So, how the things look like:

1. This is my current HOX info:

(bootloader) version: 0.5a
(bootloader) version-bootloader: 1.39.0000
(bootloader) version-baseband: 5.1204.162.29
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 3.14.401.31
(bootloader) serialno: *****
(bootloader) imei: *****
(bootloader) product: endeavoru
(bootloader) platform: HBOOT-T30S
(bootloader) modelid: PJ4610000
(bootloader) cidnum: HTC__032
(bootloader) battery-status: good
(bootloader) battery-voltage: 3816mV
(bootloader) devpower: 54
[B](bootloader) partition-layout: None[/B]
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: None
(bootloader) hbootpreupdate: 2
(bootloader) gencheckpt: 0

2. I can connect via fastboot/adb - flash, use adb shell, etc. I can also push files, create and write files in adb shell, so it looks like the card is not entirely dead

3. I can flash recovery (tried TWRP and CWM) - so no problem with charging anymore

4. No partition layout and I can’t mount storage:

~ # fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 31.2 GB, 31268536320 bytes
4 heads, 16 sectors/track, 954240 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk0 doesn't contain a valid partition table

~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0

(parted) print
print
Error: /dev/block/mmcblk0: unrecognised disk label
(parted) mklabel msdos
mklabel msdos
(parted) print
print
Error: /dev/block/mmcblk0: unrecognised disk label

~ # ls -la /dev/block/
drwxr-xr-x 3 root root 300 Nov 4 21:11 .
drwxr-xr-x 9 root root 2320 Nov 4 21:07 ..
brw------- 1 root root 7, 0 Nov 4 21:07 loop0
brw------- 1 root root 7, 1 Nov 4 21:07 loop1
brw------- 1 root root 7, 2 Nov 4 21:07 loop2
brw------- 1 root root 7, 3 Nov 4 21:07 loop3
brw------- 1 root root 7, 4 Nov 4 21:07 loop4
brw------- 1 root root 7, 5 Nov 4 21:07 loop5
brw------- 1 root root 7, 6 Nov 4 21:07 loop6
brw------- 1 root root 7, 7 Nov 4 21:07 loop7
brw------- 1 root root 179, 0 Nov 4 21:07 mmcblk0
-rw-r--r-- 1 root root 0 Nov 4 21:12 mmcblk0p13
-rw-r--r-- 1 root root 0 Nov 4 21:12 mmcblk0p15
-rw-rw-rw- 1 root root 1088 Nov 4 21:12 mmcblk0p17
drwxr-xr-x 3 root root 60 Nov 4 21:07 platform

[I]-- (but this mmcblk0pxx are there only because I tried to format - unsuccessfully - related partitions through recovery) --[/I]

~ # cat /proc/partitions
major minor #blocks name
179 0 30535680 mmcblk0

~ # cat /etc/fstab
/dev/block/mmcblk0p13 /cache ext4 rw
/dev/block/mmcblk0p15 /data ext4 rw
/dev/block/mmcblk0p12 /system ext4 rw
/dev/block/mmcblk0p14 /sdcard auto rw

~ # cat /etc/recovery.fstab
# mount point	fstype	device	[device2]

/recovery	emmc	/dev/block/mmcblk0p5
/boot	emmc	/dev/block/mmcblk0p4
/cache	ext4	/dev/block/mmcblk0p13
/data	ext4	/dev/block/mmcblk0p15
/sdcard	auto	/dev/block/mmcblk0p14
/system	ext4	/dev/block/mmcblk0p12
/misc	emmc	/dev/block/mmcblk0p17

~ # cat /proc/emmc
dev: size erasesize name
mmcblk0p5: 00800000 00001000 "recovery"
mmcblk0p4: 00800000 00001000 "boot"
mmcblk0p12: 50000000 00001000 "system"
mmcblk0p13: 14000000 00001000 "cache"
mmcblk0p17: 00200000 00001000 "misc"
mmcblk0p1: 00600000 00001000 "wlan"
mmcblk0p2: 00200000 00001000 "WDM"
mmcblk0p20: 00200000 00001000 "pdata"
mmcblk0p3: 00600000 00001000 "radiocab"
mmcblk0p14: 650000000 00001000 "internalsd"
mmcblk0p15: 89400000 00001000 "userdata"
mmcblk0p19: 01600000 00001000 "devlog"
mmcblk0p16: 00200000 00001000 "extra"

On TRWP/CWM/Philz I get (more or less the same) logs/messages:

E:Can’t open /dev/block/mmcblk0p17
(No such file or directory)
E: Can’t mount /cache/recovery/command
E: Can’t mount /cache/recovery/log
E: Can’t open /cache/recovery/log
[I](...) eg. Wipe Data/Factory Reset:[/I]
-- Wiping data…
Formating /data
E: format_volume: make_extf4fs failed on /dev/block/mmcblk0p15
Formating /cache
E: format_volume: make_extf4fs failed on /dev/block/mmcblk0p13
Formating /sd-ext
Formating /sdcard/.android_secure…
Error mounting /sdcard/.android_secure!
Skipping format...
Data wipe complete.

5. Tried RUU that ought to be correct for my HOX & hboot version: (RUU_ENDEAVOR_U_JB_45_S_HTC_Europe_3.14.401.31_R_Radio_5.1204.162.29_release_302015_signed.exe) RUU software says it was flashed successfully, but when I restart the HOX it gets stucked on “HTC quitely brilliant” logo. Also, if I try to flash boot and system images manually (extracted from the ROM.zip from this RUU) the latter fails with “heap not enough” error (tried flashing on 32-bit Windows 7 and 64-bit OS X). This way or another, I don’t expect it to work, as there’s a problem with partition.

6. In the recovery I can’t wipe/erase a single thing (as in the example above)

7. As a result, no way to install a zip from recovery (due to missing partition layout) and no way to restore from backup (as it requires to mount /sdcard and it can't)...

8. ADB sideload doesn’t work (on TWRP: big red FAIL).

9. Some interesting lines from recovery.log:

recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /recovery emmc /dev/block/mmcblk0p5 (null) 0
2 /boot emmc /dev/block/mmcblk0p4 (null) 0
3 /cache ext4 /dev/block/mmcblk0p13 (null) 0
4 /data ext4 /dev/block/mmcblk0p15 (null) 0
5 /sdcard auto /dev/block/mmcblk0p14 (null) 0
6 /system ext4 /dev/block/mmcblk0p12 (null) 0
7 /misc emmc /dev/block/mmcblk0p17 (null) 0

W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /preload during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
W:Unable to get recovery.fstab info for /external_sd during fstab generation!
(...)

W:failed to mount /dev/block/mmcblk0p13 /cache ext4 (No such file or directory)
stat /dev/block/mmcblk0p17 try 1: No such file or directory
(...)
failed to stat /dev/block/mmcblk0p17
E:Can't open /dev/block/mmcblk0p17
(...)

ro.build.display.id=cm_endeavoru-userdebug 4.2.2 JDQ39E eng.root.20130419.224121 test-keys
[I](...) - leftovers from cyanogenmod?[/I]
ro.build.description=4.18.401.2 CL231174 release-keys
[I](...) - is it the reason? Are these problems because I’m actually downgrading?[/I]

ro.aa.customizationid=559204
ro.aa.romver=4.18.401.2
ro.prot=true
ro.aa.maincid=HTC__001
ro.aa.rid=302
ro.aa.modelid=PJ4610000
ro.aa.report=com
ro.aa.project=ENDEAVOR_U_JB_50_S
ro.aa.skulist=401
ro.aa.taskid=330269
ro.aa.mainsku=401

So the most interesting part is the partition-layout: None is found with fastboot getvar all. I noticed that in almost all (all?) threads where people have problems with unsuccessful stock restore (RUU) or other "stuck on logo" and share their info from getvar there's a one common issue: partition-layout: None. Does anyone have idea what's the reason and how to get it back to partition-layout: Generic (this is the correct one as I assume looking at other threads)? I believe founding a fix for this one general problem would solve all of the mentioned not-booting/stuck-on-logo/soft-bricked issues.

I have no more ideas as I browsed through tons of posts and tried a lot of possible solutions with no effect. I believe there's a need to apply some low-level system "magic" I don't feel like being able to figure out myself. If you have any idea on how to proceed I’d be more than happy to try it out. My last try would be to flash a rom with more up-to-date android, but I'm afraid it would involve updating hboot and no chance to use RUU anymore.

Also, if you think it’s all useless given the state the HOX is in, please share, so I stop to waste my (and your) time - I already spent 2 weeks on it, learned a lot, read hundreds of threads on XDA - If I’d only knew that much before ;)

On the other hand, if any member with magic skills would like to use my HOX to perform remote surgery to try to find a general solution for that problem, I'd be more than happy (well, just happy, I would be more if I could fix it ;)) to sacrifice my HOX even if there's a chance to kill it definitely.