buffybox/README.md
Johannes Marbach 33ad24082c Fix typo
2021-09-05 13:25:29 +02:00

3.4 KiB

Unl0kr

Proof-of-concept framebuffer-based disk unlocker for the initramfs based on lvgl.

Disclaimer: Doesn't actually unlock anything 😜

About

This is an experiment that attempts to evaluate the fitness of lvgl to build a graphical user interface on the Linux framebuffer for unlocking encrypted hard drives during boot. It's neither functional nor meant to replace postmarketOS/osk-sdl. For background see postmarketOS/osk-sdl#121.

Status

The biggest obstacle is input processing. lv_drivers provides an evdev interface (supporting touchscreens, pointer devices and keypads) and a libinput interface (supporting touchscreens only). Presently there is no support for full physical keyboards (short of using the SDL interface) and no automated device detection. Additonally, the drivers can currently not be used with multiple devices at the same time.

What works

  • Password-entry UI including on-screen keyboard on the framebuffer
  • Input device discovery for keyboards, mice and trackpads
  • On-screen keyboard control via one or more mouse / trackpad (including cursor)
  • On-screen keyboard control via one or more hardware keyboard (including support for multiple layouts using XKB)
    • Works great on my laptop keyboard but occasionally drops keys on my Ergodox EZ)
  • On-screen keyboard control via touchscreen (tested on PinePhone)

To do

... everything else ...

Upstreaming

As far as feasible and sensible, lvgl and lv_drivers fixes and enhancements are being upstreamed. Ideally all code outside of main.c should be contributed back but I'm not yet sure if that will be possible.

Upstreamed contributions so far:

Operation

Dependencies

Testing

For development and testing you can run the app in a VT. sudo is needed to access input device files.

$ make
$ sudo chvt 2
$ sudo ./unl0kr

Acknowledgements

The lv_port_linux_frame_buffer project served as a starting point for the codebase. The mouse cursor image was taken from lv_sim_emscripten.

License

Unl0kr is licensed under the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.