Advertisement
metalx1000

Android lock screen settings from adb

Jun 22nd, 2023 (edited)
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. #Android lock screen settings from adb
  2.  
  3. #set pin
  4. adb shell locksettings set-pin 1234
  5.  
  6. #change pin
  7. adb shell locksettings set-pin --old 1234 5555
  8.  
  9. #clear pin
  10. adb shell locksettings clear --old 5555
  11.  
  12. #disable lock screen swipe
  13. adb shell locksettings set-disabled true
  14.  
  15. #re-enable it
  16. adb shell locksettings set-disabled false
  17.  
  18. #check lock screen setting
  19. adb shell locksettings get-disabled
  20.  
  21. #other options
  22. locksettings set-password [--old OLD_CREDENTIAL] NEW_PASSWORD
  23.  
  24.  
  25. ####Advanced Sqlite info###
  26. #as root
  27.  
  28. #view table
  29. .tables
  30. select * from keyentry;
  31.  
  32. #get column names
  33. PRAGMA table_info(keyentry);
  34.  
  35. #change pin and look for changes
  36. #remove the following columns
  37. # USER_SCREEN_LOCK_BOUND_KEY
  38. # USER_SCREEN_LOCK_BOUND_P521_KEY
  39. # USER_SUPER_KEY
  40. DELETE FROM keyentry WHERE alias="USER_SCREEN_LOCK_BOUND_KEY";
  41. DELETE FROM keyentry WHERE alias="USER_SCREEN_LOCK_BOUND_P521_KEY";
  42. DELETE FROM keyentry WHERE alias="USER_SUPER_KEY";
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement