yashsingh1/xdaforums huggingface dataset:
[Verizon Samsung Galaxy S III] ddggttff3:
That just says Rebooting Recovery.... and always happens when you enter recovery mode, this is a whole different beast.
[Verizon Samsung Galaxy S III] invisiblek:
this backs up our partitions, basically the opposite of what you think is happening here

we don't have fastboot on d2vzw :(

nvrestore, nverase and nvrecovery look interesting though...

particularly nvrecovery

EDIT: nvrecovery just does an nvbackup and then goes into recovery
[Verizon Samsung Galaxy S III] bgolden84:
Never looked. But knew it was normal.
[Verizon Samsung Galaxy S III] TrevE:
badass exactly what i was hoping for. So in theory if the stock process works right you should have valid data if those partitions if you ever trip up on something. If your IMEI ever goes bad, the first command I would run would be

adb shell reboot nvrestore

and try to kick it back from those known good images using stock functionality. Although my ongoing theory is there is a "stock" image in fsg/backup parts and its getting restored without a new backup ever being created, so hopefully what you did will cause you not to loose it in the first place.

If you run another one of my flashable backup's now you should have valid data in both partition sets now as a double layer of protection.
[Verizon Samsung Galaxy S III] alee:
I'll join the club. Lost my IMEI while doing the latest CM10 nightly. Restored and was back in action in no time.
[Verizon Samsung Galaxy S III] bgolden84:
Any chance we can do this from terminal?
[Verizon Samsung Galaxy S III] TrevE:
In terminal you prolly can just run as su

reboot nvbackup

dont ever do the restore unless you need to. I dont have a gs3 so im shooting in dark but it should work.
[Verizon Samsung Galaxy S III] bgolden84:
Thanks. Not sure I wana b the first to try but here goes brb
[Verizon Samsung Galaxy S III] ddggttff3:
Noted, if I ever loose my IMEI I will try that command and see if it comes back. (also have a backup I made using your script, as well as a nv dump, so I should be set)

also, maybe have some1 try the command without doing a backup first? if they loose there IMEI, culprit possibly found.
[Verizon Samsung Galaxy S III] bgolden84:
Worked fine from terminal. Pretty fast as well. It just booted to a black screen threw out two lines and rebooted

---------- Post added at 12:44 AM ---------- Previous post was at 12:37 AM ----------

Seems like a giant derp on Sammy's behalf for not forcing a backup on first boot or something.....
[Verizon Samsung Galaxy S III] TrevE:
i think a good test would be one of the guys that lost your IMEI recently with CM10 and came back using my restore method to a recent backup (they would for sure have the "bad data" in theory in fsg/backup, which is restored by my script to what they had before) to run an

adb shell reboot nvrestore

without running a backup first and see if they bork their imei again. Hate to purposely break someone but that would prove if thats the command screwing you guys
[Verizon Samsung Galaxy S III] ddggttff3:
well question is, does nvrestore also output to the screen when ran? if so, then it probably is not the case as I have yet to hear of anyone having there screen flasgh text after loosing a IMEI. Guess I need to test this quick ;)

EDIT:

Yep, restore outputs to the screen just like backup so unless its somehow executed in the background while the OS is running, this may not be the cause :(
[Verizon Samsung Galaxy S III] invisiblek:
nverase doesn't seem to do anything, i just ran it and it booted up and all works fine

it vibrated twice and booted up fine =/

i have someone who is going to test restoring a 'bad' backup

more to come...
[Verizon Samsung Galaxy S III] bgolden84:
I may be way way off. But if this is the cause you could just run nvrestore and bork your imei at will if you had not ran nvbackup. Or am I way off lol

Would not do this with out flashing the zip to back everything up before hand else you would be completely sol.

---------- Post added at 01:04 AM ---------- Previous post was at 12:59 AM ----------

It is possible that its a fail safe triggered and would not show output.

Maybe something gets wacky in the bootchain. Thus. Causing a trigger of nvrestore. But I'm no dev so I'm more or less talking out my arse
[Verizon Samsung Galaxy S III] BillBauman:
I'm not sure if this helps you at all, but I had a lost IMEI, had manually restored it (didn't have a valid backup) and was stuck in roaming. I went ahead and ran adb reboot nvrestore and the phone came back up with missing IMEI again.

