There are a few ways to try to save your photos and data if you have forgotten the password for your Samsung Galaxy phone. Here are a few possibilities:
Use Samsung Find My Mobile to remotely unlock your phone if you’ve previously configured Samsung Find My Mobile on your device. Using a computer or other device, go to the Find My Mobile website (findmymobile.samsung.com), log in using your Samsung account information, and search for the option to unlock your phone. The Locate My Mobile feature on your phone must have been turned on before you forgot the password for this approach to work, as well as an active internet connection.
Use Samsung’s Smart Switch: You can restore your data to another device if you have already backed up your Samsung Galaxy phone using Samsung’s Smart Switch software. To restore your data to a compatible Samsung smartphone, install Smart Switch on a computer, connect your phone using a USB cord, and follow the on-screen directions. Keep in mind that for this method to work, a backup must already have been made before you lost your password.
Use Android Debug Bridge (ADB) to communicate with your Android smartphone from a computer. ADB is a command-line program. You can use ADB commands to back up your data if you had USB debugging enabled on your phone prior to losing the password and had access to a computer with ADB installed. It depends on your phone’s model and Android version and takes some technical knowledge.
Ask for expert help: If the aforementioned solutions don’t work or you don’t feel comfortable trying them on your own, you can bring your Samsung Galaxy phone to a certified service center or a qualified technician. They might be able to help you unlock the phone or get your data back.
It’s crucial to keep in mind that these techniques might not always work, and the alternatives you have might depend on the brand and settings of your particular device. It’s advised to routinely back up your data to a secure location, such as cloud storage or a computer, to avoid data loss in the future.
Advanced Advice
You might not have any luck if you don’t know the password and don’t have any pre-set tools that would allow you to recover in the event of a lost password. The best course of action would be to perform a factory reset through recovery and continue using a phone that has been wiped clean (no data). You’ll link the phone to your Google account once it starts up again, and the OS will be essentially fresh.
The steps to factory reset a Samsung phone are listed on their site.

Hi! I’m Eric and I work on the knowledge base at GadgetMates.com. You can see some of my writings about technology, cellphone repair, and computer repair here.
When I’m not writing about tech I’m playing with my dog or hanging out with my girlfriend.
Shoot me a message at ericchan@gadgetmates.com if you want to see a topic discussed or have a correction on something I’ve written.