[Fire TV Q&A, Help & Troubleshooting] Nihilian:
Hey y'all, I've run into a really strange issue that I've been trying to troubleshoot for the better part of a day, and I'm hoping someone might be able to offer some insight. Just a little backstory: I've had this stick working with root and TWRP for years, but one day I went to boot it up and it just hung on the Amazon bootlogo. Then I found that I was no longer able to boot into custom recovery (TWRP). I'm really not sure what happened, but I suspect an OTA update might have broken things. Anyway, I went back through the process of shorting the CLK pin and managed to get TWRP reinstalled. Unfortunately, I haven't been able to flash anything via TWRP without error. Things I've tried to flash include: Lineage, a couple different pre-rooted stock ROMs, as well as the vanilla stock images I got here. Regardless of what I try to flash, I end up running into the same problems.

Here is a step-by-step walk through of what happens:

From the adb shell in recovery mode I first run the following commands:

twrp wipe cache
twrp wipe data
twrp wipe dalvik
twrp wipe /system

I get output warning me:

~ # twrp wipe cache
Formatting Cache using make_ext4fs...
Failed to mount '/cache' (No such device)
Done processing script file

~ # twrp wipe data
Formatting cache using make_ext4fs...
Failed to mount '/cache' (No such device)
Formatting Data using make_ext4fs...
Failed to mount '/data' (No such device)
Failed to mount '/data' (No such device)
Unable to recreate /data/media folder.
Done processing script file

~ # twrp wipe dalvik
Failed to mount '/data' (No such device)
Done processing script file

~ # twrp wipe /system
Formatting System using make_ext4fs...
Failed to mount '/system' (No such device)
Done processing script file

Despite these errors I try anyway to carry on with the twrp install command. However, when I try to do this I'm met with more errors (this output is the same for each ROM I mentioned above):

~ # twrp install /sdcard/firmware.zip
Installing zip file '/sdcard/firmware.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
[amonet] Remove boot patch...
[amonet] Failed to read data
[amonet] Install boot patch...
[amonet] Failed to read data
[amonet] Install recovery patch...
[amonet] Failed to read data
Error installing zip file '/sdcard/firmware.zip'
Done processing script file

I checked the '/tmp/recovery.log' file and found this message:

I:Can't probe device /dev/block/mmcblk0p13
I:Unable to mount '/data'
I:Actual block device: '/dev/block/mmcblk0p13', current file system: ''

And:

I:Can't probe device /dev/block/mmcblk0p11
Failed to mount '/system' (No such device)
I:Actual block device: '/dev/block/mmcblk0p11', current file system: ''

These log errors led me to stumble upon this thread (https://xdaforums.com/t/fixed-firet...m-partitions-unlocked-twrp-available.4288487/), which seems to address a problem very similar to mine. Unfortunately, the fix involving formatting the 'userdata' partition via fastboot (posted by @Bertonumber1) did not do the trick for me. @Bertonumber1 also mentioned a second solution in the same post that involves using the repair/change file system option from TWRP's GUI to format the 'userdata' partition to 'ext2' then back to 'ext4'. However, I am not able to try this out because I have no way of interacting with the GUI (I've got no way of attaching an input device like a mouse or touchscreen). Perhaps there is a command-line equivalent for this process?

I feel as though the core issue here is with my partition table. It seems as though '/data' and '/system' were erased somehow? Here's the output of df:

~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 440.1M 20.0K 440.1M 0% /dev
tmpfs 440.1M 32.0K 440.1M 0% /tmp
/dev/block/mmcblk0p12
242.1M 148.0K 236.9M 0% /cache

It seems there is some issue arising when trying to mount '/data' or '/system', and I am unable to mount them manually with the mount command.

~ # mount /dev/block/mmcblk0p13 /data
mount: mounting /dev/block/mmcblk0p13 on /data failed: Invalid argument

~ # mount -t ext4 /dev/block/mmcblk0p13 /data
mount: mounting /dev/block/mmcblk0p13 on /data failed: Invalid argument

~ # mount /dev/block/platform/mtk-msdc.0/by-name/userdata /data
mount: mounting /dev/block/platform/mtk-msdc.0/by-name/userdata on /data failed: Invalid argument

Also, my fstab doesn't look right:

~ # cat /etc/fstab
/dev/block/mmcblk0p12 /cache ext4 rw 0 0
/dev/block/mmcblk0p13 /data rw 0 0
/dev/block/mmcblk0p11 /system rw 0 0
/usb-otg vfat rw 0 0

Why is the fstype for '/data' and '/system' blank? Those should be 'ext4', correct?

fastboot seems to take issue with this null fstype:

$ fastboot format userdata
fastboot: error: Formatting is not supported for file system with type 'unknown'.

I also tried specifying the type as 'ext4':

$ fastboot format:ext4 userdata
Warning: userdata type is unknown, but ext4 was requested for formatting.
mke2fs 1.46.6 (1-Feb-2023)
Creating filesystem with 1607323 4k blocks and 402400 inodes
Filesystem UUID: a7ba8cbd-008f-4e7a-bfd5-1b7a196f3f9e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

Sending 'userdata' (116 KB) OKAY [ 0.026s]
Writing 'userdata' OKAY [ 0.019s]
Finished. Total time: 0.117s

But alas, after booting back into recovery I am met with the same error messages about failing to mount '/data'.

Anyway, I'm pretty stumped. Hopefully this wasn't too much information all at once. I'm just trying my best to walk through my thought process and what I've tried so far. I'm happy to post more info from the logs or dmesg if I need to. Do I maybe need to try completely erasing and reformatting 'mmcblk0'? (Is that even possible on this device?) Honestly, I'll try anything at this point.