Sometimes life just gets in the way of things we love doing. Case in point, me and hacking my Nexus phones. Even though in my Ausdroid Bio it states that I have my “finger on the pulse of all things ‘moddable'” I have not had the time, nor the inclination to modify my phone in any way for quite a while. Lately though, since the arrival of Nougat to my Nexus 6P I’ve found myself missing a lot of the features that Google thinks we do not need (such as the advanced power button functions — ie. reboot, hot reboot etc). After flashing a custom ROM at 11pm the other night I encountered an issue that I had totally forgotten about.
Personally I blame Google (tongue in cheek people). All this security (DM-verity and the like) has made it increasingly difficult for those of us who do like to hack their phones. There was once a time where you could easily hack you phone and restore it at a moments notice to a previous state — all hacking advice here Ausdroid is preceded by the advice to perform a nandroid (what it was originally known as but the term is used less often these days) backup through your custom recovery.
For a while now if you backed up your phone before performing some form of modification, and you did so while you had any form of lockscreen security enabled, it would lock you out of the phone upon restoring that backup. I often want to test out a new mod (well, when I have time) and the easy way to do it is to perform a nandroid backup, flash the new mod, test it out and then if you don’t like it restore the backup. If you performed the backup with lockscreen security enabled then no code will let you into the phone upon rebooting this restored backup. After running into this issue the other night followed by a lot of Googling there is a relatively easy fix.
To get back into your phone you will need to reboot back into your recovery and perform the following steps:
- Tap on Advanced from the main menu
- Open File Manager
- Navigate to the /data/system folder
- Find and delete the files named:
- • gatekeeper.password.key
Upon rebooting your phone will have no lockscreen security. Head into security settings and setup your security. It does not lose your previously saved fingerprints if you add a new one here either. It just needs you to set one up to get the new lockscreen pattern/code. From here your phone will function as it did before performing your nandroid backup.
I hope you never need this advice but if you do I hope it helps you and saves you many hours and lots of stress.