• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[REF] How to restore original product code!

Search This thread

Methyldioxide

Senior Member
Jul 26, 2010
52
2
www.nettuning.nl
Hi,

So i coulden't wait and had to try out JPC firmware. Personally i didn't like it at all, so i went back to JM7. 1 thing i did not like is my product code changed from XEN to KOR.

And here is how to fix that easly:

I tested this on 2.1 cause i was on JM7 when i found this out, but this works with JPC/JPH also.
this fix is for those who do not have (correct) .bak files in the /efs/ directory!


- First make sure you are ROOT and install a Terminal Emulator (can be found in the market)
- Now open the Terminal, enter ''su'' to gain root access
- Enter: cp /efs/nv_data.bin /sdcard/
- Connect you're SGS to the usb and download ''nv_data.bin'' to your computer
- Open ''nv_data.bin'' with notepad or wordpad and search for ''KOR'' change this to the product code matching your country (red marked text should be changed). Im dutch, so mine is XEN. The line looks like this:
Code:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿMP 0.800  ÿ[COLOR="Red"]KOR[/COLOR]    GT-I9000HKD[COLOR="Red"]KOR[/COLOR]
- Now simply save your changes.
- Connect your SGS with usb, upload ''nv_data.bin'' to internal sdcard.
- Disconnect USB !
- Open Terminal Emulator and enter ''su''
- Now enter: cp /sdcard/nv_data.bin /efs/nv_data.bin
Also enter: rm -rf /efs/nv_data.bin.md5
- Close terminal, Reboot Phone. And Voila!!! Product Code restored!!

**IF YOUR SIMCARD DOESN'T WORK AFTER THIS, EXECUTE THE FOLLOWING**
- adb shell
- su
- busybox chown 1001:1001 /efs/nv_data.bin
- reboot

You can also do this from the Terminal Emulator if you don't have ADB on your PC! Like this:

-su
-chown 1001:1001 /efs/nv_data.bin
-reboot

I hope it's easy to follow my steps, it works guaranteed.


UPDATE - 13/09

Some people say you don't have to create a new md5, just remove the old one on the phone. kaffre and i tested this, the phone recreates the md5 file for you. So i've updated the steps in my tutorial, to make it even more easy!

UPDATE - 15/09

Simcard fix added. Thanks to tokinux
 
Last edited:

Narcissus85

Senior Member
Oct 2, 2007
137
0
Hi,

So i coulden't wait and had to try out JPC firmware. Personally i didn't like it at all, so i went back to JM7. 1 thing i did not like is my product code changed from XEN to KOR.

So f*ck that and here is how to fix that easly:

I tested this on 2.1 cause i was on JM7 when i found this out, but im 99% sure this works with JPC also.

- First make sure you are ROOT and install a Terminal Emulator (can be found in the market)
- Now open the Terminal, enter ''su'' to gain root access
- Enter: cp /efs/nv_data.bin /sdcard/
- Connect you're SGS to the usb and download ''nv_data.bin'' to your computer
- Open ''nv_data.bin'' with notepad or wordpad and search for ''KOR'' change this to the product code matching your country. Im dutch, so mine is XEN. The line looks like this:
Code:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿMP 0.800  ÿKOR    GT-I9000HKDKOR
- Now simply save your changes.
- Download a md5 creator tool, i use MD5SUMMER
- Create a MD5 file using ''nv_data.bin" and save this as ''nv_data.bin.md5''
- Open ''nv_data.bin.md5'' with notepad and delete all the lines beside the line wich is similar to this one: 4ba37998243f14158884c5f464933398 (ofcourse your line of numbers is different ! ) Save the md5 file.
- Now your md5 file should be exactly 32bytes (this is the same size of the md5 file used by samsung, so please follow this step carefully)

- Connect your SGS with usb, upload ''nv_data.bin.md5'' and ''nv_data.bin'' to internal sdcard.
- Disconnect USB !
- Open Terminal Emulator and enter ''su''
- Now enter: cp /sdcard/nv_data.bin.md5 /efs/nv_data.bin.md5
cp /sdcard/nv_data.bin /efs/nv_data.bin
- Close terminal, Reboot Phone. And Voila!!! Product Code restored!!

I hope it's easy to follow my steps, it works guaranteed.

editing those files is there a risk of changing the IMEI in 004999010640000 ??

