Unable to set lock pin for Android apps requiring it

I’ve managed to get the Rail Planner app working! (At least well enough to start adding a rail pass, though I haven’t tried activating the pass yet.) Basically, I made a small fix that improves compatibility with various lockscreen/PIN-related things.

As of now, the fix only works if AppSupport is running Android 13, not Android 11 unfortunately. As it requires multiple files to be installed I packaged it up as an RPM - get it from here. After installing it, restart Android AppSupport, and if desired set an Android PIN via the Android settings (Settings → Android AppSupport → press on “Android version” 5 times).

I’d be interested to know if it also helps with any other apps. It won’t help with Revolut (since the problem there is that it detects the device as rooted) or with apps that need fingerprint ID etc, but it might help with apps that need a PIN to be set. The code is experimental and may misbehave. If it does it should just be a matter of uninstalling the RPM, but still, install at your own risk.

Source code is here if you want to build it yourself.

Some technical info: AppSupport disables the built-in Android KeyguardService, which is one of the components that manages the lock screen. Unfortunately this means that some lockscreen-related APIs fail, for example, KeyguardManager.isKeyguardSecure(), which is supposed to check if a PIN is installed, always returns false. This is what was causing Rail Planner to fail. So, the fix installs a replacement KeyguardService which stubs out most of the operations, just doing the bare minimum to pretend that the Android lock screen is working. With this in place the lockscreen-related APIs behave more sensibly. The RPM also includes an init file that starts the gatekeeper service following @nekron’s idea.

12 Likes