yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Q&A, Help & Troubleshooting] afff53:
Like what was already said, there is no way to fix it yourself. You need to get it repaired either at a repair shop or google.

This thread should be closed, not really gonna help anyone.
[Nexus 5 Q&A, Help & Troubleshooting] vladonru:
There IS a solution!

See my answer at http://android.stackexchange.com/questions/85807/nexus-5-imei-0-how-to-restore-imei (at the bottom of the page).

It really works, I just done it, and my phone gets original IMEI and can 3G/LTE.
[Nexus 5 Q&A, Help & Troubleshooting] payz:
thx but .rar file gone - can you repost it for me?

I'm suffering from IMEI=0 after phone went into weird boot loop. I'm hoping your solution will work, but the file on the russian forum is 404... Can you repost it?

Thanks!
[Nexus 5 Q&A, Help & Troubleshooting] payz:
Thanks, but it's not letting me register... I'm trying in "Russian" but for some reason the captcha isn't working for me (very frustrating). Any chance you could help a brother out and post the rar to dropbox/drive etc? Cheers!
[Nexus 5 Q&A, Help & Troubleshooting] bitdomo:
The captcha is about to add the two numbers you see, and write the result. Like 74 plus 12. My cousine helped me out after I was trying to register for hours as he know a little russian.
[Nexus 5 Q&A, Help & Troubleshooting] payz:
Still no IMEI...

After much headache, I finally got the Qualcomm NV tools to connect and write IMEI to phone ... but after rebooting the device still shows IMEI=0... Am I screwed? Is this a hardware issue?

Also, I couldn't find ESN to input - where to find it and is this the reason (even though IMEI wrote successfully). thx guys
[Nexus 5 Q&A, Help & Troubleshooting] bitdomo:
ESN calculates from the MEID number. MEID is same as the imei but without the last digit (atleast it was the case checking 3 working nexus 5. 2 D821 and a D820).

I had a same problem when I tried it on my nexus.

What worked for me is to restore the zeroed out efs with twrp. Check MEID and IMEI then select read, then enter your imei end meid then select write. Reboot the phone check if the imei is still 0 or not. If 0 click on read again. Select esn write yout imei end meid click on write, then click on read then click on write again. It would show an error that esn is read only, but just ignore that. Reboot the phone. If the imei still 0 then restore the zeroed out efs and do everything again.

For me after fixing the efs i could not get any 4G signal (I have D821), I decided to flash the QCN file which for D820 to enable lte band 3 and 8. Then afterf that I reverted the nv item 6828 and 6829 to the default value 524501 (this is for D821). And finally I got 4G signal ( atleast for band 3, because that is the only lte band in my country)

I spent a whole day with my repaired efs. I made a few phone calls and surfet the web and everything worked fine, but I havent tested what is with sms and mms. Then I flashed back my original efs.
[Nexus 5 Q&A, Help & Troubleshooting] payz:
YOU THA MAN!!! It's working!!! I can't believe it.. it's been dead for a month, and I've tried everything. 10000000million thanks to you good sir
[Nexus 5 Q&A, Help & Troubleshooting] payz:
Full instructions to restore IMEI from 0

I had a hard time, so I figured this may help someone else fix a broken Nexus 5 with IMEI = 0

Of course, do this at your own risk, I take no responsibility. Thanks goes to vladonru for finding the solution on the russian forums, see thread android.stackexchange.com/questions/85807/nexus-5-imei-0-how-to-restore-imei

I just translated/shortened/fixed some stuff, and here is full instructions below and all files attached.

NOTE: If you can't find/don't know the phone's IMEI it's laser etched onto the sim card holder (whew).

Change or Repair IMEI

1.	Install the LG driver LG

2.	Install QPST

3.	Copy the entire folder EFS Professional to C drive

4.	Unpack the archive Nexus5 the root of drive C.

5.	Using WUG Nexus toolkit:

a.	Make sure running stock Android 5.0.1

b.	Rooted