Another thing to note that I haven't seen discussed, which deals directly with the roaming issue, is that the "ERI version" is "None" when the IMEI is lost. On all the working GS3's I've looked at the "ERI version" is "5".
[Verizon Samsung Galaxy S III] TrevE:
Have people been in ODIN mode flashing things recently when this happened? These modes get written out to param.img so maybe it gets hit someway else? Or something low like the radio itself decides to run it? Or I guess theres the possibility its another bug causing corruption and maybe the restore command is just not called and would be enough to save someone with a lost imei?

from http://xdaforums.com/showpost.php?p=28953690&postcount=67 we know the hexcodes, combining that with kernel code we get the following reboot commands

nvbackup == 0x77665511 - copy modemst1 to fsg partition and copy modemst2 to backup partition. sets param_header.nvdata_backup to 1

nvrestore == 0x77665512 - copy fsg to modemst1 and copy backup to modemst2. checks to ensure param_header.nvdata_backup=1 first

nverase == 0x77665514 - erase fsg and backup partitions. clears param_header.nvdata_backup

nvrecovery == 0x77665515 - same as 0x77665511 but then reboots the device into RECOVERY_MODE

*edit* so in theory you cannot erase and then restore. The only possible way would be bad/generic data in backup parts from factory or theres some type of corruption in main parts and its not smart enough to restore itself?

Everyone might not have bad data in the backup partitions, somehow, somewhere these backup commands might get run for some people and not others?
[Verizon Samsung Galaxy S III] con247:
Hopefully if everyone just does reboot nvbackup while they have an intact IMEI we would stop losing them because entirely.
[Verizon Samsung Galaxy S III] bgolden84:
Not sure if that would be the case it may Be a corruption issue. Where nvbackup file is corrupted or something to that effect

Also as far as I can remember the d2spr. Has no imei loss issues. Well none that I have seen. Seems a little strange.
[Verizon Samsung Galaxy S III] con247:
Hence the "hopefully"

If corruption is the issue then this probably won't work. However, if the device just restores a blank backup then this should prevent the issue from occurring if you backup before you lose it.
[Verizon Samsung Galaxy S III] bgolden84:
True. I hope we can get this nailed down. With this backup zip deff seems like a sure fire fix. I used to be on sprint and had the d2spr. Never saw a imei loss complaint on there side I wonder why?

---------- Post added at 01:31 AM ---------- Previous post was at 01:28 AM ----------

Also think this method should be stickied in all sgs3 us variant dev forums. It could save alot of headaches. And is alot more simple than the qpst method that is hit or miss for some.
[Verizon Samsung Galaxy S III] TrevE:
This helps alot actually, just not you unfortunately.

My theory here - you had some kinda garbage or a "factory profile" in your backup/fsg partitions. That data got copied over your modemst1/st2 with a nvrestore (somehow) and you lost your IMEI. You fixed it by reinijecting an IMEI into this "stock" profile thats probably from factory and missing stuff - which is why it performs weird with things like roaming.

When you just ran adb shell reboot nvrestore it once again did the same thing the oriiiginal bug did, copy fsg/backup -> st1/2 blanking your IMEI

My theory still stands that hopefully if you had data in your fsg/backup partitions to start with by running an adb shell nvbackup, you wouldnt have lost it in the first place when it went to restore (for whatever reason)

I know its kinda a bummer for you, but it helps everyone else :|
[Verizon Samsung Galaxy S III] bgolden84:
Treve. I can't say this enough bro you are awesome and thank you for all you have done for the community as a whole. I have been around since the g1 days and used your work on several of my phones. My wife says I have issues lol. But seriously thanks bro thanks a million.
[Verizon Samsung Galaxy S III] BillBauman:
Don't worry about me, I'll be okay. ;) But thanks for the compassion.

I have some other info that might interest you. If I run the backup zip against a fully functional phone and then restore it against a phone that had lost the IMEI, it essentially "clones" the functional data to the non-functional phone, but it does not fill back in the ERI. This makes me wonder if something in that binary data is very device specific and/or it still doesn't have all the data we need in the event of loss/corruption on one of these devices. Once that procedure has been done, I even tried doing a QCN restore to the corrupt phone (as it would now accept the backup done against the functional phone). It didn't really change the status of anything. From there, I did re-input the corrupted phone's original IMEI, which brought it back up, but still in roaming.

