[Fire HD 6 and 7 General] bibikalka:
Higher skill level operation - proceed with care !!!

Update3.5 : Updates for 5.3.1 !!! Please use 5.5.2_1534_stock_recovery_uboot.zip if you downgraded from stock FireOS 5.3.1 to 4.5.3 for rooting, meaning that you now have 5.3.1 bootloaders

Update3.4 : Updates for 5.1.2 !!! Please use the new WindowsAutoTWRP_v03.zip with 5.1.2 (backward compatible to 5.1.1 and before). There are tons of verification messages in the new script, please read carefully !!! It appears that in 5.1.2 there is a bug such that root cannot see /sdcard/gscript properly (this was the issue caused by the latest SuperSu I tried). To handle this, I redirected the path to /data/media/0/gscript . If you are using Gscript, delete the flash_453(_stay) scripts in Gscript, and open them again after you run WindowsAutoTWRP_v03 once. This way Gscript will pick up the corrected scripts with the updated path. Pay attention to the checksums !!!

Update3.3 : And now "Newbie Friendly" !!! Just one simple *.bat script under Windows !!! See section "101"

Update3.2 : If you are unsure what bootloader file to use, go with 5.4.1_1133_stock_recovery_uboot.zip

Update2: If you ever booted the Sept 2015 Lollipop (FireOS 5.0.1, called here 5.2.2u2), DO NOT use 5.2.0_stock_recovery_uboot.zip , it will brick!!!

Update1: Instructions are clarified with more detail on how to use "dd" correctly.

Important : do not try to use Flashify!!! Flashify cannot access all partitions that you need to flash !!! Flashify will brick your Fire !!!

Here you get to run TWRP again, and then return to Lollipop.

