yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S (4G Model)] Vlad_z:
@dagentooboy,

Hi there, I did not mean to sound mean or personal in my post. I've read your posts in different forums on the subject and I guess I've understood your work and reasons.

Would it be nice just to create application which will read nv_data.bin file and help to find those 8 ASCII numbers of Network Unlock Code? That way, application can be used even without rooting phone. (Can we read that file on non-rooted phone? I did not tried but see no problems here).

Well, anyway, it's your thread and this is just an idea.
[Samsung Galaxy S (4G Model)] dagentooboy:
The original method was exactly that but then Samsung locked down the /efs folder so we had to have root. Later they took the code out entirely. So as of now this it the only workaround other than buying the code on ebay. Sorry if it is a little risky for you but we have found that this works on several devices. Sounds like Samsung may have changed something and if someone wants to send me their /efs folder I will be happy to look at it and incorporate it into the guide.
[Samsung Galaxy S (4G Model)] Light-라이트:
Just wondering, if the imei is 000000.... Can you still make calls/text or is it just totally gone? My friend wants to know. Thanks.
[Samsung Galaxy S (4G Model)] bormasina:
I have Samsung Exhibit II 4G and this method is not working. I can not even locate the "nv_data.bin". This is what i have in /efs folder

#cd efs
cd efs
# ls -l
ls -l
drwx------ system system 2010-12-31 23:02 dmp
-rw-r--r-- system system 3 2031-06-30 18:44 cryptprop_persist.sys.language
-rw-r--r-- root root 1 1980-01-05 18:01 cryptprop_essiv
-rw-r--r-- root root 5 2011-11-10 16:39 cryptprop_onetimeboot
-rw-r--r-- root root 5 1980-01-05 18:01 cryptprop_efs
-rw-r--r-- root root 3 2011-11-10 16:39 cryptprop_securewipedata
drwx------ root root 1980-01-05 18:01 lost+found
-rw-r--r-- system system 16 2011-11-09 21:37 cryptprop_persist.sys.timezone
-rw-r--r-- root root 1 2010-12-31 23:00 cryptprop_rebootMode
-rw-r--r-- system system 9 2010-12-31 23:02 cryptprop_applied_result
-rw-r--r-- root root 5 1980-01-05 18:01 cryptprop_sdcard

Where could it be (nv_data.bin)? I'm not sure if i can search for a file through adb, i could not find "search" command. Could somebody tell where i should look, since is not in /efs folder?

Bormasina
[Samsung Galaxy S (4G Model)] smokeuout:
Absolutely nothing changed except imei. Sol good in the hood
[Samsung Galaxy S (4G Model)] Light-라이트:
I dun get it.... So you can call/text/use internet all fine? Just the imei gets changed to 00000----?
[Samsung Galaxy S (4G Model)] smokeuout:
Thats correct
[Samsung Galaxy S (4G Model)] dagentooboy:
It shouldn't happen. We know that location is the lock bits. If there are any .md5 files anywhere in the folder you might want to delete them (backup first) and see if the IMEI comes back after reboot.
[Samsung Galaxy S (4G Model)] Light-라이트:
Then whats so bad about it being 000000--?
[Samsung Galaxy S (4G Model)] smokeuout:
Thats my question?
[Samsung Galaxy S (4G Model)] dagentooboy:
The network area can only have one of each imei. If yours is all 0s then it is not unique and you could be kicked off at any time.
[Samsung Galaxy S (4G Model)] Racing19969:
Imei 000000

I get the same thing after running your code.

Network unlocked but IMEI is 0000000000000

Should we re-lock the phone until there is a fix?

So I re-read through the posts and found the solution. There was an md5 file in the folder. Once I deleted it imei is back....

Thanks for the great work!!!
[Samsung Galaxy S (4G Model)] Light-라이트:
I may have found a fix to the 0000--- imei error. With just messing around a bit. Lmk if it works.

For simplicity, ill call the orig efs folder "folder a" and the backup copy "folder b".

