BlackBerry KEY2/LE bootloader unlock + LineageOS 22.2 install guide

WARNING: The BlackBerry Key2 LE build is unstable. Most notably, it has broken audio playback. Please consider this before installing.

Also, please excuse the quality of the tutorial - I am not the best at them.
Of course, make sure that any important data is gone from the device before starting.
I assume that you have already installed Google Platform Tools (adb, fastboot) on your PC before starting. If you are unable to do that, please do not continue with this tutorial.
The pictures show the state of the device/PC at the end of the step mentioned.

If you see write: in a step, it is not part of a command, but an indication that you need to copy/retype something, then press enter.
When you see |Path to ...| in a step, you can obviously type it in manually, but most of the times you can drag in the file to the command prompt window to achieve the same effect.
Step 1

1. Remove any device passwords and Google accounts

Before doing anything, remove all lock screen passwords and deregister the device from Google.

Step 2

2. Install the BlackBerry USB drivers

You can grab them from the link:

here
Step 3

3. Prepare the unlock tools

Download the Bootloader Unlock Tool from the link:

here

- Credits to companies Aiterium-X (www.ai10.ru), Unlock Sevice (@unlock_service54)

You may also need the latest Visual C++ Runtime libraries, which you can get from Microsoft:

here (please download and install both x86 and x64)
Step 4

4. Prepare your device for unlocking

After confirming that no lockscreen passwords are set, and all Google accounts have been removed, unplug the device from any power source, then power it off.

Step 5

5. Prepare for flashing prerequisite firmware

When the device is fully off, hold down the VOLUME DOWN and POWER keys simultaneously. Your device will enter the BootLoader Menu. This is also called Fastboot mode.

Step 6

6. Flash prerequisite firmware

Even if you are already running ACQ160, your boot chain may be out of sync. Please download ACQ160 autoloader, and run "flashall.sh". Wait for the device to reboot into the "Hello there" screen, and then repeat from step 4.
Yes, flash the firmware TWICE.

Download ACQ160 autoloader here
Step 7

7. Unlock the bootloader

Reboot the device to Bootloader mode again (Step 4/5)
Unpack and run the Bootloader Unlock tool. Then, select the Unlock button.

Do not touch the device until the process completes.
After the process completes, you will see MODE change from PRODUCT to FACTORY.
After you unlock, select option 3 with the volume buttons, and click the power button. You will end up in the Bootloader again.

Step 8

8. Boot LineageOS recovery

Download the LineageOS recovery image (from XDA), then open a command prompt, and:
write: fastboot flash recovery |path to LineageOS recovery image|
write: fastboot flash boot |path to LineageOS recovery image| reboot
After a minute, your device should start up at the LineageOS recovery menu.

Step 9

9. Wipe data

Tap "Factory reset", then "Format data/factory reset", then confirm with "Yes".

Step 10

10. Install LineageOS

On the device, click "Apply update", then "From ADB".
In the same command prompt as before,
write: adb sideload |path to LineageOS zip|
Wait for the process to continue, which should kick you back to the main Recovery menu.
Please confirm that the "Install completed with status 0" message appeared - it indicates a succesful install.

Step 11

11. Install addons

If you, for example, require any Google Services or other addons, now is the time to install them. For every addon that you wish to install:
On the device, click "Apply update", then "ADB Sideload".
In the same command prompt as before,
write: adb sideload |path to addon zip|
Wait for the process to continue, which should kick you back to the main Recovery menu.

Handy link to LineageOS wiki page for Google Services. You need the ARM64 variant.
Step 12

12. Enjoy!

That's all! You can now click "Reboot system" and enjoy your "reactivated" phone!
Note: The first boot may take up to 10 minutes, and the phone may reboot multiple times to write MAC addresses.
If the device does not boot after 10 minutes, hangs somewhere, please retry the entire process from step 6 (skipping step 7, as you've already permanently unlocked).