yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] italia0101:
... im a little confused... basically i have fully lost my IMEI number... is it impossible to get my orignal back? im stuck with 0049
[Samsung Galaxy Nexus] chlehqls:
The Nexus S is a different device with different circumstances more likely so I don't even think we can help you.
[Samsung Galaxy Nexus] italia0101:
Thought id give it a try considering they are stock phones... therefore possibly similar folders etc ..
[Samsung Galaxy Nexus] jup007:
Not likely. Once you have correct files in /factory, you're basically equivalent to stock unlocked phone. md5 files match nv_data files. This is normal case. They got out of sync only because fdocomo doesn't know how to correctly update them.

This method itself may stop working. However if you unlock now, you should be safe in the future. I can gurantee this 100%, but it's very likely.
[Samsung Galaxy Nexus] ygvuhb:
thanks

one more question

is busybox backup /factory= backup efs?

use same script?
[Samsung Galaxy Nexus] jup007:
I don't know what busybox backup is. But basically efs = factory. It used to be mounted at /efs, not it's at /factory.
[Samsung Galaxy Nexus] exe127:
will anyone make an apk for easy unlock?
[Samsung Galaxy Nexus] Black-Xstar:
I got a docomo galaxy nexus from Japan, LOCKED.

Is it possible to forever unlock and keep IMEI with this theory?

If yes, can someone post step-by-step tutorial?
[Samsung Galaxy Nexus] chlehqls:
Just use the F***docomo app by searching this site and use the "Unlock forever" button in the app and just follow through the instructions in the first post.

No need for a separate step by step.
[Samsung Galaxy Nexus] Black-Xstar:
Thank you.

There is two Fdocomo:

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

----------------------------****Docomo1.1----------------------

----------------------------****DocomoV2----------------------

Which one?
[Samsung Galaxy Nexus] Jaime.:
The second one
[Samsung Galaxy Nexus] Black-Xstar:
Thank you.

I successful forever unlock and keep IMEI.

If someone need, I can write step-by-step tutorial and post to forum.
[Samsung Galaxy Nexus] Adso58:
My phone was locked to Vodafone Spain.

It worked without any problem, now I'm unlocked and with the correct IMEI.

Thank you :)
[Samsung Galaxy Nexus] exe127:
yes!!!

requesting a step-by-step tutorial!

Thanks
[Samsung Galaxy Nexus] jup007:
Go ahead and write it, I don't seem to be able to get to it;-). Just please include link to this thread for those who want more technical background. I'll review it afterwards
[Samsung Galaxy Nexus] pewpewbangbang:
You have permanent unlock and unique imei using the fdocomo app?? It doesn't even do that yet. Only this theory can get permanent unlock with unique imei.
[Samsung Galaxy Nexus] samusknife:
really need a tutorial

Thanks in advance
[Samsung Galaxy Nexus] osmium2:
nice finding jup, i will try it out.

However, i believe nv_data.bak is generated by f***docomo and is not required for a permanent sim unlock.

Correct me if I am wrong.

And, purely for interest, any one successfully do a permanent sim unlock on 4.0.2 or 4.0.3? what is different among them and 4.0.4?
[Samsung Galaxy Nexus] jup007:
Nope, .nv_data.bak is modified by fdocomo, but it's generated by Samsung as backup. Temporary unlock by fdocomo doesn't modify it and that's the reason why it's temporary - when you wipe data, phone will restore from it since nv_data.bin has incorrect checksum.

There's also .nv_core.bak, so called secondary backup, and even that one comes from factory and contains your IMEI & lock status - but it obviously won't be used under normal circumstances.
[Samsung Galaxy Nexus] monster2046:
I have go though it but still have some unclear.

Do you mean that the best way to do is:

1) lock the phone first, back up the factory

2) unlock permenently with using fuxkdocomx

3) find out the MD5 using 1st step

4) place the original factory on the original position and go to 2nd step

May I wrong?

