Set screenlock setting interactively

Got it figured out.

1. Update settings.db using adb shell

shell@msm8974:/ $ su
shell@msm8974:/ # sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite3> update secure set value=1 where name='lockscreen.disabled';
sqlite3> .quit

2. Move or delete locksettings files

shell@msm8974:/ # mkdir /data/system/lock
shell@msm8974:/ # mv /data/system/locksettings* lock

adb reboot and good to go.


If there is no sqlite installed on the device use the following

1. Set Settings

adb shell settings put secure lockscreen.disabled 1

2. reboot to recovery

adb reboot recovery

3. remove locksettings db files

adb shell rm /data/system/locksettings.db
adb shell rm /data/system/locksettings.db-shm
adb shell rm /data/system/locksettings.db-wal