yashsingh1/xdaforums huggingface dataset:
[Moto Z Play Questions & Answers] GuzXT:
I think that when a signed firmware be available to download and install, the MZP will be able to regenerate the IMEI. Snapdragon have the capabilities to do it, but with an untrusted firmware, must "hide" it.
[Moto Z Play Questions & Answers] tag68:
It is easy to get the IMEI back. Just restore the backup you did before wipe. Noone except you has the data on efs partition.
[Moto Z Play Questions & Answers] dandrumheller:
This would require that people don't jump the gun and flash/wipe before making a backup.

A problem that shouldn't exist, but does.
[Moto Z Play Questions & Answers] IncendiaryPyro:
I think you're SOL, dude.
[Moto Z Play Questions & Answers] VR25:
DISCLAIMER

Do it at your own risk.

SUMMARY

1. Reflashed back to stock Marshmallow

2. Sideloaded Nougat OTA right after (that is before booting into the freshly restored system)

-----------------------------------------------------------------------------------------------------------------

My IMEI became zero after trying to implement on Lineage OS a dual SIM mod originally intended for the stock ROM. "fastboot getvar imei" also displayed my correct IMEI. I eventually solved the issue purely out of trial by flashing the full stock (Marshmallow), and the nougat OTA right after that, as follows:

fastboot getvar max-sparse-size

fastboot oem fb_mode_set

fastboot flash partition gpt.bin

fastboot flash bootloader bootloader.img

fastboot flash modem NON-HLOS.bin

fastboot flash fsg fsg.mbn

fastboot erase modemst1

fastboot erase modemst2

fastboot flash dsp adspso.bin

fastboot flash logo logo.bin

fastboot flash boot boot.img

fastboot flash recovery recovery.img

fastboot flash system system.img_sparsechunk.0 (repeat up to 10)

fastboot flash oem oem.img

fastboot erase carrier

fastboot erase cache

fastboot erase userdata

fastboot erase DDR

fastboot oem fb_mode_clear

fastboot reboot recovery

*recovery > adb sideload*

adb sideload nougat_ota.zip

WARNING

For downgrading, skip:

********************************

fastboot flash partition gpt.bin

fastboot flash bootloader bootloader.img

*******************************************

Proceeding otherwise will brick the device.
[Moto Z Play Questions & Answers] rfameli:
Just to clarify, I didn't made any backup before wiping my EFS.

I'm not used to go wiping everything, but I've already used the wipe function of the TWRP ticking all buttons and nothing was messed up.

Later I found that the Chinese TWRP give us the option to wipe our EFS.

I'm not blaming anyone but myself, I'm not that careless most of the times, I didn't had much knowledge as I do have now after all I've read and tried.

I have seen trough last months many people with problems on their IMEI, some problems was solved (flashing the ROM again), but the ones that continues looking for a solution probably have the same backstory as me.
[Moto Z Play Questions & Answers] rfameli:
I'll surely try that since you had the same problem and fixed, I have nothing to loose.

But I already flashed the stock ROM and updated to Nougat, but since I didn't actually sideloaded it I'll try again when I get home.
[Moto Z Play Questions & Answers] ilovemeow:
I m cool with it

as long as phone function is working

no data, coz data plan not activate
[Moto Z Play Questions & Answers] Really_Rekt:
Welcome to the club. I wiped my /efs, lost my IMEI and had to pay £120 for a motherboard replacement. Now I've got a backup for my /efs partition, and never use the Chinese TWRP, but I learned an expensive lesson.
[Moto Z Play Questions & Answers] josip-k:
How did you back it up? With that chinese twrp?
[Moto Z Play Questions & Answers] ArchLaLo:
Tambien me he cansado de buscar, pero he visto un caso similar con un OnePlus One, el mismo tenia el problema IMEI 0 y lo soluciono por medio de la PC y unos driver, el titulo del post "REPARAR EL IMEI de nuestro ONEPLUS ONE tras perder el EFS" sin backup! link: forums .oneplus .net/threads/tutorial-reparar-el-imei-de-nuestro-oneplus-one-tras-perder-el-efs.264420/

chequealo
[Moto Z Play Questions & Answers] Really_Rekt:
yeah. that was the only time i used it.
[Moto Z Play Questions & Answers] rfameli:
I was running my phone as a gaming tablet since I've lost my IMEI, connecting only trough wi-fi. I was running android MM 6.0.1 with december patch.

I've tried flashing Stock ROM RETBR version MPSN24.104-44-7, but it was not allowing me to install the OTAs giving an error by the end of the procedure.