So i copied a backup of the efs folder and put it on my sd card just in case this didnt work. Aftrr changing the nv_data on line 1468, as most people here, it turned my imei all 0's. So i thought hmmm. Thats odd... And i asked around what disadvantages there are to this. And obviously i didnt want to get kicked off data at any random time so i restored my imei.

Then i put the backup back on the phone. So we're back to square one. This time i tried deleting the md5 after changing the nv_data file. Still all 0 imei. So back to square one again

So we're in square one again with folder a.

Network lock on.

So i tried something different. I copied folder B into folder A so basically inside the main folder a, i had 2 nv_data bins. And i proceeded on changing the nv_data in

Folder a-> root -> afs - settings. then restarted my phone.

Then whala. Network lock off. AND imei stayed the same. unique.

So basically this is how it looks.

LMK if it works. :)
[Samsung Galaxy S (4G Model)] dagentooboy:
Is there a .nv_state file anywhere in the /efs/ folder? I found on the tab that when the IMEI got corrupted it was because the .nv_state file was set to ascii 0 (0x30) and that prevented it from re-generating the .md5 files.

Anyone who is having trouble please email me your zipped /efs/ folder. I am updating the PRO app for this and I will update the guides as well.

Thanks
[Samsung Galaxy S (4G Model)] Racing19969:
So, I was able the find the problem with mine. I re-read the posts here and found that I had an md5 file in the folder that needed to be removed. Once I did that all was good.

IMEI is now fixed

And phone is Carrier Unlocked
[Samsung Galaxy S (4G Model)] dagentooboy:
That is good. I lost the IMEI on mine (not sure why) so I will be trying to put a fix into the PRO app and document the procedure here.
[Samsung Galaxy S (4G Model)] Keda_P:
WOW! I just checked , my IMEI = 000000000 WTF?

I used the SGS Unlock PRO ....

Tried to Lock it back ... no use.

I guess that's it ... right?
[Samsung Galaxy S (4G Model)] dagentooboy:
I have the same thing on mine so I will be trying to make a fix...
[Samsung Galaxy S (4G Model)] tinkererx:
I wanted to report that the method in the OP that tooter1 discovered worked for me today and is much safer than editing one's NV_bin.
[Samsung Galaxy S (4G Model)] Rabid Panda:
Update on imei issue?
[Samsung Galaxy S (4G Model)] Light-라이트:
Heres another fix.

After changing the nv_data file to unlock, delete the md5 file before you reboot. Itll keep your imei and unlock your phone
[Samsung Galaxy S (4G Model)] dagentooboy:
Yes.... I changed the guide to reflect that.... Mine didn't have the .md5 until I upgraded to GB.... BTW if your IMEI gets messed up... the phone creates a 'default' nv_data.bin file. To fix it we have to copy the backup nv_data.bin file back to the /efs/root/afs/settings/ folder and delete the .md5... reboot and you are good to go.
[Samsung Galaxy S (4G Model)] Keda_P:
Sizes

I have one NVDATA.bin that is 256kb and one that is 10MB...

Which one is normal?
[Samsung Galaxy S (4G Model)] Light-라이트:
256kb.... Where did the 10mb file come from...?
[Samsung Galaxy S (4G Model)] Keda_P:
Something went bad with the unlock pro app....

This one (10mb) is nvdata.bin.bak .. was created by the app.

Now my IMEI screwed up....

cant fix ... deleting md5 file didnt help.
[Samsung Galaxy S (4G Model)] Light-라이트:
You were supposed to delete it before you rebooted. Do you have a copy of the original nv_data file?
[Samsung Galaxy S (4G Model)] Keda_P:
I have just used the pro application.

It never stated that i have to delete anything...

I do not have the original file... what do i do now?

I know my IMEI, cant i force it in somehow?

Where is it stored? What are the implications of invalid IMEI?

The only difference i see is that when i install apps using the computer and the app market, they do not install automatically on the phone as it was before.
[Samsung Galaxy S (4G Model)] Light-라이트:
Well... Nothing really changes. The imei is unique. But having a 0---- imei will kick you off the service at random times or something like that whenever there is someone else using the invalid imei? Thats what i was told. But other than that, evrrything else works. Except android market?