c.	If necessary, you can reset the IMEI using backups zero IMEI from the archive. To do this, simply make a backup of your EFS in TWRP, then replace in the folder's backup your files on the distribution of similar make and restore EFS.

i.	If it is already erased and writes 0, then just skip this step.

d.	Advanced tools:

i.	Install bootloader 5.0.0_diag_BOOT.img from folder

ii.	open a command window:

1.	adb shell > su > setprop sys.usb.config diag,adb

This activates the diagnostic mode on the phone and will be available operations with nvram through com port.

6.	Open EFS Professional:

a.	Click on Qualcomm NV Tools, Hit connect and go to Secure Ops.

b.	Hit Read and check off imei and meid, and enter imei and meid (meid is just imei without last two digits)

c.	Hit Write

d.	Reboot phone and check imei by typing *#06#

e.	If imei still 0 > do b above again, then Read (note esn now appears), then Write again (ignore the errors) > Reboot and check, should be working.

f.	Repair 3G/LTE:

i.	Install the diagnostic bootloader again and run the setprop shell command again

g.	Open QPST Configuration from Windows programs

h.	Click Ports tab, Add new port, deselect secure ports only and should now see the serial port with phone connected (if not, then the serial drivers aren’t installed properly  Use WUG driver support to remove all android drivers and plug the phone in again to install from windows update)

i.	Click Start Start Clients > Software Download

j.	Go to Backup tab and click Start Leave SPC with all zeros (note file location of backup)

k.	Go to Restore tab, check “Allow phone / file ESN mismatch”, restore from the NEXUS5.qcn (from the folder), again leave SPC with all zeros here

l.	Now click Browse next to QCN File, locate the backup from j above and now enter in SPC: 308508 > Start

m.	Reboot phone > everything should be working!

7.	Make complete EFS backup!!!
[Nexus 5 Q&A, Help & Troubleshooting] Tech_Savvy:
[/COLOR]

just to make sure.... the "5.0.0_diag_BOOT.img" is that a bootloader img or the boot(kernel) img...? i dont want to mess up my phone...thanks in advance.
[Nexus 5 Q&A, Help & Troubleshooting] fishildur:
Qualcomm NV Tools

Hi guys, I was really happy to find this thread, my Nexus 5 IMEI is also 0, could someone please point me to a right direction solving my problem.

I'm stuck on this step -> 6.	Open EFS Professional: a. Click on Qualcomm NV Tools, Hit connect and go to Secure Ops.

Qualcomm NV Tools wont show any ports so therefore i can't select my device, could this be because:

1) i'm not installing LG driver LG correctly or

2) I'm using virtual machine (Windows 10) on my Macbook.

With all the best

2G Nexus owner :)
[Nexus 5 Q&A, Help & Troubleshooting] ConorCX:
I'm not 100% sure if virtualization can affect connectivity with your phone, but just to be sure try the procedure with a non virtual machine running Windows 7 or Windows 8.
[Nexus 5 Q&A, Help & Troubleshooting] fishildur:
Phone good as new!!!

Hey, got it all done, i made a mistake on step:

i.	Install bootloader 5.0.0_diag_BOOT.img from folder.

I tried to flash it as bootloader but instead it needed to be flashed as boot(kernel) after that all went easily. Even installed windows 7 in bootcamp for all that, but i think i would have made it in my virtualized windows 10 as well.

Big big thanks for this tutorial. :good::good::good::good:
[Nexus 5 Q&A, Help & Troubleshooting] Tech_Savvy:
i about made the same mistake...but noticed it was 10 mb the size of boot(kernel)...hopefully he"ll change it...i got mine running as well...!!!!

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

[MENTION=2221327]payz[/MENTION] this method worked to prefectiong....just letting you know...change the the tuteriol so it doesn't say flash bootloader boot....rather as boot/kernel....other than that it worked just great!!!!! thank you so much!!!
[Nexus 5 Q&A, Help & Troubleshooting] fishildur:
Step 6b