I cleaned the system again and flashed the Stock ROM RETBR version MPSN24.104-44-10 and was able to sideload all the OTAs without any error.

Now my MZP is on Nougat latest available version but my problem was no fixed as I tought.

I really don't think I or the other ones that lost their IMEI like me (wiping EFS without having a backup) will be able to restore our lost IMEI.

I'm giving one last try, I'll buy a SIM from a brazilian carrier that doesn't seems to block IMEI, I don't know if this only apply for blacklisted IMEI's, but I'll try it with my IMEI 0.

The said carrier is "Oi".
[Moto Z Play Questions & Answers] IncendiaryPyro:
I think you can pay Lenovo to replace the motherboard. You're probably better off doing that IMO.
[Moto Z Play Questions & Answers] rfameli:
The only problem is that the replacement of the motherboard cost almost the same as a brand new phone here on Brazil.
[Moto Z Play Questions & Answers] theodric:
I thought I'd bricked mine. Rooted, then attempted to reflash back to stock, and had IMEI 0. Flashed CM and still IMEI 0. Did not take a backup of anything because I've been rooting around inside Androids since 2009 and never managed to fully brick a device.

I got it back by following these instructions. It works. I'm using it right now. All may not be lost.

Critically: some things need fastboot, and some things need mfastboot. Also, the order of re-flashing matters. Read the thread.
[Moto Z Play Questions & Answers] rfameli:
I went trough 2 process while loosing my IMEI, first I think my problem was just like yours, because I lost while flashing back to stock to unroot my phone, then I've seen myself with IMEI 0, at this point it could be easily fixed flashing the stock again using the right commands and mfastboot.

I didn't had much deep knowledge on what I was doing, I've been rooting my phones, flash stock and custom roms for years, but that never happened to me before... So thinking it was a good idea to do the cleanest install ever I selected every tickable option on the TWRP wipe and that was when I really lost my IMEI.

I've went trough those steps you mentioned more times that I would like to recall, just with some hope that it would fix my problem, but now that I understand more what I did I really think there is no way to fix it.
[Moto Z Play Questions & Answers] bean1975:
Just in case, how do you make a backup of /efs ?
[Moto Z Play Questions & Answers] Faheem1234:
Just flash any custom rom, for me it worked with aicp rom. I was also in the same problem. And finally I fixed.
[Moto Z Play Questions & Answers] avinandan cool:
Install latest Dec patch 7.1.1 stock room then side load stock Oreo rom......I fixed my imei problem by doing this method....

100% method
[Moto Z Play Questions & Answers] Artim_96:
Well, I never did but I just realised IMEI for me is 0. It has no impact on me, but still it's strange.

The only thing this could be from is when I tried to update to the Oreo soak which just won't fully install for me. The first time I got sick and flashed back stock I realised it was from September 2017, not December, so I don't know if Moto changed bootloader in-between, but Oreo bootloader seems to never got installed, always shows as 1.13.

I had to try a few methods to flash stock, but I don't think they ever included wiping efs. Also I never had any Chinese TWRP.

long story short: IMEI is showing 0 for me but I don't think I'm completely out of luck. I used Dr ketan's backup tool, so I have a efs.img. I aready tried the aroma zip to restore, it says it succeeded but if I look into the logs I see basically just errors. So even after clearing cache and dalvik I don't have an IMEI. So I just need a method to fish back the efs.img. would a fastboot flash efs efs.img do the job?

OT: I think it's a pretty stupid idea by Moto to make such a vital thing a partition that can just be wiped. But can an IMEI actually be lost? I thought it's hardware based and never ever be altered or removed. Only software can be tricked into report a different value.
[Moto Z Play Questions & Answers] davi_ribe:
please help

Can you explain more detailed what you did? i'm with the exactly same problem, all function moto z play with just the imei both on 0, i have the number thought, it was written on the box.
[Moto Z Play Questions & Answers] avinandan cool:
Follow me on Instagram or Facebook I will help u out search Avinandan cool
[Moto Z Play Questions & Answers] IncendiaryPyro:
Or you could just post it here in the chance someone comes across this thread looking for the same solution.

Why do people do this?
[Moto Z Play Questions & Answers] KrisM22:
There are a couple TWRPs that will do it for you and there are a few apps, though I think you have to be rooted.
[Moto Z Play Questions & Answers] Artim_96:
No, just open bootloader and either a specific TWRP or an Aroma zip by dr. Ketan. Though I can only make a backup with it, restoring the image only ends in errors. Maybe I should dig out the thread again and look for an updated version
[Moto Z Play Questions & Answers] Gilguit7:
The only way you can fix it is installing Oreo following the steps of this link

