This is a rundown of restoring your IMEI and /efs partition. A lot of people lose their IMEI and have no problem restoring it a variety of ways. But if your restored IMEI disappears on next reboot, your problem is something else. I had this, and I believe it was a corrupted /efs partition.
solution, short answer: flash a good efs.rfs file. I did it in Heimdall; I assume it'll also work in Odin. The one I found online (see attachment) restored my efs to the dummy IMEI of 004999010640000. Where I live and on my provider, this gives me network access. From there I could restore my backup nv_data.bin file to /efs. And then my proper IMEI sticks across reboots.
also: kitch posts another way to fix this, here and here.
NOTE: Messing with IMEI has potential legal problems. The attached file restores IMEI to a fairly common dummy number, so I assume it's not a problem. (mods, please delete if this is a problem). The dummy IMEI could work in your area, but that still could pose legal problems. Check in your area, and see the next paragraph.
WARNING/DISCLAIMER: I found this file on Rapidshare. I don't know who made it, put it there, where it might have been linked from, or what exactly is in it. All I had was a filename and I googled it. And all I know about it is that if you have the problems described above and below, then this may work for you. It did for me. If anyone can "see" inside the file to check that it doesn't contain anything malicious, please comment. All I can say is that ClamXav found nothing wrong with BML3_RESTORE.tar.md5 or the efs.rfs contained within it. And that I'm not responsible for what you do to your own phone.
More ways to check if this is your problem:
- You have no signal. In System Settings > About phone, Baseband says Unknown, even if you know you have a modem in there. Also, them going to Status, your IMEI and IMEI SV also say "Unknown". Other people posting about lost IMEI say they have either all zeroes there, or the dummy IMEI 004999010640000.
The rest of this is what I did in GB. I assume if you have this problem, you tried other solutions that got you here too.
- Flashing stock Samsung ROM with repartition doesn't restore IMEI (at least in Heimdall; I can't check Odin). Flashing EZbase Recovery in Heimdall doesn't do it either. They flash, but afterward boots to recovery mode and shows errors about not being able to apply Multi-CSC.
- in Terminal Emulator or adb, running 'mount /efs' returns: 'mount: can't read 'etc/fstab/': no such file or directory'.
- From here, you can still flash a rooted kernel and flash GB ROMs in CWM recovery mode. After each flash, recovery mode shows errors about not being able to mount /efs and/or /dbdata, and not being able to apply CSC.
- From here, if you try flashing to CM7 or CM9, installation aborts. Onscreen error message shows problems with /tmp/updater.sh.
- If you tried to flash a recent kernel with Heimdall, you can get in its recovery mode. I did this trying to get to a known working JB nandroid. I flashed the JB rom again, and it completes. Rebooting sent me back to recovery mode. Repeat rebooting until fed up. Restoring nandroid completes. Rebooting sent me back to recovery mode. Repeat rebooting until fed up.
solution, long answer:
For me, this was from GB.
- Flash the attached file. For Heimdall, untar it (in command line, run 'tar -xvf /path/to/BML3_RESTORE.tar' without quotes, and replacing /path/to/ with the proper filesystem path. If you don't know what this is, try dragging and dropping the file into your terminal window on your computer.)
Then run: 'heimdall flash --efs /path/to/efs.rfs' (without quotes, again replacing path, or drag-and-drop the file into your terminal window)
On first attempt (second was other human error), I did not flash a whole package with PIT file, or repartition. I did later, and that worked fine, too.
- It automatically reboots (unless you told Heimdall not to). You may go to recovery mode and see a bunch of errors about mounting, but applying Multi-CSC is a success. Reboot, and the phone starts normally. You may momentarily see the circle-and-slash no-signal icon in the upper left corner, but soon after it should show signal bars. Your homescreen may show your network somewhere.
- Check IMEI. It should be the dummy number. You can do this with the phone's number keypad (typing *#06#). I prefer to go to System Settings > About phone > Status. This way you can see the dummy IMEI, and IMEI SV should now also show a number. Go back up one level and also check Baseband; that should now show your modem.
- Restore actual IMEI. This requires that you previously backed up your /efs folder. Restoring this is documented better and more thoroughly elsewhere. I went into my /efs backup folder and copied nv_data.bin to /efs. This is easy with Root Explorer. Press the filename, select copy, navigate back up and to /efs. At the top of the screen, click Mount R/W. Delete everything in there (menu, multi-select, select all, delete). Paste the file. Long press the file, change permissions. Make it 644 (Owner is Read+Write, others are Read), save. Long press again, scroll toward bottom of menu and Change Ownership. Make it Radio (1001) and Radio (1001), save. Click to Mount R/O and exit.
- Check it. Go back and check your IMEI and it should be your real one. IMEI SV should probably change, too. (For me, it was 01 in GB, but now it's 03 in ICS). Reboot, and it should remain. Baseband is also filled in.
From here you can flash up to ICS, or whatever, and your IMEI should remain.
note on attachment: The original filename I searched for and found on Rapidshare was BML3_RESTORE.tar.md5. I've changed the extension to be *.tar, so it can upload to XDA. I think Odin users need to add the .md5 extension.
md5 checksum for BML3_RESTORE.tar: f5ab4c90ed60105c8b50e4e9b112e50b
Credit: XDA user magarto is the one whose post led me to this file and fix, from his post here.
errata: This was originally a [Q]-tagged Question thread. I overwrote the OP with this guide and changed the thread title. Hence, the next several posts may seem out of context.
Still unsolved huh? Khmers do have limited access, due to what happened in their country, anyway you can get a better idea here http://forum.gsmhosting.com/vbb/f258/ how efs problems are solved by various box. Just search this forum about efs or post, many Filipinos there .
Having said that, the version of Galaxy S I am using is Korean (has DMB TV, so hardware differences), and to solve this in our version , we simply flash the beginning ROM (with MOVI Files) Its like the Installation Files of Windows, which does a complete setup . This is the last resort for the Korean Galaxy S, solves any and every problems, always wondered why the Galaxy S, does not have this compilation or its only with samsung service centers. anyway
If you have an efs backup, you should try using Root explorer to overwrite (copy paste) the the current efs folder, fix chmod 644 and EXIT using the menu of root explorer and reboot phone to see if it sticks.
thanks for the forum link. yeah, the phone shop nerd was stuck, too. and they did have a box, several that sounded like the octopus box you said.
i've been doing some looking, too, and wondering if it's corrupted file system. i saw several posts about corrupted internal SD, and I don't know if that could be related. my internal SD mounts fine when I boot up, and all my files are there and working. nonetheless, this post seemed interesting, about reformatting in adb with parted:
http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/page__st__20
but i still have yet to find out if it's related. flashing anything in recovery, i see this:
E:failed to mount /efs /dbdata your storage not prepared yet please use UI menu for format and reboot actions
ehhh... i'd put off learning more about adb on the backburner. looks like i'm diving in.
Two different issues, internal SD get corrupted when one fails to UNDO lag fix, since samsung uses rfs and lag fixing changes it to ext 4, internal SD will fail to be recognized and needs to be formated to rfs by any Rom using rfs ( mostly stock Roms (to solve that flashing a speedmod kernel, does the trick) But your problem is efs folder
and i came across one person, who had both because he had made a onenand mode lagfix and failed to undo before flashing and was pretty impossible to get over
xsenman said:
and i came across one person, who had both because he had made a onenand mode lagfix and failed to undo before flashing and was pretty impossible to get over
Click to expand...
Click to collapse
ugh ... that does not sound promising.
and i'm not even fully aware yet what lagfix is or does. it had never been an option on any kernel i used since i started flashing roms, only early this year from stock to CM7 and soon after to CM9 and other ICSes. Well, until yesterday, when i tried flashing a supercurio kernel on a GB rom, and that failed. But I did see lagfix options under recovery>advanced. at any rate, i hope i'm not in the same boat.
is there any way in adb to find out if i am?
groksteady said:
ugh ... that does not sound promising.
and i'm not even fully aware yet what lagfix is or does. it had never been an option on any kernel i used since i started flashing roms, only early this year from stock to CM7 and soon after to CM9 and other ICSes. Well, until yesterday, when i tried flashing a supercurio kernel on a GB rom, and that failed. But I did see lagfix options under recovery>advanced. at any rate, i hope i'm not in the same boat.
is there any way in adb to find out if i am?
Click to expand...
Click to collapse
what I am saying is that, you do not have this problem, cause If you had, your internal SD will become unavailable and cannot be used and cannot be formated either ...so just solve the efs problem , thats what you need to concentrate on.
xsenman said:
what I am saying is that, you do not have this problem, cause If you had, your internal SD will become unavailable and cannot be used and cannot be formated either ...so just solve the efs problem , thats what you need to concentrate on.
Click to expand...
Click to collapse
thanks, man. i just did try this, simply taking a Camera photo and opening it in Gallery. also, ran mount in terminal to see, and yeah, saw rfs not ext.
when i try to mount /efs, i get an error:
moutn: can't read '/etc/fstab/': no such file or directory. there's a vold.fstab in there, with paths for mounting the internal and external sdcards. ehhhh... still learning what all this is about.
groksteady said:
thanks, man. i just did try this, simply taking a Camera photo and opening it in Gallery. also, ran mount in terminal to see, and yeah, saw rfs not ext.
when i try to mount /efs, i get an error:
moutn: can't read '/etc/fstab/': no such file or directory. there's a vold.fstab in there, with paths for mounting the internal and external sdcards. ehhhh... still learning what all this is about.
Click to expand...
Click to collapse
efs folder has read only permission, so you cannot do anything you like...don't mess with vold.fstab...you will have problems with your SD cards .
The only thing I can suggest is to go back to th earliest eclair or froyo to recover.
you may need to unarchive the downloaded file and then unarchive the resulting TAR files too
Hence in heimdall you should have
PIT file (s1_odin_20100512.pit), CHECK repartition
IBL+PBL = boot.bin
SBL = Sbl.bin
MODEM = modem.bin
PARAM = param.lfs
CACHE = cache.rfs
DBDATAFS = dbdata.rfs
FACTORYFS = factoryfs.rfs
KERNEL = zImage
But First, try to delete the EFS Folder (using root explorer) shut down, Go into recovery and wipe everything than battery pull to shut down and go onto download mode after that Flash
just a suggestion
xsenman said:
Hence in heimdall you should have
PIT file (s1_odin_20100512.pit), CHECK repartition
Click to expand...
Click to collapse
thanks ... this is where I get hung up. Anytime I check repartition, I get libusb End of Pit errors. It runs fine without repartition. This is Heimdall 1.3.1 and 1.3.2 on a Mac 10.5.8.
I'm going to make an Ubuntu Live CD and see if I can get it that way. I used to have an old Lubuntu laptop, and I remember Heimdall working to flash a kernel when the Mac didn't. It'd be great if the repartitioning is what's holding me back.
aargh. didn't work. Heimdall on Linux does let me repartition, but on the reboot I still get errors that /efs can't be mounted, multi-CSC can't be applied, etc. I tried ezbase recovery and the full stock setup for the original provider from sammobile. I tried deleting /efs, full wiping and pulling the battery like you suggested. I tried separately flashing a dbdata.rfs in heimdall, which was suggested for someone else with mount problems. but, it seems like all the other mount problems people have are with sdcard, and not /efs.
If I restore /efs, is it supposed to write data to /dev/block/stl3? because that file is always 0kb. But I could try the dd command to restore that way... maybe later tonight. it's been a long afternoon working through this.
I also don't know what is the deal with not being able to find /etc/fstab. I saw in some other places that Android doesn't use it, so I don't know what's calling it, and why. Or if that's tied to why I can't flash anything beyond a GB rom; I get errors about /tmp/updater.sh.
EDIT: OK, so at some point with ezbase recovery and manually restoring nv_data.bin to /efs, after a little while I saw that my /sys/block/stl3 (and so /dev/block/stl3) were looking normal. I successfully restored the file, plus the IMEI folder, which has bluetooth info. I did this with flight mode on, toggled it off and connected to my network. About Phone was showing my real IMEI, plus BT and wifi MAC addresses. And I had /sys/block/stl3 looking normal. So I ran the dd if=/sys/block/stl3 of=/sdcard/efs.rfs, and used that efs.rfs file to flash full roms in heimdall, repartitioned. I used ezbase recovery and the stock firmware from sammobile.com for the original mobile provider. Neither worked. On first boot both times, I got errors about not being able to mount /efs or apply multi-CSC. My IMEI on reboot is always "unknown", not even all zeroes, until I fix it. And CWM won't flash any CM7 or CM9 zips, giving status 7 errors that it couldn't mount. I also tried flashing the efs.rfs file alone in heimdall command line, and that didn't work. Ezbase is 2.3.3 and my stock is 2.3.5, and serial number info indicates it was made in 2011 or really late 2010 (i'm loathe to pull the battery off these days), so I wouldn't think Froyo could help out. I've reached out to a few people here who had the same problem, but never posted about a fix, or finally giving up. I'm almost at my wit's end. There must be a solution, some way to reformat or push back /efs data to /stl3.
BTW, can anyone post the filenames of what is in /sys/data/stl3 for their i9000? I'd like to know if I'm missing something in there, at least when it does fill up. Right now, I'm thinking it's gotta be a bad partition.
weird..just can't help wondering why it seems so difficult, I assume you are always practicing standard requirements before and after flashing like
1. Using CWM, make sure to wipe data/factory reset,
2. Then wipe cache, and then go into advanced, and wipe the dalvik cache too.
3. From there, flash the ROM
4. Afterwards, repeat the wipe step as in step #1
5. Continuing on, go into advanced and fix permissions.
6. Finally, reboot the device.
In my version its even more stricter, take a look this is required for an uncomplicated Flash
Hm, I've always done 1-3, as that's what's prescribed in most installation instructions, and still Dalvik even if it's not specified. I've only ever wiped post-flash a couple times, and only because it was mentioned in some threads, plus a whole re-flash of the rom. And I'd never heard of fixing permissions after flashing until HellyBean, but I always did with that.
This problem came up coming off of HellyBean with the test idle2 kernel, to AOKP JB, which apparently boots after a status 7 error and abort, but I only knew that later and didn't try that. I then flashed Semaphore to get to the working CWM 6 backups, and ended up in a loop of recovery modes. In hindsight I should have flashed a whole rom -- I went from a datadata rom to one without that I never booted, then to a kernel without datadata just to get the recovery and nandroid.
Rats, I didn't even think about that.until just now typing this out.
sent from a telephonic device
IMEI BACK.
There was a link in a post here that got me there -- basically, someone uploaded an efs.rfs file. Mods, flag me if this is illegal/against rules, but I'd guess it's not because the file gives you the 0049 IMEI.
But for me that didn't matter -- my partition or the linking was screwed up somehow, and I needed a proper one to flash in Heimdall. I couldn't simply correct my nv_data.bin backup and then export bml3.
The Spanish forum link goes to a dead upload, but I was able to find the file BML3_RESTORE.tar.md5 on Rapidshare. If you need this, it was a rollercoaster. At this point I didn't expect anything to work, and I'm still suspicious of finding a file on the web and flashing it without at least some community I can "talk" to about it.
What happened with the file: I flashed it in heimdall, onto a pretty overloaded and laggy JW5. Rebooted, and immediately saw the circle-and-slash no signal logo, so thought it didn't work -- then it pops up to four bars. I swipe to unlock the screen and it completely freezes. So I went back to ezbase recovery kit and flashed the whole thing (with the CF-root kernel, not stock) plus the efs.rfs file. I didn't repartition because I'm on a Mac, and that doesn't work for some reason, and the linux live CD is painfully slow. It flashes, and after completion, I still get a bunch of errors about mounting, but i get a success message about applying multi-CSC. I reboot, and About Phone shows the fake IMEI, but the homescreen is showing my provider. Also, the file explorer showed my internal and external sdcards.
I reinstalled Root Explorer with Titanium Backup, deleted all in /efs and dropped in my backed up nv_data.bin, changed perms and ownership to radio and radio. Exited folder and reopened, and it was all repopulated. Then I dropped in my backup of the /efs/IMEI folder, only because that has a file with BT info and that didn't regenerate. Rebooted, and all was still there! Finally getting out of this weeklong rabbit hole, and able to come back up to ICS with my real IMEI.
Word of caution, though, if going back up from there to one of the latest ICSes. There's people saying to take the latest CM9 nightly -- if you do that, you're flashing up to CWM 6. If you want to go from there to any of several other ICS roms, you might run into a problem because they might be CWM 5.*. After I had CM9 booted, I went into recovery to flash AOKP M6, lost recovery and ended up having to go *back again* to heimdall. Then onto Team Hacksung's CM9 build 16, then finally to AOKP. Done. And I think at this point I'll lay off the Jellybeans for a little while.
groksteady said:
IMEI BACK.
Click to expand...
Click to collapse
This is great, Now in order to get others who may get into this situation, out of this mess, can you post a step by step guide ( simplified as much as possible)
such that I can link your post to my EFS problems and solutions post, already downloaded Bml3 and will upload to another , so a step by step guide to resolve this will be helpful to others.
xsenman said:
This is great, Now in order to get others who may get into this situation, out of this mess, can you post a step by step guide ( simplified as much as possible)
such that I can link your post to my EFS problems and solutions post, already downloaded Bml3 and will upload to another , so a step by step guide to resolve this will be helpful to others.
Click to expand...
Click to collapse
Sure thing... I'll amend the OP later today. So glad to be out of this mess. I seriously thought I'd be manually restoring my imei on every reboot until I get a new phone.
sent from a telephonic device
xsenman, I changed the OP to a guide, hopefully the symptoms and instructions are clear enough. and thanks for talking me through this; I was losing my mind, and so close to throwing my phone in the river.
for anyone else: xsenman was helping me in another thread too. There, I mention how the official Samsung Service Center here said I had a memory board problem, can't recover IMEI without replacing that, for US$150. I went to one of the many phone seller shops with decent hackers/tinkerers, and they couldn't do it either, and they had Octopus Boxes, or at least a box for Samsung.
anyway. HTH others.
and a tinfoil-hat request: anyone who is able to look at the file attached in the OP, can you see if there's anything troubling or 'weird' in it. I just found the damn thing and tried it. It wasn't the most security-conscious step, but I was in a pinch.
so i had this same problem flashing hellybean 20120820 and used one of the guides here to return to stock then copied my good efs off to my computer flashed all the way back then restored the efs folder but it wouldnt stick. I tried several times fixing permissions and a few other suggestions on this forum but nothing worked. Finally i read somewhere that the cache would restore the efs folder if it wasnt cleared, so i restored my efs thru root explorer to the good one from gingerbread rebooted to recovery, wiped cache, and rebooted. Voila it finally stuck, i dont know exactly why it worked or where i heard clear the cache but it did. Maybe it will work for oyu
Psykologikal said:
Finally i read somewhere that the cache would restore the efs folder if it wasnt cleared, so i restored my efs thru root explorer to the good one from gingerbread rebooted to recovery, wiped cache, and rebooted. Voila it finally stuck, i dont know exactly why it worked or where i heard clear the cache but it did. Maybe it will work for oyu
Click to expand...
Click to collapse
Huh, that's cool. I hadn't read that anywhere before. I'm not in that jam anymore, but its good to know.
I do wonder if I all the other 'normal' methods never worked for me because I was using Heimdall. It shouldn't make a difference, but I did run into basic common problems, like repartitioning not working on Macs.
Thanks for the tip. I hope I won't need to try it.
sent from a telephonic device
I have SC-01C docom tab. during unlocking its imei became null and baseband became unknow. I try this tutorial and result in imei 0000946xxxxx.
But when I restart tab. Imei again null.
Note: there is no option of 644 in Permission.
Please help me to solve this.
nsnobel2 said:
I have SC-01C docom tab. during unlocking its imei became null and baseband became unknow. I try this tutorial and result in imei 0000946xxxxx.
But when I restart tab. Imei again null.
Note: there is no option of 644 in Permission.
Please help me to solve this.
Click to expand...
Click to collapse
Sorry to get to this reply so late. And, that I'm not sure I can help you -- I don't know anything about this tablet. This guide helped me with a Samsung Galaxy S i9000. From a quick search online, the PIT file you'd use is different. I don't know for sure, but I would guess it's possible that your EFS partition is different from the i9000, and this method would not work for you.
For permissions, you should be able to change them by long-pressing a file in Root Explorer, Root Browser or similar apps; it's not an option you choose, you manually toggle r/w, r and r for owner, group and others, respectively. Or you can use the chmod command in Terminal to set to 644, same thing.
Hi,
After trying to install an home-made CyanogenMod ROM, I can't connect anymore to the network.
When I type *#06#, it says "null / null"
*#1234# says "AP : I8190XXALL2" (the original ROM I just flashed) "CP : Unknown" and "CSC : Unknown"
Baseband version says Unknown too.
When I try to go to mobile network configuration, it says I've to put a SIM card.
Unfortunately, I've no backup of EFS or ModemFS, if the issue comes from here.
Already tried to flash stock ROMs like the I8190XXALL2_I8190OXXALL1, I8190XXAMA1_I8190OXAAMA1, or I8190XXAMA2_I8190XEFAMA1_XEF, or restoring a few old backups of the whole system. Still nothing.
I've heard I could've corrupted the EFS and lost the .nv_data file, but AFAIK it's not on the EFS partition on the I8190.
I can successfully make a backup of the EFS with EFSPro and it contains several files :
Code:
11/04/2013 19:28 <REP> .files
11/04/2013 19:28 <REP> bluetooth
11/04/2013 19:28 <REP> FactoryApp
26/11/2012 15:43 0 GUARDFIL
01/01/2012 02:15 12 gyro_cal_data
11/04/2013 19:28 <REP> imei
01/01/2012 02:02 222 pre_recovery.log
11/04/2013 19:28 <REP> RFHAL
11/04/2013 19:28 <REP> RFHAL.DEF
11/04/2013 19:28 <REP> wifi
If someone has an idea it'd be great, thanks in advance.
did u flashed stock roms with custom recovery?
I'm flashing it using Odin3 v3.07 with the phone in download mode. But I've TWRP 2.5.0.0 on it. Should I flash stock recovery and re-flash a stock ROM ?
Take it to Samsung's service center, but first make sure you flash Samsung's stock ROM and a stock recovery. I had this problem too and they've fixed it.
Is it really the only solution ? Because it's not easy for me to contact Samsung and go to a repairer.
And since this type of problems should never happens and might happen only when you're tweaking your device, can't they refuse to repair it ?
Someone working on smartphones at Intel can't fix it ?
And if I got it fixed, how should I prevent from further problems ?
Many questions, sorry… Thanks anyway.
I had this problem to and i flashed ot trough odin with a stock rom and a pit file and checked re-par. Square helped for me
Sent from my GT-I8190 using xda premium
piernov said:
Is it really the only solution ? Because it's not easy for me to contact Samsung and go to a repairer.
And since this type of problems should never happens and might happen only when you're tweaking your device, can't they refuse to repair it ?
Someone working on smartphones at Intel can't fix it ?
And if I got it fixed, how should I prevent from further problems ?
Many questions, sorry… Thanks anyway.
Click to expand...
Click to collapse
Well if you get a sloppy serviceman he won't see what you did with a device, so it all depends on him. And yes they can refuse a warranty repair, in which case you're screwed.
I recommend that you backup your partitions in the future. All of them to prevent it from happening again.
You can try repartitioning but I'm 80% sure it won't work.
Yes man, you've lost most of your efs datas.. if you don't have a backup of efs, take it to the service center
Hey, finally corrupted all my modem partition while trying a few things to get back my IMEI, none of them worked. After having it corrupted, it put me in Factory mode and I wasn't able to do anything (only system, cache and efs partitions were mounted AFAIK). Took me some time to find I had to format my modem partition (/dev/block/mmcblk0p12 if I remember correctly), but I still don't have an IMEI. Now I think all the "important" datas were stored in this partition, for exemple in the file named NV.dat (which I don't have any copy). So is a backup of this partition enough to prevent this type of problems ? And since this file might be similar with the EFS file called .nv_data.bin in other Samsung phones, interverting them might make it work ? Or am I totally wrong ? I didn't find any information related to what this file contains in reality, how it is encoded… no one tried to hack it already ?
PS: Now before sending my phone to the service center, I tried to run CM10.1 on it, but it's stuck on the boot animation and I can't connect with adb (that's not the whole story, but it's the last thing I get). Does anyone have an idea ? (I know it's a separate topic and it requires much more informations and we can't make a "working" ROM until we have source code for the NovaThor, but it may interest someone) (you can contact me by IM on the IRC Freenode network for exemple)
i dont know if this will help http://forum.xda-developers.com/showthread.php?t=1264021
Will not work since we don't have a .nv_data file or something similar, I think…
do u have efs back up?
No, that's the main problem, but event with an EFS backup, if the efs datas aren't all stored in the EFS partition, I'd have lost them, no ? (but no one confirms that they are stored in the EFS partition or elsewhere)
Main mistake was to use EFSPro. This program doesn't work correctly with i8190.
Code:
[b]GT-I8190 Partiotions layout. Названия разделов для GT-I8190.[/b]
mmcblk0p1=MBR,GPT
mmcblk0p2=MasterTOC
mmcblk0p3=PIT
mmcblk0p4=MD5HDR
mmcblk0p5=STEboot1
mmcblk0p6=STEboot2
mmcblk0p7=Dnt
mmcblk0p8=reserved
mmcblk0p9=CSPSAFS
mmcblk0p10=CSPSAFS2
mmcblk0p11=EFS
mmcblk0p12=ModemFS
mmcblk0p13=ModemFS2
mmcblk0p14=Fota
mmcblk0p15=IPL Modem
mmcblk0p16=Modem
mmcblk0p17=Loke4
mmcblk0p18=2ndLoke4
mmcblk0p19=PARAM
mmcblk0p20=Kernel
mmcblk0p21=Kernel2
mmcblk0p22=SYSTEM
mmcblk0p23E=CACHEFS
mmcblk0p24=HIDDEN
mmcblk0p25=DATAFS
Hello,
I have posted on various threads that i can fix DRK (Device root key), but after large demand in PM for the fix i have decided to make a tutorial, since i don't have much time to help everyone, this tutorial is only tested on SM-N910C, could work on other variants of Exynos, perhaps snapdragon but NOT TESTED!!!!
So how is DRK broken? Usually when you flash roms and stuff you should have EFS backup as its most important thing while rooting samsung phones, but some people just dont do that, other people use boxes like z3x for unlocking and they wipe EFS, while unlocking phones the process sometimes changes IMEI number and leaves device root key wiped. These modifications sometimes make it hard to revert back to stock and i personally had problems with device suddenly rebooting etc... with this tutorial we will try to mitigate these problems.
PLEASE DO NOT PROCEED WITHOUT SHELL/ADB KNOWLEDGE IF YOU MESS SOMETHING UP YOU WILL LOOSE IMEI AND WILL HAVE A BRICK! You have been warned and i am not to be held liable!
First we need to make backup of your EFS, we will use TAR and shell which is most reliable way (Partition Backup is good too), with adb shell:
1. su
2. cd /efs
3. tar czf efsbackup.tgz *
4. mv efsbackup.tgz /data/media/0/
Now go to your internal memory in My Computer and there should be file called efsbackup.tgz copy it somewhere safe on your PC. This is your efs backup!
Now we need to take two files which we will reuse latter, you can extract them from efsbackup.tgz but this is easyer:
1. su
2. cd /efs
3. cp nv_data.bin /data/media/0/
4. cp nv_data.bin.md5 /data/media/0/
Now go to your internal memory and copy nv_data.bin and nv_data.bin.m5 to your desktop, we will need these files later. These files contain your imei!
Now we need to reboot to TWRP and format EFS partition via terminal (We are doing this to force radio to recreate the files we lost while flashing and make system more stable, no reboots etc..)
TWRP --> Advanced --> Terminal type these (These will also fix "Failed to mount /efs (Invalid Argument)) Don't missspell, if you get error no mount in fstab, that is ok!
1. mke2fs /dev/block/mmcblk0p3
2. mount -w -t ext4 /dev/block/mmcblk0p3
3. reboot
Now the system will be booting, once done when you dial *#06# you will see generic IMEI and it's not yours, don't freakout this is how its supposed to be. Radio also recovered your default values in FactoryApp folder which is nice. Now reboot phone twice!
Let's restore nv_data and restore imei, assuming you still have those files in your internal memory do this with ADB:
1. su
2. cd /efs
2. rm -rf /efs/nv_data.bin
3. rm -rf /efs/nv_data.bin.md5
4. mv /data/media/0/nv_data.bin* /efs/
5. chmod 700 /efs/nv_data.bin*
6. chown radio:radio nv_data.bin*
7. reboot
After phone reboots your factory IMEI is back and registering to network properly, now we have achieved stable device no random reboots and clean remade factory EFS!!!
DRK REPAIR PART!
Now lets go to the part of fixing DRK Device Root Key and dm-verity error! I have attached file called prov_data.zip, extract the prov_data folder to your internal memory (This is not a flashabe zip) And run these commands with your ADB Shell:
1. su
2. cd /efs
3. mv /data/media/0/prov_data /efs/
4. chmod -R 755 /efs/prov_data
5. chown -R root:root /efs/prov_data
Device root key is now present in your device but not yet active/validated, in order to validate this, you need to flash your factory firmware with ODIN, go to factory recovery and wipe data/factory reset, and dm-verity error is now gone!
SERIAL NUMBER FIX PART
I have attached file called serial_no.zip (Not a flashable zip file), extract the file from it called serial_no open it with notepad or whatever text editor you use and replace XXXXXXXXXXX with your own serial number that is written behind your phone. Now copy serial_no file to your internal memory again and with adb we do this:
1. su
2. cd /efs
3. mv /data/media/0/serial_no /efs/FactoryApp/
4. chmod 700 /efs/FactoryApp/serial_no
Reboot and done, you have your serial number back *#06#!
FACTORY CSC FIX PART
Download the file called csc_repair.zip, inside you will see the file called mps_code.dat, open it with notepad or whatever text editor you use, type in your factory CSC instead of XXX in my file and save. If you cant find your factory CSC, go to Kies or SmartSwitch, initialize firmware, type in your serial number and device model it will show your factory CSC for reinstall, this is your CSC. Now copy mps_code.dat file to your internal memory and again we run ADB Shell:
1. su
2. cd /efs
3. mv /data/media/0/mps_code.dat /efs/imei/
4. chown root:root /efs/imei/mps_code.dat
5. chmod 755 /efs/imei/mps_code.dat
This is it, if you can follow these steps you can get clean factory remade EFS partition, with your own IMEI, Serial Number, CSC Code, DRK/dm-verity fixed. Flashing factory ODIN firmware after this will make your phone work as it should!
i have this issue on the n910t... I have full access and a working phone but it lags a lot... youtube videos stutter and when typing some words they keyboard, well all keyboards stutter too... this began to happen when my phone started showing me this message, you see the phone was unlocked by certfile with octoplus or z3x... then it lost signal but when i tried to wipe efs, the phone recovered its own imei and serial... So i unlocked it normally with z3x but had to downgrade the modem from EPE3 to DOK2 to unlock it.... then i restored the complete firmware to the latest version of android 6.0.1 and it showed me the DRK problem..
I'm going to try this tutorial and see it this stops all the stuttering every 8 seconds,..
SeerePetrova said:
i have this issue on the n910t... I have full access and a working phone but it lags a lot... youtube videos stutter and when typing some words they keyboard, well all keyboards stutter too... this began to happen when my phone started showing me this message, you see the phone was unlocked by certfile with octoplus or z3x... then it lost signal but when i tried to wipe efs, the phone recovered its own imei and serial... So i unlocked it normally with z3x but had to downgrade the modem from EPE3 to DOK2 to unlock it.... then i restored the complete firmware to the latest version of android 6.0.1 and it showed me the DRK problem..
I'm going to try this tutorial and see it this stops all the stuttering every 8 seconds,..
Click to expand...
Click to collapse
I am not sure if it will work on N910T variant, but you can try it. DRK error happened on your note because z3x wipes EFS and then writes new nv_data.bin, but by wiping it destroys your prov_data/dev_root folder which contains DRK. If you think your EFS partition created your problem, you can start from the start and format EFS to make it factory and then proceed.
Hey there!
I recently bought a used Note 4 910C. I was told by the shopkeeper that it has never been tempered with. But OTA update fails bcuz of DRK error. I guess someone did try something with it previously. I manged to update Marshmallow via ODIN.
yesterday I rooted it and followed your DRK REPAIR Part. flashed via ODIN for validation but the error still exists. I did not do the whole method from the beginning ( I backed up EFS and nv_bin). Plz tell me what did I do wrong.
Another thing that may be of some importance. The serial no was different form phone's back in just one letter in the middle. Instead of '5' it was showing 'S'. I wonder it can not be by mistake. there must be some messing up previously.
Anyway I followed ur method of SERIAL NO repair and managed to repair the serial no. The IMEI was already a match.
Plz help me what should I do for DRK repair.
Regards.
Usually when you restore prov_data folder properly, you need to go to twrp, format system, data and cache. Then with odin flash stock firmware with your own csc code (do csc repair if its not a match). After that phone should boot to stock recovery, then do format data/factory reset from stock recovery. It should say something like "verifiyng dm-verity" when you go to reboot. After system boots when you go to recovery again it wont show drk error anymore. Tested 100% on 910c variant.
magix01 said:
Usually when you restore prov_data folder properly, you need to go to twrp, format system, data and cache. Then with odin flash stock firmware with your own csc code (do csc repair if its not a match). After that phone should boot to stock recovery, then do format data/factory reset from stock recovery. It should say something like "verifiyng dm-verity" when you go to reboot. After system boots when you go to recovery again it wont show drk error anymore. Tested 100% on 910c variant.
Click to expand...
Click to collapse
So I'm doing the drk fix on my smg925p device and when doing the drk commands the prov_data folder doesn't move to the efs folder it stays in my internal memory and i did the restore and reset and i still get the drk error clearly a command or something is wrong
Use root explorer to move the folder then
magix01 said:
This is it, if you can follow these steps you can get clean factory remade EFS partition, with your own IMEI, Serial Number, CSC Code, DRK/dm-verity fixed. Flashing factory ODIN firmware after this will make your phone work as it should!
Click to expand...
Click to collapse
1. su
2. cd /efs
3. tar czf efsbackup.tgz *
4. mv efsbackup.tgz /data/media/0/
Testing........I was able to make a backup of efsbackup.tgz on a phone without any dm-verity damage. So the command works.
But on the phone that needs efs repair, when I run the command tar czf efsbackup.tgz * with Terminal Emulator
I get the error message tar: efsbackup.tgz: file is the archive; skipping
Any thoughts anyone?
Try with busybox installed and system root not systemless.
magix01 said:
Try with busybox installed and system root not systemless.
Click to expand...
Click to collapse
Thanks, that worked. The phone I'm working on is a SM-N910V and it does not have the files nv_data.bin or nv_data.bin.md5 inside the efs folder, any suggestions?
Can I send you my efs folder for repair?
I have two SM-N910V one is Okay. could I pull some files from the good one to help fix the damaged one?
+1 N910F have dont the nv_data's...my efs it's okay, i only wanna look
magix01 said:
Try with busybox installed and system root not systemless.
Click to expand...
Click to collapse
SM-N910V I decided to give this a try.
I used Root Browser to change the name of every file and folder inside the efs folder. I just added a 1 to the end of the names so I could revert back if needed.
I rebooted the phone, went back to check the efs folder and it had regenerated everything I needed to keep. And it didn't load the junk files. The phone runs like it's using AdAway on steroids.
What do you think about that. Why did it work.
http://forum.xda-developers.com/note-4-verizon/general/spyware-fix-fixed-lag-wi-fi-problems-t3433839
HI im having trouble doing the third command in DRK repair . it say that it cant be moved becuase the directory is not empty what should i do ?
I can confirm that it doesn't work with the Samsung Galaxy S6 Edge Sprint Model (SM-G925P)
bro i use your method to recover sn number and i get my serial number back but when i reboot its gone null again what can i do bro
Thank you! I use this method to restore the serial number and fix DRK on the phone Samsung SM-A310F Galaxy A3 (2016)
This method is full working on sm-n910g but still dm verification failed messages
Efs restore and phone working well
So thank u magix01
is it possible to use your files on my note edge n915fy ??
i have done everything but i can get back original emei. DRK everthing seem ok.serial number said no when i dial *#06# but i can see it on settings -status...
my phone can no register nto network
..please help.
doctor-cool said:
Thanks, that worked. The phone I'm working on is a SM-N910V and it does not have the files nv_data.bin or nv_data.bin.md5 inside the efs folder, any suggestions?
Can I send you my efs folder for repair?
I have two SM-N910V one is Okay. could I pull some files from the good one to help fix the damaged one?
Click to expand...
Click to collapse
Did you get any fix? I'm also missing these files in my N910T.