I am wondering if it is possible to install a new keyboard as the system keyboard. I'd like to do this because I want to use an open-source keyboard (Like AnysoftKeyboard) for typing my encryption password at boot. From what I've read, only the system keyboard is available for use when entering the encryption password.
My phone is rooted, I have adb, and I have a terminal emulator on the phone that can su. If it's possible to do, what is the process? (If it's relevant, my phone is a Galaxy S7)