Basically, this sort of confirms for me that I can't just clone the functional code from a good phone to a corrupte phone and get benefit from it. I'm hoping it helps your understanding of the situation even more.
[Verizon Samsung Galaxy S III] con247:
After reading all of this, I would recommend our root script do this:

Manually dd backup the partitions that your synergy flashable backup does. That way we have a rough backup that can be manually packaged up in the event of an immediate IMEI loss (which would be unfortunate)

Then, at the end of the root script, run "reboot nvbackup"

That way, when the device was done being rooted, there would be the .img backups on the SD card and valid backup data on the device. Hopefully that would cause nobody to lose their IMEI in the first place by forcing there to be valid backup data and it would allow for someone who didn't do enough reading to restore their device from the backup images that were made without their intervention.
[Verizon Samsung Galaxy S III] WildZontar:
Wouldn't it make more sense to run nvbackup first, assuming the current theory is correct? The script images fsg and backup, two block devices that Samsung's nvbackup copies data to. By running nvbackup and then imaging every partition, I would imagine you now have Samsung's built-in nvrestore to help, and if that fails, then you can use the Synergy zip to flash everything all back.
[Verizon Samsung Galaxy S III] TrevE:
Thanks for the kind words man :) Just trying to help I know how frustrating things like this are for everyone and you guys shouldn't need to be scared of crippling your new shiny toy flashing roms making it run how it should :) Its been fun for sure though without actually having the device or anyone that can reproduce this at will

Interesting, pretty cool it clones it (lalala look away legal naysayers) but the ERI thing is weird. I have no clue what that actually is.

Yeah nvbackup first would make most sense, but prolly be most difficult to code into just an updater.zip to happen first. This way you are hopefully protected against restoring some factory nonsense, and have a "good" copy of both the main and backup parts to restore from like you said. incase of catastrophe use stock nvrestore first, dd'ed parts second.
[Verizon Samsung Galaxy S III] bgolden84:
I just posted in all the threads I follow how to do the nvbackup from terminal. And linked to this thread as well. I feel everyone should do this. I know when I first found out about this issue I was ****ing bricks. Didn't want to do anything to the phone. After you Giuseppe posted your zip. I flashed it. Then did a qpst backup and the terminal DD commands as well. Call me paranoid biting love my $600 phone lol. Thanks bro no more ****ing of bricks for me.
[Verizon Samsung Galaxy S III] BillBauman:
The ERI, based on my limited research, is the Extended Roaming Indicator. As I understand it, it has something to do with defining/indicating whether or not you are roaming and in which roaming mode/geo you may be.

Since we're dealing with phones that seem to think they're permanently stuck roaming, and the piece of information missing from the phone after IMEI corruption has the word roaming in it (ERI), I figured there might be some connection. Of course, it could just be a text-based field and have nothing to do with the issue at hand at all.
[Verizon Samsung Galaxy S III] eman3316@optonline.net:
Has anyone lost their IMEI flashing a ICS TW Rom or has this just been present when going to an AOSP based ROM and JB?
[Verizon Samsung Galaxy S III] Hasherx1:
reboot nvrestore FIXED MY ROAMING ISSUE

OMFG>... YOU GUYS ARE AWESOME.., I had the IMEI lost and then added it back.. was in roaming. I did the reboot NVRESTORE command from a terminal. The phone rebooted and then I could not get it to restart.. I pulled the battery and did a boot into RECOVERY. I did a NANDROID RESTORE of a backup I took.

The PHONE BOOTED .. IT now shows I AM on Verizon Wireless and I have Roaming Turned OFF. THIS RESTORES you back to being NORMAL.

Once Again It worked for me I HAVE my system looking NORMAL ... NO R or Triangle and Roaming is turned off. If you want I can send screen shots.

Steps taken:

1. Nandroid backup of current set up.

2. Open Terminal enter su then reboot nvrestore

3. Tried to boot up but was left on a black screen so I pulled the battery and booted into Recovery (vol up + home + power buttons).

4. Restored the previous backup I had just done.

