Can someone please provide me with a TWRP backup of their /EFS partition? - OnePlus 6 Questions & Answers

Recently, I corrupted my /EFS partition when I tried to change my MAC address. I don't have any backups of the partition and now my wifi doesn't work. Basically, my last option is to flash someone else's /EFS and hope for the best. Can someone send me their TWRP backup of this partition? It would help a lot. Thank you.

DJsushi123 said:
Recently, I corrupted my /EFS partition when I tried to change my MAC address. I don't have any backups of the partition and now my wifi doesn't work. Basically, my last option is to flash someone else's /EFS and hope for the best. Can someone send me their TWRP backup of this partition? It would help a lot. Thank you.
Click to expand...
Click to collapse
You can't just use somebody else's EFS partition on your phone, as the data it holds is unique to each device. First, read what EFS actually is:
https://forum.xda-developers.com/oneplus-one/general/guide-efs-partitions-how-to-lost-t3307793
The only way (that I've found) of making your phone run properly again is to use a UMT dongle (do some research on how it works first) and input your IMEI back manually (it's written somewhere on the box the phone came in), but that dongle is a bit costly. If you do not want to deal with that, you should just reach out to OnePlus support.

I'm curious, why would you change your MAC address? Android 10 already has a MAC randomizer.
But yeah, EFS and Persist partitions are device specific and containing low level stuff that I don't think transferring it from one device to anther would work. First thing you could try is flashing stock ROM using MSM Download Tool.

McAwesomePL said:
You can't just use somebody else's EFS partition on your phone, as the data it holds is unique to each device. First, read what EFS actually is:
https://forum.xda-developers.com/oneplus-one/general/guide-efs-partitions-how-to-lost-t3307793
The only way (that I've found) of making your phone run properly again is to use a UMT dongle (do some research on how it works first) and input your IMEI back manually (it's written somewhere on the box the phone came in), but that dongle is a bit costly. If you do not want to deal with that, you should just reach out to OnePlus support.
Click to expand...
Click to collapse
I read somewhere that it could work... And thanks, I know what the EFS partition is... However, is it a problem if I end up with someone else's IMEI? Also, I already did a backup of the current corrupted EFS so if the EFS from another phone won't work then I can just flash my old EFS back.
Also, my IMEI is intact. I haven't lost it. Only the MAC address is probably changed and that creates the problem. But I can't restore the original MAC address because the wlan0 interface doesn't show up in custom OS's. Only in OOS.
Edit: lol I actually already read the exact same article you've sent a link to.

freezingfox said:
I'm curious, why would you change your MAC address? Android 10 already has a MAC randomizer.
But yeah, EFS and Persist partitions are device specific and containing low level stuff that I don't think transferring it from one device to anther would work. First thing you could try is flashing stock ROM using MSM Download Tool.
Click to expand...
Click to collapse
Does it? I couldn't find it there... I know that OOS has a MAC randomizer but i don't know if other custom OS's have it. Also, could you please verify if i'm using the right tool? This is the link: https://forum.xda-developers.com/oneplus-6/how-to/tool-msmdownloadtool-v4-0-international-t3798892
Because it's OOS 5.1.5 and that's faaaar from the newest one...

DJsushi123 said:
Does it? I couldn't find it there... I know that OOS has a MAC randomizer but i don't know if other custom OS's have it. Also, could you please verify if i'm using the right tool? This is the link: https://forum.xda-developers.com/oneplus-6/how-to/tool-msmdownloadtool-v4-0-international-t3798892
Because it's OOS 5.1.5 and that's faaaar from the newest one...
Click to expand...
Click to collapse
The latest one is here containing 10.3.5 https://forum.xda-developers.com/oneplus-6/how-to/op6-collection-unbrick-tools-t3914109
Android has had MAC randomisation since Oreo.

Related