---------- Post added at 07:10 PM ---------- Previous post was at 07:05 PM ----------

I need also. better to have simple English for me to understand. English is not my mother tongue.:p
[Samsung Galaxy Nexus] syyuen:
I try and it works. It keeps my IMEI. thanks a lot.
[Samsung Galaxy Nexus] gaglax:
ok here is my little test of this and what i did:

0) sim lock of A1 (network operator in austria, europe)

1) flashed android 4.0.3 with aokp b.29

2) installed ****docomo.v.2.apk

3) hit unlock and wear condom

4) flashed android 4.0.4 with aokp b.32

5) installed ****docomo.v.2.apk

6) hit wear condom

7) device has been sim unlocked. network voice and hsdpa drops occur.

8) used the scripts of step 1 in the first post.

9) result is sim beeing locked again.

10) used wear condom again

11) sim unlock works again with network voice and hsdpa drops.

i believe the network drops are connected to the 4.0.4 stock (which aokp is abes on) as also mentioned here:

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

thank you for your effort, but right now it's not usable for me.

These are my files from your instructions in step 1 (which I used between step 7 and 8).

nv.log

Fri Apr 20 08:56:32 2012: /data/radio/nv_data.bin does not exist.
Fri Apr 20 08:56:32 2012: MD5 fail. orignal md5 'b916bc4bf5983ff2903268b7172e176f' computed md5 '73e02ed8d8d66b35b272513b9e455d48' (rild)
Fri Apr 20 08:56:32 2012: backup NV restored.(GED)

nv_data.bin.md5

9e4580b0306351130bbec9b07b370f1f

computed.txt

73e02ed8d8d66b35b272513b9e455d48
[Samsung Galaxy Nexus] alanclk:
Thank you! It works perfectly!
[Samsung Galaxy Nexus] andrewcw:
I realized that COMPUTED is found at nv.log

e.g. adaa0bf9506d939d18d57f96c0c330a3 (Your example)

However, I am wonder where should I found the second MD5, COMPUTED2.

Is it found at nv.log again?

Thank you for your reply
[Samsung Galaxy Nexus] jup007:
This is correct and proves what we know. What this tells me:

- you wiped radio

- checksum for /factory/nv_data.bin did not match (this is result of temp unlock by fdocomo)

- .nv_data.bak was restored and this is original, SIM locked file, hence you end up with locked phone.

Just to make it blatantly clear: this method is based on fdocomo permanent unlock and the fact that it unlocks both files in /factory with incorrect checksum. Doing this method without running fdocomo permanent unlock with generic IMEI first (or unlocking files by hand) is at least tricky and probably doesn't work.
[Samsung Galaxy Nexus] elishapan:
unlock does work, but my imie changes to 004999010640000

what's wrong?
[Samsung Galaxy Nexus] chlehqls:
Uhh, I'm not sure you did everything right. You're supposed to have generic IMEI to start off with (Permanent unlock via fdocomo) and then apply the first Theorem for unlock with real IMEI. The second theorem is supposed to give you both permanent unlock and IMEI by fixing the incorrect generated md5 issue.

Please try again.
[Samsung Galaxy Nexus] pewpewbangbang:
He doesn't need to do theory 1. He can go straight to theory 2 if he wants perm unlock with imei.

But yea, if you want permanent imei with unlock you do theory 2. Need to start off with permanent unlock generic imei tho
[Samsung Galaxy Nexus] elishapan:
thanks for your answer, I never do the Permanent unlock before, but I am not sure what's my imie before the unlock process, maybe it's wrong before.

I only do the 2. Theory application, the unlock works, I wiped and no lock. only imie lost

And I find ****docomo can recover the imie as I have a backup, but the recovery will cover the unlock.
[Samsung Galaxy Nexus] ljwnow:
Worked ! Better than my method. Congratulations Jup!

---------- Post added at 01:04 PM ---------- Previous post was at 12:45 PM ----------

