yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] connexion2005:
The only case you will get a truly corrupted IMEI that's not restorable by easy means is when you have borked the nv_data.bin and nv_data.bin.md5 files, and there are no .bak files for each of these. When a change is made to the core files, a .bak is normally made (can't verify that for sure). So, when you ruin one of the cores, you can always delete the 2 cores and drop off the .bak extension on the backups to restore. If you are missing the bak or it's ruined as well then you are SOL. I'm considering buying a machine to do IMEI restores for people who have fully lost their IMEI. It's either that or decrypt the algorithm to find out what hex value holds the IMEI and which values in the string create the value to match the number (that's not the easiest thing to do). Only a few have done it and they are being restricted from posting the info on forums as IMEI modification is illegal in nearly all countries and most forums restrict it. It doesn't matter if it's your real IMEI, the forums have strict policies against true IMEI modding posts.

I'll be making a video tonight to showcase the original post in this thread and show people how they can attempt to possibly restore their IMEI with the .bak files or atleast get the generic IMEI on their phone for use on most carrier networks in cases they show NULL for the IMEI.
[Captivate Android Development] Phateless:
Thanks for this, definitely looking forward to it.
[Captivate Android Development] bames:
i can't explain why but worked for me despite having borked originals and borked baks. I didn't have proper nv bins or baks and was able to get it to work by repairing the original and deleting the rest.
[Captivate Android Development] sexyzone:
I got my correct IMEI back

I am from india. Got my vibrant from US and i myself unlocked it and had eugene's ginger clone on it and everything's fine. I had my nv_data.bin file backed up. A friend of mine also got his vibrant from US. He dont know about all this android stuff and so asked me to help him make his phone work. Both our phones were bought through craigslist used.

At first I unlocked his phone. Then I put a sim card but it is unable to connect to the network but could do every other thing, even able to connect to 3g network and get apps through market. I was wondering what that might be the reason for this. I didnt know it coz I dint face it with my vibrant. Then I saw his IMEI and it was 0049... and its different from the one on the back of his phone. I started to search all over internet and found that wrong IMEI is the cause and indian service providers wont allow any imei which doesn't start with 3. Then i did all that i can, which includes putting back his backed up nv_data.bin file, his backed up .nv_data.bak file and also the method mention in the first post of this thread. Nothing worked.

After a very frustrating journey of making his vibrant work, I thought why not put my nv_data.bin in his efs folder. And surprisingly it got connected to the network upon booting. That was strange. I dont exactly know the technical details. but I can be a bit more detail if anybody wants to know.

NOW he got his correct IMEI number and you can get product code from the process first told in this thread.

I got a vibrant to work (connect to network and make calls.) On side note, my friend mean while was talking to a couple of samsung service centre guys and they were not promising that they can make it work. They were saying that they will put indian version of firmware which i didnt understand, as there is no vibrant version for india but an i9000 one and they cant straight away put the in vibrant.

Anyway I got his phone work. Happy ending.

Those who got the correct IMEI back, please elaborate your process than just saying you got it.

Thank you
[Captivate Android Development] connexion2005:
bames, I wanted so thanks for this info nonetheless. It helped me atleast restore the generic IMEI to a phone so that it could still be used on the network as a regular phone. I'm glad it worked for you and very surprised at that. Sexyzone, I worked with the same steps and processes you used by importing good EFS directories from another captivate with no luck so apparently it's just luck and nobody knows why it works sometimes.
[Captivate Android Development] cellgeek:
connexion2005 -

If you do decide to get the magic IMEI restore machine, PM me. I've had my phone since a week before they came out, so there was NO direction on backing up the /EFS.. I've done everything to my phone except putting it under a BIG magnet, so my IMEI is toast and I'm using the generic. I've even gotten my phone so toasted yesterday the I had to use ODIN to restore the /EFS from my .IMG backup of my generic IMEI. . .what a PAIN!!

Long story short - if you to get the magic machine, I'd send you my phone and some $$ to get my IMEI back.
[Captivate Android Development] seclm193:
Will this fix my phone unregistered message on keis?
[Captivate Android Development] connexion2005:
Full video for this process is live now! Check it out here! http://youtu.be/JqLK_2I-SBM
[Captivate Android Development] bames:
thanks much...great work.

