yashsingh1/xdaforums huggingface dataset:
[Verizon Samsung Galaxy S III] mybook4:
Some more info:

-I've never lost my IMEI (knock on wood).

-Ran your backup zip

-ran adb shell, followed by reboot nvbackup

-manually dd the same partitions (from your backupefs script in the CWM zip)

-ran adb shell reboot recovery

-ran your backup zip again

-ran an md5sum on all the images and had the following results:

Before executing reboot nvbackup (from backup using your zip)

a2b9978ee487735497ed2f92537596ee p11_efs.img

e286681521ff1d52e69b5446a6ce92ce p12_modemst1.img

2e395df67366d3808783f4dc30194918 p13_modemst2.img

8d6f0d1429bcf7d554459b12daf9740c p20_backup.img

6766115563a2b2c66ccc4f72bcde1414 p21_fsg.img

After executing reboot nvbackup (via manual dd)

acbee2449057e643c28d585bba4b30f0 mmcblk0p11efsAfterNVBACKUP.img

11b230a4ccabe6955f19093f1bfea1dd mmcblk0p12modemst1AfterNVBACKUP.img

2d3f44c1021c753de96e79e73ff5ea5b mmcblk0p13modemst2AfterNVBACKUP.img

5ba8b57837be475d657e30f114b3211b mmcblk0p20backupAfterNVBACKUP.img

0605e37d60c9965178140224ae18b471 mmcblk0p21fsgAfterNVBACKUP.img

After executing reboot nvbackup (from backup using your script)

c57b984f51f4b54d4b112bdfa2ad3a74 p11_efs.img

82bd1904a80a72adcd53bacb6aa82196 p12_modemst1.img

2d3f44c1021c753de96e79e73ff5ea5b p13_modemst2.img

5ba8b57837be475d657e30f114b3211b p20_backup.img

0605e37d60c9965178140224ae18b471 p21_fsg.img

Seems like all the partitions have been changed after the nvbackup. Additionally, efs and modemst1 was changed on reboot between the two post nvbackup reboots.

MISC info:

-I believe somewhere earlier in this thread someone reported of someone losing their IMEI simply rebooting the phone. Losing IMEI may accompany flashing. I would venture a guess that most of us don't reboot unless we are flashing something in recovery (which could be why some are associating losing IMEI to flashing).
[Verizon Samsung Galaxy S III] bgolden84:
I think the logic is. That if your device has a bad or missing NV backup. That's what's derping the imei.

So this is trying to make sure that the phone has a nvbackup that is a known good configuration. That way if it trips the fail safe thats rewriting nvdata it will be ok. Correct me if I'm wrong TrevE
[Verizon Samsung Galaxy S III] TrevE:
Wow guys, pretty cool. I would never want to ask for something like this but if its something the community would like to do I wouldn't say no - it sure would make things easier (and I would appreciate it)

-----------------------------------------------------------------------------

So here's the most current up to date info:

What we now have confirmed (because the synergy keyrestore.zip method works) is the issue is occurring in one of these following partitions.

[B]radio/nvdata partitions:[/B]
13-modemst2 & 20-backup
12-modemst1 & 21-fsg
11-EFS

The likely candidates are something is going bad modemst1/modemst2, one or both of these parts seem to be fusemounted(or something similar) to the EFS part (11). (see more here for EFS filesystem details)

Anyway, my ongoing theory is this is happening one of two ways

FSG & Backup contain a factory image and a new backup is never performed. A nvrestore somehow gets tripped and these partitions are copied over modemst1/modemst2 giving you a factory profile/imei.

Actual corruption in modemst1/modemst2 (See GS2, they had EFS corruption issues on the EFS part). In this case the phone may just be able to run a nvrestore and fix IMEI from the backup partitions. There may just be no process for the phone to automagically do this.

For reference, here are all the reboot codes and what they do:

So until the root cause is pinned down a bit more, I recommend the following. Following these backup steps exactly in this order gives you best chance of restoring, and it may cause you not to loose it in the first place. Please post if you loose your IMEI and have done a nvbackup

Backup: (Script attached here)

Please remember to protect your backup from step 2 (/sdcard/synergyrom/backup/keybackup_*.zip) its your failsafe if things go bad. Also note this data could be used to clone your phone if it got into the wrong hands so be safe

Restore:

You lost your IMEI

and followed the above backup stuff

