Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * -
6 votes

[TUTORIAL] IMEI - Backup NV with QPST - US Variants

  • Please log in to reply

OP Goose306

Goose306

Goosie Pizzle

  • 2,577 posts

Posted 15 August 2012 - 04:13 PM #1

Update 9/15/12

I've revised all the posts of this thread to more accurately reflect what we know about the IMEI issue at this point. Development and hacking moves fast, and this is no different.

So, from what we've learned so far it appears the Galaxy SIII has a place where it is supposed to backup your IMEI and modem/NV data. This is in case that information was ever to get wiped from the EFS and other locations. However, for whatever reason that backup system does not work. Either the initial backup is corrupted, or it is storing empty information (thus the "0" in IMEI). For whatever reason, when the phone reboots, it may randomly get kicked into a cycle that causes the phone to restore this corrupted or empty backup, thus replacing the only GOOD copy (since the backup isn't working properly) with the bad copy.

With that being said, that appears to be as far as we know at this point. Now, good news, as much development has been made. You will want to do your backups in order here. Just do the fix and then the Synergy zip as well. The original QPST method is still down in post 3 if you want all the backups you can get ;)

So, first backup:

1. Its time to fix Samsung's derp on the bad IMEI/NV data backup. This is extremely easy as the GSIII has a bootpoint to make this happen. It was discovered during the bootloader testing for the Verizon GSIII variant.

You can do it two ways, either in ADB or Terminal. In ADB:

adb reboot nvbackup

In Terminal:

su
reboot nvbackup

Your phone will reboot, you will see some blue text on the bootloader screen basically stating its backing up the info to the correct directories and giving you a proper backup, fixing the Samsung derp.

Now this *should* take care of the IMEI issue, as it appears we fixed what is causing it. That being said, we haven't gotten 100% confirmation yet, and so you would be well advised to be safer rather than sorrier, and follow on below with the backup steps outlined further.

DO NOT RUN THE BELOW COMMANDS UNLESS NECESSARY FOR RESTORE. IF YOU DO NOT RUN THE FIRST COMMANDS FIRST YOU WILL RESTORE THE SAMSUNG DERP IMEI AND FLASH YOURSELF TO "0"

If you do lose IMEI in future, you restore from backup using similar commands, either in adb:

adb reboot nvrestore

or Terminal:

su
reboot nvrestore

So, Second Backup (d2vzw only):

The next backup step was found by a Synergy developer, again from information uncovered during the bootloader information that was gained. To make it simple, it showed that IMEI and NV data was stored across various partitions, not just EFS, which is why the EFS fix was not working on the device. The following will backup all the applicable partitions the IMEI is spread across. It also includes a backup of the backup you just created (the backup partitions that Samsung had derped on). Cool huh? Its also super easy.

Download the .zip file from here:
http://www.mediafire...ew6cg66np6jakcv

Flash it in recovery of your choice (Clockwork/TWRP). It will create a folder on your sdcard/synergyrom/backup with a backup image. If you lose your IMEI in the future, and the nvrestore mentioned in Step 1 doesn't fix it (gets corrupted again, whatever) this should. Just flash the backup .zip in recovery again. Highly recommend you move it elsewhere after its flashed (Dropbox, PC, external SD... you know the deal).

These backups are looking pretty successful, and more so than the QPST method was, so that's why I'm recommending these first. The more backups the better though folks, until developers can get a better grasp on what exactly is causing these issues and how to fully stop them.

Credits:
Me: Writing :P
TrevE: Synergy/Flashable .zip

Edited by Goose306, 29 December 2012 - 01:52 PM.

  • 41 Likes

OP Goose306

Goose306

Goosie Pizzle

  • 2,577 posts

Posted 15 August 2012 - 04:13 PM #2

Restoring IMEI With No Data Roaming Application [Verizon]

So, you went and lost your IMEI and didn't do your backup? That's too bad. We can help though.

You need to be on the G7 or earlier radios for the tool to work. If you need to downgrade your radio, please refer to the main radio thread in Development by clicking here.

First thing's first, get the files needed from the xda thread here (and while your at it give the developer some thanks!)

http://forum.xda-dev...d.php?t=1867442