added the video at bottom of OP.
[Captivate Android Development] gothpunk4christ:
I was one of those that didn't know I was supposed to back up those files (I'm not even sure if they knew of the issue when I even started) but half of the lines I needed to edit were missing. This could be due to the fact that I'm not surrently running stock, but I did want to see what was going on and everything, just to play with it, as is my nature.

I'm not a tech for nothing :D I know what my IMEI number is SUPPOSED to be, I don't suppose there's any way I can directly edit that hm? :P

*EDIT* LO AND BEHOLD it solved my "unregistered device" issue when connecting to Kies (though I had to fudge on the location of values to set on 2.2.1) but I flashed back to stock and even though my IMEI number is way the crap off, I am now able to connect to Kies and am getting the JH7 update. :) A step in the right direction, thanks!
[Captivate Android Development] gothpunk4christ:
It did for me.
[Captivate Android Development] bames:
did for me and should.

that being said...kies can still be pretty finicky at times even with everything proper
[Captivate Android Development] rocketcuse:
AT&T Market issue

Perception 10.2....(Android Market 2.2.7) I verified my files were not corrupted. My files match what was posted. Also verified with SGS Toolbox. My IMEI matches the label under battery. Market still does not detect my phone as AT&T. Before I flashed to a custom ROM, I could purchase apps in Market and bill it to my AT&T account. Now I can't. any ideas? I guess I may need to flash back to Odin and reflash to Perception?
[Captivate Android Development] bames:
my guess is you have a different problem. The IMEI is also known as the DEVICE ID.

Our Devices also have an ANDROID ID which is what is recognized and used for market/google checkout purposes. My guess is somehow you changed or corrupted your Android ID. There is a program to change your If you did not write down the original you may need to take extra steps.

To get back and find your original ANDROID ID if you had not previously recorded it...then i believe you must flash to stock.

This thread may be helpful:

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

As far as purchased it and it being billed to your at&t account not sure how that works. You have to setup a google account to access the market i believe and all my purchases through market are billed via google checkout.

Ah..after some research i guess this is a new option so its possible your issues of purchasing and billing via att have a diffferent root cause?:

http://android-developers.blogspot.com/2010/12/more-payment-options-in-android-market_22.html

Personally i wouldn't want my purchases going back through At&t especially if you are purchasing apps that are specifically for Rooted Phone, performing rooting, tethering/mobile AP or other thing specific to a version of Android not officially available to your handset, etc.) I would imagine they could use such purchase history as a basis for denying any warranty exchange stating it was clear evidence you had rooted and/or installed a custom rom).

Maybe its possible that at one point your phone had the generic IMEI or incorrect adroid ID when a purchase went through att and they have flagged the device?
[Captivate Android Development] sonic1089:
hi

i tried this fix for my GT-I9000M phone and it didnt work. i tried 4 times still have 000 start as my imei my phone is rooted and busybox i used all the tools and followed all the directions and nothing worked for me. can you please advise me on what to do next
[Captivate Android Development] networkdood:
"9. use menu to jump to address again and Enter 0188010

10. This will take you to line 00188010. Edit the first two blocks of green text from this line. Replace the #'s so that both of the first two blocks contain 54. (look to the text at the right of screen the first two letter should have changed to TT. To recap you need to edit Block 1 and Block 2 of line 0018010:

LINE 0018010

Block 1 = 54

Block 2 = 54

(text @ right should now read TT....SG)"

It should read LINE 00188010, right?

So far, it has not worked - I deleted the nv files and rebooted and none of them re-generated, but I was able to use the HEX editor to change the specified lines. Kind of cool, actually. I will try again later in case I just messed up due to being so late/early.

Thanks!! for your work.
[Captivate Android Development] networkdood:
"delete all nv_data files from efs folder EXCEPT FOR YOUR NEWLY CREATED NV_DATA.BIN. (Delete the following: .nv_data.bak, .nv_data.bak.md5 and the nv_data.bin.md5 files. This differs from video but i also delete any .nv_state or nv.log file present and they are recreated). "

