diff --git a/README.md b/README.md index 6820328..759c692 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ -# reset_android_gatekeeper_password +# Reset Android M Password + +Script cleans lockscreen pattern/password/PIN (not fingerprint) from rooted Android M. + +To use: +1. Connect device via USB +2. Make sure ``adb devices`` detects the device +3. Run: +``` +./clean_lock_password.sh +``` + +Script will remove password and pattern from android filesystem and replace locksettings database. diff --git a/clean_lock_passwd.sh b/clean_lock_passwd.sh new file mode 100644 index 0000000..20dea65 --- /dev/null +++ b/clean_lock_passwd.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +adb root +adb remount + +# Remove old passwords +adb shell rm /data/system/gatekeeper.password.key +adb shell touch /data/system/gatekeeper.password.key +adb shell rm /data/system/gatekeeper.pattern.key +adb shell touch /data/system/gatekeeper.password.key + +# Copy virgin version of locksettings DB +adb push locksettings.db-shm /data/system/ +adb push locksettings.db-wal /data/system/ + +adb reboot diff --git a/locksettings.db-shm b/locksettings.db-shm new file mode 100644 index 0000000..d2d9660 Binary files /dev/null and b/locksettings.db-shm differ diff --git a/locksettings.db-wal b/locksettings.db-wal new file mode 100644 index 0000000..88e689f Binary files /dev/null and b/locksettings.db-wal differ