i think something similar happened to me and now i'm with XXXXXXX as product code and that fake IMEI....... :(
 

adz86

Senior Member
Oct 7, 2008
71
1
For me it seems to be easier to do it with the *#272*hhmm#* solution.
Read about this here: http://forum.xda-developers.com/showthread.php?t=779580

Its doing also a hardreset.. so backup you data!

In case you dont want a hard-reset, this manual solution is much better! So Thx, Methyldioxide for your work and sharing with us!

but his doesnt change the product code! i did it and still is KOR.
what is true is that putting the right csc is making my phone act like a normal one so at the end having a KOR phone gives me no problems at the moment...
 

Methyldioxide

Senior Member
Jul 26, 2010
52
2
www.nettuning.nl
For me it seems to be easier to do it with the *#272*hhmm#* solution.
Read about this here: http://forum.xda-developers.com/showthread.php?t=779580

Its doing also a hardreset.. so backup you data!

In case you dont want a hard-reset, this manual solution is much better! So Thx, Methyldioxide for your work and sharing with us!

*#272*hhmm#* only changes the CSC settings indeed, not the actual product code. With warrenty this can be an issue. So i preffer my original product code :cool:
 
Last edited:

ghostgull

Member
Jul 20, 2009
13
0
Portsmouth
Did this actually change the product code or did your Galaxy S replace the changed nv_data.bin file from the backup .nv_data.bak file?

The default action is to use the bak file to write a new nv_data.bin if the original is missing or corrupt. If your original .nv_data.bak still had the original code in it this could be what happened.
 

Aery

Senior Member
Aug 5, 2010
563
8
I´ve copied my original nv_data.bin and nv_data.bin.md5 to my pc und used md5summer to check if the md5 hash stored in nv_data.bin.md5 is a normal md5 hash of the filesize.
The Hash generated with md5summer didn´t match!!!

Seems to be not an normal md5 hash of the filesize. There must be more.

If i do steps from OP the product code of my phone changes to XXXXXXXX.
Have used an Hex Editor and md5summer. Also tried WinMD5, same ****.
 

Methyldioxide

Senior Member
Jul 26, 2010
52
2
www.nettuning.nl
I´ve copied my original nv_data.bin and nv_data.bin.md5 to my pc und used md5summer to check if the md5 hash stored in nv_data.bin.md5 is a normal md5 hash of the filesize.
The Hash generated with md5summer didn´t match!!!

Seems to be not an normal md5 hash of the filesize. There must be more.

If i do steps from OP the product code of my phone changes to XXXXXXXX.
Have used an Hex Editor and md5summer. Also tried WinMD5, same ****.

You dont read proper, plz read the steps carefully and you will create the correct md5 hash. I think your problem is that you did not open nv_data.bin.md5 after you generated it and deleted all lines beside the HASH line. This all is stated clearly in my steps, and you shouldent have any issue.

EDIT: The nv_data.bin.md5 you generated should be exactly 32bytes! else you did not follow my steps properly :)
 
Last edited:

Methyldioxide

Senior Member
Jul 26, 2010
52
2
www.nettuning.nl
Did this actually change the product code or did your Galaxy S replace the changed nv_data.bin file from the backup .nv_data.bak file?

The default action is to use the bak file to write a new nv_data.bin if the original is missing or corrupt. If your original .nv_data.bak still had the original code in it this could be what happened.

Nope, i wish it was that easy for me :) This works only if you backup up your rom with Clockworks for example.
 

Aery

Senior Member
Aug 5, 2010
563
8
You dont read proper, plz read the steps carefully and you will create the correct md5 hash. I think your problem is that you did not open nv_data.bin.md5 after you generated it and deleted all lines beside the HASH line. This all is stated clearly in my steps, and you shouldent have any issue.

EDIT: The nv_data.bin.md5 you generated should be exactly 32bytes! else you did not follow my steps properly :)

I´ve much knowledge about computers, linux (running a lenny root server) and so on. I´m not stupid. ;-)
In nv_data.bin.md5 there is only the hash code and its 32 bytes.

Will try hashing the file under ubuntu or debian and report back. Maybe windows is doing **** here.
 

Aery

Senior Member
Aug 5, 2010
563
8
This is very crazy.

