BlackBerry KEY2 Generic (blackberry-key2-generic)
|
KEY2 (left) and Key2 LE (right) running sxmo | |
| Manufacturer | BlackBerry |
|---|---|
| Name | KEY2 Generic |
| Codename | blackberry-key2-generic |
| Released | 2018 |
| Type | generic |
| Hardware | |
| Chipset |
Qualcomm Snapdragon 660 (SDM660) Qualcomm Snapdragon 636 (SDM636) |
| CPU |
Octa-core (4x1.8 GHz Kryo 260 Gold 4x1.6 GHz Kryo 260 Silver) |
| GPU | Adreno 509 / Adreno 512 |
| Display | 1620x1080@60Hz 4.5" IPS LCD |
| Storage | 32/64GB |
| Memory | 6GB / 4GB |
| Architecture | aarch64 |
| Software | |
Original software The software and version the device was shipped with. |
Android 8.1 Oreo |
Extended version The most recent supported version from the manufacturer. |
Android 8.1 Oreo |
| FOSS bootloader | no |
| postmarketOS | |
| Category | testing |
Pre-built images Whether pre-built images are available from the postmarketOS Installation page. |
no |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
yes |
pmOS kernel The kernel version that runs on the device's port. |
6.17.4 |
Unixbench score Unixbench Whetstone/Dhrystone score. See Unixbench. |
2125.9 |
| Device package |
|
| Kernel package | linux-postmarketos-qcom-sdm660 |
| Firmware package | firmware-blackberry-key2-generic |
Initial MR Initial merge request. |
pmaports!6830 |
Flashing Whether it is possible to flash the device with pmbootstrap flasher. |
Partial
|
|---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
Works
|
Internal storage eMMC, SD cards, UFS... |
Works
|
SD card Also includes other external storage cards. |
Works
|
Battery Whether charging and battery level reporting work. |
Partial
|
Screen Whether the display works; ideally with sleep mode and brightness control. |
Works
|
Touchscreen |
Works
|
Keyboard Whether the built-in physical keyboard works. |
Works
|
| Multimedia | |
3D Acceleration |
Partial
|
Audio Audio playback, microphone, headset and buttons. |
Broken
|
Camera |
Broken
|
Camera Flash |
Broken
|
| Connectivity | |
WiFi |
Works
|
Bluetooth |
Works
|
GPS |
Broken
|
NFC Near Field Communication |
Broken
|
| Modem | |
Calls |
Broken
|
SMS |
Broken
|
Mobile data |
Broken
|
| Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Untested
|
USB OTG USB On-The-Go or USB-C Role switching. |
Broken
|
HDMI/DP Video and audio output with HDMI or DisplayPort. |
Untested
|
| Sensors | |
Accelerometer Handles automatic screen rotation in many interfaces. |
Works
|
Ambient Light Measures the light level; used for automatic screen dimming in many interfaces. |
Untested
|
Hall Effect Measures magnetic fields; usually used as a flip cover sensor |
Untested
|
Haptics |
Broken
|
Power Sensor Sensor to monitor current, voltage and power. Not fuel gauge! |
Untested
|
Primary Bootloader Whether it is possible to replace stock bootloader with U-Boot. |
Broken
|
|---|---|
Secondary Bootloader Whether it is possible to chainload U-Boot from stock bootloader. |
Works
|
Mainline Whether latest upstream versions of U-Boot are not broken and it is possible to use them. |
Partial
|
Internal Storage Whether it is possible to boot from internal storage (e.g. eMMC or UFS). |
Works
|
SD card Whether it is possible to boot from SD card. |
Works
|
USB Host Whether it is possible to boot from a USB storage or connect a keyboard. |
Untested
|
USB Peripheral Whether it is possible to use device as a peripheral in U-Boot, e.g. for fastboot mode. |
Works
|
Display |
Works
|
Keyboard |
Broken
|
Buttons Whether it is possible to navigate in boot menu or grub with volume and power buttons. |
Works
|
This is a generic device port consolidating BlackBerry KEY2 (blackberry-athena) and BlackBerry KEY2 LE (blackberry-luna).
Contributors
Maintainers
Users owning this device
KEY2 (athena)
- BotchedRPR (Notes: Works, LineageOS 22.2)
- DiabloSat (Notes: without display)
- Jarocks
- R00t
- Sajattack (Notes: BOE / Livata Variant)
KEY2 LE (luna)
- BotchedRPR (Notes: Works, audio subsystem dead. LineageOS 22.2)
- DiabloSat (Notes: bought for 3000 UAH, slightly damaged case)
- Jarocks
- R00t
- Sajattack (Notes: BOE / Livata Variant)
Status
The port runs with feature support as indicated. GPU crash is pretty consistently hanging the device.
You will want to use a UI not relying on 3D acceleration (e.g. sxmo-dwm), also see instructions to disable GPU usage in post-installation setup below.
Also, the tethered unlock requires that the device is connected to a PC (or other device that can run the exploit) for booting.
Variants
Display panel
Both the Key2 and Key2 LE were manufactured with either of two different display panels.
Currently only the boe ("livata") panel is fully supported with a working driver in pmaports.
If you have the other panel, synaptics, driver/devicetree support is in sdm660-mainline, but not yet in pmaports. Therefore you will need to build the 6.18.y branch of sdm660-mainline yourself (recommended to use Envkernel), or wait for 6.18.y to be released in pmaports.
| This page could use some expansion. If you'd like to help out, feel free to edit this article!
In particular: find out if there is a way to get that info from un-rooted android (probably not) |
To find out which one your device has before attempting an installation, you can boot the android recovery, open the included terminal or connect via adb shell, and run:
# dmesg | grep Panel.Name
The log should have either of:
mdss_dsi_panel_init: Panel Name = Livata video mode dsi panel(this is the panel namedboein the port)mdss_dsi_panel_init: Panel Name = Synaptics video mode dsi panel(this is the panel namedsynapticsin the port.)
(If there is no output at all, the message most likely scrolled out of the log buffer, which happens a few minutes after boot.)
How to enter flash mode
Hold while powering on, easy.
(Once you have flashed custom software, the device will ALWAYS boot into fastboot mode, because it refuses to boot unsigned software, see below.)
Bootloader Unlock
There is no official way to unlock the bootloader on these devices. The bootloader/device will only accept to flash or boot images signed by the manufacturer.
In December 2024 a tethered exploit was released (download link in links section) that manipulates the bootloader into allowing to flash and boot unsigned software. Tethered means that everytime you power-up or reboot the device, you will need to connect it to another device (typically a computer) to execute the exploit to run your custom software (i.e. postmarketOS).
(The authors claim and demonstrate to also have an untethered exploit that permanently unlocks the bootloader, but it's unclear if or when this will be publicly released.)

| WARNING: Even more than on other devices, one needs to be extremely careful manipulating the data on the internal flash. Due to the heavily locked down nature of the Blackberry devices, it is easily possible to get the device into a state where it can neither boot nor be re-flashed, with no known way to recover ("bricked", permanently). |
The exploit ships with (and by default installs and runs) a custom android recovery, it is suggested to use that (or U-Boot later) to first make a backup of all your data and all system partitions.
Backup
Replace orangefox.img in the exploit with u-boot.img, built from sdm660-mainline, then call the script ./run-twrp.sh to start U-Boot. It may take a few tries for the exploit to work.
Hold while it's booting to get a bootloader menu.
In the bootloader menu select "USB Mass Storage mode" and you should be able to see the Android internal partitions on your PC over USB.
Then make a new folder and run the backup script.
Installation
This port is currently in an early stage, but the code is published, and if you are feeling adventurous, you can build it and install/run it on your device.
Advanced knowledge of Linux and some experience with embedded software development is recommended.
(There are no pre-built images, installation via pmbootstrap is required.)
Read and understand the source install instructions (Installation/Using pmbootstrap). You might even want to try this with another, more mature port (on another device!) first, to familiarize yourself with the process.
You will have to install the most recent version of pmbootstrap from git, any version shipped by your distro is most likely outdated.
When running pmbootstrap init select vendor blackberry, device key2-generic. For the user interface you will probably want to select sxmo-dwm until the GPU crash issue is resolved, as Sxmo is the only interface usable (albeit advanced) on a phone without hardware 3D acceleration.
Run pmbootstrap install --split to generate separate boot and rootfs images.
The port uses an EFI boot setup via U-Boot instead of the more usual android bootimg, the boot image generated by pmbootstrap is an EFI system partition that cannot be booted directly.
You will have to obtain U-Boot for the device separately, as it's not included in pmaports. Prebuilt binaries are available here.
You will need to be logged in to access the download:
More details can be found in pmaports MR !7199.
Once you have all this built, you can install on the device.
| WARNING: Even more than on other devices, one needs to be extremely careful manipulating the data on the internal flash. Due to the heavily locked down nature of the Blackberry devices, it is easily possible to get the device into a state where it can neither boot nor be re-flashed, with no known way to recover ("bricked", permanently) |
If not done previously for backup purposes (recommended!), flash the U-Boot bootimg into the recovery partition (by modifying the script provided with the k2fb exploit, adjusting it to flash it instead of the android recovery).
You can flash the postmarketOS boot and root image to any partition on the internal flash (or an sdcard partition, which is safer), using cache for the boot image and system or userdata for the root image has been tested. (One may want to flash root to userdatato have more space (but forego the option to re-flash without data loss), or mount the userdata partition at /home later to have space for data.)
You can install the boot/root partitions either with fastboot, or U-Boot USB mass storage (typically more reliable).
Fastboot
Make sure you have run the exploit to temporarily unlock the bootloader.
fastboot flash recovery u-boot.img fastboot flash cache blackberry-key2-generic-boot.img fastboot flash userdata blackberry-key2-generic-root.img
U-Boot
You will initially need to use the exploit and fastboot to flash the U-Boot bootimg to the recovery partition and boot it.
- Enter the U-Boot menu by holding while U-Boot starts (after k2fb has sent the fastboot "get-flash-status" command)
- Select "USB Mass Storage"
- You should now have all the internal partitions of your phone visible on your computer over USB
dd if=blackberry-key2-generic-boot.img of=/dev/disk/by-partlabel/cache oflag=direct bs=8M status=progress dd if=blackberry-key2-generic-root.img of=/dev/disk/by-partlabel/userdata oflag=direct bs=8M status=progress
Post-installation setup
Some things that are currently broken or not yet automatically set up need to be fixed after installation:
If the device boots but you can't operate it, it should be possible to access it remotely via USB Networking. You can also setup WiFi (via the Sxmo UI, or after logging in via USB) and then use that for SSH access.
(This does not seem to suffice anymore, with a more recent kernel the screen blacks out unless the gpu driver is also blacklisted, see below.)
GPU
Until the GPU crash is fixed, you will want to disable graphics acceleration completely.
create /etc/profile.d/force-swrast.sh ahd write the following contents
export LIBGL_ALWAYS_SOFTWARE=1 export QT_XCB_FORCE_SOFTWARE_OPENGL=1 export MESA_LOADER_DRIVER_OVERRIDE=kms_swrast
Keyboard
If you're using systemd, run the following command, which should in theory set the correct keymap for X11 and Wayland, but in practice may do nothing, depending upon how the desktop environment chooses to respect locale settings:
localectl set-x11-keymap us pc key2
If you're using X11, ensure you install device-blackberry-key2-generic-x11, which contains rules to setup xkb.
If you're using Phosh, you may still have to go into the keyboard settings and select english -> us -> English (US, BlackBerry KEY2).
See also
- pmaports MR (merged)
- Kernel MR (merged)
- U-Boot commit (upcoming autobuild, build/install instructions)
- Tethered bootloader unlock blog
- key2-freeboot recovery toolset (tethered variant) for free and public use windows: by ai10 and contributors
- Linux version of tethered bootloader unlock (decompiled to Python)
- Untethered bootloader unlock, Windows only
- Open source untethered bootloader unlock for linux
- Discord development channel
- Stock OS for KEY2 LE ACT575
- Stock OS for KEY2 ACQ160