Another possible mistake could be 6b. Hit Read and check off imei and meid, and enter imei and meid (meid is just imei without last two digits)

For me i needed to only remove one digit from the ending of IMEI for MEID, otherwise it was too short!

With all the best

Fully working Nexus 5 owner :)
[Nexus 5 Q&A, Help & Troubleshooting] JsChiSurf:
Can't thank you enough for this post with details and attachments. This saved me big time after I inadvertently overwrote my /efs partition from my previous Nexus 5 to a new one, after I dropped and broke my previous and attempted to restore my latest nandroid to the new phone, all resulting in an IMEI = 0.

Thing is, I know better and still did it!

After much searching and consternation I came across this post and am back to full working order!

Cheers.
[Nexus 5 Q&A, Help & Troubleshooting] Blackiris_BLLD:
Just a very silly detail i missed and gave me some trouble, when doing the imei read and write, dont leave the sim inside.
[Nexus 5 Q&A, Help & Troubleshooting] azizLIGHT:
If you have a freedompop nexus 5, they don't write the IMEI on the box, or on the sticker on the back of the phone. Luckily, there's a MEID written on the box and sticker, and MEID is only missing 1 digit from the IMEI. You can either brute force attempt this method 10 times from 0-9 to get the last digit and get lucky, or use the way I did. I actually logged into a google account while I had my efs partition intact in the phone. If you go to https://www.google.com/settings/dashboard and expand Devices section, you'll see all your devices you logged into your google account with and find the IMEI listed there.

Also, it's possible to do this under a vm. I have a linux host and windows 7 guest. You'll encounter a problem where after flashing bootloader 5.0.0_diag_BOOT.img to boot[kernel] in WUG (step 5di), the phone will reboot and you might not be able to communicate with the phone in the vm. To fix that, just run the adb command (step 5dii) under your host os, and connect the phone to the guest os and it'll work.
[Nexus 5 Q&A, Help & Troubleshooting] jimmycinla:
Drivers

I am at the point of activating diagnostic mode, this step ... ( 1. adb shell > su > setprop sys.usb.config diag,adb )

All goes fine but 4 items show up in my device manager needing drivers ( screen shot below ).

I cannot get a driver to work at all with these. I have completely deleted my device and drivers multiple times and also used the Nexus Toolkit driver config to remove all related phone items and drivers. I used the toolkit to walk through driver install and I get that driver configuration is all good from the toolkit driver test.

Tried on two computers Windows 7 32 and a different Win 7 64.

Any clue what to do ?

Thanks
[Nexus 5 Q&A, Help & Troubleshooting] bitdomo:
Have you tried installing the LG druvers? https://mega.nz/#!gsoSCCgY!U_OhElVM2GTvqTpGBLbCqYIqvnv2hV0GN3Mv7fsjIxE
[Nexus 5 Q&A, Help & Troubleshooting] jimmycinla:
Yea i had the LG drivers, but I did a reinstall from the ones from your link and all good now. Thx

Nexus is back up and running with IMEI in place.

Thanks
[Nexus 5 Q&A, Help & Troubleshooting] Durteedee:
what is meant by step f.Repair 3G/LTE:

---------- Post added at 03:40 PM ---------- Previous post was at 03:05 PM ----------

unplug device then bring up efs pro select the program in the directions. then eneter the command in the command window to enter diag mode you will see a change then
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
imei

A litle help here i write the imei but stil is 0 i try many

Times with the same results only the maid is writen
[Nexus 5 Q&A, Help & Troubleshooting] Uchoayi:
Hello! is this thread still active? because my phone just started having IMEI 0 issues after locking up during the update to android 6.0.

I've tried the method posted by payz but still nothing. Only managed to get the ESN and MEID written. The IMEI itself always goes back to 0.
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
Don't continue trying you never make it to work same here.

One question. You have 2.3.4g??