, now what?
[Verizon Samsung Galaxy S III] Hasherx1:
My phone was a new phone but I used the same sim card as my Galaxy nexus and ported everything over. There is an interesting bug when moving the SIM card from the Nexus to the Galaxy S3 I found. The Sim that was used on the Nexus would not allow 4g on the S3 at all. I could go to phone info and change it from LTE/CDMA/EVDO to LTE Only and get LTE Data. So I had to go in and swap to a new SIM to get 4g to work.

In my case I had been playing .. I flashed cyanogen 10 2 times. The 2nd time I just did a nandroid of it and then went back to stock root and unlock. I had planned on playing some more with cyanogen and then did another nandroid and it was after that nandroid when the phone rebooted back up I had lost IMEI. I did read through and had done the dd backup to esf.sbn but as I read later on this was not good enough to restore the IMEI. So I broke down and went to qpst and added the IMEI back in by writing record 550 back with it in there. At this point I had been using my SIM again in the NEXUS. After pulling the SIM and putting it back into the S3. I rebooted and the phone came back on 3g only just like the first time I used the SIM from NEXUS to S3. I had not had the roaming problem at this point. But I did note that the ERI version was blank. I had to replace the SIM again and that is when I had the Roaming Issue.

I had tried restoring the esf.sbn via a dd in the terminal but this did not solve it either. After reading further in this thread I tried the backup and then restore of the Synergy to see if maybe something would be pulled and then added back. It still did not work. I then read about the reboot nvrestore command and so I figured ...what the heck. I did that and I must have had a good nvbackup because I rebooted and at first only got a black screen after the SIII screen. I then pulled the battery ... booted into recovery and restored a nandroid backup .. rebooted again and my phone came back up with no roaming issues. the ERI = 5 showed as well in the status.

My phone is the version with only the IMEI , it does have a 1207 date and the 888 phone number on the label behind the battery.

I believe you are correct in stating I got lucky to have a good nvbackup that the reboot nvrestore was able to copy back and allow it to fix everything.

So the position would be to determine how to restore when an IMEI is 0 and the nvbackup is bad.

I have since did the Synergy backup to ensure I copyed the information out again to be safe . But I am almost of the opinion we have to determine exactly what would trigger the reboot nvbackup. I think maybe someone may have flashed .. got a bad IMEI at some point but somehow reboot nvbackup had occurred which backed up the bad nv partitions. In my case I did alot of searching in the NV records and did find that I showed alot of records were bad and unable to be read in by QPST.

This is all the information I can provide you regarding my phone and it's restoration. I got lucky in having a good nvbackup that could be restored.
[Verizon Samsung Galaxy S III] tu3218:
Wow , a lot of good informatiom here! A bit overwhelming I must add as well lol. So is the reboot nvbackup the replacement of running the flashable zip? I know a couple users have restore their imei using the zip but just confused. I have a backup of every way now thats been talked about lol
[Verizon Samsung Galaxy S III] BillBauman:
I suspected it would look a little off.

# adb shell getprop ril.eri_num

1

# adb shell getprop ril.eri_ver_1

E:None
[Verizon Samsung Galaxy S III] neyenlives:
not sure if it matters, or if it's needed, but i have synergy backups from both before and after the nvbackup command, if someone wanted to do a comparison. or tell me where to look...just putting it out there
[Verizon Samsung Galaxy S III] s197:
No.

TrevE just walked you through the backup steps a few posts above. I don't know how it can be any clearer.
[Verizon Samsung Galaxy S III] BillBauman:
Disregard message. Wrong source.
[Verizon Samsung Galaxy S III] imablackhat:
So all this talk about commands and crap, can't I just flash the zip to back up and if I ever lose just flash the backup to restore? One person had it reported to work.

Sent from my SCH-I535
[Verizon Samsung Galaxy S III] Zalithian:
Someone also had QPST work, but as we have seen it's not guaranteed. There's nothing difficult about typing a one word command in terminal. Really depends on how much you value your IMEI if it's necessary for you.
[Verizon Samsung Galaxy S III] neyenlives:
I wanted to say that I had done every backup method since the beginning, including the synergy zip method, but had not yet done the nvbackup in adb, and in order to test a theory i did the nvrestore adb command to see if we could force it to load a bad backup and it looked like it performed it, small blue writing at top of screen. But then the screen went black and was soft bricked. Pulled battery, booted into recovery, loaded nandroid backup, and IMEI was still fine and intact. I then did the nvbackup and then another synergy zip backup...:cowboy:
[Verizon Samsung Galaxy S III] Hasherx1:
You had the same situation I did when I did the reboot nvrestore.. I had to restore from nandroid too. So now I know that a nandroid backup is necessary to recover after it. I also did the synergy backup but did not do a reboot nvbackup because what I had there was good.
[Verizon Samsung Galaxy S III] TrevE:
Here's how I understand ERI - (This is the roaming issue pretty positive now)

