yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] rajivsinha22:
IMEI is showing 0

My g5 plus was stolen and after 5 months I got my phone back. When I got back my phone it was bootloader unlocked. I flashed july nogut update via fastboot and I saw my phone's Imei is showing 0. I flashed many custom rom to get back my IMEI but I could not be able to get back. I don't know what to do.

Please help.

Can I get back my IMEI afer flasing this?

here is my bootloader getvar all status:

(bootloader) version: 0.5

(bootloader) version-bootloader: moto-msm8953-C1.07

(bootloader) product: potter

(bootloader) board: potter

(bootloader) secure: yes

(bootloader) hwrev: P3B

(bootloader) radio: 6

(bootloader) storage-type: emmc

(bootloader) emmc: 16GB SAMSUNG RE1BMB RV=08 PV=07 FV=000000000000000D

(bootloader) ram: 3GB SAMSUNG LP3 DIE=6Gb M5=01 M6=05 M7=00 M8=7B

(bootloader) cpu: MSM8953

(bootloader) serialno: ZY223ZFH3X

(bootloader) cid: 0x0000

(bootloader) channelid: 0x00

(bootloader) uid: 72AC42FA00000000000000000000

(bootloader) securestate: flashing_unlocked

(bootloader) iswarrantyvoid: yes

(bootloader) max-download-size: 536870912

(bootloader) reason: Volume down key pressed

(bootloader) imei: 358958062075376

(bootloader) meid:

(bootloader) date: 03-12-2017

(bootloader) sku: XT1686

(bootloader) battid:

(bootloader) iccid:

(bootloader) cust_md5:

(bootloader) max-sparse-size: 268435456

(bootloader) current-time: "Sun Mar 8 19:58:48 UTC 1970"

(bootloader) ro.build.fingerprint[0]: motorola/potter_n/potter_n:7.0/NPN

(bootloader) ro.build.fingerprint[1]: S25.137-92-14/16:user/release-keys

(bootloader) poweroffalarm: 0

(bootloader) ro.build.version.full[0]: Blur_Version.25.331.16.potter.ret

(bootloader) ro.build.version.full[1]: ail.en.US

(bootloader) ro.build.version.qcom: LA.UM.5.6.r1-01900-89xx.0

(bootloader) version-baseband: M8953_37.46.07.47u POTTER_INDIADSDS_CUST

(bootloader) kernel.version[0]: Linux version 3.18.31-perf-gf055b2e-0010

(bootloader) kernel.version[1]: 7-g516eb24 (hudsoncm@ilclbld30) (gcc ver

(bootloader) kernel.version[2]: sion 4.9 20150123 (prerelease) (GCC) ) #

(bootloader) kernel.version[3]: 1 SMP PREEMPT Wed May 30 15:51:32 CDT 20

(bootloader) kernel.version[4]: 18

(bootloader) sbl1.git: git=MBM-NG-VC1.07-0-g3b15bb0

(bootloader) rpm.git: git=MBM-NG-VC0.C0-1-g202d600

(bootloader) tz.git: git=283f623

(bootloader) devcfg.git: git=283f623

(bootloader) keymaster.git: git=283f623

(bootloader) cmnlib.git: git=283f623

(bootloader) cmnlib64.git: git=283f623

(bootloader) prov.git: git=283f623

(bootloader) aboot.git: git=MBM-NG-VC1.07-0-g9d7f987

(bootloader) qe:

(bootloader) frp-state: no protection (0)

(bootloader) ro.carrier: unknown
[Moto G5 Plus Guides, News, & Discussion] agustinsaavedra1:
This was exactly my question
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
No you cant until you have your efs and persist backup. And restore them.
[Moto G5 Plus Guides, News, & Discussion] LLegion:
I got to go the Gym and to Wal Mart...when I reach home today in a couple of hours I will upload by myself both, the fastboot files i used and...my full TWRP flash stock Oreo but you need latest twrp 3231 so it can work. 1 Gb for the fastboot and 9 Gb with Twrp which I believe id the option to go if the sfirst o e is nort working.
[Moto G5 Plus Guides, News, & Discussion] rajivsinha22:
So there is no way? Even if I submit my phone to service centre?
[Moto G5 Plus Guides, News, & Discussion] LLegion:
No any custom rom is based on official oreo meanimg that any custom rom oreo or pie is having issues with camera and even with gcam mods still has lots of issues..so....my recommendation is to wait for a while....

Never ever try to install nougat custom you may hard brick your phone and will be extrmmely complicated to bring back....