Follow each step exactly and you will get there. COMPUTED and COMPUTED2 are two different MD5 values. Jup' method is working. If for some reason you have trouble, it is definately not Jup's.
[Samsung Galaxy Nexus] elishapan:
my fault, I didn't read the artical careful.

it's ok now.it works, thx.
[Samsung Galaxy Nexus] Sackboy11:
Um, I'm sorry to inform you after I done it... but I posted a link of the thread to Double X's fdocomo thread.

I'm just trying to help to spread the word, hopefully he can work with the OP as well to write an app for this.

Anyways good luck, I'm getting my docomo nexus on sunday, can't wait. :)

Oh and also some interesting info to share, apparently the docomo unlocks are software unlock as well (not the factory unlock, but the unlock where you walk into a docomo store and unlock a previous locked nexus) so even with the docomo unlock, people still have to reunlock it again if they decided to flash, not sure if true, but quite a bummer for folks who are using it in Japan.....
[Samsung Galaxy Nexus] jup007:
Thanks. I already got in touch with fdocomo author. Apparently he's off traveling somewhere, but he should be back soon.

Yes, normally, when you ask your carrier for unlock, they will just give you unlock code. Which, apparently, for gnex doesn't modify /factory, only /data/radio, so your phone will lock again if you wipe data. Of course, you can reuse the same code again, but it's not equivalent to factory unlock or this method.;)
[Samsung Galaxy Nexus] Sackboy11:
Ahh bummer, but hey, I got mine for only 2/3 of the price I normally would get in Canada, and it's running 4.0.2 Yakju soft unlock with my IMEI intact as well.... Although I don't know much until I got my hands on it this weekend....

It makes me sad when Google posted the 399 price tag in the U.S after a week the phone arrived..... but as of now that model is only avaliable domestically in the U.S so that's the only way for comfort myself HAHA.

If an app is written for this, tons of people would benefit from it, thanks a lot man, I will wait patiently for the app to be released, I'm a huge noob and don't want to brick my phone right after the moment I got it :)
[Samsung Galaxy Nexus] kizuki.buy:
[Q]

jup007, first of all congratulations on the success of your grand theory :D

I am using a Docomo version on 4.0.4, temporary unlocked using Fdocomo app v2 through the condom method (not sure what it means in terms of status of my bin and md5 files)

My understanding is that,

- files in my factory folder are untouched (thus retaining my original IMEI).

- files in my data/radio folder are modded to gain temp unlock but md5 file is not fixed, since FDocomo app does not do that

When I check the log file, I can see the original md5 and the computed md5 as you have mentioned in your theory test.

In above scenario, how should I go about gaining a perm unlock while retaining IMEI,

1) Just downgrade to 4.0.2, use the FDocomo v1.1 app to do perm unlock and then follow your theory application

OR

Is there another way like,

2) Fix the md5 file in data/radio folder and then take the set of corrected files from radio folder and use it to overwrite the factory folder (if this makes any sense?)

Any suggestions will be appreciated :)
[Samsung Galaxy Nexus] jup007:
Not entirely correct, fdocomo temp unlock does modify /factory/nv_data.bin. So the line in log should match with /factory/nv_data.bin.md5, which is incorrect.

data/radio will contain unlocked file with correct checksum. I am still not sure how fdocomo does this, but apparently there's a hole in earlier versions that it abuses. These files are also stored away somewhere and that's "condom" method.

fdocomo V2 also has perm unlock. And I was under impression that perm unlock works even in 4.0.4, it's just temp unlock that stopped working, but I didn't test this. Does anybody know?

If it would, you'd just need to run perm unlock, and do theory application.

I am not sure if this works, because if it does, I am curious why fdocomo didn't start using it long time ago. But there is a method how to regenerate /factory from nv_data.bin. It's just pretty obscure and I don't know if I should post it since it's another hole Samsung may plug afterwards.;)

But believe me, after I posted this, I did some really ugly things to my /factory directory and the phone still lives. :D
[Samsung Galaxy Nexus] brightlai:
It works, thanks so much!

