how i fixed the problem of a nexus 5 being stuck in “turning on wifi” [solution]

[posted: ]  [46 comments]

how i fixed the problem of a nexus 5 being stuck in "turning on wifi" [solution] after a recent crash both in software and hardware terms, my nexus 5 running android lollipop 5.0.1 could no longer activate wifi. when touching the toggle, it would just show “wifi turning on”, but it never got around to actually scanning for wifi networks or even displaying its mac address.
after quite some online research i tried toggling aeroplane mode, deleting /data/misc/wifi (root), doing a factory reset, upgrading to the newest android version (lollipop 5.1.1), flashing other ROMs and kernels, etc. but nothing seemed to work.
since there was also a physical drop involved, i opened the N5 to check if there was anything noticeable in the internals, e.g. the wifi antenna connector being loose, but nothing was obvious. there were also several reports of google replacing wifi-faulty nexus 5 handsets under warranty due to a “hardware” or “motherboard” issue, but i wasn’t quite ready to give up yet.

then i found this post, which detailed how a user just had to manually correct the mac-address in /persist/wifi/.macaddr in order to get it working again. it didn’t work for me, but after lots of toying around with other ideas, i finally just went ahead, opened root explorer, and deleted the entire /persist/wifi folder and rebooted the phone.
lo and behold, wifi is now working again like nothing ever happened.

maybe this will help somebody else in a similar situation?

