My phone stopped remembering wifi passwords! For some reason that completely escaped me, this here Samsung S3 mini stopped connecting automatically to my home network, always requiring me to re-type the wifi password.

Since then, I noticed that it's not just for my home network, but for all wifi networks.

More concretely, here's a sample of what happens:


I try to connect to a WPA-protected wifi.
Android asks for the password.
After I provide it, the phone connects successfully.
I turn off the wifi (on the phone).
I turn it back on.
The phone doesn't auto-connect to the wifi.
I explicitly select the wifi network to connect to.
Android again asks for the password I typed in a minute earlier.


Any idea how that can happen?  What could I have done to deserve this?  What could I do to redeem myself and fix this problem?

More details: "forget"thing ("disconnect"ing from) the network explicitly makes no difference (it still doesn't remember the password next time around), rebooting the phone neither.  This phone is running Android-4.4.2, is not rooted.
There is most likely a problem with the phone's /efs/ss_data file. I think it's basically a key for decryption of your Wi-Fi passwords and other things in secure storage. 

Root is required for this fix. 

First we need to confirm it's a problem with secure storage. 


Install BuildProp Editor from Play Store 
Set ro.secure.storage=false
Reboot, setup Wi-Fi &amp; reboot again 


WiFi should now remember passwords if there was an issue with secure storage.

Now let's fix the secure storage issue since we know what's broken.


Set ro.secure.storage=true using  BuildProp Editor
Backup EFS using TWRP/CWM recovery
Delete ss_data in /efs using ES File Explorer in root mode
Reboot, setup Wi-Fi and reboot again


Your Wi-Fi passwords should be remembered now on any ROM/kernel, non rooted and without edits to build.props

Tested ON:
Samsung Galaxy S6 SM-G920T1 MetroPCS Variant on 5.1.1 build DOJC 

Note:
This may work on other devices that require setting ro.secure.storage=false in build.prop for Wi-Fi to remember passwords. I have seen users with Nexus devices experiencing this issue as well. 

SOURCE