Note: That is also where the initial writeup for this thread came from. I am not going to host the files myself as they are his work and I am not responsible for maintaining them. I have a copy I am keeping for backup, and if the ones on XDA go down I will upload them elsewhere as an alternate mirror. In the meantime the XDA download is preferred in case he pushes updates or similar.

Now, go into Diagnostic mode on the phone.

If you are on Touchwiz - enable the Hidden Menu:

- Go to dialer.
- Press *#22745927
- Enable the Hidden Menu
- Go to dialer.
- Dial **87284 (USBUI)
- Enable "PDA" on "PhoneUtil"
- In "Qualcomm USB Settings" choose "DM+MODEM+ADB"
- Hit OK.

- When you are done fixing your IMEI do not forget to come back in to this same menu (the same method) and change USB back.

If you are on AOSP:

Get the scripts from the xda thread and execute them in gscript or similar program - or type the following into terminal manually:

Enabling:
echo 0 > /sys/class/android_usb/android0/enable 0
echo smd,bam > /sys/class/android_usb/android0/f_rmnet/transports 
echo diag > /sys/class/android_usb/android0/f_diag/clients 
echo 1 > /sys/class/android_usb/android0/f_acm/instances 
echo rmnet,acm,diag > /sys/class/android_usb/android0/functions 
echo 1 > /sys/class/android_usb/android0/enable

Disabling (when done fixing):
echo "" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo "mtp,acm,adb" > /sys/class/android_usb/android0/functions
echo 1 > /sys/devices/virtual/android_usb/android0/enable
vold

OK - now we are enabled. Make sure you have the app from XDA and the drivers. Go ahead and get the drivers installed and get the program running.

Now lets fix your IMEI:

1. Find your IMEI under the battery on the device, you should see a sticker. Copy the IMEI down and power on the device.

2. Connect the device to your computer and open "Device Manger"

3. Check under "Ports" and Look for Samsung and Note the Comport it is on.

4. Open the software and under comports select the comport number you found your device on then click connect.

5. Check the IMEI number of to the left, and note the ERI message. If it is red and says your ERI is missing or not found. Please do both methods.

6. If your ERI is not found, click on "Repair" in the ERI section, if your IMEI is missing, when asked to reboot click "NO" other wise click yes and you are done.

7. Type your IMEI in the IMEI box, Do not worry about MEID it will auto fill once IMEI is typed.

8. You will notice that the last number is added automatically this is done using the Luna Algo and is a checksum number.

9. Once you have typed your IMEI click on "Repair" in the IMEI section, once the repair is done your phone will auto reboot.

10. Please check your ERI and IMEI under Settings/System/About/Status. Your IMEI should appear and ERI version 5 should be there.

Congratulations, you fixed it!

Here's some videos if your more visual:

Fixing IMEI:
http://www.youtube.com/watch?v=tatuEAm1MNg

Uploading ERI:
http://www.youtube.com/watch?v=voptuxFtvVg

Edited by Goose306, 27 November 2012 - 03:21 PM.

  • 3 Likes

OP Goose306

Goose306

Goosie Pizzle

  • 2,577 posts

Posted 15 August 2012 - 04:13 PM #3

QPST Backup/Restore Information:

The QPST method is the original method to backup and restore your IMEI. It is recommended, but not necessary. The other methods should take care of backups as listed in Post 1

Here's what you need to do. For ease of use, we are going to do this on a stock build. You can do it on AOSP, if you want to know that method it will be in post 2. If you need to know how to restore using QPST with no backup, look at post 3. Note that currently you will be stuck in roaming if you are not starting out with a backup made via this method when its done.

So, first things first, get QPST, version 2.7 build 323. I have a permanent link on Mediafire below:

http://www.mediafire...nsh7wyw4ssmxd3d

Download it, un-rar it, install it.

Posted Image

Now go to your phone, its time to enable the hidden menu. On Verizon or Sprint, go to the dialer and dial *#22745927 . Choose the option to enable the Hidden Menu. After that go back to the dialer and dial *#7284#. For AT&T and T-Mobile versions, just dial that second one (the menu isn't hidden). Once in the menu, choose the option for USBSettingsMenu, then choose the option RMNET+DM+MODEM. Hook up the phone to the PC via USB at this time if you haven't already. This option works on STOCK TOUCHWIZ (it can be rooted). Attempting to do on a custom ROM may not work, AOSP instructions are below in Post 2.