https://xdaforums.com/moto-z-play/development/official-soak-8-0-0-download-how-to-t3743021
[Moto Z Play Questions & Answers] Gilguit7:
Solution to IMEI 0

Downgrading from Android 8 Oreo to 7 Nougat cause this problem. The only way I could fix it was installing Android 8 on my Z play again following steps of this link

https://xdaforums.com/moto-z-play/development/official-soak-8-0-0-download-how-to-t3743021

It is working fine.
[Moto Z Play Questions & Answers] avinandan cool:
You just need to flash latest Dec security patch 7.1.1 rom through adb then install Oreo soak test 8.0 rom by using adb side load...that's it....you will get back your imei Instantly without any issue. I have tried this method with 2-3 device with the same issue...and the issue has been resolved Successfully.....

Sorry for my bad English
[Moto Z Play Questions & Answers] davi_ribe:
Please help

That's great man, i'm still trying though, could you please make a tutorial explaning how to do it? I'm still a newbie in this processes and what i did was:

1ª Unlocked my bootloader using Motorola Official Tool and ADB Minimal,

2ª Flashed TWRP twrp-3.2.1-0-addison-new using ADB Minimal,

3ª Flashed sideload the ADDISON_NPNS26.118-22-2-12_by_shamu17 using TWRP

4ª Then tried to install using adb-sideload on TWRP the Blur_Version.27.1.28.addison.retail.en.US (Oreo soak test 8.0) but when i try i receive the following error:

[IMG="Error"]https://drive.google.com/open?id=1xqiBg4xcVzvrySQJnYbCTaOI4jWEk31J[/IMG]

I also tried in the 3ª step flash the ADDISON_NPNS26.118-22-2-12_by_shamu17 using adb-sideload on TWRP then tried to flash the Blur_Version.27.1.28.addison.retail.en.US (Oreo soak test 8.0) using adb-sideload on TWRP but i get the same error:

What can i do? Please help Guys.
[Moto Z Play Questions & Answers] GuzXT:
ROM flashing is not a valid way to be completely stock, you need to flash firmware via, RSD Lite or Fastboot....
[Moto Z Play Questions & Answers] davi_ribe:
Would this work?

https://xdaforums.com/moto-z-play/how-to/guide-relock-bootloader-to-lasted-stock-t3718190

If it does work, would i just need to install soak 8.0 using sideloader after that?

if it doens't work, could you please teach me how?
[Moto Z Play Questions & Answers] avinandan cool:
Already mentioned flash 7.1.1 using fastboot then only adb sideload will work
[Moto Z Play Questions & Answers] davi_ribe:
But can i use adb sideload from TWRP?
[Moto Z Play Questions & Answers] avinandan cool:
After install the 7.1.1 through adb fastboot then u can install soak test ROM using adb side load and one more thing twrp recovery will not work u have to be on stock recovery
[Moto Z Play Questions & Answers] davi_ribe:
No comand problem

Thanks once again for the help Guys, i tried out flashing the stock recovery from this link with fastboot :

https://xdaforums.com/moto-z-play/help/stock-recovery-img-xt1635-02-t3551959

and tried this procedure too:

https://xdaforums.com/moto-z-play/development/rom-nov-patch-npns26-118-22-2-8-t3717037

to take it back to the stock recovery and enter adb sideload, but when i boot my cellphone on bootloader and then select the recovery option i get this:

- No Comand ( And a picture of dead android on top of it )

what else can i do, so i can install the soak test:

https://xdaforums.com/moto-z-play/development/official-soak-8-0-0-download-how-to-t3743021

---------- Post added at 02:05 PM ---------- Previous post was at 01:20 PM ----------

I did it Guys, i had to press the power and the volume up buttons to make it work, but when i side loaded the soak test exactly how he explained in the post, my cellphone now doens't show anything at all its all black screen, no buttons respond only lights up the led on the top of it when i connect to the charger, the pc recognize the device as well.

Anything i can do? or my phone is dead for good this time?
[Moto Z Play Questions & Answers] Ezerfil:
IMEI 0

Hi. I made a recovery with this system, but I stayed in IMEI 0. Fortunately, I do have EFS feedback. Now I do not know how to restore it haha can you help me? I have a blocked bootloader, do I need to unlock and install TWRP in order to put the EFS folder in its place? I hope you can help me D:
[Moto Z Play Questions & Answers] tag68:
feedback? You mean backup? How did you do it if your device is locked? As there exist different types of efs backup, one needs to know what you did before being able to give you restore advice.

Whatever you do afterwards, do an additional backup of the current efs state which looks like IMEI 0. It may be complete and fine after the right firmware is installed on the device.