/system/framework/framework.jar contains ERIManager.java, which contains the following methods to load an ERI - loadEriFileFromFileSystem() / loadEriFileFromModem() / loadEriFileFromXml()

The methods loadEriFileFromFileSystem() / loadEriFileFromModem() are empty, just no code there. loadEriFileFromXml() seems to be the only valid option.

Inside loadEriFileFromXml() its looking to two different locations. One i found pointing to /system/framework/framework-res.apk in /res/xml/eri.xml to parse. Not sure about the secondary file yet -- but wherever it is is pretty important and obviously QPST restores will not touch XML files - only NVItems - so it could very likely be somewhere in those fusemounted parts? Thats why we are not getting the roaming issue doing a full backup like this method.

Logcat also might show the location in the full status messages, without the device its up to you guys to play around.

It looks like when its loading ERI it should spit out one of the following to logcat, it might help narrow it down if you get the text of yours vs everyone elses:

"CDMA", "loadEriFileFromXml: opened alternate file"
"CDMA", "loadEriFileFromXml: open normal file"

there's also other logcat statuses like

"CDMA", "ERI File not loaded"
"CDMA", "Error Parsing ERI file: "
"CDMA", "loadEriFileFromXml: eri parsing successful, file loaded"
"CDMA", "loadEriFileFromXml: no alternate file"
"CDMA", "loadEriFileFromXml: no parser for alternate file"
"CDMA", "Got exception while loading ERI file."
"CDMA", "Error Parsing ERI file: found"

You should be able to do something like

adb reboot | adb wait-for-device | adb shell
logcat | grep loadEriFileFromXml

It might even make sense to grep on the CDMA tag instead of loadEriFileFromXml to see all the messages, but would probably return a hellofalot more. With these status's at least we can find where the people stuck in roaming are hitting in code if we can get a comparison of working vs not.

Also because we know one file its looking for is in framework-res for ERI, have you tried ODIN completely stock and maybe messing with a nvrestore or something and see if it load ERI at that point?
[Verizon Samsung Galaxy S III] amoamare:
Sorry like i said I could explain if you were here haha in better detail.

From the sounds of why people are having roaming issues is that some where along the line there EFS (Embedded File System) on the QCOM chipset is being wiped out, hence why some work and some dont. Seems like those that do work backed up everything before hand, and those that don't work didnt. The EFS on the device it self is a extracted EFS of the QCOM chipset, so its a after the fact matter. Altering those files in most cases do not usually reflect whats on the QCOM chipset, doesnt write both ways.

Not saying this is how this phone works.

Just saying this is normal conditions.

Basically Phone boots for first time, extracts QCOM efs to /efs on device, then normally device reads efs contents from /efs from then on out. Meaning making changes to /efs will works as long as the phone doesn't rextract QCOM efs back to the device.

---------- Post added at 03:53 AM ---------- Previous post was at 03:46 AM ----------

So it is a graphical thing you likely aren't actually roaming

In most cases yes it should only be a graphical thing and you can easily verify by calling verizon or checking your bill against roaming.

You are correct it is annoying, I can help look into it more. One thing it could be doing is wiping the SID, changing the SID [System Identification] from the standard 2004 to something else could trigger the roaming indicator in any case depending on what PRL is loaded on the SIM. Another thing I would like someone to check is there MCC/MNC if they could verify the values of that, they should be

MCC: 311

MNC: 480

Also could verify these settings in system/about/status

Network - Verizon Wireless

Roaming - Not Roaming

PRL Ver - 15145

ERI Ver - 5

Those are stock, if someone who is showing roaming can post this information that can be useful.
[Verizon Samsung Galaxy S III] TrevE:
Haha im the same way, i see things great in my head but it never comes out that way typed :)

My theory of what is happening (explained more in detail here) is how its getting wiped out

Your modem images are stored in modemst1/modemst2 partitions, /efs (partition 11) is just a "placeholder", where things get fusemounted or something similar. So you are right, changing values here do nothing. You can see this by doing a ls /efs, it reports there's something like 40 total files in the directory, but only displays like 10.

The issue I believe you guys are dealing with is either one of two things,

