I am writing automation test scripts in python using appium and the application being tested requires that the device have the screen lock enabled. The script will uninstall the app if it's present and install a new copy, but will only proceed if the device/screen lock is enabled. What I'm looking for is a way to programmatically unlock the device with a passcode. This can be with appium or via a command line and the device can't be jailbroken.
The only thing that I have tried (and can think of) is with the appium device unlock, but this only works when there is no passcode.
Ideally, the solution would be a lot like this, but only for iOS: How to unlock android phone through ADB