I noticed when I did this, the .md5 files never came back...how would I get these back besides using the original ones?

Thanks
[Captivate Android Development] Xstop:
A little bit off topic, but if someone is using the generic imei number with the correct product code. Does AT&T know if that is the same phone they sold you? ;)
[Captivate Android Development] Soccer_Dad:
First post... been lurking for weeks...

Before I start playing, I like to know I can get out of whatever I get into. For this specific thread, I copied the nv_data files, and anything else I could see in the efs directory, to a secure location using the cat command in terminal emulator (seemed easy enough at the time). But I saw no ".imei" file, listing the actual imei number. I just want to make sure that it's something that isn't there, not that I couldn't see (I did an "ls -a" to see the hidden files) it. There is a /efs/imei directory that has two simple files in it (bt mac address and another that hexes as "ATT"), and a .android directory which may have been empty IIRC. And a .nvstate file, so I was seeing hidden files...

On a side note, what mods would change the /efs directory anyway? Is this a case where the mods (Rom/Modem/Kernel/lagfix) don't do anything here, but multiple flashing and the use of Odin to clean and reinstall stock between incompatible Roms/Kernels is what gets one in trouble?

John
[Captivate Android Development] gothpunk4christ:
Nope.

I logged into my web portal the other day and their website gave me a "special WHAT?" for the description of my device. It showed a generic, greyed out flip phone as "my device."

I did, in a last ditch effort, copy my friends unaltered nv_data.bin (and everything else in his efs directory) and copied them to my device, and it still shows a generic IMEI. 0004999 kind of generic number. Might have something to do with that I9000 ROM I flashed specifically for I9000 on accident. heh. Oh well. I flashed back to stock, Kies is showing I897 and did an upgrade to JH7 and I'm really at the point I don't give a freaking crap anymore so long as everything works.
[Captivate Android Development] Xstop:
Not always a bad thing if you have a generic IMEI number that works, and ATT doesn't know if that is the exact phone they sent you, (especially if you have insurance), not suggesting anything. But...:rolleyes: we did get sold a broken phone.
[Captivate Android Development] TommyZee:
WTF

OP

00188008|2e|34|00|00|00|00|ff|41|.4....A

00188010|54|54|00|00|00|00|53|47|TT....SG

00188018|48|2d|49|38|39|37|5a|4b|H-I897ZK

00188020|41|41|54|54|00|00|00|00|AATT....

.4....A

I only count 7 digits here?????

My NV file .4....GA ?????

:confused:
[Captivate Android Development] gothpunk4christ:
There should be an extra dot yes. If you look at the hex frames you'll count 8 digits.

00188008|2e|34|00|00|00|00|ff|41|.4.....A
[Captivate Android Development] gothpunk4christ:
I DID see something VERY interesting last night. I was actually looking through my phone backups last night and ran across an XML file. This XML file had the IMEI that my phone PREVIOUSLY had (after it changed once) before the generic it had. I don't know where I copied it from.

The file name was SAMSUNG_XXXXXXXXXXXXXXX_20110114231716[CH0].xml The X's were the IMEI number I used to have. The digits after appear to be the date, timestamp from contents below.

Opening the file, the contents are this

<?xml version="1.0" encoding="UTF-8"?>

<REFLASH>

<UNIT>

<ESN>XXXXXXXXXXXXXXX</ESN>

<TIMESTAMP>20110114231716</TIMESTAMP>

<RESULT>PASS</RESULT>

<SOFTWARE_NAME>Downloader</SOFTWARE_NAME>

<SOFTWARE_VER>3.00</SOFTWARE_VER>

<OEM_NAME>SAMSUNG</OEM_NAME>

</UNIT>

</REFLASH>

The stuff in the <ESN> tag was my IMEI. I'm wondering if there's some way I can copy this back in in order to fix my broked IMEI situation.
[Captivate Android Development] icnu01:
Does anyone know what the binvierge file is?
[Captivate Android Development] gothpunk4christ:
Afraid not, sorry.
[Captivate Android Development] icnu01:
Guess not. Thanks
[Captivate Android Development] mi04se1:
Thanks for this post. I was running custom roms for a month and never saved my nv_data. My phone was dropping calls left and right and wasnt running stable. I returned to stock and ran kies mini to upgrade to the newest firmware. Kies said my device wasnt registered. I saw this post and thought what the hell. Did everything step by step and kies found my phone right away. Im downloading the JL7 as I type.
[Captivate Android Development] icnu01:
So did you have your correct imei # before, and do you have it now? I've followed all the steps, but I must be missing something. I can't get my imei # to change for nothing.
[Captivate Android Development] gothpunk4christ:
That's my very same issue. But as long as all my service works and I don't have to submit a warranty request, all is good.
[Captivate Android Development] Loggik:
How is everyone losing their IMEI numbers? I've never backed up my nv_data.bin and I've flashed countless ROMs. I just checked my IMEI and it's the same as the one on the sticker underneath my battery.

Also, is there any way that I can verify that the product number is also correct? Didn't see it on the sticker on the back...
[Captivate Android Development] gothpunk4christ:
Probably cause I flashed a full blown I9000 ROM by accident. Some I9000 based ROMs are a bit more oriented towards things NOT Captivate from my understanding. ;)
[Captivate Android Development] icnu01:
Originally I had just lost my product code. One way to find your product code is to check under settings-about phone it's towards the bottom. I was going to warranty my phone for random shutdowns so i tried the foremention fix. I must have done something wrong because I ended up losing my product code and my imei which was initially correct. I have since been able to correct my product code again, but I still cannot fix my imei number.
[Captivate Android Development] z28james:
So, at this point I've owned two captivates. My first captivate, I managed to snag the /efs directory but this phone ended up getting soft bricked. Amazon offered to replace it as it was in the 30 days so I did. The second captivate, I flashed it to a I9000 based rom at some point and my product code became corrupt. Forgetting that my /efs backup was from my OLD captivate, I deleted my /efs and put my "backup" into place to "easily" fix my corrupt product code. When I rebooted, the OS would delete my files and generate the generic files (the old files had the wrong IMEI in them). I was then stuck with the generic IMEI.

I ended up calling Samsung directly and told them my IMEI was damaged and asked if they would repair it. They sent me a postage paid label. I mailed the phone monday and they mailed me the phone back that friday, fixed free of charge under warranty.

TL;DR: If your IMEI is borked, flash back to stock, send to samsung, receive fixed phone with correct IMEI, profit.
[Captivate Android Development] gothpunk4christ:
... really now. I may have to check on that, though I'm not sure if I can do without this phone for another week lol.
[Captivate Android Development] bames:
for those not getting your imei back via the process had you also unlocked your phone/sim?
[Captivate Android Development] icnu01:
I didn't unlock it right after I tried to fix my imei, but later I did unlock it thinking maybe it would help.
[Captivate Android Development] BigBen:
Mine was unlocked. Your solution didn't work for me.

On a side note, I had to do more hex editing of the nv_data.bin than just the few changes that you had indicated. All entries, including 00188018 were totally different from what your instructions showed.

I had gone from Cognition to Firefly to Continuum ROMs. My problem came when I tried to edit the nv_data.bin to change my product code. An unecessary mistake. Big time. Now I have the generic IMEI, after having jumped through all sort of hoops to get this mess fixed.

My concern now is having read somewhere in this or another source that with a generic IMEI my phone might not work on non AT&T networks? Can anyone confirm or deny this
[Captivate Android Development] bames:
not sure regarding other networks because i have never unlocked my phone but i do believe there are multiple issues.

1. some custom rom flashes alter the nv_data file and/or product code/imei

2. unlocking the phone causes other alteration not necessarily fixed with this method. For instance, i have had unlocked users who already had generic imei and incorrect product code report that the fix restored product code but not imei. Most of the users who report this fixing both the product code and restoring their original imei seem to be persons who have no unlocked their device for other networks. You are the first user i have seen in this thread state that the fix yielded a generic imei. Can you run sgs tools or sgs toolbox product code check and report back what it shows are your product code?

3. Did you back up your nv_data.bin before making the alterations if so you should be able to use it to get back to where you started with correct imei but wrong prod code.

4.

Can you elaborate on this?
[Captivate Android Development] BigBen:
Thanks for your response, Bames. Sorry, rereading my post, it looks like your solution gave me the generic IMEI. Not the case. I was mucking around with the /efs files beforehand, because Continuum changed my Product Code and I wanted my Captivate code back.

Then I found your post on IMEI restoration. Your fix didn't change my IMEI to the generic. I was already NULL:NULL and then I got generic IMEI by rescuing some older SGS Toolbox /efs backups. They didn't get me my correct IMEI back, though.

As far as backing anything up, no, I didn't do that when I got into trouble. Dumb.

My product code is now correct - I897ZKAATT, but as SGS Toolbox reports, there is no .nv_data.bak. No big deal. I can fix that.

As to the lines of code being different, towards the end of your instructions, you showed how they should read. My 001880008, etc. had quite different coding in them, mostly 00's or ff's where there should have been values. I changed the cells according what you showed in your OP. That got me the correct text at the end of the lines.

By the way, that nv_data.bin file has a lot of lines with just 00's in them. Hundreds of empty lines like that between a very few with values in the cells. Is that normal?

I am just a dumb end user of this device, and probably shouldn't be messing around with modding and hacking it, but what can I say? I don't like the restrictions AT&T imposes, so here I am with borked /efs and concerned about having a generic IMEI. I am hoping Conexxion what's his name - Josh - gets the STP device he mentioned in his video, and I can get a fix from him.

Thanks for your interest. No worries. I may decide to get another device and give my Captivate to my wife. My main concern is overseas travel and the risk that I may not have service. Also, back in stock ROM with generic IMEI, I was unable to download apps from Market. When I went back to Cognition, where I am now, I got around that problem. Very strange.

Cheers

Ben
[Captivate Android Development] Greatminds:
Hi BigBen..do u mean ur IMEI # was restored to the correct one at the end when u went back to Cognition? Cud u pl clarify. ?
[Captivate Android Development] BigBen:
No i didn't get my correct IMEI back.
[Captivate Android Development] gothpunk4christ:
I had a .imei file in my efs folder, I copied to my windows machine and opened it with notpad. It contained my phones IMEI number. Changing it and replacing it did not fix my issue. In playing some more with it I also found in the /imei folder mps_code.dat and opened it up and it had the contents "KOR" comparing this with my friends stock mps_code.dat his said "ATT"

I changed it and saved it and replaced it. I'm playing with a few more things now, and am going to post my findings and results.
[Captivate Android Development] gothpunk4christ:
No. I wasn't trying to unlock my phone, I just flashed a ROM that changed it for some reason or another. I'm trying to figure out what to look for to determine which ROMs may cause it in the future.

I wasn't sucessful in ANY attempts I made otherwise. I had it exchanged today, due to issues partly from the broken IMEI and partly because I deleted some needed system files that made the phone unusable *cough* not saying on accident either...
[Captivate Android Development] quadzilla500:
I'm also just trying to restore my IMEI to the original.

After following the first part of the video my IMEI went from 004999901..... to null/null.

Next I tried the hex editor and I keep getting the same old 004999.....imei

I'm not sure what I'm missing.

quad
[Captivate Android Development] bames:
if your getting null for product code i believe you have entered the wrong data in one of the wrong fields. Double check each line please. Easy to do...i ended up null a few times the first time i did this.
[Captivate Android Development] quadzilla500:
Ok, I went back to the OP and followed the typed instructions instead of following the video.

(......wait - I'm still on a different ROM - I didn't go back to stock 2.1)

I had to edit more than what's listed in order to get the results you show.

Saved changes over the top of existing nv_data.bin then went in via Root Explorer and deleted all nv related files in the efs folder.

Went into Terminal and typed in the text. All worked and rebooted.

IMEI is still the same 004999..... and as far as the product code well, I'm not sure what I'm supposed to be looking at.

Anyway I went back into hex editor to the same file and the same place I made the changes and it's back to the way it was when I started this process.

00188008 has _ . . . . . . .

00188010 has . . . . . . No

00188018 has t Active

00188020 has . . . . . . . .

any ideas?

thanks,

quad

PS - if you really think going back to stock 2.1 first will make it work, I will try again tomorrow.