Once your device is rooted and you begin tinkering with mods and custom ROMs, a nandroid backup will start coming very handy. Who knows when your device will suddenly malfunction? But now with your backup, you will always have a fail-safe ‘undo’ button. If you don't know how to create a nandroid backup, the steps are very simple. Also read: How to Bypass Lock Screen Security on Android (Pattern /Pin /Password) You must have a custom recovery (TWRP is the current favorite), and there will be an option to create a backup in the recovery main screen itself. Don't do anything with the check boxes, just swipe right at the bottom to start creating a backup. Based on installed apps and data, a nandroid backup can take up several gigs of SD Card storage. When the process is complete, go back to the main screen and reboot. Everything works fine until now, but then you choose to encrypt your phone with a password. Now if you wish to restore another backup with a different password, several problems may arise. At times, you will need both the new password (during boot) and the old password (screen unlock), to use your device. This can be easily fixed, simply head over to Settings, Security and reset your password. Don't miss: How to Change Android Device Model Name on Marshmallow and Nougat
Steps to Fix PIN Errors After Restoring Nandroid Backup in TWRPAnother more complicated scenario may arise when none of the passwords can unlock the lock screen. There are two ways to fix this problem:
Using TWRP File Manager
- Reboot into recovery mode. If asked for a password, enter the recent one.
- Select Advanced, then tap File Manager.
- Navigate to /data/system directory.
- Now delete the files with .key extension as well as those containing the word 'locksettings’. In total, it should be five files.
- Now reboot your device again. If prompted to install SuperSU, choose do not install.
Flash a zip fileInstead of shuffling through tons of files and folders, you can simply flash a package to do the same things, only faster. This package was created by Primokorn, a recognized XDA contributor, specifically for One Plus 3T, but it should also work in other stock ROMs. The package deletes the following files:
- If you want to remove the 5 files mentioned above: lockscreen-removed-signed.zip
- If you would like to remove only the LockSettings file: lockscreen-removed-v2-signed.zip