The steps must be executed with precision (all 3 files must be dd'ed successfully). Keep the 5.4.1_1133_stock_recovery_uboot.zip file from below on the device, in its /images directory you have 3 images for 5.4.1 which you can flash back right away if you need to abort. If something is wrong, DO NOT reboot for as long as it takes. Keep the device without reboots, and come back here for guidance.

To understand a bit what we are doing in this post, read this :

A bit of background. Fire HD boots TEE1 -> UBOOT -> recovery. With 4.5.3, we lucked out that TEE1 & UBOOT accepted unsigned recovery (aka TWRP). No such luck with 5.2.x - TEE1 & UBOOT expect signed recovery (for example, stock one). That's why I had everybody overwrite TWRP with stock recovery in post #1 as the last step in the upgrade. Otherwise after the upgrade to 5.2.x, TWRP would still be sitting in recovery, and being unsigned, it cannot boot !!! A few bricks were created because of this last point. But with the stock 5.2.0 recovery (which it will boot), at least there is an option to sideload another update file.

So, the key to running TWRP while in 5.2.x is to overwrite the 3 key components together (TEE1, UBOOT, recovery), and then return things to 5.2.x once TWRP is no longer needed.

For convenience, before proceeding save all the attached files on your Fire in "/sdcard/gscript"

101 - Automatic installation under Windows !!!

I managed to debug it and not to brick !!! Tested personally (gotta eat your dog food !!!) Heavily inspired by glitch3yf0x in http://xdaforums.com/amazon-fire/general/root-playstore-busybox-optimize-flash-t3281804

Save the necessary Lollipop bootloaders zip into /sdcard/gscript on Fire HD, this will get you back into Lollipop

Download WindowsAutoTWRP_v03.zip to your PC with some Windows on it, unpack anywhere

Run the commands below, and make sure you authorize root access for adb when the question pops up on your Fire:

adb shell
su
exit
exit

Enable apps from unknown sources

Run 1_FIRE_HD_4TH_GEN_TWRP.bat

At the bottom you should see these checksums :

3a1f3cd1ef405eaeec719eaeb41ab791 /dev/block/mmcblk0p3
d605e31a180652c65d6957b58d2d8501 /dev/block/mmcblk0p5
305a5546ff8960b51cd573b59a05cde6 /dev/block/mmcblk0p7

Make sure the checksums are correct before rebooting !!! Do not reboot if checksums are wrong, keep the Fire running, and come back here to ask questions !!! I almost bricked under 5.1.2 due to the newer SuperSu version, but managed to catch the wrong checksums, and updated the scripts to have additional verifications.

A possible issue here is that you did not have root access, so the "dd" commands could not succeed. At this point you can go to method A since the script left all the necessary ingredients on the device, so all you need to do is to run the script from Gscript (installed for you!), make sure you click "needs SU". Delete the old flash_453 and flash_453_stay scripts from Gscript, and re-open them again after you run WindowsAutoTWRP_v03 at least once.

Verify again that you have 5.x.x bootloaders zip file on Fire HD which you will access from TWRP (it can also be on a USB drive if you got USB OTG cable) - Out of kindness I've provided the most popular bootloaders zip at the moment - 5.4.1 version, you can find it in /sdcard/gscript, it's TWRP ready, just flash it if 5.4.1 is OK for you (5.4.1 bootloaders will also work with FireOS 5.1.2 )

Type "adb reboot recovery"

In TWRP, after you are done with everything, don't forget to flash the 5.x.x bootloaders zip file in order to boot back into Lollipop!

After the batch file runs, you will have Gscript installed, together with the required script & image files in /sdcard/gscript, so you can head over to the next section (section A), and set up TWRP access without using a PC! You will also have scripts in there to enable/disable Amazon's stuff on the fly, as described in here :

http://xdaforums.com/fire-hd/general/fireos-4-5-x-root-quickly-switch-to-t3145613

A - Instructions with Gscript.

Due to popular demand (looking at DoLooper here :D), the approach is simplified and all the bootloaders are flashed via a script, and this assumes that you have Gscript installed (here : https://bitbucket.org/Equidamoid/gscript/downloads )

Download the attached "453_key_images.zip" to your Fire, create a folder (if does not exist) "/sdcard/gscript", and unpack this zip file in "/sdcard/gscript" (so all *bins sit in this directory)

[*]Download the attached "flash453.zip", copy to "/sdcard/gscript", unpack

Run the bat from WindowsAutoTWRP_v03 in section "101" at least once

Go to Gscript/Add script/Need Su (yes, check)/Load file "flash_453_stay.sh"

From Gscript run this "flash_453_stay.sh", and verify the checksums

If you are using versions prior to FireOS 5.1.2, you can use "flash_453.sh" and you should end up in TWRP (it will reboot automatically)

If unhappy about auto-reboot, use "flash_453_stay.sh" script, it will only do "dd" and exit back to the current OS (no auto-reboot to recovery)

B - Alternative (old) instructions via ADB

Download the attached "453_key_images.zip" to your Fire, create a folder "/sdcard/gscript", and unpack this zip file in "/sdcard/gscript". From the PC side, open ADB and start typing :

adb shell

su

cd /sdcard/gscript

ls

dd if=453_tee1.img of=/dev/block/mmcblk0p3

dd if=453_uboot.img of=/dev/block/mmcblk0p5

dd if=453_twrp.img of=/dev/block/mmcblk0p7

exit

exit

adb reboot recovery

These are 4.5.3 bootloaders, and TWRP. Just like in the good old days under FireOS 4.5.x

This is a sample log, your output should look similar (typed commands are colored in red) :

Reboot into recovery, and you should be in TWRP.

C - What am I doing in TWRP ???

-- Well, you tell me ;)

Generally, you want to flash something (Xposed, GAPPS?). Keep flashing whatever else you need! Note that at this point you won't be able to boot into 5.2.x, siegesoldier has established this fact with his early upgrade attempts. 4.5.3 bootloaders will not boot 5.2.x kernel due to some missing parameters !

When you want to go back to Lollipop, in TWRP flash the attached 5.4.1_1133_stock_recovery_uboot.zip (or 5.5.2_1534_stock_recovery_uboot.zip). This will put 5.4.1 (or 5.5.2) bootloaders back, as well as 5.2.0 stock recovery. Note if you are sure that you never had 5.4.1, 5.2.2u3 or 5.2.2u2 bootloaders running (or stock FireOS 4.5.5.1), use 5.2.0_stock_recovery_uboot.zip (this is rare now, be very sure !!!) If you forget to flash the 5.x.x bootloaders, the device will cycle upon reboot with the Amazon logo continuously. This is not a big issue ! Just hold the power button until the Fire shuts off. Then from the turned off state turn it on by pressing power and Vol+ buttons together, and this will get you back into TWRP where you can flash the 5.x.x bootloaders and reboot to Lollipop.

Now reboot to system, and you should have your Lollipop :p

Want to say thanks by clicking the "Thanks" button ? ;)