yashsingh1/xdaforums huggingface dataset:
[Moto Z Play Guides, News, & Discussion] therealhoberfinkle:
Just did this, but it looks like it still is locked. And now it boots to the "no command screen" and shuts off.

Here is the log from the adb:

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem lock begin

...

(bootloader) Flash valid Android images now

(bootloader) Then re-run this command to lock

OKAY [ 0.016s]

finished. total time: 0.016s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash partition gpt.bin

error: cannot load 'gpt.bin'

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash bootloader bootloader.img

error: cannot load 'bootloader.img'

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash logo logo.bin

error: cannot load 'logo.bin'

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot boot.img

error: cannot load 'boot.img'

Thanks for helping
[Moto Z Play Guides, News, & Discussion] jonas210678:
I think the problem is your PC, did you put all files in the minimal and.... Folder, the PC doesn't find the files to flash. The problem is not your phone
[Moto Z Play Guides, News, & Discussion] therealhoberfinkle:
You were right, I don't think it copied over correctly. Redownloaded and installed like you said and it "seemingly" didn't work. Starting it normally got me nowhere but I decided to try the "bp tools" option from the bootloader and now my phone has signal and is running oreo.

but my Bootloader is still unlocked.

Any ideas?

---------- Post added at 03:31 PM ---------- Previous post was at 02:44 PM ----------

EDIT:

Okay, I can live with an unlocked bootloader, not planning on selling it or taking it in anytime soon. But after getting it all working again I don't seem to have a recovery at all. I've tried flashing the recovery.img from the oreo firmware, but it says "signed with a bad key" and boots to the Android "no command" screen.

How can I get the stock recovery back?
[Moto Z Play Guides, News, & Discussion] jonas210678:
The Android no command screen is the recovery ;) hold your power button and then press volume up
[Moto Z Play Guides, News, & Discussion] therealhoberfinkle:
Holy moly man. You are a lifesaver. This was the first and last time I'll try anything before doing more research.

Thanks again, huge help.
[Moto Z Play Guides, News, & Discussion] Gabriel_TdV:
Thanks friend, works fine:good:
[Moto Z Play Guides, News, & Discussion] vbdss:
There is something strange on my Moto Z Play when using Oreo.

I can only use the touchscreen when i keep an finger on the screen and use another to navigate through the screens.

I tried LineageOS 14.1 and works perfectly.
[Moto Z Play Guides, News, & Discussion] edsonluis:
I have a Moto Z Play (XT1635-03) still on android 6.0.1, and wanted to use these commands to put the android Oreo and block the bootload, need by android 7.1.1 before or can I by the direct Oreo?

Sorry for my english
[Moto Z Play Guides, News, & Discussion] BarkerIsOnFire:
Do you still need to be on a custom ROM to relock the bootloader?

It's fine if so just a pain to wipe etc.
[Moto Z Play Guides, News, & Discussion] echo92:
To the best of my knowledge, you do not have to be on a custom ROM to re-lock the bootloader.