Infuse EFS Folder (Request for someone's backup)

Hi guys,
One miraculous day, my efs folder became corrupt, when it just so happened to be the week after the hard drive on my computer took a dump! What a week this has been.. I was wondering if it is possible for someone to zip their EFS folder and send it to me to see if I can't get this phone to connect back to the network again. I honestly think there are applications on androids marketplace that will wipe things if you have superuser installed.. because it was like BAM, one morning I wake up and my efs folder was deleted the day after I had installed some new apps.
So my question is - Will someone send me a backup of their EFS? If that won't conflict with their phone of course -- I would send it back to Samsung, but their 3rd tier support has no idea what I'm talking about - they just hear root and think I'm a piece of trash.
Any help would be greatly appreciated - I have not seen anything about trying someone elses efs so I thought it could be a bit experimental as well.. Thanks
-Brett
Salmiery said:
Hi guys,
One miraculous day, my efs folder became corrupt, when it just so happened to be the week after the hard drive on my computer took a dump! What a week this has been.. I was wondering if it is possible for someone to zip their EFS folder and send it to me to see if I can't get this phone to connect back to the network again. I honestly think there are applications on androids marketplace that will wipe things if you have superuser installed.. because it was like BAM, one morning I wake up and my efs folder was deleted the day after I had installed some new apps.
So my question is - Will someone send me a backup of their EFS? If that won't conflict with their phone of course -- I would send it back to Samsung, but their 3rd tier support has no idea what I'm talking about - they just hear root and think I'm a piece of trash.
Any help would be greatly appreciated - I have not seen anything about trying someone elses efs so I thought it could be a bit experimental as well.. Thanks
-Brett
Click to expand...
Click to collapse
This is an interesting request, Brett.
I thought the efs.rfs file contains one's phone imei number/network id etc.
idk for sure...
I thought using someone else's imei is kinda like "let me borrow your ss# so i can check the ss office to see if mine is working.
I didn't know if you found this link and tried it?
http://forum.samdroid.net/f28/complete-imei-restore-how-1817/
http://forum.xda-developers.com/showthread.php?t=882039
http://forum.xda-developers.com/showthread.php?t=953436
Fortunately for me, I had a efs backup on my hd.
I think I also saw scripts in Zeus and Doctor ROM that backs up efs also prior to flash..
good luck
I wasn't trying to steal anyone's IMEI.. I just have tried multiple techniques, but I have not tried the first link..
I've been having trouble getting a shell with adb, does it need to be in download mode?
I was trying to see if it were possible to copy someone's existing files, and use a hex editor to change things, but reading into it, the IMEI is not able to be edited easily without knowing the encyrption type.
I'm just frustrated and have been back and forth with both at&t and also samsung (Their support is a joke, no one I spoke with even knew what the EFS folder was..)
I will try this technique and will report back later when I get home from work tonight. I've been reading a lot of similar issues with the null/null IMEI in the infuses and the guy at the AT&T store said that this was the reason they stopped selling the phone in their store.
Thanks for the help, I'll let you know what happens.
-Brett
Goodluck.
From the tone of your post, I didn't suspect any malice...I had a gist of what you were trying to do.
From reading some of links, there may be some method of recovery.
I hope that you're able to get it back.
I posted one a while back. I think it was in the q&a section. I won't be at my computer for a couple of days or I'd upload it for ya. Try searching or scrolling thru there.
Edit: I just uploaded an EFS.zip, unzip and flash the included efs.tar thru Odin or heimdall.
I had the same problem but i fixed it through Odin. There is an option in odin where you can click on the side (sorry i just reformated the comp so i dont have odin installed) that says something about the EFS. Try that, it fixed it for me.
On a related note. I thought I read somewhere that typical backups such as tibu and nandroid do NOT back up the efs folder. Is this correct? Should we all be doing this manually to protect against corruption?
Try searching here or on market. I remember there was this app called "nitrality" something. This app backs up EFS that we can restore in case we mess it up.
diablo009 said:
Try searching here or on market. I remember there was this app called "nitrality" something. This app backs up EFS that we can restore in case we mess it up.
Click to expand...
Click to collapse
I did try to dl that app and ran it. It didn't work for me. The app hung up the system until you fc it.
If you're versed in linux or Term emu, you can use script to back up your efs.
If you had flashed zeus or doctorz, there are scripts build in that backs up your efs.
if you had root explorer, you can find efs folder in your root. long press on the folder allows you to create zip or tar of this as well.
Any harm in just copy/paste the whole folder to external SD with root explorer? Then copy paste to windows over USB? Will permissions get messed up?
I think I've already backed it up but there have been a couple threads on this. Wonder if it should be part of superthread or a sticky...do this first :...
Sent from my SAMSUNG-SGH-I997 using XDA App
rxnelson said:
Any harm in just copy/paste the whole folder to external SD with root explorer? Then copy paste to windows over USB? Will permissions get messed up?
I think I've already backed it up but there have been a couple threads on this. Wonder if it should be part of superthread or a sticky...do this first :...
Sent from my SAMSUNG-SGH-I997 using XDA App
Click to expand...
Click to collapse
no problem with copy/paste that I know of.
Being cautious, I have a zip, a tar, and the whole folder on my PC, USB and box.net.
Hypothetically,
I have access to another Infuse on the same family plan at that, if i were to copy the efs folder to mine what would that do?
I want to make sure not to have the same IMEI number on the network though, but this could save me a lot of hassle...
any thoughts?
Read the threads on the links I provided...you will get more understanding.
I have multiple times, but the first post that seemed like it would be the best fix, I have to get him to send me a fixed nv_data file and he seems to be unresponsive at the moment.
I think I'm going to root the 2nd infuse, back up her efs folder (MULTIPLE times lol) and fix it so it's generic and not an exact replica of hers..
Do you see any problems there? I'm definitely not an expert at all with this.
Salmiery said:
I have multiple times, but the first post that seemed like it would be the best fix, I have to get him to send me a fixed nv_data file and he seems to be unresponsive at the moment.
I think I'm going to root the 2nd infuse, back up her efs folder (MULTIPLE times lol) and fix it so it's generic and not an exact replica of hers..
Do you see any problems there? I'm definitely not an expert at all with this.
Click to expand...
Click to collapse
In order to see what is on the root of a phone, you may need to root it.
Once rooted, you can look for the efs folder.
I haven't used z4root in a while on an unrooted phone, I don't know if this program will let you see the root folder or not. It's possible.
The efs on my phone shows several programs and folders.
One of the folder is /imei. I suppose this is where the unique id is located.
read the thread: http://forum.xda-developers.com/showthread.php?t=1372455
as you can see, the efs contains unique id...i'm not sure of even how to make up a different imei file from using someone else's efs folder.
if your phone boots up but does not connect, if you go to settings/about phone/status
does it list the imei?
if it does, are you able to use a script in terminal emulator to back it up?
if you can't find the script, you can try flashing doctor or zeus rom, they have scripts to back up your efs folder. then try locating it on your phone.
the other thought i had was for you to call your provider to see if they can give you your previous imei number.
I'm only reasoning from what I have read...these are new territory to me.
Right, I have rooted my phone and for whatever reason the EFS folder is completely empty... The folder is there, but completley empty.
I have the IMEI number, its on the back of the phone as well as AT&T gave it to me.
The fact that my entire folder is empty, and I hadn't backed anything up because I never flashed the kernel or rom makes me think that the android marketplace does have malicious code that simply says:
if(phone==rooted){
wipe efs foler
}
continuing to pull my hair out and attempt new things, if anyone has any ideas let me know.
Salmiery said:
continuing to pull my hair out and attempt new things, if anyone has any ideas let me know.
Click to expand...
Click to collapse
Check out Post # 5, I just edited my post.
its not simply a folder its actually a partition, on Linux you can mount drives/partitions however you like so it can appear to be under another directory and be an entirely different device.
you can make a .rfs image from the dd command through adb or terminal emulator.
if it is corrupt you "may" be able to salvage it through options of the dd command.
I gotta look up the device path and whatnot but if there is anything on there, visable or not, you might be able to recover the unique files and paste them over the files from someone else's efs backup. if not I have heard but never tried it, but I heard that fromatting the partition will cause the system to generate a generic efs, but I don't know for sure.
edit: the device location is /dev/block/stl3
you can dump it to the SD card with
dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096
if there are bad blocks I think but not quite sure you can add noerror to the end
dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096 noerror
but if the information has actually been deleted unless it was overwritten it is mostly intact. it is not well known that delete doesn't actually delete the data, even after a format data can be recovered with the right program. if the dumps come up empty there is also dd_rescue and foremost but I don't know if those commands are available on android, but you may be able to loop mount the dump on a Linux box or in cygwin and try the ddrescue or foremost commands.
http://www.linuxquestions.org/questions/linux-newbie-8/learn-the-dd-command-362506/
hopefully you can recover something. and learn something along the way. this is also useful for recovering deleted files and securely deleting stuff you want gone for real.
i remember I lost my efs on my captivate. There are tools in the forum to get it back.
Salmiery said:
Hi guys,
One miraculous day, my efs folder became corrupt, when it just so happened to be the week after the hard drive on my computer took a dump! What a week this has been.. I was wondering if it is possible for someone to zip their EFS folder and send it to me to see if I can't get this phone to connect back to the network again. I honestly think there are applications on androids marketplace that will wipe things if you have superuser installed.. because it was like BAM, one morning I wake up and my efs folder was deleted the day after I had installed some new apps.
So my question is - Will someone send me a backup of their EFS? If that won't conflict with their phone of course -- I would send it back to Samsung, but their 3rd tier support has no idea what I'm talking about - they just hear root and think I'm a piece of trash.
Any help would be greatly appreciated - I have not seen anything about trying someone elses efs so I thought it could be a bit experimental as well.. Thanks
-Brett
Click to expand...
Click to collapse
Uh, NO than you. My EFS folder has nothing to do with yours. Don't know how that would work...

[SOLVED] Efs?

What is it? Because I want to download the mokeeOS, but the installation is confusing me, so I wanna know if the efs matters
Sent from my SGH-T959V using XDA
1. Yes efs matters a lot
2. I don't know a whole lot but it holds the network info, imei number, and alot of other really important things
Sent from my SGH-T959V using xda premium
Although there is a way to make sure you have a backup, flash this file in cwm
sourceforge.net/projects/teamacid/files/fb/cwm/cm7-efs-backup.zip/download
And there will be two files in the root of your sd card
Efs-backup.tar and efs-backup.tar.md5 ( I suggest save it to your computer, it saved my ass )
And you can restore this backup at anytime by flashing this
sourceforge.net/projects/teamacid/files/fb/cwm/cm7-efs-restore.zip/download
Good luck
Sent from my SGH-T959V using xda premium
Efs is the files system that holds the unique identifiers for your device. Without it, your phone is basically useless. You won't be able to connect to any network properly do things like phone calls, internet, texting, are all degraded, if they even work at all... Make sure you know what you are doing before messing with it. Fb created a vet good guide on the wiki. Follow it to a T!
Sent from my SGH-T959V using XDA
I would suggest using a root browser to copy the EFS folder to somewhere safe on your PC and copy a 2nd back-up to your SD card. I lost IMEI going from CM7 to moKeeOS but was able to easliy restore it with a back-up and a root browser.
The flashable EFS back-up/restore from FB should still be used, but with EFS/IMEI I don't think you can be too careful and backing it up manually as previously stated is a good idea.
Yeah, I keep multiple copies of it on my PC. The reason being is that I copy it whenever I do a backup before a flash. So I have a directory with the date with 3 folders: efs, nandroid, and sdcard. I used adb to copy them:
Code:
cd efs
adb pull /efs/
Probably overkill, but better to be safe than sorry, eh?
Ok, but once you lose IMEI and don't have a backup (I received this phone for repair), then what can I do?
serialteg said:
Ok, but once you lose IMEI and don't have a backup (I received this phone for repair), then what can I do?
Click to expand...
Click to collapse
It's pretty much screwed without the OEM Samsung/Tmo software. You would have to send it to Samsung for repair, or you might get lucky and get an engineer to hook you up, but that is unlikely...
thomas.raines said:
It's pretty much screwed without the OEM Samsung/Tmo software. You would have to send it to Samsung for repair, or you might get lucky and get an engineer to hook you up, but that is unlikely...
Click to expand...
Click to collapse
thanks for the answer. that OEM software isn't available in the forums or anywhere else for us? because I swear I flashed something OEM'ish without root with heimdall.
also, the imei is on the battery part of the phone, can't i fix it?
i read somewhere that you could use a phone just fine without imei on the about phone.
you can use the phone without imei, but it doesn't function as well as it would with it. Also, i was using titanium backup and it said my device's id was changed, and it showed my actual imei. If i were to restore it, would that fix the imei?
EFS help on the SGH-T959V
Basically, I've had a hell of a time with some EFS drama this weekend, made a total noob mistake, but in a stroke of luck I was able to "recover" so to speak my EFS even after it was supposedly "wiped."
After some thorough research and READING and bit of thought, I realized that the PIT mapping layouts between BML and MTD are indeed different, and that in theory if one remaps to BML (in layman's terms a stock partition map) then the EFS data originally on the phone gets correctly remapped (at least in my case it did).
To reiterate:
1. I did a nandroid backup. Basic ****. I hope to god you at least did this step too.
2. I used the cm7-efs-backup.zip script to backup my EFS. This was my first mistake. In my case, I don't know why I'm still researching, this script failed to make a backup .tar on my sdcard or anywhere else for that matter. It didn't throw any error messages either on the screen in the process. Not trying to attack the authors of that script, I'm just saying it didn't work for me this time.
3. I pushed the TWRP boot.img with Heimdall
4. I used the cm7-efs-restore.zip script which also "succeeded" but did nothing to restore any sort of EFS obviously because there was no backup to begin with.
5. I flashed R11 unofficial cm7 and booted up. Everything was fine but the IMEI was corrupted and I confirmed that the new MTD EFS partition was empty. On T-Mobile I could place no calls and only got sporadic and intermittent data access.
It was at this point I was sure I had ruined my phone.
After some more careful reading I realized that the original EFS was still present on the firmware, however the new MTD layout I flashed (wisely) stores its EFS partition in a different physical location. In theory, I thought if I reverted to BML and a stock ROM then I would recover the original EFS. In my case, this was successful.
1. I accessed the most recent "boot.img" file from my most recent nandroid and pushed that back to the device with Heimdall
2. At this point you have to flip your USB drivers back to USB Composite Device.
3. I then used a Heimdall one click to return to a rooted stock KJ6 "Gremlin Remover"
4. Upon restart, everything was fine (sigh of relief)
At this point, I'm still trying to determine why my EFS cannot be backed up with a few automatic tools. I made a backup of the file structure, but even lyriquidperfection's EFS Pro 1.4.7 can't make a backup of the EFS. It can access the ADB Server, but the backup 'fails'.
I'll check back in after I figure out why.
Hopefully this info will help anyone else who has switched to MTD and has a missing EFS.
nick.tansy said:
At this point, I'm still trying to determine why my EFS cannot be backed up with a few automatic tools. I made a backup of the file structure, but even lyriquidperfection's EFS Pro 1.4.7 can't make a backup of the EFS. It can access the ADB Server, but the backup 'fails'.
I'll check back in after I figure out why.
Hopefully this info will help anyone else who has switched to MTD and has a missing EFS.
Click to expand...
Click to collapse
I had similar issues yesterday. If your trying to install the twrp and then downgrade to the version with wifi dont flash the boot.img with heimdall. Follow the instructions for installing via cwm.
Just install the zip that has twrp in it. But follow the directions for normal cwm installation.
Also when trying to make a backup of your efs, make sure system is mounted. I initially did not have any problem but I was on antonx's kernel and when you flash with that recovery it would mount properly. What is happening is system isnt getting mounted. So its making a null backup.
The most important thing to do is when you are trying to make a backup of your efs is mount system!
Hi have you tried the updated EFS Pro v1.7.13? It can now automatically detect the mount point of the '/efs' folder for back up and restore. Also many many bug fixes and new code to communicate with adb.exe alot more quickly and efficiently.
Head over to the forum and check it out.
I already solved this problem, but this would seem useful other people with the same problem. But what forums are you exactly referring to?
Sent from my SGH-T959V using XDA
mierkat09 said:
I already solved this problem, but this would seem useful other people with the same problem. But what forums are you exactly referring to?
Sent from my SGH-T959V using XDA
Click to expand...
Click to collapse
This one.
http://forum.xda-developers.com/showthread.php?p=18524176

Possibility to return to STOCK ATT ROM after KDZ flash of PR version?

I'm noticing that FlashFire has the option to backup the system parition file based. I'm wondering if someone who has flashed the PR ROM could simply do a restore of a STOCK ATT system partition backed up this way and if it would work? If anyone wants to try, I can make a backup and upload it and post a link.. Let me know!
petermg said:
I'm noticing that FlashFire has the option to backup the system parition file based. I'm wondering if someone who has flashed the PR ROM could simply do a restore of a STOCK ATT system partition backed up this way and if it would work? If anyone wants to try, I can make a backup and upload it and post a link.. Let me know!
Click to expand...
Click to collapse
Sounds like a hard brick waiting to happen.
uly609 said:
Sounds like a hard brick waiting to happen.
Click to expand...
Click to collapse
Yeah.. probably right. It was real late when I posted that LOL
Actually doing a system restore via file based shouldn't hard brick the phone. Only if it was raw based possibly, but either way it would only be the system position so the kdz/tot would still be able to be flashed to the phone as before. This might work! Or at least be a good base to try.
petermg said:
Actually doing a system restore via file based shouldn't hard brick the phone. Only if it was raw based possibly, but either way it would only be the system position so the kdz/tot would still be able to be flashed to the phone as before. This might work! Or at least be a good base to try.
Click to expand...
Click to collapse
I agree with this theory. It should only flash the system over the system. You would have to make sure the boot loader is correct for the system rom. So say a 10b bootloader for an equivalent 10bPR rom.
(If any of the above is confusing or slightly off, I blame it on the fact I have been battling a bad virus this week with a bad headache.)
I just warrantied my PR rom device a few weeks ago, or else I would have tried this for you.
Edit: You would also have to edit the script in the file to flash to designate the correct partition to flash the system to.
CAG-man said:
I agree with this theory. It should only flash the system over the system. You would have to make sure the boot loader is correct for the system rom. So say a 10b bootloader for an equivalent 10bPR rom.
(If any of the above is confusing or slightly off, I blame it on the fact I have been battling a bad virus this week with a bad headache.)
I just warrantied my PR rom device a few weeks ago, or else I would have tried this for you.
Edit: You would also have to edit the script in the file to flash to designate the correct partition to flash the system to.
Click to expand...
Click to collapse
Unless it just extracts the tar'd files it copied from the system partition of the stock device. Still some ambiguity regarding that app. For example, it shows no option to allow me to make backups on the external SD card...
petermg said:
Unless it just extracts the tar'd files it copied from the system partition of the stock device. Still some ambiguity regarding that app. For example, it shows no option to allow me to make backups on the external SD card...
Click to expand...
Click to collapse
I would think it still needs an address as to where to put the extracted files.
I will look and see if I have any twrp backups on my computer from some of the roms I made. I have never fully looked through and studied the backups as much as I used them for system dumps. It just seems to make since that the recovery would need to know where to write the system files. Just flashing an app is alright without the address.
In writing the flashing script for ROMs, I have always had to give the recovery the address as to where to write the system files or else it would result in a flash failure or soft brick.
I may be writing my scripts wrong too. I just know what works for me.

NVData / EFS issue / already created backup, verify image?

Hi,
I have a note 3 neo, 7505 and i updated the firmware. It was all working good for a week then i was listening to soundcloud to sleep and the phone restarted, since then the phone doesn't have an imei and says to insert sim card, and of course unknown modem..
Anyway, i created a backup of the efs using twrp, i have tried gazillion ways to restore the backup and gazillion manual ways too. Going to stock recovery... trying to copy manually the nvdata and all but it doesnt resolve. The files are placed there, i can see it in the shell but the thing just wont work!
i don't know how to proceed to this, i don't know if its a hardware fault, had it been that, shouldnt have i gotten the efs corrupted or some issue? could it be that the hardware itself is damaged all of a sudden? i dont think so, i pretty much think its the efs and yet i cant restore it?
should i attach my efs folder if someone can look through hex editor or logs to suggest a possible solution?
Thanks a lot and also i have search through and proceeded with many solutions and after that created a thread. hope someone can help.
P.S. I just noticed the serial number can be seen in phone status, so apparently its reading NVdata? or is it getting it from elsewhere? how to test if its a hardware fault?
penandweb said:
Hi,
I have a note 3 neo, 7505 and i updated the firmware. It was all working good for a week then i was listening to soundcloud to sleep and the phone restarted, since then the phone doesn't have an imei and says to insert sim card, and of course unknown modem..
Anyway, i created a backup of the efs using twrp, i have tried gazillion ways to restore the backup and gazillion manual ways too. Going to stock recovery... trying to copy manually the nvdata and all but it doesnt resolve. The files are placed there, i can see it in the shell but the thing just wont work!
i don't know how to proceed to this, i don't know if its a hardware fault, had it been that, shouldnt have i gotten the efs corrupted or some issue? could it be that the hardware itself is damaged all of a sudden? i dont think so, i pretty much think its the efs and yet i cant restore it?
should i attach my efs folder if someone can look through hex editor or logs to suggest a possible solution?
Thanks a lot and also i have search through and proceeded with many solutions and after that created a thread. hope someone can help.
P.S. I just noticed the serial number can be seen in phone status, so apparently its reading NVdata? or is it getting it from elsewhere? how to test if its a hardware fault?
Click to expand...
Click to collapse
The point is that TWRP creates faulty EFS backups on many devices which can't be restored properly.
There are different backup solutions (e.g. EFS Pro) confirmed working which may help you prevent future issues. I prefer the manual backup using adb shell or terminal emulator:
dd if=/dev/block/mmcblk0pXX of=/storage/SdCard/efs.img bs=4096
(XX needs to be replaced with the model specific partition number as they use different partition tables)
Restore:
dd if=/storage/SdCard/efs.img of=/dev/block/mmcblk0pXX bs=4096
thanks LS.xd, but i guess i have a pretty solid backup as i did create backup various ways, some were corrupt, but one that i working with has nvdata and every other file along with imei pretty intact....
i can open it up with winrar, and open the nvdata with hexeditor, i was wondering if i could confirm some way that the back up is actually 100% solid?
wondering if the partition's aren't aligned. I don't know for sure if EFS folder in the root directory is the same as being pointed by /mmcblkp03/platform/by-name/EFS ?
i mean they should be the same thing, its just a redirection right?
what should i be doing now? the baseband is unknown and the imei wont just work, waste the phone? or it could be done via some boxes or some other process?
there must be a starting point? isn't there some way i could use a generic imei and just any modem? then i could replace nvdata may be? right now, i'm installing various versions of stock firmware and repeatedly placing old efs data in various ways and i kind of turning hopeless. first i lost a nexus then i bought a g4 last month, gave me a bootloop just a week after, gone dead. then i bought the n3n and now this..... i mean 3 phones in a row..... i really hope this could work..
penandweb said:
there must be a starting point? isn't there some way i could use a generic imei and just any modem? then i could replace nvdata may be? right now, i'm installing various versions of stock firmware and repeatedly placing old efs data in various ways and i kind of turning hopeless. first i lost a nexus then i bought a g4 last month, gave me a bootloop just a week after, gone dead. then i bought the n3n and now this..... i mean 3 phones in a row..... i really hope this could work..
Click to expand...
Click to collapse
So you got some non TWRP made EFS backup, too? You can list your partitions using shell:
[email protected]:/ # cat /proc/emmc
You can use the dd command once you know the layout. Backups not generated manually may only be restored with the specific app/version and are probably not compatible using other restore methods. For my OnePlus 3 EFS backup can generated fine using TWRP but restoring it screws up the partition. Manually created image works fine. As I don't have a Note 3 Neo I don't know how it behaves for your device.
any idea how would i go on about inspecting the nvdata.bin? i'm in hex editor trying to see something resembling imei but its just so much garbage except a few lines.
i can't be sure whether its corrupt or not...
in efs -> imei -> a file called mps_code.dat i open it up in hex editor, and it has only 3 characters.....
is it possible i could initially use a generic imei and modem and later on populate it with actual somehow or just keep using generic one for now until i find a better solution, using hex editor or something...?
there are some tutorials on qualcom.. none for exynos but it should happen the same way, somewhere in nvdata, you place the imei ... and it would be generic method for most exynos devices...
i wish someone could guide me to that...
also can it be restored via "boxes"?
penandweb said:
any idea how would i go on about inspecting the nvdata.bin? i'm in hex editor trying to see something resembling imei but its just so much garbage except a few lines.
i can't be sure whether its corrupt or not...
in efs -> imei -> a file called mps_code.dat i open it up in hex editor, and it has only 3 characters.....
is it possible i could initially use a generic imei and modem and later on populate it with actual somehow or just keep using generic one for now until i find a better solution, using hex editor or something...?
there are some tutorials on qualcom.. none for exynos but it should happen the same way, somewhere in nvdata, you place the imei ... and it would be generic method for most exynos devices...
i wish someone could guide me to that...
also can it be restored via "boxes"?
Click to expand...
Click to collapse
After 3 years I had to retire my HTC One S. I flashed roms and firmwares up to 3-4 times a week without having any issues. One sunny day some update bricked then nvdata. I spent a bunch of hours trying to restore it in different ways, extracted data from stock firmware as well as using dumps from other user's phones, as some users reported this error fixed doing so. Even when the files was identical it just did not work for me. Changing the mainboard was the only possible solution so I decided to get a new device.
All I want to say is try to restore a valid backup in a way confirmed working. If you don't have a usable backup ask in your device's forum for somebody may upload it. Or spend 100 hours messing around with hex editors until you reach then point where you realize its cheaper to switch the device as wasting a year's holidays browsing the internet for some solution.

[Guide] How to "fix" WiFI after come back from custom roms to Stock rom.

Ok guys after lots of tests, I've managed that the fastest and easiest way to have wifi fixed on Stock android rom is to delete some lines (they are 2-3) in a file located on "/persist" folder.
PROCEDURE
1) You need magisk (or any other form of root) and a file manager that can edit (with root permissions) systems files.
Once you have done it, go on root "/persist" and find the file "wlan_mac.bin", open it with a text editor and delete all lines in it(let it empty but don't delete it, just delete lines in it), after save and reboot phone, done.
2) This is faster, it is going to do same thing but without magisk. Just flash the WiFi_fix.zip (see file below in attachment) from Twrp and it will replace the corrupted wifi_mac.bin with an empty one.
Optional: if you know how to generate a xiaomi vendor mac address, just replace the empty wlan_mac.bin from my WiFi_fix.zip file with yours.
Comment:
*This is the fast and easy but not the best one. I'm finding a workaround.
Anyway this method isnt a problem you are going to use base Mac Address and not the vendor one. In therms of warranty I don't think it will change something.
PS: Actually this will be fixed on custom rom that used to edit that file.
Good work!
I have same problem. When i flash stock rom via mi flshtool i can't connect to wifi. It shows wifi but after entering pwd it shows only saved. Can't connect at all.can u explain procedure when flashed stock rom. Flashing persist.img via fastboot will fix? Without rooting. Sorry for my bad English.
---------- Post added at 03:30 PM ---------- Previous post was at 03:23 PM ----------
So you are saying after flashing stock rom i have to unlock bl and root. And then edit system????? Sorry im a noob to Mi A1
kishanb1988 said:
I have same problem. When i flash stock rom via mi flshtool i can't connect to wifi. It shows wifi but after entering pwd it shows only saved. Can't connect at all.can u explain procedure when flashed stock rom. Flashing persist.img via fastboot will fix? Without rooting. Sorry for my bad English.
---------- Post added at 03:30 PM ---------- Previous post was at 03:23 PM ----------
So you are saying after flashing stock rom i have to unlock bl and root. And then edit system????? Sorry im a noob to Mi A1
Click to expand...
Click to collapse
Just connect phone in fastboot on pc. open cmd (you need fastboot and adb drivers installed on PC) and write this:
fastboot oem unlock (to unlock bootloader)
fastboot boot twrp-oreo-3.2.1-2.img (you need last official twrp from XDA for that. Name can be different, you have to write extaclty of your file)
Phone will boot on twrp. From install/flash magisk and reboot phone. Now you have magisk and root.
Download and installa a file manager like MixPlorer, Root explorer, MtManager and many others.
Go on "root" and find the folder "persist". In it you will find the file "wclan_mac.bin" just edit. If you still have issue I will made something that is going to do it automatically.
Thanks mate. I'll try ?, you save the hours of works. Thanks again
Has someone tried erasing then flashing persist.img?
Your method is not the fastest nor the best to reset the WiFi connection, You do not need to be root.
You must do the following:
The persist.img file must be downloaded from the following link
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
“persist.img” file and move it to phone memory “/sdcard”.
1.- Enter fastboot mode, , you must have unlocked the bootloader
2.- Execute TWRP with the command fastboot boot twrp.img
3.- Open Terminal in TWRP Custom Recovery (go to "Advanced"> "Terminal").
4.- Type the following command:
dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
Click to expand...
Click to collapse
5.- Restart and with it the wifi will work.
Procedure taken from https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
speedunderx said:
Your method is not the fastest nor the best to reset the WiFi connection, You do not need to be root.
You must do the following:
The persist.img file must be downloaded from the following link
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
“persist.img” file and move it to phone memory “/sdcard”.
1.- Enter fastboot mode, , you must have unlocked the bootloader
2.- Execute TWRP with the command fastboot boot twrp.img
3.- Open Terminal in TWRP Custom Recovery (go to "Advanced"> "Terminal").
4.- Type the following command:
5.- Restart and with it the wifi will work.
Procedure taken from https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
Click to expand...
Click to collapse
It is dangerous, I dont advise it.
SevenSlevin said:
It is dangerous, I dont advise it.
Click to expand...
Click to collapse
It works perfectly, it's more dangerous what you do.
deleted, double post.
speedunderx said:
It works perfectly, it's more dangerous what you do.
Click to expand...
Click to collapse
I don't think you have the idea of what you have done.
I will tell 2 points of the fact that it is dangerous:
1) for the not experted doing these things can easily bootloop/soft brick phone.
2) You flashed with "DD" and you have flashed a backup of another one so you are using his MacAddress.
Now tell me how safety is it if I know your MacAddress? (everyone who is going to flash it will have same MacAddress)
PS. in this case your MacAddress are:
Bluetooth: f4:f5:dB:e9:b6:dc
WiFi: f4:f5:dB:e9:b6:dd
check them on "settings, system, about phone, status".
SevenSlevin said:
I don't think you have the idea of what you have done.
I will tell 2 points of the fact that it is dangerous:
1) for the not experted doing these things can easily bootloop/soft brick phone.
2) You flashed with "DD" and you have flashed a backup of another one so you are using his MacAddress.
Now tell me how safety is it if I know your MacAddress? (everyone who is going to flash it will have same MacAddress)
PS. in this case your MacAddress are:
Bluetooth: f4:f5:dB:e9:b6:dc
WiFi: f4:f5:dB:e9:b6:dd
check them on "settings, system, about phone, status".
Click to expand...
Click to collapse
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
speedunderx said:
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
Click to expand...
Click to collapse
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
Edit 2-
1. Dirty Flashed ROM. Re-setup fingerprints. Reset network settings. Emptied out wlan.bin file, everything works except wifi.
2. Restored my personal backup of persist, re-setup fingerprints. Everything is now working.
oreo27 said:
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
I've already done it and have same your issue in past. Problem is that, that persist.img found on fastboot firmware stock, seems to non be complete and has "corrupted" (incomplete) WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat. And also it doesnt make the folder /persist/wifi_bin where are located other 2 folders "minus" and "plus".
In your case you have finished with no wifi, that isnt correct. You have wifi but you need to put phone next to router cause with those "corrupted" files it has really low range. To fix that you just need files that I've wrote above from someone that has correct files. In this case you ave done a backup, you just needed to copy wifi_bin folder, WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat from your backup.
Anyway actually I think you are using the hardware mac address that in most of phones starts with: 00:0a:f5 (it is the prefix of vendor Airgo networks that produce those chipsets and works under Qualcomm). I've seen also mac starting with: 00:00:00 that is the prefix of Xerox Corporation.
To turn back to your back vendor (XIaomi) mac address your last hope, as I know, is to use bluetooth mac. Considerading that you have a backup of it (it is located in /persist/bluetooth) and you have never touched it.
Click to expand...
Click to collapse
SevenSlevin said:
oreo27 said:
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
I've already done it and have same your issue in past. Problem is that, that persist.img found on fastboot firmware stock, seems to non be complete and has "corrupted" (incomplete) WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat. And also it doesnt make the folder /persist/wifi_bin where are located other 2 folders "minus" and "plus".
In your case you have finished with no wifi, that isnt correct. You have wifi but you need to put phone next to router cause with those "corrupted" files it has really low range. To fix that you just need files that I've wrote above from someone that has correct files. In this case you ave done a backup, you just needed to copy wifi_bin folder, WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat from your backup.
Anyway actually I think you are using the hardware mac address that in all phones starts with: 00:0a:f5.
To turn back to your back vendor mac address your last hope, as I know, is to use bluetooth mac. Considerading that you have a backup of it (it is located in /persist/bluetooth) and you have never touched it.
Click to expand...
Click to collapse
I was actually able to restore everything . I did a dd backup of my persist partition prior to messing with it. I simply restored that and got everything working normally after I re-registered my fingerprints.
Good to know that I can simply replace those files. I just checked those out after I extracted my backup. Good to know I can just use those.
Apart from WiFi, is there anything else that's damaged when flashing the persist.img from Fastboot?
P.S. You're right, it was showing the networks but it wasn't connecting.
Click to expand...
Click to collapse
I am currently in RR, I think the best way is to wait for the developers to solve the problem, with an update.
oreo27 said:
SevenSlevin said:
I was actually able to restore everything . I did a dd backup of my persist partition prior to messing with it. I simply restored that and got everything working normally after I re-registered my fingerprints.
Good to know that I can simply replace those files. I just checked those out after I extracted my backup. Good to know I can just use those.
Apart from WiFi, is there anything else that's damaged when flashing the persist.img from Fastboot?
P.S. You're right, it was showing the networks but it wasn't connecting.
Click to expand...
Click to collapse
But Attention on deleting files on /persist folder. If you delete one of this (or all them),
WCNSS_qcom_wlan_nv.bin
WCNSS_wlan_dictionary.dat
wlan_mac.bin
you will end in a costantly reboot of phone. For that I've advised only to delete lines with a text editor from "wlan_mac.bin", and as you have seen flashing "persist.img" need lots of knowledge and it is risky (in your case you have done the best thing of doing a backup of it) if you dont know what you are doing.
PS. you can send me in PM your /bluetooth/.bt_nv.bin file. Need an hexadecimal editor and if that file was never touched (as I think) you can restore back your old Xiaomi wifi mac address also.
Click to expand...
Click to collapse
Hi,
I'm having the same issue with WiFi. Connected to WiFi, accepted pw, but not working the wifi connection.
I've a fresh stock oreo, now I see the original BT MAC address.
How to do to make wifi work again without loosing original BT MAC?
speedunderx said:
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
Click to expand...
Click to collapse
i dont know if u have tried it yourself and i dont know the technical details, but i have tried doing that after coming from RR and it didnt work. and more importantly i ended up having 30 sec reboots as someone pointed out here. This is what worked for me:
https://forum.xda-developers.com/mi-a1/help/wifi-issues-t3732798/page2
i havent tested the method described here but i am pretty sure it is no more worse than the one you advice
sachin273 said:
i dont know if u have tried it yourself and i dont know the technical details, but i have tried doing that after coming from RR and it didnt work. and more importantly i ended up having 30 sec reboots as someone pointed out here. This is what worked for me:
https://forum.xda-developers.com/mi-a1/help/wifi-issues-t3732798/page2
i havent tested the method described here but i am pretty sure it is no more worse than the one you advice
Click to expand...
Click to collapse
It works other users have tried, but as the author of this post says, leave a generic wifi and bluetooth mac for everyone, I'm RR, and I have the physical device mac bone the original, you can try all the methods there are but none will restore the original mac of your device, just wait for it to be corrected with the Custom ROM updates. If you try a lot there is the possibility that you will have a nice brick.
You have to take into consideration that the phone is quite economical, therefore it is not the same thing that you fail in this way a galaxy s8 for example.
If you are using Custom Rom enjoy it, there are many that work better than stock android.
OK, I confirm that now I tried OP's solution 2 minutes ago, and it's working. WiFi came back, and operating fine!
But is that OK, that before made the empty wlan_mac.bin file saved I saw different MAC addresses in the system info, and when
rebooted then I saw again different MAC addresses in system info??
Which is the original?
speedunderx said:
It works other users have tried, but as the author of this post says, leave a generic wifi and bluetooth mac for everyone, I'm RR, and I have the physical device mac bone the original, you can try all the methods there are but none will restore the original mac of your device, just wait for it to be corrected with the Custom ROM updates. If you try a lot there is the possibility that you will have a nice brick.
You have to take into consideration that the phone is quite economical, therefore it is not the same thing that you fail in this way a galaxy s8 for example.
If you are using Custom Rom enjoy it, there are many that work better than stock android.
Click to expand...
Click to collapse

Categories

Resources