I am gonna share this information in the chance that it can help someone else in the future.
Background: I was very tired, and as I often do before I fall asleep, I will read web pages on my phone, up til the moment that my eyes fall shut. I was reading about security, and had the hankering at that moment, to set a “pattern screen login.” So, I went to Settings, Security, and “swigged and swagged” my fingers in a matching pattern two times in a row. A felt good, I can sleep now. 30 seconds later, I wanted to check ‘one last thing,’ but could not for the life of me figure out what I had used as a pattern. =(
I am patient, I tried about 40-50+ times, each failure, leading to LONG periods of waiting, before I could try again.
Finally, it shook me, what had just happened!
I got up, and had to resolve this issue. I have 2FA setup on half a dozen account, half of which are REQUIRED work accounts. I didn’t panic, but had to get to my computer.
Searching around and dabbling around a little, I found out the following issues:
- The situation is serious - likely leading to most people hard resetting (losing all their data)
- There are some solutions for people that may have a google account associated with their phone, and/or only in some situations – not sure it even applies for current version FP2 android.
- I didn’t work out the probability for determining the code, simply because the “wait times getting longer per failure.” One minute per attempt was already like an eternity, so going through until found it was not really an option.
Here is what I did.
Preconditions:
- I have a FP2, open source phone. It is rooted (by default).
- I had “USB Debug mode” set on my phone, before I ‘lost control of it.’ I am not sure if this can be set, but maybe it can.
- I have access to all operating systems, at home, and feel most comfortable with Debian. I have the android command line tools already installed, via this command:
sudo apt-get install android-tools-adb android-tools-fastboot - I connected the mobile phone via a USB cable to the computer. I have experienced, that many cables are ONLY good for charging, and thus you need to ensure data can be transferred to the device. In my case, more than half of the USB cables I have in my house will allow full charging and data transfer – I am not enough of a hardware guru to answer how come. But, just be aware, that if your phone doesn’t show up, and you meet all the above conditions, check the cable.
Step-by-step:
I am not super familiar with the adb commands, but the exact sequence should suffice for the uninitiated (like me).
<connect phone, launch command line window/terminal>
-
verify that your device is connected:
adb devices
It should show up in a list if it is. -
get “into the device”
adb shell -
So, now, you can move around (cd), copy files (cp), and move (mv) files, just like any other command line – but now you are within the phone.
-
navigate to the relevant folder.
cd /data/system -
In some guides, it says delete the file “gesture.key” But, that is an older version of android. But, I knew something similar had to exist. I finally found the information in another forum:
https://forum.xda-developers.com/showthread.php?t=1800799&page=3
You will want to delete three files (from within the /data/system/ directory):
rm locksettings.db
rm locksettings.db-wal
rm locksettings.db-shm
I just renamed them (cp locksetting.db locksetting.db.bak, etc), but you can delete them.
- Reboot your machine. Enjoy. The security screen should be gone.
Hopefully this helps someone.