A simple script to use the biometric sensor on an Android device as an authentication method and type long master passwords into a PC through a USB cable.
demo.mp4
- It is not a full-featured password manager, It merely remembers and types a few long passwords.
- There are alternatives like Keepass2Android + K2AUSBKeyboard, but I prefer my own simple script.
- Typing long passwords repeatedly can be tedious.
- Keepass(xc) on Linux doesn't support fingerprint yet (Seems like it's planned in 2.8.x but who knows...).
- It's hard to buy a Linux-compatible fingerprint sensor that supports libfprint for desktop PC.
- I have an old rooted Android phone that is otherwise useless and collecting dust in my drawer.
The core operation flow of this script looks like this:
The idea is partially taken from This post. Signed nonce is used as the encryption key since termux-keystore doesn't support encrypting/decrypting data currently.
- Rooted Android phone with
4.x
or5.x
kernel (or customized3.x
kernel with HID enabled). - Termux environment (with root access, of course). Packages needed:
termux
,termux-api
: For accessing keystore and fingerprint sensorfzf
: For the menuopenssl
: For encrypting the password