[Vibrant Q&A, Help & Troubleshooting] philow:
Original question post below...

IF YOU DO NOT HAVE THIS PROBLEM PLEASE BACKUP YOUR /EFS NOW!!! this will save you pain in the future.

One of the things I see over and over in the DEV forum for different ROM's is I flashed this ROM and I do not have any cell service. This seemed common enough that I wanted to put what I found in one place. I am not an expert on this and I will credit the posts and users that helped me. I am actually looking for help in creating a fool proof way to fix a broken /efs, product code (Vibrant is SGH-T959ZKBT), and IMEI.

It seems that the issue here is a corrupt /efs partition/folder (/dev/block/spl3)

You can check this a couple ways first look at your /efs folder in Root Explorer (show hidden files) or via "adb shell ls -a -l /efs". As many of you know this is where you find the nv_data.bin file used for unlocking and stores your product code (needed to be accurate for Kies to work). It is also where the phone stores your IMEI. My good /efs looks like this:

adb shell ls -a -l /efs
drwxrwxrwx root root 2009-12-31 23:00 .android
-rwx------ radio radio 2097152 2011-05-30 00:44 nv_data.bin
-rw-rw-rw- radio radio 15 2011-05-28 17:46 .imei
drwxrwxrwx radio radio 2010-09-12 03:29 imei
-rwx------ radio radio 2097152 2011-05-07 18:24 .nv_data.bak
-rwx------ radio radio 32 2011-05-07 18:24 .nv_data.bak.md5
-rwx------ radio radio 32 2011-05-30 00:44 nv_data.bin.md5
-rw-rw-rw- radio radio 801 2011-05-07 18:24 nv.log
-rw-rw-rw- radio radio 1 2011-05-07 18:24 .nv_state
-rwx------ radio radio 1048576 2011-05-07 18:24 .nv2.bak
-rwx------ radio radio 32 2011-05-07 18:24 .nv2.bak.md5

The .imei file holds your IMEI in hex format.

You can also check your IMEI by pressing *#06#. You should check that against your IMEI printed on the back of your phone under the battery.

To get your radio working again with correct IMEI you will need a good backup of your /efs folder or partition. You may have a backup and not know it, some ROM porters have added a script to backup your /efs to /sdcard/backup/efs you should look for it. If you are not lucky enough to have one then find a ROM where you see the generic IMEI number (004999010640000) when you press *#06# in the dialer. I used an old Galaxy S 4G port by Eugene373 (he has removed it) to get the generic IMEI.

There are disadvantages to using the generic IMEI as some services will not work (i.e. security on corporate email)

Now that all that is out of the way let's get to the steps for getting you cell service back:

STANDARD DISCLAIMER APPLIES!!! I cannot be responsible for bad things that could happen playing with your /efs folder/partition

Create a copy of your current /efs partition (/dev/block/stl3) with this command: (Thanks Candanga http://xdaforums.com/showthread.php?t=859914)

# busybox cat /dev/block/stl3 > /sdcard/efs-stl3-backup.img

Mount this file to another location like /testefs:

# mkdir /testefs
# busybox mount /sdcard/efs-stl3-backup.img /testefs

Now we can fix it up from your /efs backup if you have one:

Copy all the files from your backup into /testefs and overwrite them

Set all the files and directories (except .android should be root) to the owner and group radio:

# busybox chown 1001:1001 nv_data.bin
# busybox chown 1001:1001 .imei
# busybox chown -R 1001:1001 imei
# busybox chown 1001:1001 .nv_data.bak
# busybox chown 1001:1001 .nv_data.bak.md5
# busybox chown 1001:1001 nv_data.bin.md5
# busybox chown 1001:1001 nv.log
# busybox chown 1001:1001 .nv_state
# busybox chown 1001:1001 .nv2.bak
# busybox chown 1001:1001 .nv2.bak.md5

Set the file permissions as follows:

# busybox chmod 700 nv_data.bin
# busybox chmod 666 .imei
# busybox chmod 700 .nv_data.bak
# busybox chmod 700 .nv_data.bak.md5
# busybox chmod 700 nv_data.bin.md5
# busybox chmod 666 nv.log
# busybox chmod 666 .nv_state
# busybox chmod 700 .nv2.bak
# busybox chmod 700 .nv2.bak.md5

Unmount /testefs

# busybox umount /testefs

Now your /sdcard/efs-stl3-backup.img should be all fixed. If you have the generic IMEI you can try editing the .imei file with a hex editor of your choice and change it to your IMEI it is just the hex representation of your IMEI and nothing else in the file. (I did not test this as I had the files backed up.

Next we are going to create an odin tar to flash to the phone: (Thanks cellgeek http://xdaforums.com/showpost.php?p=10622481&postcount=12)

# cd /sdcard/
# busybox cat efs-stl3-backup.img > /sdcard/efs.rfs (this is the key step!!)
# tar -cf efs.tar efs.rfs
# exit

Now your back at your PC. Do the following step to get the .tar file off your phone.

c:\Android\tools> adb pull /sdcard/efs.tar

This tar file can be put in the PDA section of Odin and flashed in download mode.

If all worked you should not have a repaired /efs that should work on most/all ROMs.

What I did not cover here was how to fix the Product code but this post from bames explains how to do that for a Captivate and should work the same for our Vibrants. Difference is our Product Code is SGH-T959ZKBT and you may need to be on Stock JI6 to do the steps in the post.

http://xdaforums.com/showthread.php?t=881162

I hope this helps some and feel free to let me know if I missed something or if it does not work or if there are easier ways.

Original Question: