Restore factory configuration after encrypting the phone

I bought a Samsung Galaxy S8 with ‘e’ system installed.
I performed the encryption of the phone.
I tried to restore the factory configuration but nothing works, the configuration remains the same.
Is it possible to decrypt the phone before resetting it?
A long press on the on/off and volume plus button leads nowhere.
Several attempts but without success.
However, I get red messages including unable to boot /data.
A little help, please?

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

you can start TWRP (recovery) via ‘adb reboot recovery’ or via Hardware keys (on Samsung it’s volume up + home + power, as far as I know)

TWRP will ask you for your password. After adding you have access to your data.

A factory reset can also be done via TWRP in wipe menu.

Not sure, but if you will remove your screen lock pin/pattern the device will decryped your phone, but really not sure, because I never have used encryption

Thank you very much, everything’s back to the way it used to be.

No, the device will remain encrypted but nothing will be needed to access the decryption key (which is why TWRP can access the data when no password/PIN is set).

I’ve had problems with encryption, and I’ve used this method to remove passwords.

The Device Won’t Accept Any PIN

This is where things get frustrating. In certain cases, your phone may accept the boot PIN, but not a screen unlock PIN. For this, we are going to completely delete the files that store your PIN ( yes, your PIN is stored in system files that can be deleted – shocking ?).

Delete your Android PIN – TWRP Method

  1. Boot your phone into TWRP recovery.
  2. Go to Advanced > File Manager and navigate to /data/system.
  3. Find the files that end in the .key extension and any files that have “locksettings” in the filename. They will typically be (but vary by manufacturer):

Gatekeeper.password.key
gatekeeper.pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal

  1. After you’ve deleted those files, reboot your phone. You will be greeted by a lock screen, but it will not prompt you for any password or PIN. If it does, you did not delete all the necessary files.
  2. Set a new PIN in your security settings