Sorry. Im not a pro at this.
[Samsung Galaxy S (4G Model)] Keda_P:
What about hard reset to the phone and reflash?

Shouldnt it recognize the IMEI from the phone itself?

Nad if the IMEI is not hard written into the phone shouldnt it be like an easy click to put whatever IMEI i want in?

Thanks.
[Samsung Galaxy S (4G Model)] Light-라이트:
I dont think so. Ask op.
[Samsung Galaxy S (4G Model)] Keda_P:
Who's "OP"?
[Samsung Galaxy S (4G Model)] tinkererx:
It stands for "Original Poster," or the person who started the thread. In this case, OP is dagentooboy
[Samsung Galaxy S (4G Model)] Keda_P:
He is trying ... i sent him my efs folder zipped....

Lets wait and see ...
[Samsung Galaxy S (4G Model)] dagentooboy:
So based on the .zip it looks like when the phone gets a nv_data.bin file that doesn't match the .md5 (back when I got my phone their was no .md5... sorry for all the trouble this has caused) the phone generates a generic nv_data.bin file. Unlock code 01234567. The file is the same size and the lock bits are in the same location. It looks like there is more than one person who needs to generate the nv_data.bin file. I will put this (not so small) task next on my update list.

BTW anyone with the PRO app... I made a lot of changes... if you have updated please PM me and let me know what you think...
[Samsung Galaxy S (4G Model)] wrecless:
I did it!! I had the null IMEI thing with all zero's after using the pro app but I fixed it by restoring the backup that the app made and renaming it back to nv_data.bin. Then I deleted the MD5 file and rebooted and my IMEI came back. So I used the app again but before I rebooted the phone I deleted the MD5 file again (it keeps coming back after reboots) Rebooted and everything was unlocked plus I had my IMEI# TYVM OP ;)
[Samsung Galaxy S (4G Model)] Keda_P:
OP,

Can you please refer me to somebody who can help?

I need that IMEI fixed. I paid for your app, and i was never told that it will mess up my IMEI. You need to help me.
[Samsung Galaxy S (4G Model)] Light-라이트:
Honestly guys, i recommend not using the app as hex editing to unlock is safer (surprisingly.) either way, if you were going to use the app, you should still back up your nv_data.bin file. If you're going to hex edit, same thing. BACK UP.

Dont ever rely too much on apps or hex editting skills. Even developers use backups, so why shouldnt you? ;).

either way,

for the app, all you need to do is follow the steps provided in the app.

For hex editting, open up nv_data.bin file and go to address 1468, and after ff-ff, there should be 01-00-00-00. Change the 01 to 00, then save the file. In the same folder as the nv_data.bin, theres a nv_data.bin.md5 file. Delete the md5 file then reboot your phone. Then, WHAM. imei still there, but now your phone is also unlocked.

If hex editting doesnt work, you have your trusty backup.

To restore your imei, move your backup of the nv_data.bin back into the main folder (/efs/root/afs/setting) and delete the md5 file once again. Then reboot. Your imei should be back but network lock would be on again.

THIS IS FOR PEOPLE THAT DONT COMPLETELY READ THE ORIGINAL POST.
[Samsung Galaxy S (4G Model)] Keda_P:
Well, to back up i needed another app which is also not for free.

I wanted to avoid HexEditing and extra apps. The app said it done backup.

When i wanted to restore it ruined the backup....

Before one is selling one must do more testing.

I myself wrote no less than 800 programs in my life .. i never sell before i test.
[Samsung Galaxy S (4G Model)] wrecless:
Read my post #122 its is super easy to get the IMEI back and have your phone unlocked just

1. Get ES file explorer free form the market and go into the options to allow root and write look on your SD card there is a file the pro app made called nv_data.bin.orig rename it to just nv_data.bin

2. Copy the file you renamed then press the star in the top right corner and select phone then navigate to efs/root/afs/settings and paste the file. Delete the file that has .md5 then back out and reboot your phone. After it boots look your IMEI is back!

