[Galaxy S III General] davidcsv:
IMEI Repair Procedure

How to repair your SC-03E's IMEI number and restore its network connection.

Keywords: IMEI: null/null Unknown + Baseband: Unknown + no connection with QPST + no IMEI backup + phone signal lost

Disclaimer

This procedure is intended to be applied in a last resort scenario only. You must check thoroughly what the actual cause is for your phone having lost its imei number. It may very well be merely due to an incompatibility issue between the baseband code and the efs version, and thus easily fixed by flashing a proper modem component. Writing to partitions in your phone's internal storage device, re-partitioning it, flashing with the Odin tool or operating the QPST Qualcomm engineering tool carries many risks, which include hard-bricking the phone. You are solely responsible for anything you do to your phone and by carrying out the steps detailed in this procedure, you are agreeing to accept all responsibility for any and all outcome of the procedure, even if you end up with an expensive door-stop.

Try This First

Before panicking and diving into this procedure to perform all of its steps, note that your specific problem/case might not require such an extensive procedure. There could very well be a much simpler solution for your case, so I strongly advise you to put some effort into diagnosing your problem properly (best as you can given the resources you have at your disposal) BEFORE continuing.

I will be adding topics to this section based on the feedback we get, which will hopefully help everyone to improve diagnostics and find out if there are quicker/better way to solve any specific case.

BASEBAND UNKNOWN (Courtesy of [MENTION=301316]majin[/MENTION])

Introduction

This procedure is based on the following two posts, which are identical content-wise, and may be from the same individual. Credit goes to user xt890612 of forum site bbs.shendu.com and user softbank_1001 of forum site bbs.91dongji.com. Special thanks to xda member [MENTION=301316]majin[/MENTION] for the find/input/feedback and having tested the procedure on his SC-03E.

- bbs.91dongji.com

- bbs.shendu.com

The issues we will attempt to resolve are:

IMEI corrupt or 0

Baseband Unknown status

QPST does not recognize the phone

What to Expect

If the procedure has been followed correctly and applied successfully, then take note of the following points.

IMEI restored

Network connection restored

Device serial number not the same as your original one (we will try to resolve this in the future)

No SIM network lock (Do not apply this procedure if you only want to SIM unlock a device with no issues)

You should be feeling happy, so please lookup the sources mentioned above and thank them

Preparations & Prerequisites

You will need the following tools and files, so please check each item in the list below and make sure you have them ready before commencing with the first step of the procedure.

An SC-03E which can at the very least boot into Odin Download Mode (soft-bricked). If the bootloader is corrupt, you will need some kind of JTAG service to revive the phone, because this procedure will not help your case.

Windows PC

Odin v3 (preferably Odin3 v3.09 or v3.07) - Google is your best friend

Google QPST.2.7.378.zip and download this Qualcomm engineering tool. Install it on the PC.

ADB tool/program. ADB, Android Debug Bridge, is included with Google’s Android SDK.

Hex editor. Google 'Hex editor' and download your preferred or favourite variant. Try HexEdit.exe.

Download SC-03E_IMEI-REPAIR.ZIP (mirror, torrent) and unpack the files in this archive to a work directory

Download one of the pre-rooted or root ready rom images, which are still functional/bootable on your phone, from the OP/reference post (this item is only required if your phone does not boot into Android at all, even after resetting it, and is not rooted)

Step 1 - Flash a Bootable Rooted ROM Image

If your phone currently has firmware, which boots properly and can give you root access, then skip this step. If not, then use Odin to flash the rooted image you have downloaded earlier. Consider resetting the phone afterwards by entering recovery mode to clear data and cache.

Step 2 - Enable USB Debugging

Enable USB debugging by setting the checkmark in the following option in settings:

Settings->Developer options->USB Debugging

Step 3 - Connect the Phone

If necessary, wait for all PC drivers to install and initialize.

Step 4 - Prepare Phone Internal Storage

Copy all 15 mmcblk* files, which were unpacked from the SC-03E_IMEI-REPAIR.ZIP zip archive earlier, to the phone's internal sd card after connecting it to the PC. The files must be located in the root of folder /sdcard.