5. Rebooted and turned off roaming after seeing that the phone is now finding Verizon Wireless and I get normal 4g and no R or Triangle.

Again PROPS to you guys that have the time to research. Awesome.

---------- Post added at 01:32 PM ---------- Previous post was at 01:27 PM ----------

OMFG>... YOU GUYS ARE AWESOME.., I had the IMEI lost and then added it back.. was in roaming. I did the reboot NVRESTORE command from a terminal. The phone rebooted and then I could not get it to restart.. I pulled the battery and did a boot into RECOVERY. I did a NANDROID RESTORE of a backup I took.

The PHONE BOOTED .. IT now shows I AM on Verizon Wireless and I have Roaming Turned OFF. THIS RESTORES you back to being NORMAL.

Once Again It worked for me I HAVE my system looking NORMAL ... NO R or Triangle and Roaming is turned off. If you want I can send screen shots.

Steps taken:

1. Nandroid backup of current set up.

2. Open Terminal enter su then reboot nvrestore

3. Tried to boot up but was left on a black screen so I pulled the battery and booted into Recovery (vol up + home + power buttons).

4. Restored the previous backup I had just done.

5. Rebooted and turned off roaming after seeing that the phone is now finding Verizon Wireless and I get normal 4g and no R or Triangle.

Again PROPS to you guys that have the time to research. Awesome.
[Verizon Samsung Galaxy S III] WildZontar:
Weird! o.O Two conflicting reports using an nvrestore without an nvbackup. According to the current theory, Hasherx1's phone should have never restored! My only guess is that his phone had a "good" backup while BillBauman's phone did not, although that leaves the question as to what totaled Hash's phone to begin with.
[Verizon Samsung Galaxy S III] TrevE:
Zigg just laughed at me for being too young and not knowing ERI :) silly old guy. Your on the ball with the roaming stuff though, thats correct to what it is and sounds like what could be borking you. But from what I see it looks like sec-ril populates those fields based on these prop fields, what do yours return if you run

adb shell getprop ril.eri_num

adb shell getprop ril.eri_ver_1

stock values on a working phone I believe should be

[ril.eri_num]: [1]

[ril.eri_ver_1]: [E:5]

Where that eri info is actually pulled from to get into the prop vars I'm not sure. If you guys know anyone on AOSP/AOKP that have ported RIL stuff it might be worthwhile to pick their brains and see if they know more on these.

Very weird, not sure exactly whats happening yet. Might lead some credence to the second theory, I think right now the best thing is to have everyone and there mothers run the nvbackup and see if anyone else corrupts there IMEI after having a legit backup done. Maybe its the "not smart enough to save itself" theory, maybe were battling 2 different things, not really sure. But you guys have the tools now between the stock and dd backup to atleast to mess around and narrow this down even more.
[Verizon Samsung Galaxy S III] droidstyle:
a few folks lost it on synergy, but it mainly happens on aosp.
[Verizon Samsung Galaxy S III] TechBSwift:
Sorry if I missed it but where does the backup save after doing nvbackup? I would like to make a copy of that and email it to myself.
[Verizon Samsung Galaxy S III] TrevE:
reboot nvbackup copies modemst1/modemst2 to the FSG/Backup partitions. If you rerun the flashable backup zip I created after doing a reboot nvbackup it will make you an image of these partitions as well. My script backs up & restores efs/st1/st2/fsg/backup partitions.

If anything goes wrong and you created a nvbackup and a new "flashable" efs backup afterwards-

-First try running adb shell reboot nvrestore. This will use stock functionality to restore IMEI

-If above didnt work, flash your recovery IMEI the script created. This will restore all your partitions.

-If things still dont work for some whacky reason after restoring parts, you can try to nvrestore again, in theory you have 2 good copies of your nvdata you backed up so this is the "failsafe's failsafe"
[Verizon Samsung Galaxy S III] niv3d:
Ok so from what I've been reading over the last few pages is that running reboot nvbackup we should no longer have an IMEI issue? Can this be run on aosp or should we be on a TW ROM? Also IF we were to lose our IMEI we would just run reboot nvrestore?
[Verizon Samsung Galaxy S III] bgolden84:
You are correct. I'm running aokp and ran reboot nvbackup from terminal w no issue.
[Verizon Samsung Galaxy S III] knifedroid:
So, uh, anyone want to start a bounty to get TrevE an s3? I think the man deserves one!

