Skip to content

locksettings | Cheatsheet


Checks whether lock screen is disabled

adb shell cmd lock_settings get-disabled --old 1234

Clears the lock credentials

adb shell cmd lock_settings clear --old 1234 --user 0 

Gets whether synthetic password is enabled

adb shell cmd lock_settings sp --old 1234

Enables synthetic password

adb shell cmd lock_settings sp --old 1234 --user 0 1

Disables synthetic password

adb shell cmd lock_settings sp --old 1234 --user 0 0

Verifies the lock credentials

adb shell cmd lock_settings verify --old 1234 --user 0 

Removes cached unified challenge for the managed profile

adb shell cmd lock_settings remove-cache --user 0 

Sets the lock screen as password, using the given PASSWORD to unlock

adb shell cmd lock_settings set-password --old 1234 --user 0 'newPassword'

Sets the lock screen as PIN, using the given PIN to unlock

adb shell cmd lock_settings set-pin --old 1234 --user 0 'newPin'

Sets the lock screen as pattern, using the given PATTERN to unlock

adb shell cmd lock_settings set-pattern --old 1234 --user 0 'newPattern'

When true, disables lock screen

adb shell cmd lock_settings set-disabled --old 1234 --user 0 true

When false, enables lock screen

adb shell cmd lock_settings set-disabled --old 1234 --user 0 false