If yes fu..ck the imei..
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
OK here
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
OK ....
[Nexus 5 Q&A, Help & Troubleshooting] Uchoayi:
Got it working. My original IMEI weren't being accepted for some reason. so I bought a totaled nexus 5 on craigslist for 20 bucks and got it's IMEI which worked.

Fully functional Nexus 5 now.
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
I have second imei of other nexus but I don't try it
[Nexus 5 Q&A, Help & Troubleshooting] Ultraschorsch:
Is there any way to do this on a linux machine? I tried to open the attached programs in Wine but it did not work.
[Nexus 5 Q&A, Help & Troubleshooting] Vibed:
Hi guys, I am stuck at 6h point. I can't see serial port of my port. I tried to reinstall drivers few times, but there is no change. I also tried to install drivers on a fresh pc that never connected to android device and still no results. Is there any option, that there is issue with something else than drivers?
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
You must have on phone the modded boot img
[Nexus 5 Q&A, Help & Troubleshooting] Vibed:
Do you mean an 5.0.0_diag_BOOT.img? - I have it
[Nexus 5 Q&A, Help & Troubleshooting] ferko85:
Only 3g, 4g problem

Hi!

Never got the imei 0 issue, but only connected to 2g edge. I restored with the provided qcn, and now at least it says it connects to 3g and lte BUT it doesn't transfer data.

Could it be that the imei is blacklisted? (there is no way i can check that in my country)

I can make, receive calls and sms, plus i can navigate with 2g, so i think that's not the issue.

I've tried flashing a couple of radios but they make no difference.

Also, i've noticed my qcn backup file is smaller (734kb) than the provided one (773kb). I've tried backing up several times, and they always end up on that size. Can this issue have anything to do?
[Nexus 5 Q&A, Help & Troubleshooting] nokiagye:
If you have it I don't know witch step you miss to help y!!
[Nexus 5 Q&A, Help & Troubleshooting] Vibed:
I am stuck on 6h point:

I can't see serial port so I tried to remove drivers and install new like in this advise, but still nothing. Probably I am doing sth wrong with this drivers but maybe it is sth else?
[Nexus 5 Q&A, Help & Troubleshooting] ferko85:
If you are using windows, check Device Manager. I couldn't find com ports directly from qpst, but i checked the number on device manager and added it manually.
[Nexus 5 Q&A, Help & Troubleshooting] Vibed:
YES! It was it - thank you a lot! Now everything is working!
[Nexus 5 Q&A, Help & Troubleshooting] Chatperdu:
Thanks. Accidentally restored an old nandroid with EFS on a Nexus 5 that barely just came into my possession! Had to install windows 7 in bootcamp as well. But in the end, got it to work. Thank you. The thought of the process still make my legs feel like jelly.

I dropped only 1 digit off my 15 digit IMEI to arrive at 14 digit MEID. I am assuming the ESN = null then. I am just hoping there are no other information in the EFS that got lost during the wipe.
[Nexus 5 Q&A, Help & Troubleshooting] Miguun:
Thanks payz for the tutorial, you saved me from sending my Nexus to warranty!

Again, thank you very much.
[Nexus 5 Q&A, Help & Troubleshooting] razr003:
stuck on step d i

stuck on step di from which folder should i Install bootloader 5.0.0_diag_BOOT.img

need help

thanks in advance

---------- Post added at 09:47 AM ---------- Previous post was at 09:31 AM ----------

ii.	open a command window:

1.	adb shell > su > setprop sys.usb.config diag,adb

i m not able to understand this step from where i have to flash this i m not able to find this setup file pls help me with this step

---------- Post added at 09:50 AM ---------- Previous post was at 09:47 AM ----------

ii.	open a command window:

1.	adb shell > su > setprop sys.usb.config diag,adb

i m not able to understand this step from where i have to flash this i m not able to find this setup file pls help me with this step
[Nexus 5 Q&A, Help & Troubleshooting] razr003:
phone not connected

ii fllowed exact as post

but my phone not connecting in nv tools

i already installed lg and google drivers

