4

I have a rooted Nexus 5 (Lollipop 5.1) which just decided to restart itself and clear out my saved WiFi passwords!

Luckily I make regular manual backups of the wpa_supplicant.conf file from /data/misc/wifi to /sdcard.

However I am trying to restore this file so that the networks appear again under Wifi > Saved Networks but I am having no luck!

I have tried to copy the file from /sdcard to /data/misc/wifi and /system/etc/wifi (even though I'm pretty sure it's the one in /data that Android uses) using ES File Explorer. The networks do not show up and after restarting the phone, the file in /data resets itself and the one in /system is remains.

I have also tried copying the file using Terminal Emulator and also running chown on the file in /data but this also hasn't worked.

Any ideas as to why Android doesn't accept the restored file?

  • 1
    My guess would be that it is loaded into RAM before you can copy it over, and then saved back from RAM on shutdown. Possibly you could create an update.zip and flash it from Recovery. – Matthew Read Mar 23 '15 at 17:40
3

In my case it was necessary to change the owner and group of the file to wifi:

mount -o rw,remount /system
chown wifi:wifi /data/misc/wifi/wpa_supplicant.conf
ls -la /data/misc/wifi/wpa_supplicant.conf
-rw-rw---- wifi     wifi         2343 2016-07-11 10:31 wpa_supplicant.conf

Note: you need a rooted device to do that.

protected by Community Jan 12 '16 at 8:50

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.