It works, thanks so much!
[Samsung Galaxy Nexus] churchmice:
works like a charm, thank you.
[Samsung Galaxy Nexus] amazonho:
It Work!! great job:)
[Samsung Galaxy Nexus] kizuki.buy:
Thanks for your response jup007. :-)

Am dying to try out the theory. Since I cant afford any downtime with mobile connectivity, will have to wait until weekend when I can get my hands on a spare phone.

Will update if I was able to perm unlock directly on 4.0.4 and then apply the theory successfully :-D
[Samsung Galaxy Nexus] BugoyKulit:
At first I also made an error regarding computed :) but everything works.

Got back my original IMEI. Thanks so much!!!
[Samsung Galaxy Nexus] pcbroch:
I have bought a GNex from amazon, and there is no nv_data.bin or nv_data.bin.md5 files in /factory. I of course have a generic IMEI. I haven't messed with any of the files, it was like that when I received it.

Would these 2 missing files mean I'm SOL at ever getting the original IMEI back? If it's the case, I'll simply return the phone. It was sold as an i9250, when in fact it was a SC04 model (so clearly not "as described").

I have nothing against the SC04 if it works properly, but not having a proper IMEI will bite me in the %$/ at some point I'm sure.
[Samsung Galaxy Nexus] jup007:
Is there .nv_data.bak or .nv_core.bak? You need to run something like ls -la to see these. If so, it should be possible to restore nv_data.bin from them. I can post here short summary if you want to play with it, it's not that difficult.

On the other hand, I think that selling device with wiped factory is pretty ugly practice. The device was obviously tampered with in not very professional way. So it may be simpler to just return it. It's up to you.
[Samsung Galaxy Nexus] pcbroch:
I think the bak files are still around. Do I simply copy them back to nv_data.bin and md5?

I agree with your comment on selling devices like that. First I get a different model than I purchased, and it's not even working properly... Who knows what devices they sell, the box had clearly already been opened, and the bootloader already unlocked... Could even be a return from another buyer. :-S
[Samsung Galaxy Nexus] jup007:
I don't know if that works, you could try it. But there are some differences between those two files in /factory.

Here's what I did to restore IMEI from .nv_core.bak.

BACKUP /factory.

Switch to airplane mode.

$ su
# cd /data/radio
# rm nv_data*
# mount -o rw,remount /dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory
# busybox killall rild

And let it do its magic, meaning wait at least 30 seconds. Check that /factory contains nv_data.bin and nv_data.bin.md5 and check logs (both /data/radio/nv.log and /factory/nv.log), they should say something like this:

Fri Apr 20 03:02:24 2012: nv_data.bin does not exist.
Fri Apr 20 03:02:24 2012: NV backup has been rebuilt.
Fri Apr 20 03:02:25 2012: backup NV restored from Secondary bak.
Fri Apr 20 03:02:28 2012: NV restored.(GED)

The reason why this works is that Samsung driver knows how to rebuild these files from backup by itself, but normally on boot, when it's started, /factory is ro mounted, hence it can't. So we're mounting factory rw and then kill the telephony deamon. Since rild is pretty vital service, android will immediately restart it for us and it will do what it normally does on boot on rw mounted factory.

And yes, this is a bit nasty.;) It also assumes that .nv_core.bak is still correct. So if you don't feel comfortable doing it, just return the thing.

Also, it doesn't require busybox, it's just simpler. You can use simply kill <PID> but you need to find PID in ps output (it's alway 116 for me;))
[Samsung Galaxy Nexus] Sackboy11:
Again, although I still didn't have my hands on the device yet, but I just want to ask a really retarded question.

Can I unroot the phone and run stock ICS on this after I use this method and still keep everything (IMEI) intact?

I just want to make sure of this before I do anything, thanks.

and I sure hope this can unlock stuff once and for all, hopefully Samsung won't tamper with this in future updates, although I don't see anything that would affect them in a bad way.....
[Samsung Galaxy Nexus] jup007:
Yes, if you use theory application. To our current knowledge, once you fix /factory files, it's more or less same as factory unlocked phone.

Although... Why would you want to unroot it?;)
[Samsung Galaxy Nexus] Sackboy11:
Oh, that's just me being OCD about how "absolute" this unlock would be, my hands are itching for the nexus right now and I still have 4 days until the device arrive to my place, I'm just jumping the gun and doing all kinds of research once and for all :D