It is important that you consider verifying data integrity of the mmcblk* files you have copied to the phone. Root Browser is recommended and can assist in this process. The following list consists of the MD5 checksums generated for the files in the SC-03E_IMEI-REPAIR.ZIP zip archive.

b5cfa9d6c8febd618f91ac2843d50a1c *mmcblk0p1

30fd6dfc09a70c8bcf345dc8c9e2781a *mmcblk0p10

c71fb4dfba643299159b97c6065fdb54 *mmcblk0p11

95557d70252c9b0af3f95a2244cd93ab *mmcblk0p12

e35b35efb73dd8320bdae08ec463372c *mmcblk0p13

31bc9037b092df1abbcf7550938d553d *mmcblk0p14

96995b58d4cbf6aaa9041b4f00c7f6ae *mmcblk0p15

b5cfa9d6c8febd618f91ac2843d50a1c *mmcblk0p2

dbad1316e91f5dcf0b89ad3e456f3bf8 *mmcblk0p3

713a67b9605c02f6cdd0346dfa1cab1e *mmcblk0p4

130715b90924c2394e1acd758059dd90 *mmcblk0p5

4029a1de061c375547aa3096a14562dc *mmcblk0p6

67bb0d7fbec2e250c5e2bd75dd9816f3 *mmcblk0p7

9e4a4230f51545ffd352cb7988f4bc9f *mmcblk0p8

edc27dbf0cc8b29df3ba31e21b552a98 *mmcblk0p9

4459508535b3c064f6afc6d1c6119b9e *sc03e.qcn

Step 5 - ADB

