Installing KUAL and MRPI
You will need to install KUAL (Kindle Unified Application Launcher) and MRPI (MobileRead Package Installer) to run homebrew on your Kindle.
Download the correct KUAL version
The above version of KUAL is provided by HackerDude
KUAL - For legacy devices
Extracting MRPI
Extract the contents of the MRPI tar file you downloaded, and copy the extensions and mrpackages folders to your Kindle

Extracting/Copying KUAL
If you downloaded KUAL for legacy devices, extract the .tar.xz file you downloaded to get the Update_KUALBooklet_*_install.bin file
The above step does not apply if you downloaded KUAL (Coplate)
Now, find the Update_KUALBooklet_*_install.bin file and copy it to your Kindle's mrpackages folder

Eject and unplug your Kindle

Running MRPI
On your Kindle, type ;log mrpi into the search bar and hit enter

Done
Now wait whilst KUAL is installed, your Kindle screen turns white and shows some icons, after a while you will be returned to your library and see a KUAL book appear in it.
If you see a "Application Error" dialog, you can close it without worry - this is normal behaviour on some modern Kindles

Troubleshooting
- The installation of
Update_KUALBooklet_hotfix_*_install.binmay fail if there is not enough free space on your Kindle. If you are using the “fill storage” method to block updates, make sure to free up some space before proceeding with these steps. - Verify the location of all the folders and files on the Kindle
- Try copying the
Update_KUALBooklet_hotfix_*_install.binfile to the root of your Kindle when connected to your PC, and then go toSettings>Update Your Kindle, then resume fromstep 5