1- backup/fsg partitions contain the stock qcom images from factory. modemst1/modemst2 contains actual images containing imei. Somewhere along the lines the kernel hits a 0x77665512 reboot code, which wipes out your actual modemst1/modemst2 with the stock qcom images contained in fsg/backup

2- theres corruption happening in modemst1/modemst2 and no process to restore from fsg/backup partitions.

Keeping that in mind, the only way to properly backup these parts is with the nvbackup command in kernel (adb shell reboot nvbackup) which copies out real qcom data from modemst1/st2 -> fsg/backup, eliminating issue #1

issue 2 can be prevented by dding the parts and using the adb shell reboot nvrestore command

The reason qcom backups are not enough in this case, if issue #1 or #2 is happening which seems very likely, there is other data besides just your IMEI there. HDCP/Playready DRM/Mac addresses are all contained on this partition as files outside standard NVItems. Its looking the same now with the XML files for ERI. There's other files that are getting destroyed as well besides just IMEI/radio data
[Verizon Samsung Galaxy S III] amoamare:
If someone who is having roaming icon issues want's to work with me to see if we can narrow down the issue I would be more then willing to help.

One idea is creating a EFS backup from the QCOM chipset and restoring. There is other things to test as well. I DO NOT RECOMMEND TO USE QPST ON THESE DEVICE'S 355 was the latest release and does not OFFICIALLY support this chipset. The issue with using QPST is when you click write, it writes ALL those NVItems back to the device. Some of them might not be supported by the device or are different, the other thing I dont recommend is using someone else's back up. These devices in NVItems contain RF configurations specific to that device. Restoring from someone else's will modify these values, possible to give you better service maybe but more then likely going to give you more problems then anything. Each device is tuned for RF frequencies if you don't know what NVItems these are I advise staying away from using someone else's backup

---------- Post added at 04:17 AM ---------- Previous post was at 04:04 AM ----------

Normally Samsung has a NVRAM reset in there test menu, I haven't checked on this device but in most cases this would do a factory reset to the device including the efs it would restore everything to a factory state, this includes the IMEI/MEID/ESN it would restore to a B000000 state or 0000 state. It would require a rewrite of the IMEI but could fix the roaming issues or other issues that might arise.
[Verizon Samsung Galaxy S III] bgolden84:
Re: [HOW-TO][FIX] Repair your IMEI with QPST - updated w/ info

Do not trying this. It will break Verizon test mode.

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

DO NOT TRY THIS. was wondering if Any one could throw some light on his? Could it be possible to issue a command like reboot nvrebuild?
[Verizon Samsung Galaxy S III] muscle4u85:
IMEI backup

Can i rename this synergy backup to what i want like "imei backup" in the original folder on phone memory and can i copy this folder to ext sd and use it from there also if i ever need to restore....as placing on ext i know its always gonna be there. Thanks.
[Verizon Samsung Galaxy S III] jclendineng:
Qpst works fine. Used it today. Erased esn meid iemi etc and was able to fully restore without using my backup efs. The latest qpst and qxdm support the chip.
[Verizon Samsung Galaxy S III] NeoMagus:
I also bought my S3 new, and swapped over my sim from my Galaxy Nexus, which I purchased at launch. I have no issues at all with data/4G on the S3 so it had to be a problem with the card itself, not a bug
[Verizon Samsung Galaxy S III] eman3316@optonline.net:
"Code:

adb shell reboot nvbackup

If you recieve an Operation not permitted error, do this sequence instead:

Code:

adb shell

su root

reboot nvbackup"

I have read in another thread that you can also do this backup through Terminal Emulator and the file will backup to your SD Card. Might be easier for some then running in ADB. Can anyone verify?

You would just type su then reboot nvbackup. Can't seem to find the thread where it originated from so if someone knows please post here as I do not remember all the details.....
[Verizon Samsung Galaxy S III] Jay Evans:
I'm on roaming and the values are

Network - Unknown

Roaming - Roaming

PRL Ver - 15145

ERI Ver - None

If you would point me on how to get the MCC/MNC, I would be happy to supply that.

I lost mine early on when the issue was though to apply only to AOSP. So like a dumb ass, I hadn't done a backup. I was on Senergy (1.7?) and lean kernel at the time. I was able to re-inject with QPST.
[Verizon Samsung Galaxy S III] tgom222:
Awesome work on this. Thanks for putting so much effort into researching this.