Check before flashing that you have OEM unlocking enabled in Settings>Developer options (the same toggle you used to allow bootloader unlocking when getting the unlock code). I don't know if this option exists in custom ROMs so you may have to flash the stock ROM without locking the bootloader, boot into the stock ROM and enable OEM unlocking, then flash with locking commands to lock your bootloader. Of course, re-locking your bootloader will wipe your device in the process, so back up and keep those backups off your device until you are done.
[Moto Z Play Guides, News, & Discussion] KOOLjeet:
I've followed your tutorial, it restored my phone to stock but there is no signal for my sims. please help. Even flashing custom roms now not helping out. no signals even on customs roms too. please help what to do?
[Moto Z Play Guides, News, & Discussion] Schnoops:
Same thing happened to me, and even the IMEI is 0 now :(
[Moto Z Play Guides, News, & Discussion] tag68:
Let me guess. OTA for Oreo converted your efs partition to the new structure (whatever that is), and now you installed older nougat which can't read the probably correctly stored IMEI. Right?

First hint: Don't do OTA now. Risk of hard brick is high in this case.

Second hint: Backup efs before trying to flash anything.

Third hint: Search and read. I never was in that situation, if you do the right actions solution should be possible.
[Moto Z Play Guides, News, & Discussion] Arafa1994:
I did all commands but still unlocked & bad key appears

May anyone help me

:(
[Moto Z Play Guides, News, & Discussion] rcortese:
How should I proceed if I'm already on Oreo than?

I've backed up EFS, but I believe it can't be restored with a locked bootloader, and the locking procedure is likely to break it.

Update:

Also, OEM Unlocking option is grayed out under Developer Options with message: "Bootloader is already unlocked"

Why god, why?

Have tried following the commands on this thread with the firmware from this thread (supposedly signed Oreo firmware), but during bootloader flashing I get a "signed with bad key" warning, and warnings about OEM unlocking disabled as well. At least my IMEI is still intact at the end.
[Moto Z Play Guides, News, & Discussion] tag68:
My guess: Once on Oreo you currently can't relock until a signed Oreo firmware gets released from Motorola. If you install Android older than Oreo, efs can't be read.

Until a signed Oreo gets published by Motorola, you won't be able to relock.

As the bootloader was not published by Motorola, it is impossible that it is signed with Motorola's keys. That warning is fine.

As the bootloader is not signed by Motorola, it is not possible to relock. Is it possible that the warning is not about unlock, but saying that lock is not possible without the right keys? This would also be fine.

Why do you want to relock?
[Moto Z Play Guides, News, & Discussion] rcortese:
Thank you for the quick reply :)

I have not used any feature that benefits from the unlock in months, therefore I'm trying to close a potential vulnerability.

I'm getting fake virus alerts on a just flashed firmware even straight on google, and it's driving me nuts (I know it probably won't fix it, but it is an extra, not currently needed, potential vulnerability nonetheless, and I'm closing them all)...

Is the signed Oreo from the linked thread not real than?
[Moto Z Play Guides, News, & Discussion] echo92:
That firmware looks genuine - users in that thread have reported being able to flash the firmware onto a locked bootloader (locked bootloaders will only permit flashing of signed stock images as new or newer than the existing firmware) and it was sourced from the Motorola servers for service centres - so you'd hope that the OEM itself is serving signed images to its service centres...

However, if your OEM unlocking toggle is greyed out (and I'm guessing greyed out in the 'off' position), then you would not likely be able to re-lock your bootloader with the instructions in the opening post. You'd need to enable OEM unlocking to re-lock your bootloader.

One suggested method of re-enabling the OEM unlocking option would be to flash magisk (i.e. root), as has been described for the G5 Plus. https://xdaforums.com/showpost.php?p=76781431&postcount=3 However, I've noted that rooting on the Z Play with the Oreo update has been problematic (some users have reported success, others not so much).

Hopefully, that root will re-enable the OEM unlocking option and let you flash a clean, stock Oreo ROM with the locking commands (oem lock begin and the rest of them); of course, be warned that the process of re-locking will wipe your device.
[Moto Z Play Guides, News, & Discussion] rcortese:
I did it! Hoorray!! :D:D:D

Flashed Nougat again instead of messing with Oreo rooting.

Steps I took to re-lock from Oreo (ymmv):

0. Backup EFS (haven't you already?)

1. Flash Nougat (OP)

2. Install Magisk (otherwise OEM Unlocking option is greyed out, tyvm tag68)

3. Boot into Nougat and enable Developer Options > OEM unlocking (your IMEI might seem broken, it's OK)

4. Flash signed Oreo using the LockBootloader.bat provided by OP

Bootloader is locked and everything seems to be working fine
[Moto Z Play Guides, News, & Discussion] tag68:
AFAIK: If your firmware is not modified against the original one, it is as safe as a locked device, as long as no data connection using usb is being made. OTA also will work fine.

If you lend someone your device, he could unlock it, modify, and relock - and his modifications were gone because the relock can only be made using original format.

If you keep the physical access to the device restricted to people you trust and/or are not technically able enough to flash firmwares, there should result no vulnerability.

Disadvantage when your device is unlocked but not modified (rooted) is that you can't use banking software like Android pay or play games like Pokemon go which requires a device which passes SafetyNet (trusted base).

If you relock and later decide your need root, you win one wipe. That's why I usually unlock devices as soon as I have them. Before using them so much backup and restore makes effort. Rooting them later does not cause data loss if unlocked.
[Moto Z Play Guides, News, & Discussion] rcortese:
Many people have physical access to my phone on a daily basis, most of which have high Android expertise. I feel relocking was the right thing to be done, since I haven't played with rooting and such in a while.

Disadvantages go beyond PokeGO and Android Pay. Netflix, for instance, can't be found on the Store and has to be sideloaded. All it takes for a dev to push this restriction when publishing an app is a checkbox.

Sideloading apps like Netflix in itself is a major vulnerability.

Root is overrated nowadays. Google, unfortunately, is making it harder and harder to enjoy it fully. I'm perma out.
[Moto Z Play Guides, News, & Discussion] garov1:
if i lock bootloader with this guide, would i by able to unlock it again in oreo? has anibody tried?
[Moto Z Play Guides, News, & Discussion] Jimi Mack:
I have locked it and now trying to re-unlock with no luck. Just as a heads up...
[Moto Z Play Guides, News, & Discussion] garov1:
thanks for reply:)
[Moto Z Play Guides, News, & Discussion] Brutal_Master:
What exact version number is this stock ROM based on?
[Moto Z Play Guides, News, & Discussion] KrisM22:
Massive edit:

You do not have to lock the bootloader to receive ota's.
[Moto Z Play Guides, News, & Discussion] tag68:
No. But there are no modifications of several partitions allowed.

If you mount the system partition read/write it gets marked as modified which usually prevents OTA. Flashing twrp prevents OTA. But starting twrp for a backup is fine. If you relock bootloader, doing Nandroid backup/restore will be impossible until you open bootloader again - which wipes system.
[Moto Z Play Guides, News, & Discussion] KrisM22:
Thanks for your comment.

Disaster struck when I backed up Alberto's aosp8.1 and restored my original stock and then let it try to update. It would only boot to twrp no matter what I restored. Fortunately: RSDlite'ed (win7) a 7.x (I think it was a Dec'17 version) and that booted fine so didn't play with it but RSDlite'ed [MENTION=5750370]rafikowy[/MENTION] 's signed 8.0

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

and running that at the moment. I have no idea whether I'm locked or not LOL. - yep says unlocked and dead android (pwr ,tap volup) leads to stock recovery.

But I'll leave it that way as it's Zzz time and at least i have a phone that works. :D:D:D

Flashing TWRP prevents OTA, huh... Hmmmmmmmmmmmm. Nite.

But starting TWRP for a backup is fine? - Again, Hmmmmmmmm. realized I don't know how to do that - can you give me a tutorial? THANKS!
[Moto Z Play Guides, News, & Discussion] tag68:
Having a phone that works is really good. I hope you are aware of the hard brick possibility. OTA update a nougat system with Oreo structure on efs partition (at least it seems so, exact reason is not known for sure), and risk is high that your mobile is dead and you are not able to flash anymore until you find Oreo blank flash files - which did not appear by now. You saw these threads "help me, my phone is bricked"?
[Moto Z Play Guides, News, & Discussion] KrisM22:
Massive edit: see my guides for going easily back and forth 7 to 8 to 7.

Do not lock your bootloader. Ever.
[Moto Z Play Guides, News, & Discussion] KrisM22:
apologies to [MENTION=7329665]SupahCookie[/MENTION] for OT.

New thread with info.

https://xdaforums.com/moto-z-play/how-to/mini-guide-bricked-special-case-attempt-t3812530
[Moto Z Play Guides, News, & Discussion] joshua764:
I followed this guide and it worked perfect. Now that I want to reopen the bootloander I get error code 7. Also note that the PC no longer recognizes it (we already understand it in two) and I realized that the bike model z play was changed. Has someone been the same? any solution?

Enviado desde mi XT1635-02 mediante Tapatalk
[Moto Z Play Guides, News, & Discussion] artem250:
Dont work with 1635-02 retca stock Oreo. I have three time flashed with oem lock.
[Moto Z Play Guides, News, & Discussion] KrisM22:
You gain nothing by re-locking your bl, and you may well never be able to unlock it again - so no mods - ever. Think about that. :)
[Moto Z Play Guides, News, & Discussion] rcortese:
Responded here by mistake... Sorry... Don't know how to delete.
[Moto Z Play Guides, News, & Discussion] masteguh:
can i do this ? for now im on 8.0 and OPNS27.76 12-22-3 will it break my device ?

are this is realy work https://youtu.be/EUqEXLq4bSU ?
[Moto Z Play Guides, News, & Discussion] rusa-raus:
bat files didnt work for me but I pasted the commands in the post and worked pretty fine. Thank you bro, you are a lifesaver.
[Moto Z Play Guides, News, & Discussion] sergiomc22:
Hello

do you have the link in another host? Mega is bandwidth limit and the othe one is down. Please help. Thank you.
[Moto Z Play Guides, News, & Discussion] talktosam:
which version u need.?
[Moto Z Play Guides, News, & Discussion] sergiomc22:
Hi I'm on Stock 8.0 1 April patch.

Attached screenshots. Thank you.

Enviado desde mi XT1635-02 mediante Tapatalk
[Moto Z Play Guides, News, & Discussion] JR Bautista:
how to remove from the start "Your device has been unlocked..." after flashing this?
[Moto Z Play Guides, News, & Discussion] JR Bautista:
thanks it works!
[Moto Z Play Guides, News, & Discussion] shivdip:
Creating bat file.

Should i include rom file and command in single bat file.

or

The bat file should be created only with commands with rom in adb folder

---------- Post added at 06:05 AM ---------- Previous post was at 05:42 AM ----------

Please answer to my... question
[Moto Z Play Guides, News, & Discussion] khanpatriot:
Hi dev. I know its been 2 years but still i hope for your response. I'm on lineage os i want to revert back to stock but don't wanna lock the bootloader cz i want root and twrp in stock. What commands should i execute stated in op to get back to stock nougat with an unlocked bootloader. Thanks. I hope for your kind help
[Moto Z Play Guides, News, & Discussion] tag68:
Just omit those oem lock things and you should be fine.
[Moto Z Play Guides, News, & Discussion] AgEnT_aVi_99:
Hi All,

Has anyone tried to revert to this stock from Pie roms? If yes, could you use google pay and other payments apps flawlessly post installation?
[Moto Z Play Guides, News, & Discussion] flakovalenciam:
hello, i'm already in a 8.0.0 stock rom with august 2018 security patch... can i do this from here? or i need to go to a custom rom like aosp9 from alberto97 and do the process from there? thanks in advance...

NEVER MIND, I JUST DID ALL THAT AND WORKS PERFECTLY... THANK MAN¡¡¡ GREAT POST¡¡¡
[Moto Z Play Guides, News, & Discussion] flakovalenciam:
I can help you with half of the answer, I was on AOSP 9 from developer Alberto, then going back to stock with the relock bootloader guide, the phone is like the first day I bought it...hope it helps...
[Moto Z Play Guides, News, & Discussion] AgEnT_aVi_99:
Hi, thanks OP for the wonderful work. Could revert with no issues. But is there any way to remove the bad id /phone unlocked message at boot time? I followed all the commands but that message still pops up! Is there any other step post those commands?
[Moto Z Play Guides, News, & Discussion] khanpatriot:
Flash the logo witb fastboot. fastboot flash logo logo.bin
[Moto Z Play Guides, News, & Discussion] Atreta:
hi,

i just downgraded from lineageos 15.1 to the stock nougat and all went well except that now i don't have a mobile network. i try to register onto my carrier and it says "selected network (xxx) not available".

what can be done to correct this? when i check my imei, it has a 0 in slot 1.

thanks in advance.

edit: i tried a different carrier chip and it worked, also tried the faulty chip in another phone and it worked too.
[Moto Z Play Guides, News, & Discussion] AgEnT_aVi_99:
Not sure how much it will help u, but i faced the same issue when i came to stock, i updated all otas one by one and came to oreo, updated the carrier app from google and both sims started showing up!
[Moto Z Play Guides, News, & Discussion] tag68:
The message means you did unlock. If you relock, it should disappear. But then you can't run TWRP and make a real backup anymore. As mentioned by others it is also possible to hide it using a logo with the same colors like that message, but it is only hidden and the delay remains. Additionally I'm not sure if OTA updates will succeed after flashing logo. I wouldn't do it, but be proud to have an unlocked device which shows that message.
[Moto Z Play Guides, News, & Discussion] Atreta:
thanks for the asnwer, i wanted it to work with nougat 7.1.1 because i didn't like oreo at all, i had a problem with low volume.
[Moto Z Play Guides, News, & Discussion] sunil shamaa:
not able to relock boot loader ..

not able to relock my moto z play device .. after fastboot oem lock ..

it shows "STILL REQUIRE SIGNED BOOT.IMG

and still my bootloader shows its unlocked.
[Moto Z Play Guides, News, & Discussion] celulares7:
escuseme and wath

is the password to unzip the files ?
[Moto Z Play Guides, News, & Discussion] celulares7:
escuseme what is the password to unzip the files

escuseme what is the password to unzip the files
[Moto Z Play Guides, News, & Discussion] beatschubser:
Hi there, noob-question incoming: I know it says I need a custom rom to use this package, but I tried to run it on my unlocked & rooted stock device anyway. Now the phone has been reset but is still unlocked. Do I really need to install a custom ROM first to lock it again, or is there a simpler way?
[Moto Z Play Guides, News, & Discussion] flakovalenciam:
Yes
[Moto Z Play Guides, News, & Discussion] beatschubser:
Ok, I installed LineageOS and then ran the batch-script of the original post. It reverted to stock android, but I noticed the following things:

- Device is still unlocked

- TWRP doesn't find the EFS-partition to backup (which I wanted to do before messing around further with locking the bootloader)

- Both IMEIS are 0

I then re-installed LineageOS and the IMEIs appeared again.

Any idea what went wrong?
[Moto Z Play Guides, News, & Discussion] winner1:
hi ... how are you? .... i followed the steps in the 1st post and always giving me error saying "still require signed boot.img"

https://ibb.co/ctxQsZn

how can i solved this problem?
[Moto Z Play Guides, News, & Discussion] khanpatriot:
Maybe you need to flash chinese twrp which has efs options.
[Moto Z Play Guides, News, & Discussion] huma_dawii:
I actually got the same error... didn't relock the device.

Also when im reading the log it shows a lot of "image signed with a bad key" im starting to think this only has a "fix logo.bin" file to hide the unlocked bootloader status.
[Moto Z Play Guides, News, & Discussion] Bunt007:
Last I wasn on oreo, with oct or dec security patch, then i unlocked bootloader, can someone help me relocking boot loader, no matter how many times i try with the given steps it fails, getting secutrity patch downgrade on this step fastboot flash partition gpt.bin.

i need recent firmware for oreo, i tried hard but couldnt find, please help me..
[Moto Z Play Guides, News, & Discussion] LunaEros:
Anyone still around that could give me some help flashing an XT1635-02 attmx?
[Moto Z Play Guides, News, & Discussion] shubhojit89:
Check this thread : https://xdaforums.com/moto-z-play/how-to/guide-xt-1635-02-relock-bootloader-id-t4119825
[Moto Z Play Guides, News, & Discussion] mzp_user:
The image is probably not signed. Try using a signed image. You can find one in the post here: https://xdaforums.com/moto-z-play/how-to/guide-motorola-z-play-xt-1635-02-t4063701
[Moto Z Play Guides, News, & Discussion] Zunairahmad20@gmail.com:
I'd installed custom rom after bootloader unlock but now I've tried this method as well as some other methods and went back to stock firmware also getting ota updates but during boot it's show a warning that your device has been unlocked and not more trusted, visit care center;- 😶 how i can get rid from this screen warning???
[Moto Z Play Guides, News, & Discussion] echo92:
Generally, provided you have the same motherboard in your device as when you requested the unlock key from Motorola, you should be able to unlock your bootloader again using the same key.

As before, your device will be wiped when you unlock/re lock your bootloader.
[Moto Z Play Guides, News, & Discussion] Greamos:
That would be cool! Will check it today :)
[Moto Z Play Guides, News, & Discussion] Milly7:
Here's a mirror. I would check the md5 though before using since I uploaded it from my phone.

https://mega.nz/#!sl4VmaQY!qrFARw4bZLBYwOvbPJvuHfOmDldkBpZYHSn_em3vApA

1e9d83e9ae99450af3d0f92a9b480473
[Moto Z Play Guides, News, & Discussion] Chydzim:
Have someone tested if we can lock and unlock bootloader as many times as we want using image from this thread and single unlock code?

If we can... Then I'm going to have some fun ^^

Could someone test it? Please.
[Moto Z Play Guides, News, & Discussion] jst98:
thanks! you are amazing!!!saved my life!!!
[Moto Z Play Guides, News, & Discussion] Greamos:
No problem!
[Moto Z Play Guides, News, & Discussion] Greamos:
It should work! Will test it this weekend
[Moto Z Play Guides, News, & Discussion] adakaya1994:
Works perfectly, thanks!
[Moto Z Play Guides, News, & Discussion] varun jashnani:
Works ?
[Moto Z Play Guides, News, & Discussion] ghostbusted:
Work just fine! Finally signed factory image that we are waiting for... Thank you OP.
[Moto Z Play Guides, News, & Discussion] Chydzim:
Have you tested it already? I can't wait ^^
[Moto Z Play Guides, News, & Discussion] Greamos:
Yeah it worked, just use the same key :)
[Moto Z Play Guides, News, & Discussion] Greamos:
No problem :D
[Moto Z Play Guides, News, & Discussion] varun jashnani:
Thank you soo much buddy, since days i was trying to get back to stock, finally with your help did it. Cheers.
[Moto Z Play Guides, News, & Discussion] Kdx10:
Bro thank you. It really works. And the best part of it was my IMEI 0 before is back to its normal digit. And it's wow. Thanks thanks thanks
[Moto Z Play Guides, News, & Discussion] tag68:
The problem with IMEI 0 is usually not that it is overwritten, but that it can't be read somehow. I'm quite sure: People thinking it would be blanked somehow, nervously overwriting the partition with the IMEI trying to restore any functionality instead of doing a backup before (which is not that expensive and if it is really empty, you still can delete that backup afterwards), are the most frequent cause of deleted IMEI.
[Moto Z Play Guides, News, & Discussion] Stephan.135:
Sorry for my bad english i hope you understand me.

I have a german Moto Z Play reteu Device and wont to go back to Stock. My Build Number is NPNS26.118-22-1 can i use the Firmware from second Post to do this?

Thanks for help