10

Somehow Wi-Fi stopped connecting on my phone. It is not a hardware issue, as it does work when I perform a reset.

What files do I need to delete to get Wi-Fi back working? I don’t want to reset my phone.

If relevant, model is Sony Arc S, using CM9.

Manu
  • 3,094
  • 7
  • 22
  • 40
kinokijuf
  • 499
  • 2
  • 6
  • 27

2 Answers2

12

This has happened to me on several occasions, mostly when backing up/restoring Wifi settings using an app such as TitaniumBackup. Here's what I recommend, starting with the safest solutions:

  1. First try going into the wifi settings and removing the problematic network. While you're there you might as well remove any other unused networks:
    https://support.google.com/android-one/answer/2819519 > Change, add, or remove saved networks > Remove

  2. If that doesn't work, the only remaining option that doesn't require root access is to delete all of your saved networks.

  3. If you don't want to delete all of your saved networks and you have root access, the wifi network settings are kept in a text file (/data/misc/wifi/wpa_supplicant.conf), which can become corrupted. I've been able to fix problems by manually editing the file:

    1. Turn off wifi (if you leave it on, the corrupted wifi settings may get rewritten)
    2. Back up /data/misc/wifi/wpa_supplicant.conf
    3. Edit /data/misc/wifi/wpa_supplicant.conf and remove any problematic networks.
  4. If you've made it this far and you're still having problems, turn off your wifi and delete /data/misc/wifi/wpa_supplicant.conf. Of course this will delete all of your saved networks. The file will be recreated the next time you turn on your wifi.

  5. As a last resort, you can delete /data/misc/wifi, but I don't recommend it. If you do decide to do this, make sure you back it up first. The folder should be recreated on reboot with default settings, then you'll need to set your networks up again.

bmaupin
  • 2,442
  • 21
  • 20
  • How to set network up again from scratch – user3758898 Sep 06 '15 at 09:18
  • If you delete /data/misc/wifi and reboot, your phone should restore default files. Then you'll need to add your wireless networks back one by one. – bmaupin Sep 06 '15 at 22:03
  • I want reset my wifi, for that I removed /data/etc/wifi, /data/misc/dhcp and /data/misc/wifi. But then after WiFi stop working. I also try factory hard reset. – user3758898 Sep 07 '15 at 04:41
  • 1
    Those aren't the steps I recommended to reset your wifi ;) Restore those folders (I'm hoping you backed them up) and try the steps in my answer. If you didn't back up those folders, you may be able to find a download for the ROM you're using and extract them from there. – bmaupin Sep 07 '15 at 12:17
  • Yes I forgot to back up those folder. Can you tell me where I can found It. I have Moto G Dual Sim (xt1033) – user3758898 Sep 08 '15 at 04:38
  • does one need a rooted device to follow your steps ? – Blackbelt Sep 08 '15 at 08:37
  • @Blackbelt Removing networks does not require root, and apparently neither does FXR WiFi fix and rescue. Accessing the /data folder does require root, at least on my phone. – bmaupin Sep 08 '15 at 13:18
  • on my nexus 5, adb shell ls /data returns opendir failed, Permission denied – Blackbelt Sep 08 '15 at 13:31
  • @bmaupin No files are not created. After searching on XDA I found this http://forum.xda-developers.com/general/help/help-deleted-wrong-folders-wifi-anymore-t2887222 . It have same problem. I added files provide on this link. but It not fix my problem – user3758898 Sep 08 '15 at 13:35
  • @Blackbelt Yes, as I mentioned in my previous comment access to the /data folder requires root – bmaupin Sep 08 '15 at 13:39
  • What I understand I need to follow the above 4 steps and then delete this directory /data/misc/wifi. Is it correct ? Thank you for response. – user3758898 Sep 08 '15 at 13:50
  • @bmaupin I followed your steps, but nothing happened. – user3758898 Sep 08 '15 at 14:08
7

I removed /data/etc/wifi, /data/misc/dhcp and /data/misc/wifi and it worked.

kinokijuf
  • 499
  • 2
  • 6
  • 27
  • 4
    For readers: I rejected an edit suggested by a new user for this post who had this to say: "Don't do this. You will simply lose the wi-fi connection function altogether after reboot. This procedure will ruin your wi-fi connection for good and force you to hard reset your phone. Pure sabotage.". // I found it worthy to be mentioned so I posted a comment on the user's behalf. – Firelord Jul 18 '15 at 14:27
  • @Firelord I tried factory reset through setting. only deleted my user data...Wifi still not working – user3758898 Sep 06 '15 at 09:16
  • @kinokijuf It didn't work for me. My phone loses the WiFi connection at night (while charging) and never comes back automatically. This after getting a new modem/router with the new Fiber connection. – Michele Dall'Agata Sep 26 '16 at 09:11