3. Now open the unlock app and select unlock again but, after you do this dont reboot yet just hit back and go into ES file explorer again and to the same folder as in step 2. Now delete the MD5 file again back out and reboot. Now when you enter *#7465625# in your dialer it should say everything is unlocked and you are done.
[Samsung Galaxy S (4G Model)] Light-라이트:
To back up the efs folder shouldnt cost anything. You can download super manager/linda file manager/ghost commander/ and a ton of other file managers that let you go into the base folders. It just asks you for root permissions, then BAM. Just copy the efs folder to your sd card.

And note that the OP says "note the importance of backup".

p.s. Sorry for your loss.
[Samsung Galaxy S (4G Model)] Keda_P:
Yes... All true, now that i have the experience i know all that.

But back then i tried to use the app. The Nvdata.orig was blank.

Because when i tried to restore the app did not restore it just overwritten my orig file....

Also it created an NV_Data.bin which is 10MB ....

I am pretty sure that there is a way to write IMEI into that file...

I mean the z3x thingy does it....
[Samsung Galaxy S (4G Model)] norman505:
so am i out of luck if i lost my original file and having null imei? thanks
[Samsung Galaxy S (4G Model)] Light-라이트:
Pm the original poster that you have a null imei problem, then send him your nv_data.bin file once he asks for it, then wait for his response.
[Samsung Galaxy S (4G Model)] Keda_P:
Did it. No use.
[Samsung Galaxy S (4G Model)] Light-라이트:
Sorry i couldnt be more helpful.... Ill try messing with a messed up data file to see what i can do
[Samsung Galaxy S (4G Model)] Keda_P:
Super thanks, i found ppl who do it , but i have to send the phone ...

I do not trust them and besides, wasting 40$.... too much if it can be done "softly"
[Samsung Galaxy S (4G Model)] Logix:
did exactly that no imei number i got 2 files in my sd one is the .orig which is 256kb and one thats nv data thats 10 megs which one do i need to move and rename? i did the .orig like you said but no luck
[Samsung Galaxy S (4G Model)] Keda_P:
hehe

Thats what i am trying to tell them...

The most important thing is not to try to relock/or unlock again....

it will mess up your files.

The 10 MB file is a bug, it should not be there.

The orig should be the one. look also for an nv_data.bin on your sdcard.

PM the OP for further info.
[Samsung Galaxy S (4G Model)] Logix:
yeah I lost my file lol hooray me

but i have my imei written down cant i just hex edit the nv_data and put it back in there in hex??

---------- Post added at 03:38 PM ---------- Previous post was at 03:29 PM ----------

also on that note isent there a clear efs setting in odin or what not
[Samsung Galaxy S (4G Model)] dagentooboy:
So far... I don't think anyone has found a way to regenerate an nv_data.bin. Sorry. Check any .bak files in the directory.
[Samsung Galaxy S (4G Model)] Keda_P:
True. Cant write it down.... I am trying to decode the algorythm / encryption of IMEI

for that i am gathering WORKING nv_data.bin's ... so far i have three ... hard but i am getting there. Once i am finished i will help all! If you would like to participate send your nvdata to my email : Diskeda@Gmail.Com
[Samsung Galaxy S (4G Model)] Keda_P:
I recently came across a prog called Samsung Direct IMEI Changer...

Someone knows something about this?

BTW its time we do something like that.
[Samsung Galaxy S (4G Model)] Logix:
leemme know if that works ... so lemme get this right even if i have the iemi number written down for the device i cant edit the nv_data and put it in in hex?
[Samsung Galaxy S (4G Model)] Light-라이트:
Wont work. Its much more complicated than that. Heck. If we could do that, wed be able to put a whole bunch of random numbers in there. Wouldnt you think?
[Samsung Galaxy S (4G Model)] vladzko:
do you (or anyone) know how to pull the nv_data.bin file form EXHIBIT II? thanks
[Samsung Galaxy S (4G Model)] Posthuman83:
Got some problem while unlocking my friend's SGS T959V T-mobile (usa)

Got root already. Installed Busybox, Titanium backup and tried oneclick unlock software, but nothing

Here is a screenshot from SGS_Unlock.apk

And here is a log from Generate Unlock