My original files:
nv_data.bin -> DBT
hash in nv_data.bin.md5 -> 3012f56623f1a296c1ecd33ee8f0819b
Hash of nv_data.bin (windows, md5summer) -> 1e44ea7702c0e6b603c01ef0bf5508b0
Hash of nv_data.bin (ubuntu, md5sum) -> 1e44ea7702c0e6b603c01ef0bf5508b0

With my original Files Product Code of Phone is DBT.
If i use the md5 Hash generated by md5summer, put it in nv_data.bin.md5 Phone says XXXXXXXX.

Pretty strange.
 

uiterlix

Senior Member
Sep 27, 2007
167
76
This is very crazy.

My original files:
nv_data.bin -> DBT
hash in nv_data.bin.md5 -> 3012f56623f1a296c1ecd33ee8f0819b
Hash of nv_data.bin (windows, md5summer) -> 1e44ea7702c0e6b603c01ef0bf5508b0
Hash of nv_data.bin (ubuntu, md5sum) -> 1e44ea7702c0e6b603c01ef0bf5508b0

With my original Files Product Code of Phone is DBT.
If i use the md5 Hash generated by md5summer, put it in nv_data.bin.md5 Phone says XXXXXXXX.

Pretty strange.

I've been looking to correctly generate the .md5 file as well. As you can see Samsung uses more than just the file contents for generating the MD5 hash. An interesting thing is that when the phone recreates the nv_data.bin file based on the .nv_data.bak file it also regenerated the md5 file. The hash in this file was different from the one in the backup (original and backup were exactly the same nv_data with the same product code). So I suspect at least the timestamp of the file is also taken into account. I already tried diffenent scenario's but did not manage to generate a correct hash yet.
 

Narcissus85

Senior Member
Oct 2, 2007
137
0
This is very crazy.

My original files:
nv_data.bin -> DBT
hash in nv_data.bin.md5 -> 3012f56623f1a296c1ecd33ee8f0819b
Hash of nv_data.bin (windows, md5summer) -> 1e44ea7702c0e6b603c01ef0bf5508b0
Hash of nv_data.bin (ubuntu, md5sum) -> 1e44ea7702c0e6b603c01ef0bf5508b0

With my original Files Product Code of Phone is DBT.
If i use the md5 Hash generated by md5summer, put it in nv_data.bin.md5 Phone says XXXXXXXX.

Pretty strange.

i was talking about this in my post....check ur imei too...
 

rkadve

Senior Member
Aug 12, 2009
181
16
THANKS

Using the steps in 1st post, I could change my Product code from KOR to INU after updating to JPC thro kies.
Thanks.
 
G

gpnda

Guest
Its not working. cant generate a correct md5 file.

Is the Imei stored in the nv_data.bin too????
 

Methyldioxide

Senior Member
Jul 26, 2010
52
2
www.nettuning.nl
Imei is not on that file, but /efs/imei/bt.txt if i recall that correctly.

And my fix does work great, if you cannot create a correct md5 then it's prolly cause you do it wrong. I bet if you send me your modified file and i make the md5 for you it will work.

Sent from my GT-I9000 using XDA App
 

akajess

New member
Aug 18, 2010
3
0
At that location there's the bluetooth mac aaddress.

I think your product code reverted to the original because you damaged your nv_data.bin and nv_data.bin.md5 files and the phone recreated them from the backup.

If you don't have backups don't try this.

Sent from my GT-I9000 using XDA App
 

kuposh

Member
Feb 19, 2008
34
3
viareggio
Hi,

So i coulden't wait and had to try out JPC firmware. Personally i didn't like it at all, so i went back to JM7. 1 thing i did not like is my product code changed from XEN to KOR.

And here is how to fix that easly:

I tested this on 2.1 cause i was on JM7 when i found this out, but im 99% sure this works with JPC also.

- First make sure you are ROOT and install a Terminal Emulator (can be found in the market)
- Now open the Terminal, enter ''su'' to gain root access
- Enter: cp /efs/nv_data.bin /sdcard/
- Connect you're SGS to the usb and download ''nv_data.bin'' to your computer
- Open ''nv_data.bin'' with notepad or wordpad and search for ''KOR'' change this to the product code matching your country. Im dutch, so mine is XEN. The line looks like this:
Code:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿMP 0.800  ÿKOR    GT-I9000HKDKOR
- Now simply save your changes.
- Download a md5 creator tool, i use MD5SUMMER
- Create a MD5 file using ''nv_data.bin" and save this as ''nv_data.bin.md5''
- Open ''nv_data.bin.md5'' with notepad and delete all the lines beside the line wich is similar to this one: 4ba37998243f14158884c5f464933398 (ofcourse your line of numbers is different ! ) Save the md5 file.
- Now your md5 file should be exactly 32bytes (this is the same size of the md5 file used by samsung, so please follow this step carefully)