pls help me asap thanks in advance
[Nexus 5 Q&A, Help & Troubleshooting] Felixaus:
Also I can not connect the device with nv tools... Please help mee :(
[Nexus 5 Q&A, Help & Troubleshooting] srajper:
Hi, could you explain in detail how to did you flash as boot(kernal)?

when i do it through fastboot, the phone gets stuck on boot. 6.0.1 nexus 5
[Nexus 5 Q&A, Help & Troubleshooting] audit13:
The post says the phone must be running rooted stock 5.01.
[Nexus 5 Q&A, Help & Troubleshooting] zerosum0:
22 posts and two phones screwed up get another hobby. People loose out when people rma phones they broke. Try honestly and a stamp album..
[Nexus 5 Q&A, Help & Troubleshooting] audit13:
I successfully restored my phone's original imei and according to the dialler but I still get the "not registered" error. The imei used to be zero. No big deal as I will just find a used motherboard.
[Nexus 5 Q&A, Help & Troubleshooting] kolrabie7:
Hey, might it be possible to say how you did that? I've the same issue with no 4g connection, but I've no idea how and where I can revert these nv items....So it would be really nice, if you could say which tool you have used and how you used it :D

Thank you so much!
[Nexus 5 Q&A, Help & Troubleshooting] lorcap:
Remove SIM + enter port manually

IMEI coulnd't be written with the SIM card plugged in. Maybe Airplane mode is enough, instead of removing the SIM?

I couldn't get anything in the port list. I had to enter the port (i.e. COM22) manually, both fields Port and Port label.

[MENTION=2221327]payz[/MENTION], maybe you can update your post...
[Nexus 5 Q&A, Help & Troubleshooting] richybuitre:
Great

It works!!! thanks a lot
[Nexus 5 Q&A, Help & Troubleshooting] opeller:
Thank you SO MUCH!!!

Saved my phone!

(used backup after replacing motherboard. IMEI was 0 and no cell reception.)

No way I would understand the Russaing forum for this, wayyyy to complicated.

But you made it possible! ^_^

Thank you so much again! Saved my phone!
[Nexus 5 Q&A, Help & Troubleshooting] n33raj18:
Thanks for this thread.

I have one question about one of the steps. When the fix says "Repair 3G/4G", what does it mean? I got the IMEI back but the phone gets only 2G network. How do I repair it to get 3G/4G back?

Thanks.
[Nexus 5 Q&A, Help & Troubleshooting] balu08:
Can anyone help me doing this please
[Nexus 5 Q&A, Help & Troubleshooting] sutobe:
Hey

I bought a new Nexus 5 32 GB (from a private ebay seller, sealed box etc) and I got the IMEI = 0 error and finally got this procedure to work after 4 hours , will be late to work tomorrow probably.......

anyway, I wrote the IMEI and checked if it was stored in the phone (it was) but now I have the problem 3g and 4g aren't working. No cell signal, obviously no data transfer.

The SIM card works perfectly well in my other Nexus 5.

What can I do?
[Nexus 5 Q&A, Help & Troubleshooting] Iskhander31:
Hello, after rewriting imei number I don't got 4G. Could you explain how you reverted the nv item 6828 and 6829 to the default value 524501. Thanks you.
[Nexus 5 Q&A, Help & Troubleshooting] golden_life0807:
please help i have lost data connection

i have last data connection after repairing imei, i tried to repair 3g lte but now i cannot get 4g signal and also i lost data connecton on all modes that is 2g,3g,4g

i have a D821

thanks in advance
[Nexus 5 Q&A, Help & Troubleshooting] akkufix:
lost 3G/4G

For all you had lost data connections, there are some threads around to get it back.

Look for your device. D820 and D821 uses different bands.

For start up with all, first read this one, to get your right SPC - this is like your password to get in nv and programming-things.

Without SPC you can't write anything.

https://xdaforums.com/google-nexus-5/general/radio-enable-lte-band-3-nexus-5-d820-t2928561

This one lets you find your default values for nv 441, 946, 2954, 1877 (gsm) and nv 6828, 6929 (LTE).

https://xdaforums.com/android/general/3g-lte-frequency-nv-items-qualcomm-t2950491

Another thread helped me to check and write them values in nv.

https://xdaforums.com/galaxy-s5/general/how-to-add-rf-lte-frequency-bands-to-t2886059

Read carefully the Quick Start Guide.

You must have a working adb and drivers installed, which you will find in the threads above or in this thread here..

Make a backup from your phone (efs also) in TWRP to have one, if something went wrong, so you could go back to the state from where you started.

Btw... I did it with AOSP 7.1.1, You will see if your rom/kernel is working, if you get your com-port, after enter DIAG mode.

And as a hint for this dec, hex and binaries values, you could easy use windows calculator in programmer mode.
[Nexus 5 Q&A, Help & Troubleshooting] mihail1:
I locked up on point 6 k.

My nexus 5, spc is 000000 when i try restore back.qcn with spc code 308508 ,pops error spc code.

what I'm doing wrong?

Sorry for my bad english

'Nexus 5'
[Nexus 5 Q&A, Help & Troubleshooting] akkufix:
If your SPC is 000000, then try to restore the qcn-file with your SPC.
[Nexus 5 Q&A, Help & Troubleshooting] mihail1:
I don't have original backup efs.

I do not know what is the default spc code:(

'Nexus 5'
[Nexus 5 Q&A, Help & Troubleshooting] akkufix:
But you've said your SPC is 000000. So, this is your programming-code to write. Look at my post above #74. I also had not a own efs (flashed wrong backup and deleted mine) and i could solved it by read these 3 threads.
[Nexus 5 Q&A, Help & Troubleshooting] mihail1:
I tried but I do not understand everything.

I did everything on these thread

https://xdaforums.com/goo...-d820-t2928561 and still does not work lte

Could you write what exactly did you do, step by step?
[Nexus 5 Q&A, Help & Troubleshooting] George35000vr:
Could you please share the default values of nv 441,946 and 2954 (assuming that you're using a D821 one) i can't calculate them lol . Thanks in advance.
[Nexus 5 Q&A, Help & Troubleshooting] xI mEzMeRiZe Ix:
The command that puts the phone into diagnostic mode does not work at all for me. I enter the diagnostic mode command following the adb shell and su commands while the phone is booted up and running normal (with USB debugging on and running rooted stock 5.0.1), but nothing happens on the phone to indicate the diagnostic mode when I enter the third command. When I then go into EFS professional, it fails to connect to my phone.

Any ideas?
[Nexus 5 Q&A, Help & Troubleshooting] thejacko:
Thank you very much
[Nexus 5 Q&A, Help & Troubleshooting] $olerL:
GETTING ERROR IN QPST RESTORE!!! HELP (6k)

I followed all the steps

installed boot file turned the diagnostics on

drivers seem to all be OK. etc etc...

Got to the QPST section

COM5 port found immediately... (removed and re-installed all drivers, and this is now COM9 for some reason)

Backup OK...

But then when I have to restore NEXUS5.qcn from file with SPC 000000 and allow mismatch ticked, the process doesn't even start, and I get an error:

"Memory restore failed"

"Received an invalid command from the phone."

I have no idea what to do from here. Tried rebooting PC and Phone, factory reset, and re-root, and re-flash , etc etc... My Nexus 5 is D821 model.
[Nexus 5 Q&A, Help & Troubleshooting] LastStarDust:
Thank you very much for the wonderful tutorial!! I had lost any hope but your tutorial worked!!!

One very important thing to notice is that the stock 5.0.1 Android is NEEDED. If you try with android 6 you won't ever be able to change the IMEI (it will always revert to 0).

So I repeat: this tutorial must be followed VERBATIM! Especially with regards to the 5.0.1 stock Android version.

Check also the discussion on Android stack exchange