yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] waghoba:
you mean stock jf6 right?? just asking coz in your first post you have mentioned 'stock froyo' which is 'jI6' not 'jf6' as jF is 2.1 Eclair just to confirm this as I will be doing this now....btw thanks for this great method!
[Captivate Android Development] bames:
yes... jf6 2.1 stock

will correct...thanks
[Captivate Android Development] waghoba:
thanks for quick response...btw I just have one more Q, I assume that our original IMEI is messed up coz of our flashing habbits, but how will it get its original IMEI back just by editing few lines? can we not enter our IMEI somewhere manually just by reading it from under the battery?? This is just a logical Q I encountered:confused:

EDIT: and once restoring the nv_data.bin can we use http://www.communityhosting.net/sgsunlock/ this to unlock?? anyone tried this??
[Captivate Android Development] bames:
I don't know of anywhere or program to manually re-enter your correct IMEI.

This worked for me. Technically the process Restores your correct product code in the nv_data files. I had experienced generic imei when flashing before but it also restored to original upon return to stock......until the first time i had my product code changed by a custom rom. Flash to stock after that was not correcting the PC or IMEI.

The only thing i can deduce is that there must be some link in the nv_data files between the PC and the IMEI (i believe the wrong PC in the files were preventing my IMEI from restoring as once i corrected PC's in the nv_data files.....my original IMEI returned).
[Captivate Android Development] Sithis:
Alternatively, you can press the capacitive menu button and press "Toggle Soft Keyboard" to get the keyboard back after allowing root access.

Thanks for this, I got the correct Product Code with Phoenix 1.0 (I haven't yet found what the correct IMEI should be as I haven't read enough to find out, so I can't comment on that Found it :)).

EDIT: Correct Product Code and IMEI on Phoenx 1.0. Thanks. :D
[Captivate Android Development] tbong777:
That's my observation as well. My product code is not ATT...no idea what the IEMI is but everything works and I won't need to download any updates from ATT anyway as long as I have this phone and XDA is around.

edit:

I was messing around with the Hex editor on the PC side of things. I had a back up EFS Folder with the wrong Product code and the correct IEMI.

One thing I noticed was the CORRECT Product code was in the .nv2.Bak file.

First Question..

Could someone delete all .nv_data files with the exception of the nv2.bak and restore to the correct Product code?

Seems the nv2 is a third back up that does not get changed by ROM flashing!!

Second question:

I edited the .nv_data.bin file to the correct product code on the PC.

Can someone effectively copy that file to the EFS folder to the SD card then, using Root Explorer copy the file to the internal EFS directory, delete ALL the other .nv* files (with the exception of Nv2 which seems to have the correct product codes) and reboot?

Should not that reinstall the correct product code at which time one can then back up their EFS Folder while on Froyo 2.2 on any ROM and have the correct information...or does some Linux command need to be run on the file before rebooting.

Since I am ignorant to Linux commands like "chown 1001:1001" or what they do...

I am not going to copy the corrected nv_data.bin yet until I know for sure it is a simple matter of copy and paste and reboot.

I used the HEX editor to read my IEMI in the .imei file and it is untouched.
[Captivate Android Development] bames:
FYI - update

just got this to work in Phoenix 1.5 custom rom.

installed the rom and as anticipated i had the wrong product code and a generic imei.

figured i would try the instructions once without reverting back to stock and to my surprise both product code (expected) and imei (unexpected) were restored
[Captivate Android Development] rwj5279955:
I wonder why some people are getting generic IMEI's and wrong product codes, and some, like myself (knock on wood) are only getting the wrong product codes after flashing.

Iow, what is changing the IMEI?
[Captivate Android Development] tbong777:
My IMEI has not changed (except for a /05 /02 on the end) But I have THREE back up EFS folders with ATMB AKOR and a revised ATT nv_data.bin I used hex to change

Unfortunately my phone is not creating an nv_data.bak file.

I actually deleted the entire EFS folder today and replaced it with the AKOR back up. Ran permissions and booted fine. So at least I know I can replace the EFS folder in its entirety (albeit wrong Product code) if I need to while trying to "fix" the non back up file thing.

Moved back to Cog2.3b8 while I get this resolved.
[Captivate Android Development] rwj5279955:
I didn't have a bak file either until I re-flashed and rebooted.

Also in order for me to fix mine, from stock ODIN, I had to flash forward and then back to stock. It worked though, and every flash now, I just delete nv_data.bin and drop in my (backup) from external.
[Captivate Android Development] bames:
Once u do that fix prod code on nv_data.bin and delete all other nv_data files baks and md5's then reboot
[Captivate Android Development] tbong777:
Just to make sure I understand (since i restored the entire EFS folder once today already LOL) On Cognition I should delete all nv files and reboot....

If I flash a non captivate ROM again, what should i do to keep the Product code on the new ROM?

the previous post to yours makes some sense..

Copy the "fixed" nv_data,bin file from my current EFS folder...set permissions using $busybox chmod 1001:1001 efs/nv_data.bin reboot,,,delete all nv data files and reboot again?
[Captivate Android Development] tbong777:
Did as you said..nv_data.bin.Md5 file was created. Still No nv_data.bak or nv_data.bak.md5
[Captivate Android Development] tbong777:
Do you need to set permissions on the file you drop in?
[Captivate Android Development] boborone:
Bames, thanks for posting this

From a phone
[Captivate Android Development] bames:
you did fix your nv_data.bin right? (in earlier post you said you were dropping a backup with the AKOR prod code back into EFS...i am assuming this is after changing it back to the proper ATT code??)

just copy both files from your efs folder to the sdcard

rename the copies as .nv_data.bak and nv_data.bak.md5 and move them back into efs
[Captivate Android Development] bames:
your welcome glad it helped
[Captivate Android Development] tbong777:
What I did was deleted the entire EFS folder and replace ot with a back up EFS folder with the worng Product code that had backup files. Just to make sure I could make that work if i needed to in the future, I them edited the nv file to reflect the correct Product code. Deleted all nv files and the BAK files were never restored..

Since then i flashed to stock then flashed DGs latest Perception ROM and low and behold the Product codes held and BAK files were created. So I am saving that new EFS folder as a back up and won;t have to worry about product codes again...

The thing that was throwing me off is people are saying the "dropped" files and folders in EFS but not doing the Chmod thing.....Is that possible?
[Captivate Android Development] knopper123:
Where i can find "stock 2.1 (JF6)" and how to install over 2.2 rom safly. ?
[Captivate Android Development] tbong777:
I use this....

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

There is a "One click Odin" version as well in DG's threads.

Just to let you know you don' t flash over 2.2 with these ROMS.

You replace 2.2.

You should read the thread "Before you flash" before doing anything so you understand what is taking place. I did this exercise with EFS for no reason except to understand a little better just in case. I risked borking my phone by deleting the EFS folder and replacing it , but i read for days before trying it, and felt confident I could get it done.

I read thread after thread for weeks before flashing my first ROM. It still is a risk with each flash. You never know when you will need a jig (which I bought) or worse have to send the phone off for repair becasue of a stupid mistake or faulty USB cable.
[Captivate Android Development] bames:
that will work and here is the one-click jf6 odin link as well:

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

this captivate bible thread is a good one to keep bookmarked for general instructions and good quick links:

http://xdaforums.com/showthread.php?t=788093&highlight=jf6+one-click
[Captivate Android Development] knopper123:
Bro i am using nokia n97 micro usb data cable since 2 months for galaxy s.. is it risky with flashing?? i dont wanna take any risk bcoz i am very far from US..
[Captivate Android Development] tbong777:
I bought 5 cables and don't use one more than a few weeks from here....

http://www.monoprice.com/products/p...=10303&cs_id=1030308&p_id=5452&seq=1&format=2

I think bad cables are a reason some have bad flashes. If Sbin has an error while flashing your phone is bricked. Albeit it flashes in seconds. I don;t touch the phone or cable while it's flashing. I turn background apps off in the notebook. I am over cautious.
[Captivate Android Development] knopper123:
Hmmmm..Cant we flash from "Stock.zip" via recovery method ?? i think its more safe...
[Captivate Android Development] bames:
yes once you are rooted and rom manager installed you can flash CWM recovery and install most custom roms via CWM recovery which is what i do.

I usually only use odin when returning to stock.
[Captivate Android Development] tbong777:
Ok so I am reading where some are just dropping the EFS files into root wthout setting permissions and that is working....

Why are the adb chown commands needed on nv_data.bin? Just safety or do the permissions change when those files are pulled from root into SD?
[Captivate Android Development] anthesca:
Many thanks. This worked for me on Phoenix 1.5.
[Captivate Android Development] alphadog00:
regarding perms

Ideally you should change the permissions as they are not set as original - they should be

chmod 755 /efs/nv_data.bin

Probably 777 after a copy, but I am not sure. They should be 755 - you don't want everyone to have modify access.
[Captivate Android Development] tbong777:
I see now. you are setting permissions to PROTECT the files rather than have them work. Makes sense now.
[Captivate Android Development] hybernator:
this worked great for restoring my product code, however iemi is still generic and I don't have the nv2 files or the bak files and there is no file for my iemi code. did this on pheonix 1.5, with 2.0 coming out 2morrow i'll flash back to stock and hope it updates then. might need to go through the whole process to get it fixed...this is a very useful thread. I tried the other 1 transferring between pc and it didn't work at all. this did for the most part. thanks
[Captivate Android Development] knopper123:
Unable to download any app from market or sd card after going to back to stock 2.1.. , also i am getting error on startup (Phone not allowed MM#6)

Please Help
[Captivate Android Development] EtherealRemnant:
Is this really such a big deal? My IMEI is fine but my product code is messed up. I'm not having any issues with the phone to speak of - would at&t check the product code if I took it in for a warranty issue?

Also, there is a backup of NVDATA that shows up in SGS Toolbox that has the right product code, can't we just replace the files?
[Captivate Android Development] knopper123:
Can anyone upload

Busbybox

Android Terminal Emulator

Hex Editor

SGS Toolbox

In apk format please
[Captivate Android Development] bames:
yes...if you wanted to rename it as the binary then you could just replace it ....it would be your fixed nv_data.bin file.
[Captivate Android Development] bames:
attached SGS Tools and Rom Manager APK's to first thread...will post others as i can find them

in the meantime clear market cache and try running Market fix from SGS Tools and it may fix your stalls.
[Captivate Android Development] bames:
all requested APKS added.
[Captivate Android Development] G-Man.:
When I try to copy my efs folder using any method, I get a 'permission denied' error... I am rooted, and running Gingerborg ROM, any ideas? I have the same issue regaurdless of running stock eclair 2.1 or any froyo based ROM..
[Captivate Android Development] existz:
Works great thanks! Had no issues at all first try..

Sent from my Captivate
[Captivate Android Development] G-Man.:
Worked like a charm :D you the man!

[edit] However my network lock is back ON :confused:
[Captivate Android Development] waghoba:
anyone with a solution to restore from generic IMEI...? restoring product code worked perfectly! but the IMEI is still an issue with me...and because of it I cannot use on other network..it gets on the network and soon after that is says 'phone not allowed mm#6' and its because of the generic IMEI.. :(

so anyone with a solution to restore original IMEI please post..thanks!
[Captivate Android Development] knopper123:
The only solution is sent back to samsung or samsung professional tool box. :)..
[Captivate Android Development] waghoba:
what is Samsung professional toolbox....?
[Captivate Android Development] bames:
fyi this fix is intended specifically for persons with borked product codes and imei's due to custom rom flashes and will not address nv_data issues of carrier blocks/etc. for those who had unlocked their devices.
[Captivate Android Development] G-Man.:
I restored my IMEI from generic w/o that program/app.... just follow bames directions here... and presto.

[Edit] I also had no good backups of any nv_data files... no efs backups... this does work.
[Captivate Android Development] hybernator:
what does the rest of your nv_data.bin file look like, mine contains all F's. this worked great for getting my product code back but won't restore IEMI, the IEMI file in the efs folder shows the proper number when I look at it with hex editor but it won't change in the phone. wondering if the rest of my nv_data.bin file is more messed up than just product code...please help if u can
[Captivate Android Development] waghoba:
yes I also tried this method and successfully restored the PC thanks to this great method by bames...but somehow I am not getting my IMEI back...I just wanted to confirm that I am following right steps...First I flashed to stock 2.1 ODIN, then installed root, busybox etc etc and then followed bames steps for editing and replacing the nv_data.bin file....after reboot I got my PC back on but not the IMEI so please help me out here if I am not following steps in correct order....Thanks!
[Captivate Android Development] bames:
are you running terminal commands prior to reboot?
[Captivate Android Development] waghoba:
yes I am running:

su

busybox chown 1001:1001 efs/nv_data.bin

and then reboot..

I just noticed one thing that there is an ".imei" file in the efs folder which actually contains the IMEI in hex format...so I copied that file to external sd renamed it to just "imei" opened it from hex editor, replaced the generic IMEI with my own and saved it renamed it to ".imei" and copied back to efs folder...but now I dont know what permissions should I give to the .imei file so that the IMEI will also be reflected as the PC...can you/anyone help me out here???
[Captivate Android Development] G-Man.:
I did notice that when i was running an i9000 kernel/rom my IMEI showed as either generic or null:null... when i put DGs Cognition 2.3b8 back on my phone and went through all the steps again, my IMEI is now showing correct, I then re-did the unlock procedure and I am now unlocked with correct IMEI - Maybe the i9000 kernel/rom reports the IMEI differently than a captivate kernel/rom ?
[Captivate Android Development] waghoba:
so you did all the steps from this method after installing a plain cog....right??

EDIT: is there any small relation between the chance of getting original IMEI back and number of ROM flashing on phone...because I was flashing all the ROMs since SRE and must have flashed like 100s of different ROM,.. :P
[Captivate Android Development] quiksandjesus:
I tried this method and sgstools shows my product code but without the SGH at the beginning. is this normal?
[Captivate Android Development] rwj5279955:
This is how it shows for me also.

I don't think it shows the SGH.

And I went back to jf7 through Kies with this fix.
[Captivate Android Development] G-Man.:
Yes, I flashed stock, (forgot to mention that) and my IMEI was correct... no longer showing " null:null "; however my network lock was back ON again - so i flashed Cognition v2.3b8 and re-did the unlock precedure - now my Network Lock is OFF and my IMEI is correct and my Product Code is Good. Idk if this will work the same for all Captivates or if it was just a fluke thing with mine.

Check those lines in your nv_data.bin - I believe that is where your product code info will be corrected - those 4 lines should read the same as in Bames OP...
[Captivate Android Development] Phateless:
Dumb question. Please pardon me if this has been answered, and even better post a link in addition to flaming me.

Is this a necessary and advisable procedure to perform BEFORE rooting a stock phone? My gf wants me to put a custom rom on her Captivate but I want to make sure I know EXACTLY how to restore it to 100% stock before I change anything.

So far all I've done is use Clockwork Recovery from update.zip (didn't even root the phone) to perform a nandroid backup.

PHONE IS NOT ROOTED. STOCK JH7. BUILD 1007.

Thanks!
[Captivate Android Development] bames:
no need to perform fix on stock or if your imei and product code are correct.

i would reserve use of this fix until if/when you encounter the problem
[Captivate Android Development] Phateless:
Ok thanks, that makes sense. But shouldn't I back up the info BEFORE I go ahead and **** it up? :D

I guess that's really my concern. How do I back it up in case I end up needing it later? I'm a big believer in Murphy's Law...
[Captivate Android Development] waghoba:
well I would suggest to make a backup of your efs folder using either ADB or root explorer...as this threads main purpose was to help those who dont have a backup of efs, so a backup of efs will definitely help you in the future!
[Captivate Android Development] Phateless:
Got it, will do. Anything else I should preserve while I'm at it?
[Captivate Android Development] waghoba:
use can always use TiBu to backup all apps...other than this I dont think anything is needed...but I dont know anything specific about android os and required files and hence I have already made a mistake of not backing up my /efs folder...i thought clockwork backup will backup everything :( but that was my mistake as I started flashing straightaway without enough research..so if possible backup all OS specific folder i.e. folders which are at same level as /efs. Again these are just my thoughts just to be on the safer side. But a backup will save you sometime in future.
[Captivate Android Development] Greatminds:
Thank you for all the valuable info.

I followed the above steps (after flashing back to Stock rom and master reset)...many times...but still unable to restore the IMEI.

Finally, I deleted all the files under /efs & rebooted the phone. I then saw only the below files

.android,

.imei,

nv_data.bin

The IMEI is still wrong..

I tried copying the .imei file into external SD card, renamed it to Test_IMEI.bin and edited it in HexEditor to see the values in it. It did have the wrong "004999010640000" IMEI inthe very 1st two lines of the file. I corrected it to the correct IEMI number, saved it. renamed it back to '.imei' and copied it back to /efs folder

did ...

su

busybox chown 1001:1001 efs/.imei

reboot

after reboot, the file i copied was overwritten again and its back tot wrong IMEI...tried several times..but no luck.

Anybody ..any ideas ?? please help. I would really appreciate it.

Thanks,
[Captivate Android Development] Phateless:
Ok I just copied the efs folder and it's EMPTY. wtf...?

I'm gonna put the SIM card back in and try again. Totally confused here.
[Captivate Android Development] Xstop:
The folder should not be empty, even if you delete the nv_data.bin. It will recreate another one. View all files?

I was able to retrieve my IMEI number and product code with this method. Product code is the easiest to get back, IMEI is a pain in the arse!

I still haven't got my gf IMEI number back, she is still using the generic 4000 PC which it seems fine for her.

Her product code was all screwed up, would not tell me anything when I checked it. All it said was "productcodecheck" weird... But all I did was use my nv_data.bin, copied to hers and flash to stock. Then, and only then was she was able to use kies for the update. IMEI still was generic.

Don't know if this was a proper method, but it worked for her to get her PC back.
[Captivate Android Development] Phateless:
Tried it all but no dice. Even tried to root with superoneclick, but didn't take. Finally I just gave up and flashed cognition. Seems to be doing fine. IMEI shows up correctly and everything. Shrug.
[Captivate Android Development] connexion2005:
Ok I just wanted to share my personal experience with this. I received a customer's phone in the mail asking if I could take a look at it as he had borked his nv_data.bin file and had no network connectivity. Using the methods described with the hex editor I was able to restore connectivity and generate the generic IMEI that is not blocked on AT&T. This is a great tool to atleast get folks who are showing NULL as their IMEI backup and running. However, I do not think this is a valid way to restore IMEI if you have no .bak files for the nv_data file. That is what hold the unmolested copy of your nv_data file for restoring the new file you've jacked up. I'm not sure how you did it but I spent hours reading and although some have decrypted the bin to solve the IMEI puzzle the info is not available as forums restrict that tutorial. Props to you for providing a partial solution for me though! I'll be making a video for this tonight.
[Captivate Android Development] Phateless:
What about my case where the folder was empty in the first place, even though her information shows up correctly? On second thought I never verified that the displayed info matches what's on the phone physically. Will check it out next time I see her.
[Captivate Android Development] bames:
i don't know why the folder would be empty.

double check the settings for the file explorer program you are using...make sure it is set to show hidden files.
[Captivate Android Development] connexion2005:
Exactly, the files should never be truly non-existant.
[Captivate Android Development] Phateless:
Used Root Explorer and double checked the settings, that was the first thing I did.

Agreed. The only thing I can possibly think is that it was the stock rom and wasn't rooted. I tried SuperOneClick a few times but it didn't take so I gave up and just flashed Cognition.

All the info is still displaying correctly and the phone hasn't given her any weird behavior so for the moment I'm not worried about it, but still...

I guess I can check Cognition to see if the files are there now?
[Captivate Android Development] rwj5279955:
If your folder was not showing any files before you were rooted, does that matter?

Ime, the files are always there, you can verify this by pulling them with ADB even if your folder shows empty.

Has anyone figured out why some peoples IMEI has been corrupted while others hasn't? Even though we all share the same nv_data.bin corruption issue.
[Captivate Android Development] Phateless:
Nope, tried that through terminal I think. LS command showed no data. I copied the folder to my computer and hoped the files would be there but it stills shows empty.

I bought this phone used and I'm starting to think it was rooted and then restored with ODIN before I got my hands on it. Dude said he had never rooted it, but who knows...