If you are on a custom TouchWiz ROM and get an error about PhoneUtil closing, see below for a method to get into the hidden menu.


Using Anycut to get around PhoneUtil Closing


If you are on an AOSP ROM use the instructions below.


AOSP ROM Instructions


Posted Image

OK. Now go to your PC Control Panel. We need to get into the Device Manager to determine where your phone is being recognized as far as the COM ports. For this, go to System -> Device Manager (on the left) or System -> Hardware -> Device Manager (depends on your Control Panel setup). Anyways, scroll down to Ports (may say Ports & LTP, Serial, depends on version). Anyways, find your phone under it, and take note of the COM# (mine was COM9, yours can and probably will vary). If you have exclamation marks anywhere then install the Samsung drivers and try again.

Posted Image

Samsung drivers here:
Support - AT&T Cell Phones SGH-I747 | Samsung Cell Phones

OK. Now go to Start Menu -> All Programs -> QPST -> QPST Configuration

Click on the Ports tab. Click on Add New Port, then add your Port# where it says Port and name it something you can remember. Hit OK.

Posted Image

Now click on Start Clients -> Software Download. Click on the Backup tab. Make sure your phone is listed under Port. If its not, hit Browse, choose the COM that is your phone, and hit OK. Now where it says QCN File, hit Browse, find a safe spot to store your backup on your PC, and name it. Hit OK. Now hit Start. Make sure backup gets to 100% with no errors.

Posted Image

Congratulations, you now have your backup made! Flash away!

Don't forget to go into your phone hidden menu again and change USB mode back to MTP so you can use it to access the phone storage.

If it bricks sometime in the future:

Go back into QPST. Go to Start Clients -> Software Download. Click on the Restore tab. Make sure your phone is listed under Port. If not, browse to the appropriate COM port. Choose your QCN backup in the other box. Click Start, let it finish. Phone should reboot. If it fails rebooting, just do a manual reboot. First boot will take a bit, let it do its thing.

AS PER THE USUAL, I, GOOSE306, NOR ROOTZWIKI TAKES RESPONSIBILITY FOR WHAT YOU DO TO YOUR DEVICE! IF YOU FOLLOW THESE STEPS -TO A T- YOU SHOULD HAVE NO ISSUES, BUT QPST IS A VERY POWERFUL PROGRAM, SO KNOW WHAT YOU ARE DOING!

HAPPY FLASHING!


If you need to know how to restore the IMEI from 0 using QPST with no backup made, or how to do an AOSP ROM, follow the link at the top of the OP.

Note:
This is taken from XDA: All credit to Peoplearmy for the intial write-up. I just cleaned it up, re-wrote it, and clarified some parts, and put the screenshots in-line where they would make sense.

Initial thread and images from here:
[FIX/TOOL] Backup/Restore/Fix IMEI App v1.2.2.2b now available - Updated 8/04/2012!!! - xda-developers

Edited by Goose306, 15 September 2012 - 12:41 PM.

  • 1 Likes

OP Goose306

Goose306

Goosie Pizzle

  • 2,577 posts

Posted 15 August 2012 - 04:14 PM #4

Restoring With No Backup / QPST (LAST OPTION)

You should do this option last, if Post two regarding IMEI restore with no backup failed. Depending on your variant, you may be stuck in data roaming. This post is for getting it recognized back on the network at least (restoring IMEI from 0 without a backup)

NOTE: YOU WILL BE WRITING DATA MANUALLY VIA QPST. WHILE RELATIVELY SAFE IF YOU KNOW WHAT YOU ARE DOING, IF YOU SLIP UP, YOU *CAN* HARD-BRICK YOUR DEVICE. SO FOLLOW INSTRUCTIONS PLEASE!

First, you need to be on stock/rooted. So get there before proceeding (Verizon variant - use Root66 or debug2fs root) Also, take off the back cover, pull your battery, and get your IMEI number from the back sticker. Write it down.

