[Fire HD 8 and HD 10 Original Android Development] k4y0z:
Read this whole guide before starting.

This is for the 8th gen Fire HD8 (karnak).

Current version: amonet-karnak-v3.0.1.zip

This is based on [MENTION=9667509]xyz`[/MENTION]s original work, but adds some features such as reboot to hacked BL.

It also intends to simplify the installation process.

If you are already unlocked you can simply update by flashing the ZIP-file in TWRP.

NOTE: If you are on a firmware lower than 6.3.1.2 this process does not require you to open your device, but should something go horribly wrong, be prepared to do so.

What you need:

A Linux installation or live-system

A micro-USB cable

Install python3, PySerial, adb, fastboot dos2unix. For Debian/Ubuntu something like this should work:

sudo apt update
sudo add-apt-repository universe
sudo apt install python3 python3-serial adb fastboot dos2unix

1. Extract the attached zip-file "amonet-karnak-v3.0.1.zip" and open a terminal in that directory.

NOTE: If you are already rooted, continue with the next step, otherwise get mtk-su by [MENTION=8132642]diplomatic[/MENTION] from here and place (the unpacked binary) into amonet/bin folder

2. Enable ADB in Developer Settings

3. Start the script:

sudo ./fireos-step.sh

NOTE: If you are on a firmware newer than 6.3.0.1, a downgrade is necessary, this requires bricking the device temporarily. (The screen won't come on at all)

WARNING: There have been numerous reports that would indicate a hardware-change that doesn't allow access to the bootrom.

When bricking these devices there is currently no known way to unbrick.

This makes the hardware-method currently the safest option.

To brick firmware 6.3.1.2 use the attached brick-karnak.zip, boot into fastboot

adb reboot bootloader

and run

./brick-6312.sh

Make sure ModemManager is disabled or uninstalled:

sudo systemctl stop ModemManager
sudo systemctl disable ModemManager

After you have confirmed the bricking by typing "YES", you will need disconnect the device and run

sudo ./bootrom-step.sh

Then plug the device back in.

The device will reboot into TWRP.

You can now install Magisk from there.

Going back to stock

Extract the attached zip-file "amonet-karnak-return-to-stock.zip" into the same folder where you extracted "amonet-karnak-v3.0.1.zip" and open a terminal in that directory.

Then run:

sudo ./return-to-stock.sh

Your device should reboot into Amazon Recovery. Use adb sideload to install stock image from there. (Make sure to use FireOS 6.3.0.0 or newer, otherwise you may brick your device)

Important information

Don't flash boot/recovery images from FireOS (FlashFire, MagiskManager etc.)

TWRP will prevent updates from overwriting LK/Preloader/TZ, so generally installing an update should work without issues (only full updates, incremental updates won't work).

For ROM developers there is still an option to overwrite these, which should only be done after thorough testing and if needed (LK should never be updated).

It is still advised to disable OTA.

Very special thanks to [MENTION=9667509]xyz`[/MENTION] for making all this possible and putting up with the countless questions I have asked, helping me finish this.

Special thanks also to [MENTION=8132642]diplomatic[/MENTION] for his wonderfull mtk-su, allowing you to unlock without opening the device.

Thanks to [MENTION=9605864]Kaijones23[/MENTION] for testing.