Most cases of lost IMEI were desperate tries to repair what is not really broken. IMEI usually does not get lost. Firmware may change access methods, so that older versions cannot read it. So better be sure that your backup has some fine looking contents (despite device being locked, afaik you can't successfully backup efs in that state!) before writing anything on efs partition.
[Moto Z Play Questions & Answers] Ezerfil:
Lo escribiré en español, espero de una mejor traducción :S. Me pasó que instalé una ROM personalizada, pero no me agradó (obviamente desbloqueé el bootloader) entonces, para recuperar el sistema de fábrica use el que anda por aquí para cerrar el bootloader de nuevo. A la hora de encender el teléfono, estaba en IMEI 0. Ya lo solucioné. Volví a desbloquear el bootloader y le instalé el twrp, metí la copia de seguridad de mi EFS, restauré y quedó! :)
[Moto Z Play Questions & Answers] Tepig:
Hello

I got IMEI 0 after downgrading from first Oreo soak to Nougat December security patch. This was fixed by sideloading the first soak again. From here, I reapplied all other soaks and finally the oficial OTA.
[Moto Z Play Questions & Answers] Onedmunds:
Man very thanks, this solved my problem and save me $89usd
[Moto Z Play Questions & Answers] avinandan cool:
Cheers bro....donate some for ? beer???
[Moto Z Play Questions & Answers] imakul8:
I wiped my imei with Chinese twrp when trying to return to stock 7.1.1. I had no mobile data. TodayI noticed I had an ota for Oreo and updated successfully. My imei is back! Am I good? My sim is registered in another phone now..how can I tell..who knows from experience?
[Moto Z Play Questions & Answers] tag68:
Your are aware that the place where the IMEI is stored on Moto Z Play changed from Nougat to Oreo? It is normal that you lose IMEI access when downgrading, and usually completely brick your phone when doing OTA afterwards. If it does not brick, of course it find the IMEI again, as it never was lost.

What did you do in the Chinese TWRP so that you thought you wiped your IMEI?
[Moto Z Play Questions & Answers] imakul8:
I believe I wiped for some reason I can't recall with efs ticked.

That's a nice self quote there. I had read it previously and held on to hope that my MZP could be fixed although I felt I had the worse case scenario.
[Moto Z Play Questions & Answers] tag68:
If you are not sure if efs partition is fine, first thing to do is a backup. If you really wiped the partition, it is useless. But if you didn't, it may turn out as the key to complete restore of device functionality.

Backup of efs should be the first before upgrading, flashing or wiping anything. After an upgrade which changed efs structure, do the next efs backup. After the upgrade your bootloader is current and it may not be possible for you to downgrade to do the update again, which changes old efs structure to the new one, so your old efs backup may turn out worthless. That's why backup of efs should be the first before upgrading, flashing or wiping anything, and try to remember (or write it down somewhere) which OS/bootloader was active when you did the backup. You may need that information when restore is necessary (fortunately I never had that case).

(This does not mean that I always do it, just be aware of the risk if you don't do it)
[Moto Z Play Questions & Answers] imakul8:
You can trust and believe I won't be caught without a efs backup again.

Let me ask you this..I initially did a backup including system image. Would the efs be included in this and could it be extracted?
[Moto Z Play Questions & Answers] tag68:
If you did a Nandroid backup in Chinese twrp and specially ticked efs (think it is not default), it should be included.

The answer to the second part - how helpful could it have been - is difficult.

The thing is, I never restored an efs backup. The experiences with efs restore are very limited. You know, without unlocked bootloader it isn't even possible to have one.

Also you did an upgrade after the efs backup. I'm not sure if the old bootloader is possible to restore in twrp without hassle. If it is, then I guess best approach would be simultaneously with the efs backup.

Risk of hard brick is high in this situation. If the efs structure is the new one, but bootloader is old and the update of bootloader tries to update the already-new efs partition, you have that situation where hard brick occurs. Without blank flash files which did not appear by now for current bootloader you won't be able to revive or even flash your device. Currently the only solution for this would be to let Motorola change the motherboard which is usually similar expensive like a new device.

So, if you did an upgrade of OS, do a new efs backup.

Currently bootloader changed twice for Moto Z Play in a way which changed efs so that a hard brick happened for some users when downgrading via TWRP and afterwards upgrading using OTA. Security patches March/April 2017 (iirc Android 7.0) and from Nougat to Oreo.
[Moto Z Play Questions & Answers] Shrijithbjj:
Imei 0 moto z play

Dear friends

I have same issue what I do please help me
[Moto Z Play Questions & Answers] MOTO DSTROYER BY ACCIDENT:
that is messed up, dude. Sorry. Gotta be so careful following these "instructions". The IMEI went to zero on my MOTO Z PLAY after I flashed chinese TWRP. I've since learned that this will almost always be the result when flashing inexact programs, ROMS, etc. into MOTO Z PLAY cells. I found tutorial using mfastboot to unbrick a motorola device. I'm gonna try it.
[Moto Z Play Questions & Answers] KrisM22:
missing imei on 7 - it's there, but you can't see it. if you go back to 8 you can see it again.
[Moto Z Play Questions & Answers] Damian93mad:
hi people I come to join the debate, I have my mzp in nougat with imei 0, but if I update it to oreo (and I did it several times) my imei returns to normal, but there my dilemma, returns the imei but the twrp gives me the error "unable to mount storage" and can not delete or move anything to the folder "system" and the twrp does not give me the option to backup or restore the folder efs, any ideas?
[Moto Z Play Questions & Answers] KrisM22:
There are a couple TWRPs around that will backup efs - Dehumanized did one as I recall. But it doesn't matter. When you went to 8, it moved the location of it, so even if you backup and restore, 7 won't "see it". but it is there. :)
[Moto Z Play Questions & Answers] MOTO DSTROYER BY ACCIDENT:
How to get Your IMEI back On A MOTO Z PLAY