You need open bootloader, flash twrp 3231, backup all system..lile 13 gb space needed and then flash custom oreo or pie never nougat...but as i said..none of those have any 100✓ working cameras of any kind...again...stay in oreo by the moment unless your are willimg to brick ur phone and spend hours trying to get it back....

In a couple of weeks it ks limely we wll have customs roms based on official stock oreo

---------- Post added at 11:00 AM ---------- Previous post was at 10:58 AM ----------

you can wait once i upload my full twrp 3231 backup 9 gb size to try to come into full working stock oreo
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Well, if the Oreo custom ROMs are updated with the Oreo updated source, then I'd be more than happy to wait. Also, I was talking about flashing stock Nougat TWRP flashable, not Nougat custom ROM
[Moto G5 Plus Guides, News, & Discussion] LLegion:
Damn...people does not get what we are trying to say for safe and help brother...go ahead and install whatever you want if you do t feel so depressed you can tell how bad u broke jr pho e even with nougat stock which cannot be installed cmon go ahead do what u pleased
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Sorry man, I didn't mean to sound rude or anything. I'm just looking at the possibilities here. I haven't done anything yet, we can relax.
[Moto G5 Plus Guides, News, & Discussion] LLegion:
Me too I do apologize I was at Gym having a testosterone rush...anyways there is none custom rom based on official Oreo that may work flawlessly...all have bugs so it is your call at this point and....you can install custom nougat since stock cant but that will bring imei radio issues most likely...also your call...this info is from someone that hard bricked the phone and i was struggling almost a year to have stock again. Best blessings take care and wait for official oreo based custom roms in oreo or pay not before...:cool:
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Sure, I'll wait till the current Oreo custom ROMs are updated with the newer source
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
If that will happen at all. Most developers are working on Pie ROMs, Oreo is almost dead in custom development. Sad but today everyone just wants the newest and not the best.
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Pie seems too young for me to try, I'll just wait for a month or two till it's issues have been worked out for daily use, till that, I might just stay stock.
[Moto G5 Plus Guides, News, & Discussion] gumpysitruc@gmail.com:
I would still like to see this oreo firmware that keeps radio intact for those on Moto Z bootloader.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Here's the info about switching to custom Oreo ROMs and why it's mandatory to downgrade to a TWRP flashable (not fastboot!) nougat stock ROM:

Source:

https://xdaforums.com/g5-plus/development/oreo-twrp-flashable-stock-builds-coming-t3830482
[Moto G5 Plus Guides, News, & Discussion] LLegion:
Look for my post on the main menu...I got phone hardbrivked and revived with moto x bootliader and had being using custom oreo simce then...until now finally i have stock oreo workimg perfectly fine.
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Are you on the correct bootloader now i.e G5 Plus's? Hope I'll never hardbrick my phone.
[Moto G5 Plus Guides, News, & Discussion] LLegion:
I am on Moto Z bootloader but with all Oreo Stock firmware....everything else is working flawlessly
[Moto G5 Plus Guides, News, & Discussion] psychopac:
And I believe the only downside is you won't be able to take OTAs, right? Well, if you can flash the TWRP flashables and everything works, it works.
[Moto G5 Plus Guides, News, & Discussion] LLegion:
Exactly only downside is no OTAs but that i do not need i can flash by fastboot adb any update or by TWRP...so everything is perfect for me now
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Do you flash the complete fastboot ROM or do you skip the bootloader or anything else?
[Moto G5 Plus Guides, News, & Discussion] LLegion:
Check my main post here: https://xdaforums.com/g5-plus/how-to/safe-stock-oreo-fastboot-flash-t3851515
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Hey [MENTION=7015693]irfanalinawaz[/MENTION], just thought I'd mention that I've now created a separate download of the Soak Test 1 firmware which is just 66MB. Here are some links for you to update the OP (filename is oreo-soak1-firmware.zip):

Android File Host - https://www.androidfilehost.com/?fid=1322778262904022951

Dropbox - https://www.dropbox.com/s/jn28nfc74m786ia/oreo-soak1-firmware.zip?dl=0
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Sure bro...
[Moto G5 Plus Guides, News, & Discussion] #Prince:
Hey!

I was on 8.1 Stock from OTA Update. But I decided to root and it went wrong so I had to fastboot flash 7.0 Stock ROM. I lost my IMEI so I moved to PixelExperiance