- Connect your SGS with usb, upload ''nv_data.bin.md5'' and ''nv_data.bin'' to internal sdcard.
- Disconnect USB !
- Open Terminal Emulator and enter ''su''
- Now enter: cp /sdcard/nv_data.bin.md5 /efs/nv_data.bin.md5
cp /sdcard/nv_data.bin /efs/nv_data.bin
- Close terminal, Reboot Phone. And Voila!!! Product Code restored!!

I hope it's easy to follow my steps, it works guaranteed.

I did it!!!! :D
but, if I can , there's a small error,you 've to correct the red line ''nv_data.bin.md5'' in "nv_data.md5" .... this worked for me....
very helpfull guide, greetings mate :cool:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hi,

    So i coulden't wait and had to try out JPC firmware. Personally i didn't like it at all, so i went back to JM7. 1 thing i did not like is my product code changed from XEN to KOR.

    And here is how to fix that easly:

    I tested this on 2.1 cause i was on JM7 when i found this out, but this works with JPC/JPH also.
    this fix is for those who do not have (correct) .bak files in the /efs/ directory!


    - First make sure you are ROOT and install a Terminal Emulator (can be found in the market)
    - Now open the Terminal, enter ''su'' to gain root access
    - Enter: cp /efs/nv_data.bin /sdcard/
    - Connect you're SGS to the usb and download ''nv_data.bin'' to your computer
    - Open ''nv_data.bin'' with notepad or wordpad and search for ''KOR'' change this to the product code matching your country (red marked text should be changed). Im dutch, so mine is XEN. The line looks like this:
    Code:
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿMP 0.800  ÿ[COLOR="Red"]KOR[/COLOR]    GT-I9000HKD[COLOR="Red"]KOR[/COLOR]
    - Now simply save your changes.
    - Connect your SGS with usb, upload ''nv_data.bin'' to internal sdcard.
    - Disconnect USB !
    - Open Terminal Emulator and enter ''su''
    - Now enter: cp /sdcard/nv_data.bin /efs/nv_data.bin
    Also enter: rm -rf /efs/nv_data.bin.md5
    - Close terminal, Reboot Phone. And Voila!!! Product Code restored!!

    **IF YOUR SIMCARD DOESN'T WORK AFTER THIS, EXECUTE THE FOLLOWING**
    - adb shell
    - su
    - busybox chown 1001:1001 /efs/nv_data.bin
    - reboot

    You can also do this from the Terminal Emulator if you don't have ADB on your PC! Like this:

    -su
    -chown 1001:1001 /efs/nv_data.bin
    -reboot

    I hope it's easy to follow my steps, it works guaranteed.


    UPDATE - 13/09

    Some people say you don't have to create a new md5, just remove the old one on the phone. kaffre and i tested this, the phone recreates the md5 file for you. So i've updated the steps in my tutorial, to make it even more easy!

    UPDATE - 15/09

    Simcard fix added. Thanks to tokinux
    2
    SGS Toolbox showed that my bak files had the correct product code.

    What I did was use root explorer (available on market) and went inside the efs folder and deleted nvdata.bin and nvdata.bin.md5

    After that rebooted the phone and it used the bak files to restore the original product code.

    SGS Toolbox now shows the original product code and also still have my original IMEI
    1
    Don´t use the terminal but gain root access and install root explorer then fire root explorer up go to the efs folder and press long on the nv data file.

    Then you will see a pop up wich also gives the option copy then copy it to the folder called sdcard.

    Then shutdown root explorer and connect the phone to the pc.
    go to your sd card folder and you will see a file called nv data.bin

    Copy it to your pc desktop and install PSpad. When PSpad is installed do a right click on the nv file and select pspadHEX

    Then in the top menu look for the optin called search and typ in KOR

    Then you will find 2 files called KOR just press with your Mouse on the K from KOR and put in your Code (PSpad changes the letters during typing)

    Then click file, save and then reupload the nv file to your sd card.

    Fire up root explorer again, do a long press on the nv file and select copy, browse to the efs folder and press the button paste and select yes to overwrite and you are done