Android Debug Bridge (ADB)
If your phone has USB debugging turned on, hackers can delete the password file using a desktop tool called Android Debug Bridge (ADB). A hacker can connect your Android phone to a computer via USB and simply run a command via a command prompt window from an ADB directory.
To prevent this hack, make sure you disable USB debugging on your Android phone by going to Settings >> Developer Options (If enabled) >> scroll down to Debugging then toggle USB debugging to off.
Alternatively, you can turn off Developer options altogether.
Important: If you don’t have the Developer options on your Settings app, don’t worry, it’s not turned on by default. It is a secret section recommended strictly for advanced users. The secret way to turn it on is by going to Settings >> About Phone then scroll down to the Build Number and tap it seven times.
Booting into safe mode
If you’re using a third-party app to lock your screen, hackers can simply boot into safe mode to bypass that lock screen.
For most Android phones, Safe Mode can be easily accessed by holding the power button until the “Power off” menu pops up, then press this menu until you’re given an option to boot into Safe mode. Third-party lock screens will then be bypassed on Safe Mode and a hacker could simply uninstall them.
To prevent this from happening to you, don’t rely on third-party lock screen apps. Not only are they security risks themselves, they can be bypassed easily.