Back in the day, the (Kindle) Fire could be very easily rooted using the
likes of Kingoroot, Towelroot or ADB based methods. This lasted until OS
version 5.3.1. Version 5.3.2 couldn't be rooted but could be downgraded to
5.3.1 which could. Then version 5.4.0 appeared. It couldn't be
rooted and any attempt to downgrade resulted in a bricked device.
This state of affairs remained until about January 2019 when users xyz
and k4y0z on XDA forums came up with an exploit for the Fire
8 (8th gen). This procedure hijacks the bootloader allowing TWRP
(a custom recovery) to be installed. This then gives the access
required to root the device, by installing SuperSU or Magisk, install custom ROMs, perform nandroid
backups and so on.
The method has since been extended to Fire 7 (5th & 7th gen), Fire 7 (9th gen), Fire 8 (7th gen) and Fire 10 (7th gen).
The process is somewhat adventurous and not for the faint hearted, in my
opinion.
It requires the running of various scripts using Linux, either by a
dedicated PC or via a bootable USB drive. (Fire 7 9th gen instructions say
not to use a Virtual Machine but I don't know about the others). In order
to give the scripts the necessary access to the system you also need to
either downgrade and (temporarily) brick your device or open it up and
short circuit a couple of points on the circuit board, depending on model
and OS version.
Before going this far you may want to consider the Fire Tool Box. This box of tricks will perform
several modifications without root such as;
Installing Google Play Store
Removing home page ads
Deactivating various Amazon apps to free up RAM
Replacing the stock launcher with Nova.
Updates:- If your device has updated to Fire OS 7 then this method may not work or you'll have to use the 'hardware' method. Keep watching XDA for further developments.
There is also a method to temporarily root the Fire HD 10 (9th gen) and install Lineage OS.