Unfortunately, I lost my IMEI before these effective backup procedures were known and am currently stucj=k in roaming. Is there any reason to backup a phone that is already on roaming?
[Verizon Samsung Galaxy S III] bgolden84:
I don't think it will backup to your SDcard. It is the same end result as running adb
[Verizon Samsung Galaxy S III] Hasherx1:
Then it must be an issue in Cleveland Ohio Area where I live because it has happened on 2 different S3's OR my galaxy Nexus is not writing to the sim properly and causing issues( which very well could be). I actually had them order me a new phone and while that was being shipped they replaced the sim card and 4g was able to switch ok. This S3 is the second S3. I sold the first one since they just upped my acct to 2 years on both lines. So this S3 had the same issue. After I lost IMEI. I swapped the sim out to my Nexus and when I added the IMEI back with QPST and swapped the sim back from the nexus to the second S3 .. the S3 booted but would not go into 4g. At this point I was not in roaming either. When I went to the Verizon store and had them provision a new sim, I popped it into my S3 and that is when I went into roaming. I was able to do the reboot nvrestore and my nvbackup must have been good because it restored my S3 to not have the roaming .

---------- Post added at 03:11 PM ---------- Previous post was at 03:05 PM ----------

IN my case I had only backed up using the efs.sbn file to the sdcard. I had added my IMEI back via QPST and then decided to go to the terminal and su .. then do the reboot nvrestore. It rebooted to black screen and I pulled battery and rebooted to recovery and restored my nandroid backup and when I rebooted I was back to normal with no roaming. Now in my case did not lose IMEI after flashing. I lost mine after rebooting to recovery and then doing a nandroid backup. I had previously installed CM10 nightlies 2 time without losing IMEI. So I think somewhere when Iost my IMEI I still had a good nvbackup that allowed me to restore.

I would try the reboot nvrestore as the only thing that could happen is that it wipes out the IMEI again and you just have to readd it to get back to roaming. My situation was different than others.

Also they stated that there are 2 different phones. mine was the version which has 1207 and the IMEI only and a phone number on the sticker behind the battery. So maybe that made a difference for me. still not sure.
[Verizon Samsung Galaxy S III] WildZontar:
The reboot command itself works through Terminal Emulator just fine; I use "reboot recovery" all the time through it. I havent tried running "reboot nvbackup" through Terminal Emulator, although the worst that can happen is that it doesn't do anything.
[Verizon Samsung Galaxy S III] TechBSwift:
I can confirm that it does work
[Verizon Samsung Galaxy S III] con247:
The new OP looks excellent and is very informative. It would be fantastic if we could get a sticky for this thread. It could be the most important one.
[Verizon Samsung Galaxy S III] jdk2:
A courtesy bump...
[Verizon Samsung Galaxy S III] amoamare:
I'm on roaming and the values are

Network - Unknown

Roaming - Roaming

PRL Ver - 15145

ERI Ver - None

This looks like you are missing ERI on QCOM chipset. Pretty sure thats the issue.

---------- Post added at 09:12 PM ---------- Previous post was at 09:09 PM ----------

Ok just proved my own theory by wiping my ERI, now i'm roaming wo0t wo0t. Ill have a fix for you guys..

---------- Post added at 09:16 PM ---------- Previous post was at 09:12 PM ----------

Okay first before i claim it this is what people are talking about right
[Verizon Samsung Galaxy S III] Jay Evans:
Exactly what my screen says.

If you need a test subject just PM me.
[Verizon Samsung Galaxy S III] amoamare:
Ok tool is going to be posted in 5 mins, this will fix ERI and IMEI
[Verizon Samsung Galaxy S III] Jay Evans:
Color me excited!
[Verizon Samsung Galaxy S III] tylerw1369:
Wow Thx man you are awesome thanks for the work... I'll drop a donation Friday when I get paid... I really appreciate your help
[Verizon Samsung Galaxy S III] amoamare:
http://xdaforums.com/showthread.php?p=31051731#post31051731

Tool has been updated, please use V3 and please get back to me with success or fail. It should work i have tested it few times on my device.

Thanks.
[Verizon Samsung Galaxy S III] silver04v:
Question. I have a synergy backup zip from when I flashed r55. I also have a nv backup with qpst.

I plan on doing the nv backup command. After that I see it's suggested to run the synergy backup again.

Will this replace the first synergy backup or just make another file in synergyrom folder under backup?

Sent from my Synergized vzw S3!
[Verizon Samsung Galaxy S III] guyd:
It will make another one in the backup folder.