where I got IMEI back but lost Network, Since then I am not having network. Even in lineage OS based on 8.1 which I installed after pixelExperiance. I want to go to stock. Will it solve the problem! And Shall I flash this Stock ROM?
[Moto G5 Plus Guides, News, & Discussion] leroy200716:
After receiving the OTA update for Oreo 8.1, I unlocked the bootloader. I need to re-lock the bootloader. Can I still use your ROM file? Also you have posted 2 sets of commands above. Should I only use the commands for locking the bootloader or do I also need to flash the rom as well?
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Its will be better if you flash full rom thn lock bootloader. You can lock it with flashing full rom also if your security version is equal or higher.
[Moto G5 Plus Guides, News, & Discussion] leroy200716:
Sorry I'm a bit new to this. Are you referring to the Android security patch level? If so, it's August 1, 2018 on my phone. Does that help?
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Exactly, you need to follow locking bootloader commands, you already told that you are on August security patch, this stock rom also have same patch, so can lock bootloader.
[Moto G5 Plus Guides, News, & Discussion] leroy200716:
I flashed the rom and re-locked my bootloader successfully by following the steps you have detailed. So far I have not observed any issues. Wifi, VOLTE, network and the IMEI are all intact. Thank you very much.

I did run into some issues while executing some commands, but I still proceeded. See below:

C:\adb\platform-tools>fastboot flash boot boot.img

Sending 'boot' (16384 KB) OKAY [ 0.391s]

Writing 'boot' (bootloader) Image signed with key bad key

OKAY [ 0.735s]

Finished. Total time: 1.188s

C:\adb\platform-tools>fastboot flash recovery recovery.img

Sending 'recovery' (20580 KB) OKAY [ 0.485s]

Writing 'recovery' (bootloader) Image signed with key bad key

OKAY [ 0.812s]

Finished. Total time: 1.343s
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
First of all congrates, You can ignore these errors, actually these are not issues and not harmful for device.
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
Can we flash this Rom on Indian variant Moto G5 plus XT1686
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Sure...
[Moto G5 Plus Guides, News, & Discussion] ham-op:
Does anyone know if this is safe to use on the retus (US) version XT1687? I am trying to re-lock my bootloader, but I have the latest patch level (NPNS25.137-93-18) and I can't find a fastboot image for that version. Hoping this 8.1.0 image will work?
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
Thanks your kind Reply but

Even after flashing MOTO G5 PLUS fast boot stock Oreo 8.1.0 Rom on moto XT1686 my mobile is not working. What can i do now Bro. its logo appear and than it powered off. It was likely the same before flashing this Rom.

Bootloader is also not unlocking even after getting code from Motorola

When I enter the

fastboot oem unlock <code>

it says