Now, go in and enable the hidden menu and put the phone in RMNET+DM+MODEM mode (see Post 1 if not aware of how to do). Hook it up to PC via USB, fire up QPST Configuration (see Post 1 regarding getting QPST and installing)

Make sure your phone is listed under Ports tab. If not, get it recognized using steps in Post 1.

Click on Start Clients then RF NV Item Manager.

In the RF NV Item Manager; click on Setting and then Comport. Select the Port with your phone on it. Hit OK.

Go to File -> Read From Phone.

This is going to pull up a big list of all the NV items on the phone. We are looking for NV_UE_IMEI_I - it is item 550. You can scroll to it or find it with a search.


Line 550 Not There - Click Here!


To the right of the item when you select it there will be an area where the IMEI is. If its been wiped or 0 this may not appear with any values in it.

Click the Hex Check Box. The Hex values of your IMEI will have no more than two characters per box and have to be entered 100% correct or it will not take. It also has to be entered in a special order.

PLEASE PAY ATTENTION TO THIS STEP AS THIS IS WHEN WE ARE WRITING THE IMEI!

Note: The first box will ALWAYS be 8.

Posted Image

Example if your IMEI was: 954091051099226

then the boxes would look like so:

8
9a
45
90
1
15
90
29
62


Click on Write NV to write the new values to the phone. MAKE SURE IT IS 100% CORRECT BEFORE DOING SO!

Reboot. Your IMEI should be restored. First boot may take a little bit, be patient. Make sure you change USB back to MTP when done. (See Post 1)

Continue below to the app post if you are stuck in roaming. Depending on your carrier, it may be able to pull it out of roaming (the app is a WIP) - all credit to peoplearmy.

Edited by Goose306, 15 September 2012 - 12:39 PM.

  • 1 Likes

OP Goose306

Goose306

Goosie Pizzle

  • 2,577 posts

Posted 15 August 2012 - 04:14 PM #5

And one more for good measure
  • 0 Likes

kingdroid

kingdroid

Average Android

Posted 15 August 2012 - 10:43 PM #6

So, here's the skinny on the IMEI issue:

You can sometimes flash a ROM and you will lose your IMEI. This is important, as the IMEI is what identifies your device on Verizon's network. There is now ways to restore it even without a backup, but doing so will leave you in permanent roaming. This isn't that big of a deal as Verizon doesn't charge for domestic roaming, but we have yet to see long-term effects.

<Moderator snip! -Jax>

is this method btr than doing it using terminal. With this
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn??....

Sent from my SCH-I535 using RootzWiki

Edited by Jaxidian, 24 August 2012 - 11:03 AM.
Mod edit: Removing the full quote of the OP in case there have been corrections in the OP - don't want people accidentally following the quote instead.

  • 0 Likes

Kpa2727

Kpa2727

Android Apprentice

  • 121 posts

Posted 16 August 2012 - 12:45 AM #7

Fantastic Goose!
  • 0 Likes

gf7z

gf7z

Supporting Member

  • 42 posts

Posted 16 August 2012 - 04:05 AM #8

...
The EFS method is deprecated (restoring via EFS leaves someone in roaming, same as restoring with no backup).
...


is this method btr than doing it using terminal. With this
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn??....


From goose's first post, when using the "dd" to backup EFS, a subsequent restore will leave you roaming. Use QPST to backup (and restore) NV.

Sent from my SGS3 with Tapatalk2
  • 0 Likes

amotamatapia

amotamatapia

Member

  • 13 posts

Posted 16 August 2012 - 06:06 AM #9

When I dial in *#7284# the PhoneUtil menu hangs up and is forced to stop. I am running Beans 7 and tried stock/AOSP methods for this. Thanks :)
  • 0 Likes

rcarman

rcarman

Average Android

  • 4 posts

Posted 16 August 2012 - 06:11 AM #10

When I dial in *#7284# the PhoneUtil menu hangs up and is forced to stop. I am running Beans 7 and tried stock/AOSP methods for this. Thanks :)


I get the same thing running Synergy ROM. PhoneUtil briefly shows up and then crashes.
  • 0 Likes