[Fire HD 8 and HD 10 Original Android Development] coolcorner:
I have a weird situation, let me explain.

[Please refer to EDIT 4]

[Please refer to EDIT 3]

[Please refer to EDIT 1 and EDIT 2 as well]

1. I executed the script provided here https://xdaforums.com/t/unlock-root-twrp-unbrick-fire-hd-10-2017-suez.3913639/post-79169422 by k4y0z everything went fine, without any issues

2. I installed Lineage OS 16 from TWRP (have not flashed gapps or magisk yet), after installing Lineage OS I was trying to execute cleanup script by psi78 but it was not recognizing the script by giving file not found error. Even after trying to mount system, it failed to execute the script. At this point I thought the issue is with TWRP (as I could not even see the external SD card/storage), so I decided to flash TWRP again.

3. I downloaded TWRP_suez-180918 and flashed this img to recovery from Install option in TWRP, which messed up my TWRP recovery and my device now is not able to get into TWRP. (I select flash image, then selected the img file and selected recovery from the two options we get boot/recovery).

4. After flashing TWRP as in step 3, it rebooted and showed on the bottom left corner "recovery" but would not enter the TWRP. It kept boot looping between booting up and trying to enter TWRP recovery and would failed to do so.

5. Luckily as I had flashed Lineage OS I am able to boot into Lineage OS. Here I enabled USB debugging and tried to enter bootloader mode to flash recovery. While being in the Lineage OS, I can see my device under "adb devices" and I could issue "adb reboot bootloader" and the device was in bootloader mode (on the left bottom corner I can see "bootloader" mentioned), however when I try "fastboot devices" it would not show any device. [Please refer Edit 1 below]

Questions:

a) I am not sure if I am getting into the right bootloader, from what I searched I need to be under hacked bootloader to flash TWRP?

b) If yes, please let me know how can I get into that bootloader to flash TWRP again.

Or

Please let me know how can I fix my situation to flash TWRP.

Note: Currently, the device is able to boot normally into Lineage OS, which is without Gapps and does NOT have root access :(

EDIT 1: Seems like there was some issue with my USB drivers, had to reboot my PC a couple of times for device to get recognized in fastboot mode.

Now, when I try to flash twrp in fastboot, it says "FAILED (remote: the command you input is restricted on locked hw)"

EDIT 2: Did some more search in this thread and found out how to enter hacked bootloader, basically we need to use the script "boot-fastboot.sh" run the script while the device is off and connect the device to the PC which would boot the device and put the device into hacked bootloader mode. In this mode I did flash the TWRP image with "fastboot flash recovery_x twrp.img", then I issued the command "fastboot oem reboot-recovery", it seemed it tried to enter the TWRP recovery but it failed and booted into Lineage.

EDIT 3: After some more searching I figured I need to execute "boot-recovery" script, I ran that script and finally entered TWRP with that, and I was all happy about it and then......... However, after the reboot from TWRP, all I am seeing is a boot loop, now both scripts "boot-fastboot" or "boot-recovery" are not useful, neither its entering recovery or hacked bootloader, also it is NOT able to go past Amazon logo and boot into Lineage OS, I do not know what happened suddenly, it is basically in a boot loop. How do I fix this, please let me know?

EDIT 4: Had to open the device and do the shorting method to fix the boot loop issue and it got fixed.

Thanks!