One of Samsung's flagships, the S7 and S7 Edge, will have to be hard-formatted. If you ever have to, you can follow the steps below.

To hard format Samsung Galaxy S7 and S7 Edge;
First of all, I have to make the following warning, which is important. Make sure your battery is over 50%. Otherwise, if you run out of charge during formatting, you may have trouble.
If you don't have a problem with charging, switch off your phone.
With the phone closed, press and hold the volume up key and the key down while holding down the home keys.
The phone will open and you will see the Samsung logo. Release the keys as soon as you see the Samsung logo.
When you come across the recovery screen, that is, the recovery screen, scroll down with the volume down key, come to “wipe data / factory reset” and select it with the power button.
When you choose, you will be presented with yes / no options. Select the option "reboot system now" on the screen that comes up by selecting Yes. Then confirm it.
Finally, wait until your phone turns on and the setup screen appears.
You can apply hard format to your Samsung Galaxy S7 and S7 Edge by following these steps.