Now open a cmd window and start the ADB tool by typing the following command at the cmd prompt, followed by the enter key. In many cases, you will first have to cd (change directory) to the directory where the adb.exe program is located (hint, if you've installed the Android SDK, look for the location where it was installed and search its subdirectories for adb.exe):

>adb shell

If the shell in the adb session starts successfully, the following prompt is presented:

shell@android:/ $

Type su followed by the enter key to get root access. If the $ sign in the prompt does not change in a # sign, then you have no access to root and you should revert back to step 1 to make sure you have a rooted firmware image on the phone.

shell@android:/ $su <enter>

shell@android:/ #

Step 6 - Restore Partitions

This step must be taken with great caution. You will be directly writing to partitions in the internal storage device and a mistake can end in disaster. Copy the following lines, each terminated by the enter key to initiate the command. Note that the lines with mmcblk0p10 to p14 can take a long (5 minutes or more) time to complete, so be patient.

dd if=/sdcard/mmcblk0p1 of=/dev/block/mmcblk0p1 <enter>

dd if=/sdcard/mmcblk0p2 of=/dev/block/mmcblk0p2 <enter>

dd if=/sdcard/mmcblk0p3 of=/dev/block/mmcblk0p3 <enter>

dd if=/sdcard/mmcblk0p4 of=/dev/block/mmcblk0p4 <enter>

dd if=/sdcard/mmcblk0p5 of=/dev/block/mmcblk0p5 <enter>

dd if=/sdcard/mmcblk0p6 of=/dev/block/mmcblk0p6 <enter>

dd if=/sdcard/mmcblk0p7 of=/dev/block/mmcblk0p7 <enter>

dd if=/sdcard/mmcblk0p8 of=/dev/block/mmcblk0p8 <enter>

dd if=/sdcard/mmcblk0p9 of=/dev/block/mmcblk0p9 <enter>

dd if=/sdcard/mmcblk0p10 of=/dev/block/mmcblk0p10 <enter>

dd if=/sdcard/mmcblk0p11 of=/dev/block/mmcblk0p11 <enter>

dd if=/sdcard/mmcblk0p12 of=/dev/block/mmcblk0p12 <enter>

dd if=/sdcard/mmcblk0p13 of=/dev/block/mmcblk0p13 <enter>

dd if=/sdcard/mmcblk0p14 of=/dev/block/mmcblk0p14 <enter>

dd if=/sdcard/mmcblk0p15 of=/dev/block/mmcblk0p15 <enter>

Close the cmd window and restart the phone. If the phone does not boot into Android (could be bootlooping due to incompatible data elements), then perform a reset in recovery mode by wiping data and cache.

At this point you should confirm that the baseband has been restored in settings.

Step 7 - Restoring IMEI

Get ready to make changes to the sc03e.qcn file, which was unpacked from the

SC-03E_IMEI-REPAIR.ZIP zip archive earlier, using the hex editor.

Load the sc03e.qcn file in a hex editor and search for the following hexadecimal byte value sequence:

08 0A 21 43 65 87 09 21 43

The file contains two instances of the sequence as is shown above. Both sequences must be changed to your IMEI number and the way it is done is outlined below.

Note that when searching for the above sequence, in most hex editors you are supposed to also specify the search type, whether it be a text search or byte (binary search. You want the latter type.

Start with looking up your device's IMEI number. It is printed on the label in the battery compartment and on a label or sticker on the original box, if you still have it. The IMEI number consists of 15 digits, so please write it on a sheet of paper in order to help you visually 'construct' a hexadecimal sequence, which in turn can be used to update both instances of the abovementioned sequence in the file. This sequence has three fixed nibble values, which must remain unchanged in the final sequence. The following sample shows x's in the sequence which represent the part to be initialised to your IMEI number. The fixed (constant) parts are the 08 and the A in xA.

08 xA xx xx xx xx xx xx xx

In order to correctly fit your 15 digit IMEI number into the sequence, use the following guide to construct it. Here, we use the dummy IMEI number 012345678901234 for reference only.

...0..12.34.56.78.90.12.34 (IMEI number to convert)

08.0A.21.43.65.87.09.21.43 (byte sequence to be constructed)

As you can see, the first digit of the IMEI number is paired with the A of the second byte in the sequence; it is placed left of the A, thus becoming the most significant nibble of the byte. The remaining digits are paired to form 7 groups in order, where each pair's digits are swapped as is shown above.

When you have finished changing the two instances of the search sequence to reflect your IMEI number, save the sc03e.qcn file, exit from the hex editor and move on to the next step.

Step 8 - Restore Configuration From QCN File

Enter the following string in the stock phone dialpad:

*#7284#

Immediately after entering the trailing # sign, as is shown in the above image, the service mode screen shown in the next image will appear.

Tap on the Qualcomm USB Settings button to display the list of USB options you can choose from. This is shown in the next image.

Select the RNDIS + DM + MODEM option followed by tapping the OK button to return to the previous screen. Now use the back button to return to the dialpad.

Next, enter the following string in the stock phone dialpad to enter the DIAG CONFIG service mode screen:

*#9090#

Immediately after entering the trailing # sign, as is shown in the above image, the service mode screen shown in the next image will appear.

Select the [2]DM/DUN over HSIC (*) option. Note that the phone will immediately reboot as soon as you tap on this option in order for it to take effect.

Let's start the QPST Configuration program in Windows and select the Ports tab to add the new port, which has been assigned to the phone's USB communication protocol. Make sure to select the port with label USB/QC Diagnostic before clicking on the OK button.

If the port has been correctly initialised and selected, SURF9615 (0) should be displayed in the Phone column of the Ports tab, as is shown in the image below.

Finally, select the Start Clients menu and navigate to the QPST Software Download item to start its corresponding program.

In the QPST Software Download program, select the Restore tab and then specify the path to the qcn file which you have edited earlier. Hit the Start button to start uploading the new configuration file to the phone. After the upload is done, reboot the phone and check the IMEI number to verify everything went ok.

Finalizing

Enter the following string in the stock phone dialpad:

*#7284#

The service mode screen appears, so again, tap on the Qualcomm USB Settings button to display the list of USB options you can choose from. To restore the default USB settings, select the RNDIS + DM + MODEM option followed by tapping the OK button to return to the previous screen. Now use the back button to return to the dialpad, or hit the home button to continue using the phone normally.

That's it...enjoy your phone!

Notes & Feedback

Serial Number (Courtesy of [MENTION=301316]majin[/MENTION])