[Captivate Android Development] hansonmi:
********NOTE*********

i have included a few of the tools you will need as attachments to this post. I will not take any credit for these programs as i was not the developer for them... these people work too hard to have anyone steal their credit... please give credit where credit is due!
​

Your nv_data.bin file and its matching nv_data.bin.md5 files are located on your phone in /efs/

All references that i make to "sd card" or "/sdcard/" refer to your phone's internal SD Card, not an external SD card that you may have installed.

I have created a windows batch file that you can run and it will extract your entire /efs/ folder from your phone to your PC. I am currently working on the batch script to move the edited nv_data.bin files back to your/efs/ folder and do the other adb stuff.

attached is the EFS Extractor.zip file that contains the ADB files and the batch script.

The product code for your AT&T Captivate is:

SGH-I897ZKAATT

WARNING… I AM NOT RESPONSIBLE IF YOU BREAK YOUR PHONE FOLLOWING ANY OF THESE INSTRUCTIONS

The Attached EFS Extractor.zip file contains the necessary adb file and a couple batch files. "retrieve efs.bat" copies your entire /efs/ folder to your PC in a folder called /efs_bkup/ in the directory where you unzipped the file and ran the batch program from. The file "update nv_data.bat" takes your edited nv_data.bin file from the root directory where you ran the .bat file from and places in in your phone's /efs/ folder and removes the old copies from your phone... when it is done, it will power cycle your phone.

To fix your nv_data.bin, you will have to have access to the following tools:

A hex editor (search google for hex editors, they have tons of them that are free… I use one called HexEdit and i have it attached)

GalaxyS_One-Click_Root_All_Models (available via XDA-Developers... attached)

ADB (Android Debugging Bridge) This is available by getting the Android SDK at the Android Developers Website (http://developer.android.com/sdk/index.html) or if you downloaded the Galaxy S One Click Root, it is in the directory where you unzipped the files.

BusyBox – Search the google market for “BusyBox”. It will appear and will be the free one from stericson (i have included the .apk as an attachement)

Odin One-Click Downloader (available from XDA)… make sure you get the correct one. There are 2 versions. If you batch number is 1008 then you need the one with the 3-button fix, if you batch number is greater than 1008 then you should need the regular one. Your batch number is written on the sticker on your phone under your battery on the left side right under the words “S/N” where your serial number is listed.

Samsung Kies Mini (gotten from Samsung website)

Download the attached EFS Extractor .zip file. It contains everything you need to copy your /efs/ folder to your PC

Now for what you need to do to get your phone’s nv_data.bin back to normal:

Flash back to stock and then do a master clear using Odin One Click

put phone into USB debugging mode and also check the setting to "stay awake"

connect phone to PC and root and install busybox

extract the attached EFS Extractor.zip file and run the "retrieve efs.bat" file. This will copy your entire /efs/ folder from your phone to your PC in a direcotry called ./efs_bkup/

Using the Hex Editor, edit the file ./efs_bkup/efs/nv_data.bin on your PC to have the correct product code SGH-I897ZKAATT. do an ASCII search for "SGH" to locate the line in the file that contains your product key. then save the edited file to ./nv_data.bin (the root directory where you extracted your ZIP file to on your PC)

run the file "update nv_data.bat" to copy your corrected nv_data.bin to your phone's efs folder and chown it and reboot your phone

change USB Settings on phone back to Kies then open Kies Mini and connect phone.

you should now be able to connect to Kies Mini and not have unregistered device... now would be a good time to back_up your /EFS/ folder... you can now either do Odin One-Click and a master clear, or flash a different rom. You should do Odin if you want to use Kies to get updates to be 100% stock to remove your root and busybox.

The general overview what what you need to do is this for those of you that want to know and/or use other tools to do this

Copy your /efs/nv_data.bin file from your phone to your PC

Use a hexeditor to modify the line in the nv_data.bin file that contains the productcode to contain your correct product code

delete any nv_data.* files from your /efs/ folder on your phone

copy the corrected nv_data.bin file from your PC to your /efs/ folder on your phone

busybox chown 1001:1001 /efs/nv_data.bin

reboot phone

Done!

Now, when you backup your /efs/ folder to your PC you may see files like nv_data.bak and nv_data.bak.md5. Using a hexeditor, open the nv_data.bak file and look at the line that has the product code (ASCII values starting wtih SGH)... if the product code in the .bak file is correct, then delete the nv_data.bin and nv_data.bin.md5 from your /efs/ folder on your phone and reboot your phone. Your phone should then create new .bin and .bin.md5 files from the .bak and .bak.md5 files that will have the proper productcode. You can also optionally rename the .bak and .bak.md5 files on your PC to be .bin and .bin.md5 and copy them to your /efs/ folder on your phone.

You can view what Kies is reading your productcode as by opening your windows registry editor Start>Run>regedit[enter]

Connect phone to PC in Kies(Firmware) mode

Navigate to HKEY_CURRENT_USER/Software/Samsung/KiesMini/FUS

Look at the key "PRODUCTKEY" and what it's value is... if it is correct, then you are good. If not, then something went wrong somewhere.

If you have issues please post the issues you are having and I will update as necessary.

Here is a link to a different thread that contains a program and instructions for restoring your unlock codes if that is what you are trying to do. The .jar (java program is written in frech, but it only asks for the codes you want to use for your unlock codes... i did not make this program so I cannot help you with it.

http://xdaforums.com/showpost.php?p=8983897&postcount=103