[Fire TV Original Android Development] BagiMTsnowplant6:
Like others, my box one day would not boot. I initially tried the rbox unbrick method which consistently worked in the past, but no luck. I then tried the amonet 1.3 scripts from the previous unbrick thread and that worked. I got into TWRP but flashing the rom failed and I was back at the white Amazon logo. I figured I should use this new script and unlock the bootloader while at it. However, I keep getting a "bad gpt" error.

[2021-10-30 07:46:10.896010] Waiting for bootrom
[2021-10-30 07:48:04.118655] Found port = /dev/ttyACM3
[2021-10-30 07:48:04.119207] Handshake
[2021-10-30 07:48:04.119815] Disable watchdog
[2021-10-30 07:48:04.150619] Waiting for bootrom
[2021-10-30 07:48:12.290244] Found port = /dev/ttyACM3

* * * Remove the short and press Enter * * *

[2021-10-30 07:48:13.832423] Init crypto engine
[2021-10-30 07:48:13.853129] Disable caches
[2021-10-30 07:48:13.853916] Disable bootrom range checks
[2021-10-30 07:48:13.869918] Load payload from ../brom-payload/build/payload.bin = 0x4760 bytes
[2021-10-30 07:48:13.871530] Send payload
[2021-10-30 07:48:14.575798] Let's rock
[2021-10-30 07:48:14.576675] Wait for the payload to come online...
[2021-10-30 07:48:14.580443] all good
[2021-10-30 07:48:14.580609] Clear preloader header
[8 / 8]
[2021-10-30 07:48:15.949699] Check GPT
[2021-10-30 07:48:16.387763]
[2021-10-30 07:48:16.387898] Sector size (logical): 512 bytes
[2021-10-30 07:48:16.388006] Disk identifier (GUID): 2C7359E3-DA7B-4FAC-921D-C158570A9F04
[2021-10-30 07:48:16.388062] Partition table holds up to 128 entries
[2021-10-30 07:48:16.388121] This partition table begins at sector 2 and ends at sector 33
[2021-10-30 07:48:16.388175] First usable sector is 34, last usable sector is 15269854
[2021-10-30 07:48:16.388224] Other partition table is at sector 15269887
[2021-10-30 07:48:16.388279]
[2021-10-30 07:48:16.388357] Number Start (sector) End (sector) Size Name
[2021-10-30 07:48:16.388887] 1 1024 1277 127.00 KiB PRO_INFO
[2021-10-30 07:48:16.389090] 2 2048 12287 5.00 MiB NVRAM
[2021-10-30 07:48:16.389316] 3 12288 22527 5.00 MiB TEE1
[2021-10-30 07:48:16.389497] 4 22528 32767 5.00 MiB TEE2
[2021-10-30 07:48:16.389708] 5 32768 34815 1024.00 KiB lk
[2021-10-30 07:48:16.389888] 6 34816 86015 25.00 MiB boot
[2021-10-30 07:48:16.390218] 7 86016 137215 25.00 MiB recovery
[2021-10-30 07:48:16.390426] 8 137216 139263 1024.00 KiB KB
[2021-10-30 07:48:16.390604] 9 139264 141311 1024.00 KiB DKB
[2021-10-30 07:48:16.390780] 10 141312 142335 512.00 KiB MISC
[2021-10-30 07:48:16.390953] 11 142336 158719 8.00 MiB LOGO
[2021-10-30 07:48:16.391125] 12 158720 182015 11.38 MiB EXPDB
[2021-10-30 07:48:16.391299] 13 182016 2659615 1.18 GiB system
[2021-10-30 07:48:16.391470] 14 2659616 3171615 250.00 MiB cache
[2021-10-30 07:48:16.391658] 15 3171616 15269854 5.77 GiB userdata
[2021-10-30 07:48:16.402275]
[2021-10-30 07:48:16.402441] Modify GPT
[2021-10-30 07:48:16.402714] Validate GPT
[2021-10-30 07:48:16.402944]
[2021-10-30 07:48:16.403013] Sector size (logical): 512 bytes
[2021-10-30 07:48:16.403081] Disk identifier (GUID): 2C7359E3-DA7B-4FAC-921D-C158570A9F04
[2021-10-30 07:48:16.403141] Partition table holds up to 128 entries
[2021-10-30 07:48:16.403193] This partition table begins at sector 2 and ends at sector 33
[2021-10-30 07:48:16.403247] First usable sector is 34, last usable sector is 15269854
[2021-10-30 07:48:16.403294] Other partition table is at sector 15269887
[2021-10-30 07:48:16.403342]
[2021-10-30 07:48:16.403413] Number Start (sector) End (sector) Size Name
[2021-10-30 07:48:16.403588] 1 1024 1277 127.00 KiB PRO_INFO
[2021-10-30 07:48:16.403784] 2 2048 12287 5.00 MiB NVRAM
[2021-10-30 07:48:16.403952] 3 12288 22527 5.00 MiB TEE1
[2021-10-30 07:48:16.404120] 4 22528 32767 5.00 MiB TEE2
[2021-10-30 07:48:16.404287] 5 32768 34815 1024.00 KiB lk
[2021-10-30 07:48:16.404453] 6 34816 86015 25.00 MiB boot_x
[2021-10-30 07:48:16.404667] 7 86016 137215 25.00 MiB recovery_x
[2021-10-30 07:48:16.404840] 8 137216 139263 1024.00 KiB KB
[2021-10-30 07:48:16.405007] 9 139264 141311 1024.00 KiB DKB
[2021-10-30 07:48:16.405174] 10 141312 142335 512.00 KiB MISC
[2021-10-30 07:48:16.405342] 11 142336 158719 8.00 MiB LOGO
[2021-10-30 07:48:16.405510] 12 158720 182015 11.38 MiB EXPDB
[2021-10-30 07:48:16.405676] 13 182016 2659615 1.18 GiB system
[2021-10-30 07:48:16.405842] 14 2659616 3171615 250.00 MiB cache
[2021-10-30 07:48:16.406008] 15 3171616 3233055 30.00 MiB boot
[2021-10-30 07:48:16.406176] 16 3233056 3294495 30.00 MiB recovery
[2021-10-30 07:48:16.406357] 17 3294496 15269854 5.71 GiB userdata
[2021-10-30 07:48:16.416767]
[2021-10-30 07:48:16.416919] Flash new primary GPT
[34 / 34]
[2021-10-30 07:48:16.911163] Flash new backup GPT
[33 / 33]
[2021-10-30 07:48:17.518815]
[2021-10-30 07:48:17.518939] Sector size (logical): 512 bytes
[2021-10-30 07:48:17.519004] Disk identifier (GUID): 2C7359E3-DA7B-4FAC-921D-C158570A9F04
[2021-10-30 07:48:17.519045] Partition table holds up to 128 entries
[2021-10-30 07:48:17.519086] This partition table begins at sector 2 and ends at sector 33
[2021-10-30 07:48:17.519121] First usable sector is 34, last usable sector is 15269854
[2021-10-30 07:48:17.519157] Other partition table is at sector 15269887
[2021-10-30 07:48:17.519190]
[2021-10-30 07:48:17.519248] Number Start (sector) End (sector) Size Name
[2021-10-30 07:48:17.519424] 1 1024 1277 127.00 KiB PRO_INFO
[2021-10-30 07:48:17.519586] 2 2048 12287 5.00 MiB NVRAM
[2021-10-30 07:48:17.519745] 3 12288 22527 5.00 MiB TEE1
[2021-10-30 07:48:17.519906] 4 22528 32767 5.00 MiB TEE2
[2021-10-30 07:48:17.520062] 5 32768 34815 1024.00 KiB lk
[2021-10-30 07:48:17.520241] 6 34816 86015 25.00 MiB boot
[2021-10-30 07:48:17.520427] 7 86016 137215 25.00 MiB recovery
[2021-10-30 07:48:17.520586] 8 137216 139263 1024.00 KiB KB
[2021-10-30 07:48:17.520741] 9 139264 141311 1024.00 KiB DKB
[2021-10-30 07:48:17.520903] 10 141312 142335 512.00 KiB MISC
[2021-10-30 07:48:17.521087] 11 142336 158719 8.00 MiB LOGO
[2021-10-30 07:48:17.521266] 12 158720 182015 11.38 MiB EXPDB
[2021-10-30 07:48:17.521573] 13 182016 2659615 1.18 GiB system
[2021-10-30 07:48:17.521756] 14 2659616 3171615 250.00 MiB cache
[2021-10-30 07:48:17.521931] 15 3171616 15269854 5.77 GiB userdata
[2021-10-30 07:48:17.530880]
Traceback (most recent call last):
File "main.py", line 146, in <module>
main()
File "main.py", line 84, in main
raise RuntimeError("bad gpt")
RuntimeError: bad gpt

I have tried at least 10 times now.

The "gpt-fix.sh" script also throws an error:

sudo ./gpt-fix.sh
[2021-10-30 07:55:48.368625] Waiting for bootrom
[2021-10-30 07:56:04.703938] Found port = /dev/ttyACM3
[2021-10-30 07:56:04.704303] Handshake
[2021-10-30 07:56:04.705802] Disable watchdog

* * * Remove the short and press Enter * * *

[2021-10-30 07:56:07.012329] Init crypto engine
[2021-10-30 07:56:07.032533] Disable caches
[2021-10-30 07:56:07.033071] Disable bootrom range checks
[2021-10-30 07:56:07.046745] Load payload from ../brom-payload/build/payload.bin = 0x48B0 bytes
[2021-10-30 07:56:07.048588] Send payload
[2021-10-30 07:56:07.685042] Let's rock
[2021-10-30 07:56:07.685787] Wait for the payload to come online...
[2021-10-30 07:56:07.689511] all good
[2021-10-30 07:56:08.453742] Flashing GPT...
[34 / 34]
[2021-10-30 07:56:09.171610] Check GPT
[2021-10-30 07:56:09.509931] gpt_parsed = {'PRO_INFO': (1024, 254), 'NVRAM': (2048, 10240), 'TEE1': (12288, 10240), 'TEE2': (22528, 10240), 'lk': (32768, 2048), 'boot': (34816, 51200), 'recovery': (86016, 51200), 'KB': (137216, 2048), 'DKB': (139264, 2048), 'MISC': (141312, 1024), 'LOGO': (142336, 16384), 'EXPDB': (158720, 23296), 'system': (182016, 2477600), 'cache': (2659616, 512000), 'userdata': (3171616, 12098239), '': (0, 1)}
[2021-10-30 07:56:09.510033] Check boot0
[2021-10-30 07:56:09.766374] Check rpmb
[2021-10-30 07:56:09.971542] RPMB: b'AMZN\x01\x00\x00\x00\x04\x00\x05\x01\x02\x00Xc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[2021-10-30 07:56:09.971697] Clear preloader header
[8 / 8]
[2021-10-30 07:56:10.340200] Flashing TEE..
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 500, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 164, in <module>
main()
File "main.py", line 126, in main
flash_binary(dev, "../bin/tz.img", gpt["TEE1"][0], gpt["TEE1"][1] * 0x200)
File "main.py", line 56, in flash_binary
dev.emmc_write(start_block + x, data[x * 0x200:(x + 1) * 0x200])
File "/home/ubuntu/Documents/amonet-sloane-v1.3/modules/common.py", line 200, in emmc_write
code = self.dev.read(4)
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 509, in read
raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