(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer

(bootloader) Options

What can i do now, as I cannot start my OS.

---------- Post added at 02:12 PM ---------- Previous post was at 02:05 PM ----------

Thanks your kind Reply but

Even after flashing MOTO G5 PLUS fast boot stock Oreo 8.1.0 Rom on moto XT1686 my mobile is not working. What can i do now Bro. its logo appear and than it powered off. It was likely the same before flashing this Rom.

Bootloader is also not unlocking even after getting code from Motorola

When I enter the

fastboot oem unlock <code>

it says

(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer

(bootloader) Options

What can i do now, as I cannot start my OS.
[Moto G5 Plus Guides, News, & Discussion] mercality:
stock nougat, can update?

I am on stock nougat 7.0 AMAZON. Can i fastboot to oreo following these steps and using this file?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
First do what the message says: Go to developer options and activate the "allow OEM unlock" toggle.

If the developer options aren't visible tap 6 times on build number in settings - about phone.

You can't fastboot flash a firmware with locked bootloader.
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
I've tried recovery mode / factory mode in fastboot, but it still goes into bootloop

i have my 20-character alphanumeric code to unlock the device Mooto G5 Plus OEM Unlock.

When I enter this code in ADB using fastboot oem unlock CODE it says 'Check 'Allow OEM Unlock' in Android Settings > Developer'.

But I can't Check 'Allow OEM Unlock' in Android settings as I can't boot the phone, and I never 'Checked it' when the phone was working properly.

Is there anyway to 'Allow OEM Unlock' while the phone is in fastboot mode, without being able to boot the phone properly?
[Moto G5 Plus Guides, News, & Discussion] ikkaro26:
Command Promt

That's no Command prompt, that's PowerShell

see how to open a command pront here: _ digitalcitizen.life/7-ways-launch-command-prompt-windows-7-windows-8
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
You have not checked it to bootloader unlocking in developer menu?
[Moto G5 Plus Guides, News, & Discussion] Quantumizer:
Can this firmware be used on any variant of Moto G5 Plus or it is specific to only one variant?

I have XT1686 (retin channel) and want to relock the bootloader.

Should I use it?
[Moto G5 Plus Guides, News, & Discussion] Casper1982:
Android 8.1

arrive today, android oreo 8.1 Argentina Movistar
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
fastboot erase customize (optional: will erase any customization if ordered through motomaker)

fastboot erase clogo (optional: will erase the custom boot logo if ordered through motomaker)
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
Irfan Ali Nawaz Bhai my problem is not solved

No body can understanding my problem
[Moto G5 Plus Guides, News, & Discussion] Quantumizer:
Join the official Telegram group of Moto G5 Plus by clicking the link below and ask there.

They will help you.

Link : https://t.me/g5plus
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
Can i flash this update via adb sideload ?
[Moto G5 Plus Guides, News, & Discussion] sherry9873:
thanks for this method and bro can i downgrade to nougat i am not able to use fingerprint scanner and nfc if i install custom nougat after install twrp on stock oreo
[Moto G5 Plus Guides, News, & Discussion] abdulmajid4128:
Whats about this update?

Blur_Version.28.51.16.potter.retail.en.US

Link: https://drive.google.com/file/d/1ZmtSW40oZi1EXD0PsRib3dqIeF9vauAY/view

Can i flash it via adb sideload on Retin XT1686
[Moto G5 Plus Guides, News, & Discussion] the_pawan_verma:
I flashed nougat build through twrp on my phone and potter stock persist by nzpred will my persist and efs intact.

can i fastboot this oreo build to relock bootloader ??
[Moto G5 Plus Guides, News, & Discussion] Quantumizer:
Yes.

You can flash this firmware via fastboot to relock your bootloader.

Don't forget to take backup of EFS and Persist before proceeding.

Reply here after you successfully relocked your bootloader.
[Moto G5 Plus Guides, News, & Discussion] FastLoudMusic:
Just to clarify, would this work for relocking the bootloader of a xt1687 on retus that was upgraded to Oreo via the OTA update file provided by NZedPred in the Official Moto G5 and G5 Plus Android 8.1 Oreo OTA ZIP files thread? My phone doesn't have TWRP flashed on it, I just want to relock my phone so I can get the Netflix app back.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
To relock your bootloader you have to use the same firmware that you're on so you have to flash the mentioned firmware first.

So the answer to your question should be no, you can't use this firmware to relock the TWRP build.

If it's the same build you can try it but I don't think it will work. I'm not sure if TWRP flashables are lockable at all.

I'm not using Netflix but it's new to me that the app looks for the bootloader status. As far as I know it detects root apps like Magisk or SuperSU.

Magisk hide should do the job and hide the root app from Netflix. Maybe you have to hide your Magisk manager too.

Unlocking the bootloader is supported by Motorola, that's why you can capture OTA updates with an unlocked bl if you are not rooted. So in most cases it's the root app, not the unlocked bl that makes some banking apps or games fail.

As said above I'm not sure about Netflix.

Edit: Sorry I misread your post. You used the OTA to update to Oreo, not a TWRP flashable build.

Than I would give it a try, the worst thing that can happen would be just not relocking the bl.
[Moto G5 Plus Guides, News, & Discussion] FastLoudMusic:
Yeah, they started blocking phones with unlocked bootloader phones last year (I can't post the link, too new of a member to XDA, but just Google "netflix android unlocked bootloader" and you'll see a Android Central post about it). Netflix simply doesn't appear in Play Store when I search for it. I'm sure there's a workaround out there, but for this phone, I just don't want to root or add TWRP, I just want it all stock and locked.

I got to where I'm at because I was on the Nougat retus August update and had to fastboot flash down to the April update, apply the June update, so I could then apply the retus Oreo OTA. I believe that my mistake was that I never relocked the bootloader while I was still on Nougat before doing the OTA.

If I understand correctly, you think using this posted TWRP build to relock the stock Oreo bootloader for retus might work. And if not, I'm guessing I will just have to wait for an official retus Oreo stock rom to be released before I can relock it, correct?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Sorry, I edited my post several times so maybe it's a bit misleading.

I don't think a TWRP flashable build will work.

I never relocked my bootloader but as far as I know the most common way is to fastboot flash a ROM and a after that relock with the same firmware (for our device it's not enough to give a command like

fastboot oem relock, you have to flash most parts of the ROM again).

The nougat firmware had different versions for different regions, some users say that wouldn't be the case for Oreo but I'm not sure about that.

For example US users got that 93-18 build with August security patch while in other regions the latest firmware is 93-14. The OTA found here on XDA needs 93-14 to be installed but today users from the US received an Oreo OTA that needs 93-18.

So to be safe I would wait until a US fastboot firmware is leaked.

I hope it's understandable now, I'm not a home at the moment.
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Sure...you can use it. I also have retin.
[Moto G5 Plus Guides, News, & Discussion] Quantumizer:
Yes.

I checked it with a phone.

It worked perfectly and bootloader was successfully relocked.

Thanks for sharing the firmware:)
[Moto G5 Plus Guides, News, & Discussion] the_pawan_verma:
I successfully locked the bootloader by fastbooting.
[Moto G5 Plus Guides, News, & Discussion] xaj52:
That's true!

That is so true! I got Oreo through OTA on my Potter but, wanted to try custom ROMs so switched to Oreo Pixel Experience. And, correct me, if I'm wrong but now, its developer(s) is (are) working on Pie Pixel Experience.
[Moto G5 Plus Guides, News, & Discussion] xaj52:
Please help...

Hello!

I'm very new to all this, so, please help. I received stock Oreo from OTA on my XT1686. After unlocking bootloader and successfully installing Oreo Pixel Experience, I realised that I wanted to have the option of going back to stock Oreo since Oreo PE's screen-on time isn't that great. My IMEI is still intact (probably because I migrated from stock Oreo to Oreo PE only and not Nougat) and I'm able to use everything except, NFC. I used TWRP 3.2.3-1 to backup "boot", "efs", "persist" and "recovery" folders on my SD card.

According to the "getvar all" command that I ran after installing PE Oreo, I got this (included only the ones that, I think, are important):-

<bootloader> ro.build.fingerprint[0]: motorola/potter_n/potter_n:8.1.0/O

<bootloader> ro.build.fingerprint[1]: PS28.85-13/b8ea:user/release-keys

<bootloader> ro.build.version.full[0]: Blur_Version.28.51.16.potter.reta

<bootloader> version-baseband: M8953_41.50.07.82R POTTER_INDIADSDS_CUST

<bootloader> kernel.version[3]: T Fri Aug 17 09:31:36 CDT 2018

<bootloader> ro.carrier:retin

Now, to install the stock Oreo again:-

1) I need to extract the "POTTER_OPS28.85-13_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml" file and put its contents in the internal memory of the phone