Although, I know you would probably be as uncertain as me and everybody else.... but you did mention the possibility of Samsung closing the backdoor for this.... what do you think are the odds? I remember the old temp fdocomo unlock was reverted because of the 4.0.4 update, however I remember it was due to the fact that the 4.0.4 is not coping well with currently rooted phones and the old IMEI erasing perm unlock still works. hopefully they can be Good guy gregs and let us through.....
[Samsung Galaxy Nexus] jup007:
This is just guesswork but I wouldn't be that much worried. a) you can still reflash 4.0.4, fix /factory and go back to your new version should they close this. b) there's still other method for unlock I haven't posted. c) with gnex finally being sold officially by google in the US unlocked, there will be much less of these locked phones flying around, hence less pressure from carriers. Of course, it's also quite possible that SG III will use same locking mechanism which will negate this.

So this remains to be seen, but your device will have 4.0.4 firmware, will be unlockable by this mehod and once unlocked it will, in all likelihood, stay unlocked indefinitely.
[Samsung Galaxy Nexus] Sackboy11:
Thank you :D, I'm quite new to the Android dev scene and I appreciate all the helps :), although I don't think Samsung can do anything (at least on IMEI blacklisting) because this method would revive all unique

Japanese

IMEI's. It would be impossible for them to tell a foreign carrier to blacklist a Japanese phone. Usually carriers have more say on blacklisting.... at least in Canada... I think. But on the other hand I don't think Canadian carriers even does IMEI blacklisting, it actually sparked up some controversies from people who got their phone stolen .
[Samsung Galaxy Nexus] chlehqls:
Hmm.

After this method, did anyone try using Google Wallet? I try to add a card but it errors out.
[Samsung Galaxy Nexus] jup007:
I installed it from Google Play, got my free $10 credit but didn't get to using it yet. There's not that many places around that accept it, I probably have to go to Peet's Coffee or something...
[Samsung Galaxy Nexus] robrob777:
Thanks a lot! It worked!!!

I was temp unlock on 4.0.4 so I had to go perm unlock first to get the correct md5.

Used the Android terminal from the market and rootexplorer to mount RW (otherwise cannot echo the Computed).
[Samsung Galaxy Nexus] chlehqls:
Dang, I'll probably have to call again to get them to do a reset of some sort. I called today but made the mistake of saying that I rooted my phone and they took a hands-off approach and gave me a number to Google.
[Samsung Galaxy Nexus] jup007:
Well, I just mentioned that my wallet says unsupported device because of rooted phone (seen here: http://xdaforums.com/showthread.php?p=25254122). Didn't say it when I installed it, wierd.

Shouldn't be an issue in itself, but yes, if you're rooted, it would seem that official google policy, because of security vulnerabilities is not to support these devices.
[Samsung Galaxy Nexus] chlehqls:
Yeah, the banner doesn't come up for me as well.

I'm likely going to give Money Network a call again but this time mention that I'm not rooted or something, provided they don't keep track of what I already said before lol.
[Samsung Galaxy Nexus] kizuki.buy:
robrob777, I am pretty much in same situation as you. Temp unlocked with 4.0.4 and am planning to apply the theory over the weekend.

Although I have a hang of what needs to be done, it would help my confidence if you could outline the step by step procedure that you followed. Thanks in advance :-)
[Samsung Galaxy Nexus] norazi:
i have a negri gnex with the generic IMEI... if i do this, can i later switch back to the generic IMEI again?