and so does the old 1.3 script

sudo ./bootrom-step.sh
[2021-10-30 07:53:22.978159] Waiting for bootrom
[2021-10-30 07:53:36.516411] Found port = /dev/ttyACM3
[2021-10-30 07:53:36.516809] Handshake
[2021-10-30 07:53:36.517507] Disable watchdog

* * * Remove the short and press Enter * * *

[2021-10-30 07:53:41.509351] Init crypto engine
[2021-10-30 07:53:41.532719] Disable caches
[2021-10-30 07:53:41.533298] Disable bootrom range checks
[2021-10-30 07:53:41.549908] Load payload from ../brom-payload/build/payload.bin = 0x48B0 bytes
[2021-10-30 07:53:41.551731] Send payload
[2021-10-30 07:53:42.163202] Let's rock
[2021-10-30 07:53:42.163858] Wait for the payload to come online...
[2021-10-30 07:53:42.167700] all good
[2021-10-30 07:53:42.167894] Check GPT
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 537, in write
n = os.write(self.fd, d)
OSError: [Errno 19] No such device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 164, in <module>
main()
File "main.py", line 95, in main
switch_user(dev)
File "main.py", line 61, in switch_user
block = dev.emmc_read(0)
File "/home/ubuntu/Documents/amonet-sloane-v1.3/modules/common.py", line 179, in emmc_read
self.dev.write(p32_be(idx))
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 571, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: [Errno 19] No such device

Any ideas are appreciated.