2) Then run the first set of commands (except "fastboot erase modemst1" and "fastboot erase modemst2").

And then, again enter fastboot and execute the second set of commands, if I want to lock bootloader?

Is that right?

Thank you so much!
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You habe to run the fastboot commands from the ADB & Fastboot folder from your PC, not from your phone.

Here are threads that explain how to do it exactly: https://xdaforums.com/g5-plus/how-to/solution-to-flash-stock-romfactory-t3691396

https://xdaforums.com/g5-plus/how-to/how-to-revert-oreo-custom-rom-to-stock-t3842658 (choose your fitting firmware instead)

If your persist file is intact (and you have a backup) there´s no need to exclude the erase modemst commands, you can do it but you don´t have to.

Btw, there´s no need to relock the bootloader, OTA updates don´t care about bootloader status so there´s really no good reason to lock it except you want to sell the device.
[Moto G5 Plus Guides, News, & Discussion] xaj52:
Wow! That worked smoothly! NFC is back on again! I followed the 9 out of 13 steps from the post that you mentioned and entered the first set of commands mentioned in this OP (there's a difference of one "fastboot flash system system.img_sparsechunk.8" command). The apps and settings are restoring at the moment. Big thanks!

Just a couple of things more, if I may:-

1) I haven't locked the bootloader yet but, if I do, will it wipe all the apps and settings again?

2) If, at a later date, I go nuts again and decide to install custom ROMs higher than Oreo, say ArrowOS or Pie Pixel Experience, will it affect my network signal, wifi, fingerprint, NFC or something the way people say happened when they migrated from Nougat to Oreo? I'm assuming not since now the custom ROMs take Oreo as base, right?

Thanks again! Great thread, big help!
[Moto G5 Plus Guides, News, & Discussion] Quantumizer:
Pixel Experience Pie was released for potter last week. Download and clean flash it from the link below. It's better to download on PC as people are facing issues while downloading on phones.

Before flashing Pixel Experience flash the Oreo firmware attached so that you won't lose fingerprint scanner.

Link : https://download.pixelexperience.or...rience_potter-9.0-20181029-0245-OFFICIAL.zip/

Enjoy Pie on potter and thank me later:)
[Moto G5 Plus Guides, News, & Discussion] aksh295:
Sir we will get official ota after flashing this .....I am on custom pie rom with my own persist and efs intact ...I wanna go full stock rom ....I have Indian version retin
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Offcourse you will get official OTAs, but dont forget to keep your persist and efs safe, and its will be better to lock bootloader again after flashing this official rom.