Saturday, December 21, 2019

Using ADB to change the screen lock


I am looking for a way to change the screen lock type from slide to password, and set the password via adb command line. I have a device with the setup I want, and one that has slide lock. I'm pretty sure this can be accomplished via sqlite3 "copy paste" of some fields, but not sure which fields, and how to do it. I'm open to pretty much all ideas except using adb shell input commands to accomplish this. Meaning - I can/know how to/am currently using commands input swipe input text input tap commands to change swipe unlock to password unlock.


edit1: clarified adb shell input, and yes, my phone is rooted.


edit2: relevant links:
How to change lock screen type
Pass encryption on android

According to the post in the first link, it should be easy to change the lockscreen type, the only problem is that I cannot find the lockscreen.password_type field in the database they refer to. Has it moved in 4.3? After reading through the article in the second link my idea became to use the salt number stored in the database to hash out a new password using the device specific salt, and override the existing (if any) password. I'm still trying to figure out how to do this.





No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...