Generate unlock code for any Samsung Galaxy S
===============================================================
===============================================================
__________________________________________________________
Copy nv_data.bin
* daemon not running. starting it now *
* daemon started successfully *
remote object '/efs/nv_data.bin' does not exist
Extract code

SGUX v0.92b (C) 2010 By Mark0 & rbnet
Samsung Galaxy Unlock code eXtractor
(based on info by rhcp0112345 & RazvanG)

* Error: unable to find file <.\nv_data.bin>
Can not find C:\Users\Posthuman83\Desktop\Generate Unlock Windows\Generate U
nlock Windows\nv_data.bin
===============================================================
===============================================================
Please donate to DagentooBoy for the script
Please donate to rbnet.it and marcopon for the SGUX utility used in the script
===============================================================
===============================================================
Script complete!

I've checked a file on SD nv_data.bit, the size of file is 0kbt

Any sollution on this?

upd: fuuny thing, I do not have nv_data.bin file in /efs folder. There are imei, root folder and nv.log with .nwksimpin files
[Samsung Galaxy S (4G Model)] Posthuman83:
Found this web unlocker based on Helroz's soft http://www.communityhosting.net/sgsunlock/

Unfortunately my nv_data.bin is not on /efs ((((
[Samsung Galaxy S (4G Model)] dagentooboy:
Try the hex hack. This method is outdated.
[Samsung Galaxy S (4G Model)] Posthuman83:
will it work even without nv_dat.bin file? Cuz I do not have any .bin .md5 etc files.
[Samsung Galaxy S (4G Model)] dagentooboy:
How did you determine that?
[Samsung Galaxy S (4G Model)] Posthuman83:
I've opened system files with rooted Filexpert explorer and found empty folder. But nv_dat.bin located also in some settings folder. That's why i'm confused.
[Samsung Galaxy S (4G Model)] bswann:
Try this - FBis251's unlocker
[Samsung Galaxy S (4G Model)] Posthuman83:
Goddamn! I love you (not gay)! Thanks so much!

God bless the developer hands!
[Samsung Galaxy S (4G Model)] norman505:
For those of us who lost the nv_data.bin file, did anyone try to copy the file from another phone? My IMEI is 0000000000s, I guess there is no solution yet?

thanks
[Samsung Galaxy S (4G Model)] heo_con184:
Does this method work for Rogers Samsung Galaxy S2 LTE ?

Thanks
[Samsung Galaxy S (4G Model)] hampsterblade:
Probably not considering this is a galaxy s 4g a t mobile gsm hspa+ phone. Try searching the galaxy s 2 forum.
[Samsung Galaxy S (4G Model)] dglaboi:
I unlocked mine using a site freeunlocks.com where you just have to sing up for an offer but get the code emailed the next day. You can just opt-out of the offer you subsribed to and nothing is being billed anyway so in fact I got it for free without having to worry about my imei screwing up.... :-D
[Samsung Galaxy S (4G Model)] fbum:
I used it on vibrant stock and now I have generic imei

Sent from modded sgh-T959 using XDA.
[Samsung Galaxy S (4G Model)] dagentooboy:
Restore from backup and try again. You might have to change nv_state to allow md5 generation. Also make sure you check the log file to see why it is getting rid of your nv_data.bin.
[Samsung Galaxy S (4G Model)] FerociousAndroid:
Thanks that worked. I backed up my /efs/root/afs/settings/nv_data.bin then used HxD Editor as well and was able to located the my 8-digit unlock code between 00001460 - 00001470. My code was something like

49615714. Then I inserted a AT&T sim card. Got the prompt to enter the unlock code and it worked! Super Ezzz :)

T959v

REV1.1 SGH-T959HA
[Samsung Galaxy S (4G Model)] tvotony:
How do you know if your imei number is gone
[Samsung Galaxy S (4G Model)] eollie:
Menu>settings>about phone>status does your imei have numbers or unknown or some goofy looking characters.
[Samsung Galaxy S (4G Model)] tvotony:
I have numbers
[Samsung Galaxy S (4G Model)] lumin30:
They should match the IMEI behind your battery and you are good.
[Samsung Galaxy S (4G Model)] mierkat09:
Then your imei is ok
[Samsung Galaxy S (4G Model)] ipaq_101:
Can anyone help, I can't find address "0x1469".

I attached the file, What am I doing wrong?
[Samsung Galaxy S (4G Model)] FBis251:
Take down that file right now. It contains private info
[Samsung Galaxy S (4G Model)] ipaq_101:
Thanks FB, I am just having a hard time with this damn unlocking business.
[Samsung Galaxy S (4G Model)] FBis251:
Upload it somewhere private and shoot me a link. I'll help you out. Remember to make an efs backup. You were having trouble getting it unlocked to sell it, correct?

EDIT

Hop on our IRC server, it'll be easier to help you there.
[Samsung Galaxy S (4G Model)] ipaq_101:
I really appreciate your help!

Yup, can you pm me your email?

EDIT

Haha ok I haven't used IRC in atleast 5 years, going to have to figure it out...
[Samsung Galaxy S (4G Model)] FBis251:
Do this instead:

http://xdaforums.com/showthread.php?t=1549317
[Samsung Galaxy S (4G Model)] ipaq_101:
On it now
[Samsung Galaxy S (4G Model)] ipaq_101:
FB, the file worked, thanks again, you are awesome, T-Mobile and Samsung tech support couldn't do for me in 6+ hours what you did in 5 minutes. Many thanks!

I hope to see you in the SGS 3 forum in the not so distant future, its bittersweet to say goodbye to my trusted SGS4G and the community.
[Samsung Galaxy S (4G Model)] SpoonerPS3:
Hi guys. I'm stuck at: "rm /efs/root/afs/settings/nv_data.bin.md5" . I get "rm failed. No such file or directory." I didn't get any errors on the previous steps so I don't get it.

Thanks
[Samsung Galaxy S (4G Model)] Sil3nt Pr0digy:
why not just use fb's unlocker? http://xdaforums.com/showthread.php?t=1419468
[Samsung Galaxy S (4G Model)] SpoonerPS3:
Well, that's woud've been handy but it didn't came up when I searched. After I got stuck there it somehow got the unlock but thanks!
[Samsung Galaxy S (4G Model)] skatax:
Sorry, but this method work for Samsung S Plus (i9001)? thanks
[Samsung Galaxy S (4G Model)] cyrixke:
Hi, I have following problem: about a year ago i succesfully unlocked my SGS4G, but in a blatant state of mind i chose to lock the phone to my new provider (being proximus). Now, a year later, i switched providers, so, again, i have to unlock the phone, but it doesn't accept my unlock code anymore. I tried looking it up again (upgraded to cyanogenmod 9 ICS in the meanwhile) and the nv_data.bin still gives the original code.

Any ideas on why it doesn't accept the code anymore and, where i could find the 'new' code?
[Samsung Galaxy S (4G Model)] jeffsf:
Do you have a backup of your old /efs?

If so, you might be able to restore it and unlock against that one.

Before you do, make sure you have a backup of your current state!

Posted from my SGS4G, thanks to Team Acid development
[Samsung Galaxy S (4G Model)] hechoen:
Try flashing back to a stock based ROM then enter code. Should work that way.
[Samsung Galaxy S (4G Model)] cyrixke:
jeffsf, do you mean the efs/root/afs/settings part? Yes, i still have that, that's where i got nv_data.bin from. How do i restore that, do i flash back to stock rom like hechoen says or can i just restore the efs part?
[Samsung Galaxy S (4G Model)] jeffsf:
I'd try back-to-stock first.

Posted from my SGS4G, thanks to Team Acid development
[Samsung Galaxy S (4G Model)] dagentooboy:
I get emails all the time about things like this. It seems that Samsung's application that unlocks your phone has a few bugs in it. I have seen a few devices that have been unlocked with a code and then re-lock themselves. When that happens using the code is usually not repeatable. That's why I have posted the HEX hack.

I would follow the advice above and restore your phone to stock, restore your /efs/ to the original backup, reboot, and unlock from there.