Sent from an overpriced Verizon tower.
[Verizon Samsung Galaxy S III] bgolden84:
No doubt I think we should all pitch in. Between this thread and the synergy thread should have no issue drumming up enough donations to get TrevE this phone. That is if he wants it
[Verizon Samsung Galaxy S III] Hasherx1:
Okay so here's my story I was actually going back and forth between cyanogen and stock root restore and I was then re backing up and restoring. One night I did a nandroid backup when I went to reboot and I came back up without the IMEI. So I had not had any problems since then and decided to try this restore. I'm just wondering if my situation was a little different because I only lost after a reboot and restored it with the qpst right away.
[Verizon Samsung Galaxy S III] BillBauman:
The only ROMs I've tried were Beans8 and Synergy 1.7 through 60s. Interestingly, none of the flashing of those ROMs casued a lost IMEI. When I installed IMO's Lean Kernel .4, I lost my IMEI. So, from my experience, you can lose your IMEI from just a kernel update.

---------- Post added at 12:23 PM ---------- Previous post was at 12:17 PM ----------

I think there are some other relatively significant differences in phones. I have seen two different "versions" now, and the date doesn't seem to have much to do with the "version". If you pop your battery, you might have one of two labels (and there may likely be others). One has your IMEI and MEID, the other only has your IMEI. The double-label doesn't label them, and the single-IMEI label actually labels that it is the IMEI. It also has a phone number to call, the other does not. What's interesting is, the single-lable, only-IMEI version is 12.07, the double-lable (seemingly increased information), on my headset, is 12.06. The 12.07 version does not have a date on the label, but that phone shipped in July. The 12.06 version DOES have a date, or August-something, (can't remember exactly). I think it's likely the "newer" phone with "older" "version" got factory refurbed.

Note, this phone definitely does NOT act the way the 12.07 phone does. Off-topic, but for those of you with differing WiFi issues and 3G-to-4G transition, and WiFi-to-OTA transitions, the 12.06 phone, even with newer date, is certainly nowhere near as competent as the 12.07 phone is, in my experiences.

I think there are a lot of variables to consider. One, does your MIN match your number (basically, were you a brand new number & activation, or were you ported or moved from a different phone)? What "version" does your phone state on the inside label? Do you have a date on it? Etc., etc.

---------- Post added at 12:25 PM ---------- Previous post was at 12:23 PM ----------

... and when just flashing a kernel (in my case from CWM flashing Lean Kernel .4)

I'm of the belief that almost any sort of flash can cause this.

---------- Post added at 12:28 PM ---------- Previous post was at 12:25 PM ----------

I'll pull this in a bit and get back to you. I think if we (basically, you smart people) can figure out where the ERI data is, we might be on to a fix for the roaming issue.

BTW - where do you find the source for the code on our phones? I'm happy to peruse it some.
[Verizon Samsung Galaxy S III] omgi0wn:
Ok, so it looks like some progress was made recently. Can anyone please make a comprehensive post of what has just been discovered, and the new steps, if any, that are now involved in backing up and restoring our IMEI? I would really appreciate it, thanks!
[Verizon Samsung Galaxy S III] bgolden84:
Not trying to be rude at all. But the best thing you could do for yourself is read the entire thing first page to last page. I don't think you would be able to sum this up in one post
[Verizon Samsung Galaxy S III] omgi0wn:
Well I have read the post practically front to back. I just noticed that TrevE has made some progress.

"reboot nvbackup copies modemst1/modemst2 to the FSG/Backup partitions. If you rerun the flashable backup zip I created after doing a reboot nvbackup it will make you an image of these partitions as well. My script backs up & restores efs/st1/st2/fsg/backup partitions. "

And I am not entirely sure what to do. What can reboot nvbackup do that the current script he has doesn't do? I backed up using his flashable zip before the reboot nvbackup commands have been discovered. Would there be any difference in my backup file if I did a reboot nvbackup and then ran his flashable backup zip again? If so, what differences would there be and how would they be beneficial to me rather than having just ran it before all of this.