Android: Trying to unlock real device: Weak credential type

Hi

Platform: Android
Appium: 2.0 Beta

I have set the capabilities as described in the documentation:

 desiredCapabilities.setCapability("unlockType", "pin");
 desiredCapabilities.setCapability("unlockKey", "1258");

… but when I run my tests (while screen is locked), I’m getting the error:

Original error: Cannot clear device lock credential. Original error: New credential doesn’t satisfy admin policies: Weak credential type

Any idea how to solve this issue?

Most likely the device under test has MDM or some other policies configured that prevent it to have no lock. And in order to unlock the device one must basically remove it and then set again from the command line. I assume the first step miserably fails. You could try to select another unlock strategy as a possible workaround

1 Like

Yes, that is exactly what it is, but I don’t have permission to remove it (for now). Thanks for your answer.