[Nexus 5 Q&A, Help & Troubleshooting] Retr0.Hacker:
THE ORIGIN OF THE ISSUE:

Everything began 1 month ago. I was using my Nexus 5 like I always did. I had my WiFi turned on because I was chatting with my friends on Instagram and I left my smartphone charging. There were notifications and the notification light turned on showing me that I had two texts from Instagram app. When I tried to turn it on the screen, I pressed the power button, but the screen did not turn on. I pressed the power button again and again and again, but still the same. I tried to force-reboot my device and that's what I did. When the screen started again, my WiFi was stuck at "turning WiFi on...", also, my Bluetooth was not working properly too, because when I tried to turn it on, it automatically turned back off.

ATTEMPT TO FIX #1:

First thing I tried was unrooting and reinstalling stock using Nexus Root Toolkit. That didn't work... I tried doing a simple factory reset from the phone settings, also didn't work...

After those fails, I noticed that my MAC address was corrupted, showing this: 02:00:00:00:00:00 so I searched the Internet for stuff related to this MAC address error and found people with similar problem just like mine. I found solutions like deleting /persist/wifi folder (my friend did not recommended me to do so after I did this). So, I did the thing, AND IT DID NOT HELP. Tried returning to stock using Nexus Root Toolkit AND IT DID NOT HELP. I had an idea to delete my entire system using TWRP and I thought that reinstalling it would fix the problem. But I was noob at the moment, didn't know how to flash after deleting it. Anyway, I went on, and deleted system, but I didn't know how to reinstall and I was without a smartphone for 3 weeks. I was sooooooooo sad cause this was the worst issue I had to deal with... No smartphone... No WiFi.... life sucks (still does, I am sooo depressed for a stupid smartphone)... Well, obviously, NOTHING HELPED.

ATTEMPT TO FIX #2:

After those 3 weeks, I finally managed to find a way to reinstall OS on my smartphone again (using Nexus 5 factory image found in Google site for developers). I was sooo happy because at least I managed to turn the smartphone back on. So, step two was to check if WiFi worked. Well... not as I expected things to be. It didn't work... Obviously... Well, after doing simple experiments, I tried to do "the thing again". After deleting file .macaddr from /persist/wifi folder, without deleting the folder, only the file, WiFi turned back on!!! I went in tears thanking God. Sooooo much happiness!!! I desided to insert WiFi APs that I prevously saved in a wpa_supplicant.conf file, and guess what.... I F***** UP WIFI AND SENSORS!!! I was sooooo mad!

ATTEMPT TO FIX #3:

Well, the next day, I attempted to do a system delete again, but this time, I used another computer device, my family laptop. I deleted system, and this time, I didn't flash anything using Nexus Root Toolkit, but I used this Nexus 5 factory image again. WIFI WAS BACK ON!!! YEESSS!!! I was crying soooo hard!! I again thanked God!!! But it didn't last long... After two days, I turned on my WiFi to check my messages from Instagram, sadly, my WiFi was again stuck on "turning WiFi on..." and my smartphone rebooted by itself (again). So... guess what. I DEAR YOU TO GUESS WHAT HAPPENED NEXT!!! MAC address was back to this STUPID 02:00:00:00:00:00. I had enouch. I installed Termux, I installed a packet called "macchanger" and tried to change my MAC address to something random. I used command "macchanger -r wlan0" and I rebooted. This changed my MAC address to something random. Now, WiFi turns on and when I open an application to use WiFi with, it turns off immediatelly... Also, my MAC address is on changing again with command "macchanger -r wlan0" and is stuck in the previous randomized MAC address. Using "macchanger" command, I also noticed that my "permanent" MAC address is now: 00:00:00:00:00:00 (something that was never valid).

WHAT DO I DO?

DO I NEED TO BUY A NEW SMARTPHONE BECAUSE THIS ONE IS PRETTY F***** UP?

DO I NEED TO REPLACE THE ENTIRE MOTHERBOARD?

IS THIS EVEN A HARDWARE ISSUE?

IS THIS A SOFTWARE ISSUE?

DO I NEED TO REPLACE FIRMWARE? IF SO, HOW DO I DO THAT?

DOES THIS HAVE SOMETHING TO DO WITH /PERSIST?

WHAT DO YOU PROPOSE? BECAUSE I AM TIRED OF THIS STORY, REALLY... :cry:

SPECIAL URL: https://xdaforums.com/t/guide-efs-partitions-what-they-are-and-how-to-get-it-back-if-lost.3307793/