i just want to keep my options open in case T-Mobile blocks all the japanese IMEIs from Tzones in the future
[Samsung Galaxy Nexus] dextroz:
To post my experience:

I have a Negri Galaxy Nexus running Android 4.0.4 yakju with generic IMEI.

I downgraded my phone to 4.0.2 with the help of Galaxy Nexus Toolkit using stock tarball images from Google website.

Next, I upgraded to 4.0.4 (since I needed the md5 files) and changed my device from yakju to takju.

Next, I followed your instructions to the tee to retrieve my original IMEI number.

I verified unique IMEI by resetting my phone once again.

I did not use 'echo -n'.

Thank you for your help!

I am willing to send a beer your way :-)

tldr: Your instructions work perfectly on the takju build as well.
[Samsung Galaxy Nexus] jup007:
Good to know, thanks!
[Samsung Galaxy Nexus] kgdg:
I am stumped.

I was able to successfully do permanently retain the original IMEI.

But for the life of me, I can't get Wallet to work.

It keeps giving me Error, cannot add card.

I called Money Network, they said call google since device is rooted.

I called Google, they said it will not work since it is rooted.

I unrooted, tried, failed, called Money Network, they said, once it has been rooted, even if it is currently unrooted, it will never work on this device again!

Called Google, same answer...!

WTF! I even tried locking the bootloader, still same issue.

How is this possible when there are people who are running Wallet WHILE being rooted?!

KG
[Samsung Galaxy Nexus] jup007:
This is different issue and I don't know much about google wallet. The only question relative to this topic is: did you try using google wallet before, with generic IMEI? I can see how this (changing IMEI on same device) could flag you in google database...

I don't think rooting in itself will have much to do with it, except that google does not support rooted devices and clearly says so.
[Samsung Galaxy Nexus] giliath:
It works，and everything seems fine，IMEI BT address etc.thanks~
[Samsung Galaxy Nexus] kizuki.buy:
Thanks jup007, it works :D

However, in my case I didnt have the .bak files in factory folder!!

I was on 4.0.4 and had temp unlocked using 'wearing condom'. The condom itself was 'taken' when I was on plain vanilla temp unlocked on 4.0.2.

As first step I directly did a perm unlock on 4.0.4 and checked that I got a generic imei.

Then I just went ahead and did the operation only for the bin.md5 file and to simulate a reset, deleted the files from my radio folder. After reboot, my imei was back and lock status was still unlocked. I will try some different ROMs over the weekend so will be wiping a lot. Lock status will get tested again but I think it is perm unlocked now.

Also, everyone was mentioning about two sets of hashes in the log file. When I checked, I had 4 sets - Is that strange?

cat nv.log

Wed Apr 4 13:00:48 2012: /data/radio/nv_data.bin does not exist.

Wed Apr 4 13:00:48 2012: MD5 fail. orignal md5 '5cb0be87dfd4795eb7002bab276832cf' computed md5 '9d6aa32a14a7c3cb2ffad01a824dc268' (rild)

Wed Apr 4 13:00:49 2012: backup NV restored.(GED)

Fri Apr 27 21:44:14 2012: MD5 fail. orignal md5 '6548d9f89f4c68473cf7d91d4d4c391a' computed md5 'd93dde8bf53bdc6cc3dbf63a3946737e' (rild)

Fri Apr 27 21:44:14 2012: MD5 fail. orignal md5 '74a3bfc68d91630a48c3a73bab88b99e' computed md5 'f8ffb715597c7294544376369c0c821b' (rild)

Fri Apr 27 21:44:14 2012: MD5 fail. orignal md5 '2a0ef65a885f670b5a24b52b93e80e79' computed md5 'd76c83fbe97155483c714000398ea7cb' (rild)

Fri Apr 27 21:44:15 2012: default NV restored.
[Samsung Galaxy Nexus] Namidairo:
Nah, you should see my log... few dozen hashes listed now because I kept messing it up... (This is why you backup /factory with 'adb pull /factory')