This method is not a "bypass" that keeps your data intact. It is a factory reset via software flashing. If you did not back up your data before forgetting the lock, it will be irretrievably lost.
Are you currently stuck on any in Flashtool or Xperia Companion?
Click on the latest available firmware build number in the right-most panel. Click to pull the firmware files.
:
A progress bar at the bottom of Flashtool will track the firmware installation.
Open the folder containing Newflasher and the firmware files. Double-click newflasher.exe .
The Sony Xperia XZ1 (codenamed Poplar , model G8341) launched with Android 8.0 Oreo and is upgradeable to Android 9.0 Pie. Since Android 5.0 Lollipop, Google introduced and file-based encryption. On the G8341, the lock screen credentials (PIN/pattern/password) are stored in a protected partition ( /data/system/locksettings.db ). Simply performing a "Factory Reset" from recovery does not always delete these files on Sony devices due to persistent encryption keys.