Use "mfastboot" and get "ADDISON_OPN27.78-12-22_cid50" from "motorola firmware". Then type "cmd" in your windows search box and right click, goto "Open file location" and copy "cmd.exe" into your mfastboot folder. From there, just open the cmd screen and flash the following (make sure that you have the Motorola device drivers installed). You won't need to install "mfastboot".

mfastboot getvar max-sparse-size

mfastboot oem fb_mode_set

mfastboot flash partition gpt.bin

mfastboot flash bootloader bootloader.img

mfastboot flash modem NON-HLOS.bin

mfastboot flash fsg fsg.mbn

mfastboot erase modemst1

mfastboot erase modemst2

mfastboot flash dsp adspso.bin

mfastboot flash logo logo.bin

mfastboot flash boot boot.img

mfastboot flash recovery recovery.img

mfastboot flash system system.img_sparsechunk.0

mfastboot flash system system.img_sparsechunk.1

mfastboot flash system system.img_sparsechunk.2

mfastboot flash system system.img_sparsechunk.3

mfastboot flash system system.img_sparsechunk.4

mfastboot flash system system.img_sparsechunk.5

mfastboot flash system system.img_sparsechunk.6

mfastboot flash system system.img_sparsechunk.7

mfastboot flash system system.img_sparsechunk.8

mfastboot flash system system.img_sparsechunk.9

mfastboot flash system system.img_sparsechunk.10

mfastboot flash system system.img_sparsechunk.11

mfastboot flash oem oem.img

mfastboot erase carrier

mfastboot erase cache

mfastboot erase userdata

mfastboot erase DDR

mfastboot oem fb_mode_clear

mfastboot oem lock

mfastboot oem lock

mfastboot flash oem oem.img

mfastboot flash system system.img_sparsechunk.0

mfastboot flash system system.img_sparsechunk.1

mfastboot flash system system.img_sparsechunk.2

mfastboot flash system system.img_sparsechunk.3

mfastboot flash system system.img_sparsechunk.4

mfastboot flash system system.img_sparsechunk.5

mfastboot flash system system.img_sparsechunk.6

mfastboot flash system system.img_sparsechunk.7

mfastboot flash system system.img_sparsechunk.8

mfastboot flash system system.img_sparsechunk.9

mfastboot flash system system.img_sparsechunk.10

mfastboot flash system system.img_sparsechunk.11

mfastboot flash boot boot.img

mfastboot oem lock

Take note that this will restore your IMEI, upgrade you to Oreo, and re-lock your bootloader. Most important: you will not be able to downgrade Android Versions. But, your phone will be working again. You'll get a cell signal once you put in a SIM card. Worked for me. I wiped my IMEI by flashing chinese TWRP. Never do THAT again. And this is MY GIRL'S phone we're talking about. I've been researching on the net for three weeks STRAIGHT. I found this solution right here on XDA Forums. All credit is due to "talktosam - [Guide] Relock Oreo bootloader, go back to stock ROM and get OTA". Good luck.
[Moto Z Play Questions & Answers] KrisM22:
Simply flashing any true 8 will enable you to see imei. It's there. you just can't see it in 7.

https://xdaforums.com/moto-z-play/development/rom-official-fastboot-stock-oreo-image-t3786537