Be Sociable, Share!
    [category: android] [tags: , , ]

    46 comments on “how i fixed the problem of a nexus 5 being stuck in “turning on wifi” [solution]

    1. Thanks for this post. I've had this issue for a while and gave up on the phone. Left it in a drawer and just used my Nexus 6. Tried this and it worked like a charm. Thanks.
    2. Does your phone need to be rooted? I'm having this issue with a bone stock Nexus 5 on Lollipop 5.1.1. Can I somehow navigate to that folder and delete it?
    3. Yes, you'll need root to do it on your phone. You might also be able to do it on your PC using adb, but I haven't tried myself. The Nexus Root Toolkit (http://www.wugfresh.com/nrt/) can help you with either task, I think.
    4. I'm going to try this tonight, mine is also out of warranty too and the wifi stopped working even after a factory reset.
    5. Hi. did deleting the persist/wifi folder solve the problem permanently?
    6. For me it did.
    7. can you please give step by step procedure, how to root and remove that folder... i am really frustrated with this issue. please it will be helpful
    8. Hi Manoj,
      you should be aware that when you root for the first time, your entire phone will be wiped (including sd storage). The rooting process is quite simple and there are many tutorials on the web. I use Nexus Root Toolkit.
      Once rooted, install Root Explorer from the play store, navigate to /persist and delete or rename the wifi folder.

      Not sure if this works on unrooted phones, but it's worth a try:
      --- ABSOLUTELY no warranty, purely at your own risk. ---
      Open Nexus Root Toolkit, confirm phone model etc., click on "Launch" under "Advanced Utilities" (bottom left) and "Launch CMD Prompt" (bottom left).
      Connect your Nexus 5 via micro-USB cable and reboot to Recovery (google "nexus 5 recovery mode"). In the NRT command prompt, enter these lines:

      adb shell mount /persist
      adb shell mv /persist/wifi /persist/xwifi
      adb reboot


      Just tried this on a spare Nex5 with custom recovery and there it worked.
    9. I rooted but cannot find the /persist folder.... Where is it?
    10. In Root Explorer, I have to navigate to root (/), tap on "mount as r/w", and then refresh the folder via the menu. Then it's there.
    11. found the folder and deleted it but still have the wifi not turning on problem...phone also eats up the entire battery in about 4 hours...ideas?
    12. If rebooting into recovery and clearing the cache doesn't help, it sounds like your phone is plagued by a different problem.
    13. I did a full factory flash stock and unroot reinstall...problem persists...guess so. Thanks for your help
    14. I have found a medium term way of fixing this with no data loss... Basically remove the battery will solve it but - most of the devices that have been impacted (myself included) have batteries that cannot be removed so... drain that sucker until it gives up the will to even turn on and then drain it some more... best way i found was just to turn on the video camera and leave it recording... turning on the flash speeds this up a bit. when it dies, keep trying to turn it on into the android boot menu. (hold on and the volume down key) then if it opens i went to the barcodes menu item and let the screen stay on until it dies...this process can take a good few hours... sometimes it will seem completely dead but will then start an hour later... so basically try get as much juice out of the battery as possible... then plug it back into the charger and wifi should be back to normal... i did this once and then my phone worked for around a month with no problem and then bam out of nowhere again wifi broken... so i redid it and again its working for and has been for at least 3 weeks now.... still have no idea what is causing it to break but at least i have a solution – sort of...
    15. be careful with this technique. it's not good for rechargeable batteries to discharge them completely!
    16. thanks markus, while you are correct that you should avoid constantly letting your battery drain to empty, there will be no noticable imapct to your battery life by doing this infrequently as required... i promise you... and guess what it fixes a problem many people cannot seem to resolve that has a huge impact on useabliity... lets put it in perspective...
    17. Hi markus, I tried your solution but it didn't work for me. My WiFi stopped working after I send my phone for repair, I guess the useless techs damaged something in there. Seems like I'll have to get a new phone...
    18. It didn't work for me.
    19. Worked for me initially but the wifi failed again after about 5 mins, this is definitely looking like a hardware problem. I'm going to try running down the battery for a couple of weeks to see if this resolves the issue, I doubt it though. Anyway, thanks for the help.
    20. Found this in your link above and it was the solution for me: -------------- So I go in with root explorer, delete .macaddr file, and run these commands (the first line is my mac address being set, because I know what it is already; obviously you'll need SU to do this): echo -ne '\x8c\x3a\xe3\x41\x8d\x79' > /persist/wifi/.macaddr chown root:root /persist/wifi chmod 755 /persist/wifi chown wifi:wifi /persist/wifi/.macaddr chmod 660 /persist/wifi/.macaddr --------------------------- Used root explorer to change all the files/permissions
    21. hi clint3200,, can you please tell me, where to run commands after delete of .macaddr file. please give us complete step by step tutorial as i tried all above mentioned steps but no success in my case.. i hope your commands help me in fixing my no mac address issue on nexus 5
    22. I deleted these files. Is there anyway to get them back? Wifi still not working
    23. If your Bluetooth craps out at the same time with your WiFi, it's a hardware issue. There's no software fix and it's likely either a Broadcom issue or an assembly defect. If your phone is still under warranty, they will fix it by replacing parts but most people got this issue after more than one year so LG & Google are ignoring the users. It's absolutely a scandal! You can see a lot of people complaining in the Google forum under "WiFi Bluetooth fail to turn on after 5.1.1 update but it has nothing to do with software. Updating to Marshmallow didn't fix it.
    24. i am facing the same problem as yours.Hanging on turning on wifi.So please help me how can i delete the files as explained first ", opened root explorer, and deleted the entire /persist/wifi folder and rebooted the phone. lo and behold, wifi is now working again like nothing ever happened."
    25. I deleted data/misc/WiFi folder by mistake. And now WiFi is not turning ON .please help (lava iris fuel10,android-5.0)
    26. wifi randomly quit on me. tried a full wipe and reinstall. eventually nothing worked until i deleted /persist/wifi folder and rebooted the phone as well. Thanks for the help
    27. Hi Folks, Unfortunately none of this solutions worked for me. I have noticed that I couldn't find "wlan0" interface on my phone (/sys/class/net) which is used for wifi. Does that mean I have a hardware issue? Appreciate your response. Thanks!
    28. Hi Folks, It worked like a gem when I tried below solution. Installed [root] Pry-Fi and rebooted the phone.
    29. I had this issue and figured it was triggered by my phone's battery dying and it shutting off suddenly (nothing else irregular happened that I thought could have triggered this). I seem to have fixed it by draining the battery to 0, then kept turning it on and letting it die again to further drain the battery. Plugged it back in, turned it on, and WiFi is back!! I don't understand it, but that simple fix is working for me. I hadn't tried anything more drastic yet, thankfully.
    30. i m also suffering from same issue and after reading hundreds of answers the best one i got is CHANGE THE PHONE hahaha
    31. how to access /persist/wifi folder? I rooted it yet unable to see it
    32. You'll need a root capable file manager such as Root Explorer.
    33. Tried the solution. Did not work :( .Now I tried installing Pry-Fi but it shows an error Cannot detect MAC address. any suggestions on this?
    34. Having the same issue here with the Cannot detect MAC address. Tried the persist folder, Pry-fi. Nothing seems to work.
    35. Same problem with my Nexus 5, have the same results as Praveen S
    36. Hi, I am experiencing the same problem. I have a Nexus 5 running Andoid 6.0.1... Wifi does not work on phone, but bluetooth does work (so I guess that might help indicate this is not a hardware issue?). Have looked at some youtube tutorials on rooting, and would like to avoid that if I can. Saw the message Markus sent to Manoj on June 28, 2015, but am unclear on the take-away from that meessage... So I have 2 questions. 1). Does this method work on unrooted phones or not? If so, then great. WIll just download Nexus Root Toolkit and proceed. 2). Alteratively, is there anyone in NYC who I could recruit to help me root the phone? Please send me a message on twitter at
    37. @paulettonyc (twitter)
    38. I have been trying to fix this problem for a long time, but my persist folder doesn't even seem to have the wifi things that everyone else's does. Deleting my persist folder did nothing. Any other ideas? :( Maybe someone has a nexus 6p with a correct persist folder they can copy?
    39. Tried this on my Nexus 5X When I enter those lines that you mentioned above it says for adb shell mount /persist that it doesn't exist, and for adb shell mv /persist/wifi /persist/xwifi it says permission denied. Wifi and Bluetooth both stuck, rooted my phone and everything, please help
    40. I am having the same issue, WTF? does nexus have a self kill timer for all nexus users? No WIFI No Bluetooth for me. My phone got wet from condensation and started over heating while plugged in and the phone was off, it felt like the battery was going to explode like a mini reactor so I took the battery out dried everything off and put the phone into a ziplock with silicas/dehydrating packs. The phone works great miraculously after all that however neither the bluetooth or the wifi work, it maybe a hardware problem due to water damage but I think I just reassembled the connections improperly.... anyone help with is or possibly show me where the connections are so I can fix the issue?
    41. Deleting persist/wiki with root explorer worked for me as well. I paid for root explorer but it was worth it.
    42. I take back my last comment. It worked for a bit, but went back to doing the same thing.
    43. Hi, I have most certainly messed up my phone somehow. I have managed to delete the /persist folder in its entirety. Went into the NRT command prompt and proceeded to the "adb shell mount /persist". It says that multiple devices are connected, although my computer is only connected to my phone and some computer peripherals via USB. When I type "adb -s [device name] shell mount /persist", it gives me "mount: mounting /dev/block/mmcblk0p16 on /persist failed: Device or resource busy" Cannot proceed to the next line on the command prompt as it does not detect the /persist folder. I'm just surprised I managed to ROOT my nexus 5 after my bluetooth and wifi failed. So unsurprisingly, it is most likely a hardware problem, but I wanted to give this a try. Although, clinging on my last hope, does anyone have an answer to my problem?
    44. guys I think this a hardware problem..
    45. UNBELIEVABLE!!!! I have been searching the internet for a very long time regarding my Nexus 5 having no wifi. I was honestly ready to just give up and throw my phone against the wall, when I came across this post. Being as this post was started years ago, I figured there's no way this will work. Well, IT DID WORK!!! So, thank you VERY much!!!! I can now use my beloved N5 again.
    46. I also would like to say that if your phone is unrooted, and you have no clue what you're doing, don't do anything until you know 1) What Root is exactly, 2) You fully understand that Rooting will completely wipe your phone, and 3) Rooting will in most cases void your warranty if applicable. I have been Rooting phones for years now, so I knew exactly what I was doing and felt very comfortable deleting files because I knew that I could just reflash my ROM if something went wrong. If you are unaware of, or are not comfortable with anything written in this page, don't do it, until you are, or at least understanding and respectful of the power of Rooting and deleting System files and folders. Good luck. Worked for me, and I'm extremely relieved.

    Leave a Reply