[GUIDE] How to restore stock firmware - Moto Z Play Guides, News, & Discussion

Warning: some people have said following these instructions on Nougat bricks your phone. I have done them to restore stock after upgrading to Nougat and have had no issues but you may want to conduct further research before attempting.
I had trouble finding the correct instructions for restoring the stock firmware when I needed it a few months ago so I decided to make a simple guide to help people that may be having the same issues I was.
Firstly, ensure your bootloader is unlocked and USB debugging is enabled in developer options. I'd assume this is already the case if you're needing to restore to stock.
Download the stock firmware for your update channel from https://mirrors.lolinet.com/firmware/moto/addison/official/
Extract the zip file into a directory of your choice
Right click and "Open command window here"
Execute, line by line:
Code:
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
Reboot device

Thank you! This is very helpful restoring the device. Is there also command to re-lock the bootloader to enable OTA? The info is so fragmented... Many thanks

Yes same question. Is it possible to relock the bootloader after that? If so how to do this?

slainer68 said:
Yes same question. Is it possible to relock the bootloader after that? If so how to do this?
Click to expand...
Click to collapse
I dont remember who tell this "once you unlock your device, you can never ever lock it again."
Sent from my XT1635-02 using XDA Labs

There's a lot of devices that you can relock...
fastboot oem lock
should relock the bootloader...

Relock usually does make no sense. Unlock does not prevent OTA update. Relocked is "locked again", but won't help you in any way.
Under which circumstances do you fear that someone gets access to your device and flashes something? This is what gets prevented by relock.

Relock works only if we have a signed firmware. Without that there is no way to relock the bootloader.

tag68 said:
Relock usually does make no sense. Unlock does not prevent OTA update. Relocked is "locked again", but won't help you in any way.
Under which circumstances do you fear that someone gets access to your device and flashes something? This is what gets prevented by relock.
Click to expand...
Click to collapse
Relock to use Android Pay

In NOUGAT your script flash MM brick phone
Remove
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
Donwgrade Bootloader Brick Phone

You really should add a warning. This breaks your phone if you already upgraded to Android N (specifically, the bootloader).
This other thread helped me downgrade the right way
https://forum.xda-developers.com/mo...irmware-downgrade-t3558118/page2#post71404455
Specifically the version of the script in the comments by -=MoRpH=-

graphitenexus said:
I had trouble finding the correct instructions for restoring the stock firmware when I needed it a few months ago so I decided to make a simple guide to help people that may be having the same issues I was.
Should this be unzipped in the ADB folder?
Click to expand...
Click to collapse

marsisabar said:
You really should add a warning. This breaks your phone if you already upgraded to Android N (specifically, the bootloader).
This other thread helped me downgrade the right way
https://forum.xda-developers.com/mo...irmware-downgrade-t3558118/page2#post71404455
Specifically the version of the script in the comments by -=MoRpH=-
Click to expand...
Click to collapse
I've restored to it from N without issue

Jimi Mack said:
I had trouble finding the correct instructions for restoring the stock firmware when I needed it a few months ago so I decided to make a simple guide to help people that may be having the same issues I was.
Firstly, ensure your bootloader is unlocked and USB debugging is enabled in developer options. I'd assume this is already the case if you're needing to restore to stock.
Download the stock firmware for your update channel from https://mirrors.lolinet.com/firmware/moto/addison/official/
Extract the zip file into a directory of your choice
Right click and "Open command window here"
Execute, line by line:
Should this be unzipped in the ADB folder?
Click to expand...
Click to collapse
Not necessary if you have ADB added to your path

graphitenexus said:
Not necessary if you have ADB added to your path
Click to expand...
Click to collapse
Thank you, but sorry I do not understand., an old guy here and the whole thing with command lines confuse me.
---------- Post added at 11:28 AM ---------- Previous post was at 11:06 AM ----------
I have all the files in the ADB folder, I keep getting "Slot Counts not found" on the 2nd entry on the list. All want to do is flash my screw up back to stock.... LOL.
I do not even have an "oem fb_mode_set" in the folder, I have an "oem.img"

Jimi Mack said:
Thank you, but sorry I do not understand., an old guy here and the whole thing with command lines confuse me.
Click to expand...
Click to collapse
Don't worry about path then. Unzip to platform-tools in the ADB folder then shift+right click and select open command window here. Then run the commands in the OP

graphitenexus said:
Don't worry about path then. Unzip to platform-tools in the ADB folder then shift+right click and select open command window here. Then run the commands in the OP
Click to expand...
Click to collapse
I am running the commands one by one but the 2nd one get me stuck as I noted above. The no slot think has be confused, what should I see after entering each command?
---------- Post added at 12:10 PM ---------- Previous post was at 11:44 AM ----------
Got It

graphitenexus said:
I've restored to it from N without issue
Click to expand...
Click to collapse
In the future... when you receive a "new" OTA you may brick your phone... (ghost user experience)

CsR0501 said:
In the future... when you receive a "new" OTA you may brick your phone... (ghost user experience)
Click to expand...
Click to collapse
Original Moto X, had one and loved it and yes lots of bricks.

graphitenexus said:
Relock to use Android Pay
Click to expand...
Click to collapse
I've never had that problem? My bootloader was unlocked on my Moto X Pure and the only time Android pay didn't work was when I rooted. I reverted back to complete stock and it worked fine.

SixShots said:
I've never had that problem? My bootloader was unlocked on my Moto X Pure and the only time Android pay didn't work was when I rooted. I reverted back to complete stock and it worked fine.
Click to expand...
Click to collapse
Unlocked bootloader now breaks safetynet

Related

[NOOB GUIDE] Unroot/Relock Bootloader - VZW Developer Edition Moto X

It took me about two days to figure out how to unroot and relock my Moto X. Figured I'd create a total noob guide for those who are also looking to do the same. This is for the Verizon Wireless Developer Edition Moto X ONLY! I have no clue if this will work for other variants like Sprint, AT&T, T-Mobile, etc. So just play it safe and don't...
I've unrooted and relocked my VZW Dev Edition Moto X twice using this method, so as long as you follow the steps below you should be fine. Also please note that I'm not at all responsible for anything that happens to your beloved phone.
Btw, this process wipes your phone completely clean, so back your sh** up.
So here goes.
1. You need a Windows PC.
2. Download and install the Motorola Device Manager (USB Drivers) to your PC. This will allow your Moto X to be recognized by your computer.
3. Plug your Moto X into your PC and let the drivers install automatically.
4. Download and unzip the VZW Developer Edition Factory Image for the Moto X to your desktop.
5. Download both the fastboot.exe and AdbWinApi.dll files and place them in the folder you just unzipped in step step 4.
6. Now grab your Moto X, unplug it from your PC and power it off. Once powered off, press and hold both the Power and Volume Down buttons for about 10 seconds or so to access Fastboot mode.
7. Now, back on your PC, open the folder you extracted on Step 4. Hold down the Shift key on your keyboard and Right Click on an empty space within that folder. From the menu that pops up, click on Open command window here. A command prompt window should open. Plug your phone back into your PC.
8. In the command prompt type fastboot devices to make sure your X is being detected. You should see something similar T0620059GA. If you don't see it, then you may have to reinstall the USB Drivers from Step 2.
9. Once your X has been detected by your computer, and while still in Fastboot mode, type the following commands (in the order shown) into the command prompt on your PC:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase cache
fastboot oem lock
fastboot reboot
...
That's it! You should now be locked and unrooted; back to the out of the box factory state. Don't forget to hit thanks and share!
Did re-locking ur bootloader get rid of the Bootloader Unlocked Warning Message?
tonyf7 said:
7. Now, back on your PC, open the folder you extracted on Step 4. Hold down the Shift key on your keyboard and Left Click on an empty space within that folder. From the menu that pops up, click on Open command window here. A command prompt window should open. Plug your phone back into your PC.
Click to expand...
Click to collapse
Right click sir.
mschumacher69 said:
Did re-locking ur bootloader get rid of the Bootloader Unlocked Warning Message?
Click to expand...
Click to collapse
Yes.
tonyf7 said:
Yes.
Click to expand...
Click to collapse
Just to make sure we're on the same page here, after re-locking ur bootloader, when u boot the phone, u get the Moto logo instead of the message that says Warning Bootloader Unlocked?
Because many other users said that u would still get this message even if u re-lock ur bootloader.
When I relocked the bootloader and rebooted the phone I didn't get the warning message. Went straight to the Moto logo. But then I immediately rooted and unlocked again. Only reason I unrooted and relocked in the first place was because I flashed a zip file that corrupted and broke Google Voice Search on my phone.
The second time I did this process I stopped right before locking the bootloader since I was going to root again anyways.
So maybe those other people are right. I've only rebooted my phone once since relocking the bootloader.
Sent from my XT1060 using xda app-developers app
If you want to get rid of the warning on startup, just flash the logo.bin. You can do this and remain unlocked. The instructions provided should have your phone looking and acting the same as it did out of the box. However, fastboot may note that it's been unlocked, to the OP, do you recall what status fastboot was reporting?
you need to reflash to stock in order to lock your bootloader? If not, I would appreciate if you separate the steps to just lock your boot loader.
I have my boot loader unlocked and the only reason I am considering to lock it again is so that if the phone is stolen, someone can't reimage it easily. I'm not sure that gives me any sort of protection though. But its just a thought.
In other words, I see unlocking and locking as a switch that stops you from flashing firmware. The OP makes it sound like the switch is tied to the firmware, ie only stock can have bootloader locked. I am not sure which is right.
esidnD Selim
I did it and keep receiving the warning unlock bootloader screen.
lopescesar304 said:
I did it and keep receiving the warning unlock bootloader screen.
Click to expand...
Click to collapse
Did u re-lock on your phone's ROM or after flashing another carrier's ROM?
mschumacher69 said:
Did u re-lock on your phone's ROM or after flashing another carrier's ROM?
Click to expand...
Click to collapse
My phone is Retail, I used the retail ROM to flash.
My device won't lock. I've run your commands listed, as well as the fastboot oem lock on it's own, and I can't seem to lock the device. Any help?
flavinator said:
My device won't lock. I've run your commands listed, as well as the fastboot oem lock on it's own, and I can't seem to lock the device. Any help?
Click to expand...
Click to collapse
Welcome to the "Relock" party..
The OP does not mention (that I can see) what OS version..are you on KK 4.4 and is there a "Factory Image" for KK 4.4 available for your device.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
NWKENT said:
Welcome to the "Relock" party..
The OP does not mention (that I can see) what OS version..are you on KK 4.4 and is there a "Factory Image" for KK 4.4 available for your device.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
Click to expand...
Click to collapse
Yes, there is, flashed it, ran commands, and the relock command, multiple times and get:
(bootloader) FAIL: Please run fastboot oem lock begin first!
OKAY [ 0.120s]
finished. total time: 0.122s
Not sure what I am doing wrong.
flavinator said:
Yes, there is, flashed it, ran commands, and the relock command, multiple times and get:
(bootloader) FAIL: Please run fastboot oem lock begin first!
OKAY [ 0.120s]
finished. total time: 0.122s
Not sure what I am doing wrong.
Click to expand...
Click to collapse
I'd think you ran this as the first flash >> fastboot oem lock begin first!
Then all the OS files and then this for the last command >> fastboot oem lock > as the last command.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
http://forum.xda-developers.com/showthread.php?t=2575586
NWKENT said:
I'd think you ran this as the first flash >> fastboot oem lock begin first!
Then all the OS files and then this for the last command >> fastboot oem lock > as the last command.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
Click to expand...
Click to collapse
I have no clue. At first I just flashed back using RSD Lite. Then I ran the lock command and got that error. Afterwards, I searched online, trying a bunch of different fastboots. That's when I stumbled on this list of commands, figured I'd run it from scratch, see if it makes a difference. Once it got to the relock command though, I got the same issue. And now I'm just frustrated...
---------- Post added at 06:41 PM ---------- Previous post was at 06:36 PM ----------
shane1 said:
http://forum.xda-developers.com/showthread.php?t=2575586
Click to expand...
Click to collapse
I think this might work, thanks shane1
@NWKENT have u managed to re-lock your bootloader yet?
mschumacher69 said:
@NWKENT have u managed to re-lock your bootloader yet?
Click to expand...
Click to collapse
Yes Sir..with Kit Kat 4.4..I have successfully"Unlocked", "Relocked" and "Unlocked" again..my XT1080MDEV (Droid Maxx)..No one could tell me exactly how to do it..Motorola Tech Line was absolutely NO HELP either..SO..after hours upon hours..I did figure it out..Now I'm working on "Relock" on JB 4.2.2
Sounds easy..and many have probably "Unlocked and "Relocked" on JB 4.2.2..BUT..The difficult part is once the XT1080 has been on KK 4.4..is when alot more firey hoops must be jumped thru..
ANYONE can chime in with help on this..NOT ADVICE..but proven procedures..
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
Yes, thanks guys.

[GUIDE]Safely Restore to Stock

***RESTORE TO STOCK 4.4.4 SAFELY***​
This guide is only for those who have entered into the world of "Customization" after getting the 4.4.4 update via OTA, before unlocking their bootloaders, or for those whose devices were shipped with 4.4.4. ​
After watching so many members of XDA going ahead, skipping important steps while trying to Restore their Moto E to stock 4.4.4, and ultimately ending up failing to do so, or in the worst case a BRICK, it's time I put in a few words here...
If you follow the steps correctly, you WON'T BRICK your device, and will be able to enjoy the fully restored firmware.
1) gpt.bin (WARNING: DO NOT flash this file)
Fastboot command :
mfastboot.exe flash partition gpt.bin
This is the file which contains all the partition information of your phone. It gets updated with each OTA update, and you CANNOT DOWNGRADE the partition table. If you somehow end up flashing the file, either the remaining commands may succeed, or fail... And when, you accept OTAs,!!!BRICKED!!!
2) motoboot.img (WARNING: DO NOT flash this file)
Fastboot command :
mfastboot.exe flash motoboot motoboot.img
This is your bootloader. I have very little info on how it gets flashed through each update... The bootloader is the bios of your phone. If you mess up this file, GOD knows what will happen!!! You won't be able to boot up your device, not even to the bootloader mode (or fastboot mode as some other people call it).
IF ANY ONE OF THE ABOVE FILES ARE MESSED UP, YOU CAN SAY GOODBYE TO YOUR PHONE FOREVER!!
Now, the commands which you should execute are listed below:
mfastboot.exe flash logo logo.bin
mfastboot.exe flash boot boot.img
mfastboot.exe flash recovery recovery.img
Now, Check inside your firmware zip for the numbers (system.img_sparsechunk.0, system.img_sparsechunk.1 etc.). If they are 0,1,2 then follow the steps above then type in:
mfastboot.exe flash system system.img_sparsechunk.0
mfastboot.exe flash system system.img_sparsechunk.1
mfastboot.exe flash system system.img_sparsechunk.2
Or , if you have like 1,2,3 then type:
mfastboot.exe flash system system.img_sparsechunk.1
mfastboot.exe flash system system.img_sparsechunk.2
mfastboot.exe flash system system.img_sparsechunk.3
Now type in:
mfastboot.exe flash modem NON-HLOS.bin
mfastboot.exe erase modemst1
mfastboot.exe erase modemst2
mfastboot.exe flash fsg fsg.mbn
mfastboot.exe erase cache
mfastboot.exe erase userdata
You MUST execute the commands in the order given above, to safely restore to KitKat 4.4.4.
All the best!!! :good:
This is a working tutorial to get and install the 5.1 OTA.
unrooting
when I run the first command ("mfastboot flash partition gpt.bin") in minimal adb...it showing ""mfastboot" is not recognized as an internal or external command" ..please tell me what i missed?
dijusg said:
when I run the first command ("mfastboot flash partition gpt.bin") in minimal adb...it showing ""mfastboot" is not recognized as an internal or external command" ..please tell me what i missed?
Click to expand...
Click to collapse
Why the hell are you trying to do so....?
Does reading my full post waste a lot of time?
Please ELI5 to me:
My condition right now:
Bootloader: 5.1
Bootlock: UNLOCKED
OS: 5.1 Optimized
Root: ROOTED
Can I restore to 4.4.4 by skipping that 2 command?
If so please reword your introduction to:
This guide is only for those who
- Have entered into the world of "Customization" after getting the 4.4.4 update via OTA, before unlocking their bootloaders.
- Device shipped with 4.4.4
- Device that updated to 5.x stock
And your device is
- Unlocked / Locked / Doesn't matter
- Rooted / Not roooted / Doesn't matter
- TWRP-ed / Original recovery intact / doesn't matter
Click to expand...
Click to collapse
Because I'm confused with your introduction.
Rohitagni said:
Why the hell are you trying to do so....?
Does reading my full post waste a lot of time?
Click to expand...
Click to collapse
well not everyone knows how to execute the commands (i dont know it too)
so can you please write us how to execute it?
adjayanto said:
Please ELI5 to me:
My condition right now:
Bootloader: 5.1
Bootlock: UNLOCKED
OS: 5.1 Optimized
Root: ROOTED
Can I restore to 4.4.4 by skipping that 2 command?
If so please reword your introduction to:
Because I'm confused with your introduction.
Click to expand...
Click to collapse
Yes you can do so... Just follow the tutorial.... You can get back to stock safely....
1) Make sure you clear all partitions from your phone except ur sd card... Do this via TWRP
2) Now you have a clean system.... You are ready to enter the commands
MAKE SURE YOU EXECUTE ALL OF THEM IN SEQUENCE (Except the ones I have told to leave out namely gpt and motoboot).
You are done!
Mondop said:
well not everyone knows how to execute the commands (i dont know it too)
so can you please write us how to execute it?
Click to expand...
Click to collapse
Okay... I'm sorry for being harsh...
First of all download the following:
1) Minimal ADB and Fastboot from Here
2) mfastboot.exe from Here
3) Motorola Drivers from Here
4) Kitkat 4.4.4 OS from Here
Download and install 1) and 3) and then tell me.
Rohitagni said:
Okay... I'm sorry for being harsh...
First of all download the following:
1) Minimal ADB and Fastboot from Here
2) mfastboot.exe from Here
3) Motorola Drivers from Here
4) Kitkat 4.4.4 OS from Here
Download and install 1) and 3) and then tell me.
Click to expand...
Click to collapse
already done im trying to update to Lollipop i was following this:
http://forum.xda-developers.com/showthread.php?t=2759495
http://forum.xda-developers.com/moto-e/general/solution-stuck-bootlogo-flashing-5-1-t3168109
and eveything was working fine except that im stucked at boot animation :/
---------- Post added at 11:17 AM ---------- Previous post was at 11:08 AM ----------
well, trying to find on internet why im stucked, i left my device to continue on booting and magically, after 10mins, android jumped on so im happy Lollipop owner :3
Mondop said:
already done im trying to update to Lollipop i was following this:
http://forum.xda-developers.com/showthread.php?t=2759495
http://forum.xda-developers.com/moto-e/general/solution-stuck-bootlogo-flashing-5-1-t3168109
and eveything was working fine except that im stucked at boot animation :/
---------- Post added at 11:17 AM ---------- Previous post was at 11:08 AM ----------
well, trying to find on internet why im stucked, i left my device to continue on booting and magically, after 10mins, android jumped on so im happy Lollipop owner :3
Click to expand...
Click to collapse
Well I am happy to hear that...
Always remember one thing:
HAVE PATIENCE!
Rohitagni said:
Well I am happy to hear that...
Always remember one thing:
HAVE PATIENCE!
Click to expand...
Click to collapse
yop, thaks for your time but i have rly one problem... after installing Lollipop, i cant connect to any mobile operator. is that problem caused by fact, lollipop i installed is from Brozail or whatever? is there any fix for that?
nope your tutorial bricked my phone :/ it will not help when you will not flash gpt.bin
just restored back, updated and boom bricked... your guide does not help
not working
Hi, I did everything as per post.
After rebbot I am shown old boot menu for some time.
But then I am back into lolipop .... Please advise if I missed something.
I just followed your instructions. They seem to have worked well. Thanks!
One comment- I understand that the first two commands are not to be followed, but perhaps it would be wiser to not give the full command that will brick the phone? That way people who just see the number and the command won't just be bricking their phone when they don't read the full instructions. Just say "don't use any command that includes gpt" or something like that instead of giving them the command.
LeiraHoward said:
I just followed your instructions. They seem to have worked well. Thanks!
One comment- I understand that the first two commands are not to be followed, but perhaps it would be wiser to not give the full command that will brick the phone? That way people who just see the number and the command won't just be bricking their phone when they don't read the full instructions. Just say "don't use any command that includes gpt" or something like that instead of giving them the command.
Click to expand...
Click to collapse
I like your suggestions... But I made this post for those who wanted to downgrade.
I hope u understand that downgrading is a very risky process, and EVERYONE SHOULD READ EVERY SINGLE LINE prior to trying to mess with their phone. Some told me to write the full commands so that they can clearly understand, while some like you are telling me to be more precise
Well, it's too tough for me to step on two boats at the same time. But still, I will try to be more precise for my next tutorial
Mondop said:
nope your tutorial bricked my phone :/ it will not help when you will not flash gpt.bin
just restored back, updated and boom bricked... your guide does not help
Click to expand...
Click to collapse
I told not to flash the gpt, AS WELL AS THE MOTOBOOT... It has been proved by other devs here at XDA, that these two will brick ur phone, and not the other ones!!!
So, don't blame me. You must have done something that was not mentioned here, that was responsible for the brick.
Mondop said:
nope your tutorial bricked my phone :/ it will not help when you will not flash gpt.bin
just restored back, updated and boom bricked... your guide does not help
Click to expand...
Click to collapse
How did the phone get bricked if you booted it successfully to lollipop? I think I must be making a mistake as in the earlier post, u said u were a "happy lollipop owner"????
rahul1042 said:
Hi, I did everything as per post.
After rebbot I am shown old boot menu for some time.
But then I am back into lolipop .... Please advise if I missed something.
Click to expand...
Click to collapse
Can u give me the link of the firmware? I think something is wrong with the files....
Else you can directly flash the 5.1 fresh by following the instructions from here
Rohitagni said:
I told not to flash the gpt, AS WELL AS THE MOTOBOOT... It has been proved by other devs here at XDA, that these two will brick ur phone, and not the other ones!!!
So, don't blame me. You must have done something that was not mentioned here, that was responsible for the brick.
Click to expand...
Click to collapse
I DID NOT flashed gpt as well MOTOBOOT
---------- Post added at 11:07 AM ---------- Previous post was at 11:06 AM ----------
Rohitagni said:
How did the phone get bricked if you booted it successfully to lollipop? I think I must be making a mistake as in the earlier post, u said u were a "happy lollipop owner"????
Click to expand...
Click to collapse
I flashed to Lollipop succesfully but since this is POST for restoring back to stock, i used it to go back to Kit Kat and thats where my mobile was bricked
Mondop said:
I DID NOT flashed gpt as well MOTOBOOT
---------- Post added at 11:07 AM ---------- Previous post was at 11:06 AM ----------
I flashed to Lollipop succesfully but since this is POST for restoring back to stock, i used it to go back to Kit Kat and thats where my mobile was bricked
Click to expand...
Click to collapse
So... In that case tooo? Did u leave out the bootloader and the partition?

Unable to update OTA since repair - alternatives?

Hi all,
To cut a long story short, around the time MM was being released I cracked my display and broke the digitiser. Before sending the phone off for repair I got the update notification -.- but sent it away without updating as I couldn't accept it. Phone returned and working but no OTA notification, factory reset a few times, sim out and try again, all the usual tricks. They flashed my phone in the factory (came back wiped) and for some reason this firmware isn't getting the OTA update.
So after persevering with Lollipop (and cracking the display again, and fixing it myself this time) I'm getting Marshmallow one way or another. I just would like to know the best way.
I'd rather keep everything as stock as possible (in terms of bootloaders and rooting) and my current plan was to flash TWRP and try running a MM OTA file. I'm just looking to verify this would work and if so, any pitfalls (future OTAs) or things that could go horribly wrong by doing something idiotic.
I'm on an EU XT1572 so I'm assuming a general EU OTA file will work?
Thanks in advance for any assistance,
Phil
clarkey586 said:
Hi all,
To cut a long story short, around the time MM was being released I cracked my display and broke the digitiser. Before sending the phone off for repair I got the update notification -.- but sent it away without updating as I couldn't accept it. Phone returned and working but no OTA notification, factory reset a few times, sim out and try again, all the usual tricks. They flashed my phone in the factory (came back wiped) and for some reason this firmware isn't getting the OTA update.
So after persevering with Lollipop (and cracking the display again, and fixing it myself this time) I'm getting Marshmallow one way or another. I just would like to know the best way.
I'd rather keep everything as stock as possible (in terms of bootloaders and rooting) and my current plan was to flash TWRP and try running a MM OTA file. I'm just looking to verify this would work and if so, any pitfalls (future OTAs) or things that could go horribly wrong by doing something idiotic.
I'm on an EU XT1572 so I'm assuming a general EU OTA file will work?
Thanks in advance for any assistance,
Phil
Click to expand...
Click to collapse
Easy-peasy.
*NOTE - Using TWRP to flash the OTA.zip IS NOT an option, it WILL fail. You can however use the stock recovery and ADB sideload it.. but the following is how I would probably do it. It's also easier IMO.
I'm assuming your bootloader is unlocked since you were talking about using TWRP so grab the WHOLE 6.0 firmware for your phone (I'm guessing your're RETEU so -> XT1572_CLARK_RETEU_6.0_MPHS24.49-18-3_cid7_subsidy-DEFAULT_CFC.xml.zip - It's 1.3GB in size) and then reboot the phone into the bootloader (Fastboot mode) and use the files in it to flash everything (this process will wipe the phone so backup anything important first) with fastboot and you will be on a clean completely stock 6.0 with the february patch.
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
Standalone Fastboot & adb installer - LINK
WHOLE Firmware - LINK
Good luck! If your bootloader is not already unlocked and you don't want to unlock it there is still hope.. it will just be a bit different process by using the OTA zips and the stock recovery.. let me know if you MUST go down this route.. it's a bit more of a PITA IMO.
EDIT* If terminal commands are not your thing you can also try using RSDLite.(Official Moto tool). but I've not personally tried it with my Moto X Pure... I like the terminal
DaMadOne said:
Easy-peasy.
*NOTE - Using TWRP to flash the OTA.zip IS NOT an option, it WILL fail. You can however use the stock recovery and ADB sideload it.. but the following is how I would probably do it. It's also easier IMO.
I'm assuming your bootloader is unlocked since you were talking about using TWRP so grab the WHOLE 6.0 firmware for your phone (I'm guessing your're RETEU so -> XT1572_CLARK_RETEU_6.0_MPHS24.49-18-3_cid7_subsidy-DEFAULT_CFC.xml.zip - It's 1.3GB in size) and then reboot the phone into the bootloader (Fastboot mode) and use the files in it to flash everything (this process will wipe the phone so backup anything important first) with fastboot and you will be on a clean completely stock 6.0 with the february patch.
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
Standalone Fastboot & adb installer - LINK
WHOLE Firmware - LINK
Good luck! If your bootloader is not already unlocked and you don't want to unlock it there is still hope.. it will just be a bit different process by using the OTA zips and the stock recovery.. let me know if you MUST go down this route.. it's a bit more of a PITA IMO.
EDIT* If terminal commands are not your thing you can also try using RSDLite.(Official Moto tool). but I've not personally tried it with my Moto X Pure... I like the terminal
Click to expand...
Click to collapse
Thanks a million.
I've not unlocked my bootloader, but I don't think it should be a problem there's plenty of tutorials etc for that.
Ideally, I'd not like to wipe my phone but alas it looks like that's going to be the case and I'll trust your advice rather than looking for a lazy way out haha. Is there any way to back up everything (even just apps, etc) without root though?
Cheers :good:
clarkey586 said:
Thanks a million.
I've not unlocked my bootloader, but I don't think it should be a problem there's plenty of tutorials etc for that.
Ideally, I'd not like to wipe my phone but alas it looks like that's going to be the case and I'll trust your advice rather than looking for a lazy way out haha. Is there any way to back up everything (even just apps, etc) without root though?
Cheers :good:
Click to expand...
Click to collapse
Yea, your warranty is void at this point anyways so why not just unlock it! I root and use TiBu.. so I've not tested other backup methods but I'm pretty sure there are backup apps on the playstore that don't require root you could try.
BUT, the step "fastboot erase userdata" is what erases your installed apps/setting and personal files, etc. Really you can just SKIP that step and you SHOULD be ok. Then your apps and settings will be there when you boot 6.0. I was just providing instructions for a fully clean flash. I would say you have a 98% chance it will be just fine though if you don't erase userdata.
EDIT* oh and IIRC you will probably get an error or weird msg with the gpt.bin part of the flash.. ignore it..
EDIT 2* Here is one such app that doesn't look like it requires root. If you go this route make sure you copy everything over to your PC after using the backup app if you are going to run the "fastboot erase userdata" command.
GOOD LUCK!
---------- Post added at 06:38 PM ---------- Previous post was at 06:07 PM ----------
Just out of curiosity.. I've just read some posts on here about people getting their phones back from repair and their bootloader says "Device is ENGINEERING" instead of "Device is LOCKED" or "Device is UNLOCKED".
What does yours say? I'm mainly just wondering if it being in ENGINEERING mode is why you are not getting the OTA...
DaMadOne said:
Yea, your warranty is void at this point anyways so why not just unlock it! I root and use TiBu.. so I've not tested other backup methods but I'm pretty sure there are backup apps on the playstore that don't require root you could try.
BUT, the step "fastboot erase userdata" is what erases your installed apps/setting and personal files, etc. Really you can just SKIP that step and you SHOULD be ok. Then your apps and settings will be there when you boot 6.0. I was just providing instructions for a fully clean flash. I would say you have a 98% chance it will be just fine though if you don't erase userdata.
EDIT* oh and IIRC you will probably get an error or weird msg with the gpt.bin part of the flash.. ignore it..
EDIT 2* .... is one such app that doesn't look like it requires root. If you go this route make sure you copy everything over to your PC after using the backup app if you are going to run the "fastboot erase userdata" command.
GOOD LUCK!
---------- Post added at 06:38 PM ---------- Previous post was at 06:07 PM ----------
Just out of curiosity.. I've just read some posts on here about people getting their phones back from repair and their bootloader says "Device is ENGINEERING" instead of "Device is LOCKED" or "Device is UNLOCKED".
What does yours say? I'm mainly just wondering if it being in ENGINEERING mode is why you are not getting the OTA...
Click to expand...
Click to collapse
Haha suppose you're right! Sure I'll probably just wipe my device in the end, be nice to have a clean go at MM haha.
The bootloader status was indeed locked so I don't know what's causing the issue?
Anyway, thanks a million for the help I'll update if/when all goes well :good:
Despite my best efforts, it seems to have been in vain. I'm getting an error when trying to unlock the bootloader (something along the lines of no backup available, please try again) which is common to people who have sent their phone in for repair.
I'm just wondering if I could flash the firmware regardless of bootloader (Odin maybe?) At this point I'm happy to root suit and boot I'm just a bit sick of moto at this stage so want to be able to control my phone haha.
Any help much appreciated
clarkey586 said:
Despite my best efforts, it seems to have been in vain. I'm getting an error when trying to unlock the bootloader (something along the lines of no backup available, please try again) which is common to people who have sent their phone in for repair.
I'm just wondering if I could flash the firmware regardless of bootloader (Odin maybe?) At this point I'm happy to root suit and boot I'm just a bit sick of moto at this stage so want to be able to control my phone haha.
Any help much appreciated
Click to expand...
Click to collapse
Odin is for Samsung. Moto has RSDLite. But if your bootloader is locked the firmware package must be signed by Moto and I don't thing the ones floating around the web are.
So this is the point where it seems you're stuck with the (possibly) more PITA way. What you need to do is find the OTA zip that goes from 5.1.1 -> 6.0 and use the stock recovery to flash that with ADB. Boot to stock recovery, press button sequence to get the menu (I THINK at the fallen android dude you hold vol up for a few seconds then hit the power button while still holding it.. it's something like that to get the actual useful menu) then towards the bottom is an update via ADB, plug phone into pc via usb and select that and then in terminal do "adb sideload <OTA_file>.zip" and it will flash the OTA, assuming your device passes it's check it will feel like it's taking forever. This method won't wipe your phone either.
EDIT* HERE is a post with a link to the EU OTA and much better instructions than mine You can flash it with adb sideload or like that post says by copying it to your phone before booting the recovery and flashing it.
And then.. assuming you get to 6.0 using that OTA hopefully you can trigger the february OTA to auto download. If not... HERE is a link to a post with the february OTA zip for your phone. Flash it the same as last one.
If flashing the OTA with a locked bootloader and stock recovery doesn't work I'm afraid you're either stuck or your phone is on a return path to Moto again.
DaMadOne said:
Odin is for Samsung. Moto has RSDLite. But if your bootloader is locked the firmware package must be signed by Moto and I don't thing the ones floating around the web are.
So this is the point where it seems you're stuck with the (possibly) more PITA way. What you need to do is find the OTA zip that goes from 5.1.1 -> 6.0 and use the stock recovery to flash that with ADB. Boot to stock recovery, press button sequence to get the menu (I THINK at the fallen android dude you hold vol up for a few seconds then hit the power button while still holding it.. it's something like that to get the actual useful menu) then towards the bottom is an update via ADB, plug phone into pc via usb and select that and then in terminal do "adb sideload <OTA_file>.zip" and it will flash the OTA, assuming your device passes it's check it will feel like it's taking forever. This method won't wipe your phone either.
EDIT* HERE is a post with a link to the EU OTA and much better instructions than mine You can flash it with adb sideload or like that post says by copying it to your phone before booting the recovery and flashing it.
And then.. assuming you get to 6.0 using that OTA hopefully you can trigger the february OTA to auto download. If not... HERE is a link to a post with the february OTA zip for your phone. Flash it the same as last one.
If flashing the OTA with a locked bootloader and stock recovery doesn't work I'm afraid you're either stuck or your phone is on a return path to Moto again.
Click to expand...
Click to collapse
Ah sure I'll give that a go! Just checking if there are any precautions I should be taking for this? Don't want to brick the phone without the ability to flash it back to life again!
clarkey586 said:
Ah sure I'll give that a go! Just checking if there are any precautions I should be taking for this? Don't want to brick the phone without the ability to flash it back to life again!
Click to expand...
Click to collapse
You should be fine. The OTA zip is going to check all of the files it is going to patch first and only upgrade if everything passes. If it finds ANYTHING amiss... it will refuse to flash it. If it refuses to flash it your only hope is to send it to Moto unfortunately.
DaMadOne said:
You should be fine. The OTA zip is going to check all of the files it is going to patch first and only upgrade if everything passes. If it finds ANYTHING amiss... it will refuse to flash it. If it refuses to flash it your only hope is to send it to Moto unfortunately.
Click to expand...
Click to collapse
You, my friend, are a hero.
That seems to have done the trick with no issues (going to see if I can potentially unlock the bootloader now) and I'm finally on MM haha. Seems I have to perform the Feb security update separately too for some reason but I'm not too worried about doing things manually.
Sent you a small token of my appreciation, have a pint on me
Thanks once again
clarkey586 said:
You, my friend, are a hero.
That seems to have done the trick with no issues (going to see if I can potentially unlock the bootloader now) and I'm finally on MM haha. Seems I have to perform the Feb security update separately too for some reason but I'm not too worried about doing things manually.
Sent you a small token of my appreciation, have a pint on me
Thanks once again
Click to expand...
Click to collapse
Sweet! Thanks for the pint! Glad you're updated now. Did it end up giving you the OTA for the February patch or did you have to use the 2nd OTA?
DaMadOne said:
Sweet! Thanks for the pint! Glad you're updated now. Did it end up giving you the OTA for the February patch or did you have to use the 2nd OTA?
Click to expand...
Click to collapse
Had to use the 2nd OTA.zip but I didn't really try any of the remove sim card stuff or waiting long. No unlockable bootloader either but I'm satisfied for the moment haha.

FYI: recovered G5 XT 1676 to stock and updated. :)

Just an FYI type thing that may save people a bit of digging around sometime.
I tried to get the update that just came out, but as i had TWRP as recovery, no good. Anyhow, in my trying i completely bollixed the phone. Would start, but always booted to TWRP and had various conniptions. Could not even get a TWRP backup to load. Strange not encountered before by me stuff............
Anyhow, recovered by the following method to stock and am back in business.
Boot into bootloader fastboot mode.
Extract .xml.zip format firmware file:
eg: CEDRIC_NPP25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
to a folder on c drive of the PC that has the ADB and fastboot files in it.
In command prompt cd\ to that directory.
fastboot flash the following in sequence.
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk1
fastboot flash system system.img_sparsechunk2
fastboot flash system system.img_sparsechunk3
fastboot flash system system.img_sparsechunk4
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
boots to stock .
Not my own work, adapted from this thread by t-bon3
https://forum.xda-developers.com/showthread.php?t=2542219
which I found thanks to eens post18 at this thread
https://forum.xda-developers.com/g5/how-to/npp25-137-33-stock-firmware-moto-g5-t3577084/page2
After this, Motorola system update installed. On Australian XT1676 is build number NPP25.137-15-7
Patch level 1-May-2017
Still get the I cant be trusted page on power up as have unlocked bootloader.
Many thanks to all at XDA, its a resource that can certainly get you into trouble, but then out of it again.
where do you get the stock firmware?
Think I worked out what I did wrong. Somehow, I changed the format of the data partition. Fat fingers at some point??
TWRP backups didn’t like that and would not mount or write to the data partition as it was not f2fs format that the backup had been made in??
Anyway, restored data from a TWRP backup after going to ....wipe…format data. All good.
That gave me the passcode lockout issue at next reboot which can deal with.
stock Firmware? http://www.filefactory.com/folder/c6cdedc45a775d27/?sort=created&order=DESC&show=25
for me stock the phone came with is: CEDRIC_NPP25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
Worked on my XT1676 dual sim, but CHECK if its appropriate for your model. There are files on that page that wont be and flashing some of their components (particularly bootloader), can i have read, be unrecoverable disastrous. Be warned.
Slow, but got it. At first i thought it was corrupt as TWRP wouldn't flash it. My gumby. The .xml.zips apparently need to be extracted and flashed file by file.
We're you able to revert to a locked bootloader after this, I am looking forward to do so
We're you able to revert to a locked bootloader after this, I am looking forward to do so
Click to expand...
Click to collapse
didnt try, didnt need to for taking take the update.
And, from my reading there is no way so far to relock the bootloader. I got it to stock, with stock recovery, and that was enough for me.
astmacca said:
didnt try, didnt need to for taking take the update.
And, from my reading there is no way so far to relock the bootloader. I got it to stock, with stock recovery, and that was enough for me.
Click to expand...
Click to collapse
I can confirm what you said, but I am asking because I am sick of the warning before the device starts
ap4ss3rby said:
I can confirm what you said, but I am asking because I am sick of the warning before the device starts
Click to expand...
Click to collapse
You can get rid of that easily
Put phone in fastboot mode
Download logo from link below
Enter the following in a windows command prompt where you have fastboot files & the logo file
Code:
fastboot.exe flash logo logo-g5-fix.bin
http://drive.google.com/file/d/0B-idWfPYugGvREJaR3B0UFIxUkU/view?usp=sharing
TheFixItMan said:
You can get rid of that easily
Put phone in fastboot mode
Download logo from link below
Enter the following in a windows command prompt where you have fastboot files & the logo file
Code:
fastboot.exe flash logo logo-g5-fix.bin
http://drive.google.com/file/d/0B-idWfPYugGvREJaR3B0UFIxUkU/view?usp=sharing
Click to expand...
Click to collapse
Thanks, but this is why I made a Google pixel themed logo.bin and used a matching boot animation to go with it some time earlier
downgrade
thanks for the guide
- can i use this method to downgrade to this version?
- can i do this without unlocking the bootloader
- if it goes wrong can i unlock the bootloader later (i have an unlock code)
- is there a reason why we don't flash sparsechunk.0 ?
thanks in advance
distclean said:
thanks for the guide
- can i use this method to downgrade to this version?
- can i do this without unlocking the bootloader
- if it goes wrong can i unlock the bootloader later (i have an unlock code)
- is there a reason why we don't flash sparsechunk.0 ?
thanks in advance
Click to expand...
Click to collapse
No you cannot downgrade (same firmware version or newer required)
Yes - unlocked bootloader not required
As long as your phone still goes into the bootloader
You should flash all sparsechunks in number order
Thanks a bunch,
So to be absolutely clear, my phone shipped with NPP25.137-15-7 i can't install the stock rom linked, and the same version isn't out yet,
if i unlock the bootloader, would i be able to downgrade ?
Is the software channel setting preserved across this method?
distclean said:
Thanks a bunch,
So to be absolutely clear, my phone shipped with NPP25.137-15-7 i can't install the stock rom linked, and the same version isn't out yet,
if i unlock the bootloader, would i be able to downgrade ?
Is the software channel setting preserved across this method?
Click to expand...
Click to collapse
You maybe able to - there are different variants of the same phone
As long as the firmware is the same or newer (as in the bootloader and API version) it may flash
It will either flash or error out
There's only one way to find out - if your phone is dead anyway it's not going to make alot of difference
No - generally you can never downgrade firmware - doing so would be dangerous and you may loose the bootloader for good
thanks again,
motoboot.img is the bootloader you talk about? is the partition layout described somewhere? would custom roms use a different one here?
do tell me by the way if i should get this information elsewhere/if i should read something to get started in the whole moto g world.
distclean said:
thanks again,
motoboot.img is the bootloader you talk about? is the partition layout described somewhere? would custom roms use a different one here?
do tell me by the way if i should get this information elsewhere/if i should read something to get started in the whole moto g world.
Click to expand...
Click to collapse
You can write in adb
Code:
adb shell
cat /proc
cat /proc/partitions
Hello,
Does anyone know where can I download the latest firmware for Moto G5 XT1676 baseband Version: m8937_ 8000.122.02.40 R
Thanks
astmacca said:
Boot into bootloader fastboot mode.
Extract .xml.zip format firmware file:
eg: CEDRIC_NPP25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
to a folder on c drive of the PC that has the ADB and fastboot files in it.
In command prompt cd\ to that directory.
fastboot flash the following in sequence.
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk1
fastboot flash system system.img_sparsechunk2
fastboot flash system system.img_sparsechunk3
fastboot flash system system.img_sparsechunk4
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
boots to stock .
Click to expand...
Click to collapse
You're partially right. These commands won't work for our files. You have to flash the firmware according to the instructions contained within the "flashfile.xml" file within the archive. For example we have no "motoboot" partition
I've flashed every stock package available now (4 I think) and haven't been offered an update once. I've ran a couple of custom ROMs but they're just not right in one way or another. Might be time to move on.
distclean said:
Thanks a bunch,
So to be absolutely clear, my phone shipped with NPP25.137-15-7 i can't install the stock rom linked, and the same version isn't out yet,
if i unlock the bootloader, would i be able to downgrade ?
Is the software channel setting preserved across this method?
Click to expand...
Click to collapse
I upgraded to this and since then can't downgrade the phone to the stock roms available online. From memory trying to flash gpt.bin gave a "Security version downgrade" error. So I wouldn't assume you'll be able to downgrade and until there is a copy of this particular firmware, you won't be able to flash back or relock the bootloader
astmacca said:
Think I worked out what I did wrong. Somehow, I changed the format of the data partition. Fat fingers at some point??
TWRP backups didn’t like that and would not mount or write to the data partition as it was not f2fs format that the backup had been made in??
Anyway, restored data from a TWRP backup after going to ....wipe…format data. All good.
That gave me the passcode lockout issue at next reboot which can deal with.
stock Firmware? http://www.filefactory.com/folder/c6cdedc45a775d27/?sort=created&order=DESC&show=25
for me stock the phone came with is: CEDRIC_NPP25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
Worked on my XT1676 dual sim, but CHECK if its appropriate for your model. There are files on that page that wont be and flashing some of their components (particularly bootloader), can i have read, be unrecoverable disastrous. Be warned.
Slow, but got it. At first i thought it was corrupt as TWRP wouldn't flash it. My gumby. The .xml.zips apparently need to be extracted and flashed file by file.
Click to expand...
Click to collapse
Is this ROM is good to my XT1676 Baseband: M8937_11.16.02.51R ?
astmacca said:
Think I worked out what I did wrong. Somehow, I changed the format of the data partition. Fat fingers at some point??
TWRP backups didn’t like that and would not mount or write to the data partition as it was not f2fs format that the backup had been made in??
Anyway, restored data from a TWRP backup after going to ....wipe…format data. All good.
That gave me the passcode lockout issue at next reboot which can deal with.
stock Firmware? http://www.filefactory.com/folder/c6cdedc45a775d27/?sort=created&order=DESC&show=25
for me stock the phone came with is: CEDRIC_NPP25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
Worked on my XT1676 dual sim, but CHECK if its appropriate for your model. There are files on that page that wont be and flashing some of their components (particularly bootloader), can i have read, be unrecoverable disastrous. Be warned.
Slow, but got it. At first i thought it was corrupt as TWRP wouldn't flash it. My gumby. The .xml.zips apparently need to be extracted and flashed file by file.
Click to expand...
Click to collapse
Hi, i own the same model of moto g5, i do this in fastboot window
fastboot erase userdata
now the phone only boot in twrp and show a message "failed to mount /data". i think that delete my userdata partition, how could i fix it?
once i can avoid this loop in twrp, i follow these steps to flash stock rom
thanks in advance
juan

[Guide] Relock Oreo bootloader, go back to stock ROM and get OTA

This method is only works, if you are in Oreo
unlocked bootloader, and use custom rom,
DISCLAIMER
Not taking responsibility if it goes wrong
We have found a way to get back to stock, and relock the bootloader! for now, it only works for the XT-1635-02 because we dont have a signed stock image for any other phone model.
you can use this on any software channel!
How it works.
YOU NEED TO BE ON A CUSTOM ROM TO RELOCK THE BOOTLOADER!
1 - Download Stock ROM in the first post down below
2 - install adb minimal fastboot
3 - after install adb minimal fastboot, go to the install location and paste all the files there
5 - Copy all commands how is in this site and past it on the cmd screen and wait. (you need to press enter for the last command)
Stock Oreo Signed ROM
If u are in June bootloader Kindly use June Security Patch rom, otherwise, phone should be Brick
June Security Patch
Commands
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
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash oem oem.img
fastboot erase carrier
fastboot erase cache
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear
fastboot oem lock
fastboot oem lock
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash boot boot.img
fastboot oem lock
Now youre phone will reboot, and your phone is locked again.
I'm using this ROM here:
[ROM][Stock+] [7.1.1] Dec. Patch NPNS26.118-22-2-12 Prerooted
https://forum.xda-developers.com/moto-z-play/development/rom-nov-patch-npns26-118-22-2-8-t3717037
Do I need to perform any procedures before starting this installation?
I think fast boot erase modemmst 1 & 2 may get a result of IMEI 0 error.
talktosam said:
DISCLAIMER
Not taking responsibility if it goes wrong
We have found a way to get back to stock, and relock the bootloader! for now, it only works for the XT-1635-02 because we dont have a signed stock image for any other phone model.
you can use this on any software channel!
Click to expand...
Click to collapse
talktosam said:
So how does this differ from the method below that was posted here months ago by someone else on doing the same thing? Looks like you copied and pasted....
https://forum.xda-developers.com/moto-z-play/how-to/guide-relock-bootloader-to-lasted-stock-t3718190
Click to expand...
Click to collapse
Jimi Mack said:
talktosam said:
DISCLAIMER
Not taking responsibility if it goes wrong
We have found a way to get back to stock, and relock the bootloader! for now, it only works for the XT-1635-02 because we dont have a signed stock image for any other phone model.
you can use this on any software channel!
Click to expand...
Click to collapse
talktosam said:
So how does this differ from the method below that was posted here months ago by someone else on doing the same thing? Looks like you copied and pasted....
Yes, text is copied, but rom is different Oreo... procedure is same...
https://forum.xda-developers.com/moto-z-play/how-to/guide-relock-bootloader-to-lasted-stock-t3718190
Click to expand...
Click to collapse
Click to expand...
Click to collapse
talktosam said:
Thanks for clearing that up. So the older was to fully restore to Nougat and yours it to restore to Oreo. So being I never updated to Oreo I should restore with the old file, as I am sure yours would cause issues being I never updated to Oreo. You should clearly document that in the thread as well and not just the Title as well if this is the case. Just because most people do not thoroughly read but skim quickly and then jump without looking.
Click to expand...
Click to collapse
Jimi Mack said:
talktosam said:
Thanks for clearing that up. So the older was to fully restore to Nougat and yours it to restore to Oreo. So being I never updated to Oreo I should restore with the old file, as I am sure yours would cause issues being I never updated to Oreo. You should clearly document that in the thread as well and not just the Title as well if this is the case. Just because most people do not thoroughly read but skim quickly and then jump without looking.
Click to expand...
Click to collapse
Yes, if you are in 0xC182 Oreo bootloader, in title i mentioned its works only if u are in oreo bootloader unlocked
Click to expand...
Click to collapse
Can I use this tutorial if I have 0xC114 bootloader (february patch)???
gercdgcat said:
Can I use this tutorial if I have 0xC114 bootloader (february patch)???
Click to expand...
Click to collapse
Yes, but u are in custom rom, u can,
I was in AOSP 8.1 with Oreo bootloader (I had stock oreo before installing the ROM) and just did this procedure, everything went fine ! IMEI is safe and system works as intended, thank you !
If I have the bootloader blocked and I want to update to OREO with your tutorial which commands would I have to skip?
Dude you are a lifesaver..
---------- Post added at 12:32 PM ---------- Previous post was at 12:30 PM ----------
Mario3DS said:
I was in AOSP 8.1 with Oreo bootloader (I had stock oreo before installing the ROM) and just did this procedure, everything went fine ! IMEI is safe and system works as intended, thank you !
Click to expand...
Click to collapse
I am in the exact same situation as you. I will give this a try and report
djdelarosa25 said:
Dude you are a lifesaver..
---------- Post added at 12:32 PM ---------- Previous post was at 12:30 PM ----------
I am in the exact same situation as you. I will give this a try and report
Click to expand...
Click to collapse
Just do exactly what OP says and everything will be fine, I even recovered my Software Channel (attmx) somehow
oh and btw, you can "fix" the navbar bug in stock Oreo changing the theme with Custom Navigation Bar (it's an app)
I just did it and it fixed it completely
Mario3DS said:
Just do exactly what OP says and everything will be fine, I even recovered my Software Channel (attmx) somehow
oh and btw, you can "fix" the navbar bug in stock Oreo changing the theme with Custom Navigation Bar (it's an app)
I just did it and it fixed it completely
Click to expand...
Click to collapse
Your software channel isn't supposed to change anyway
Safety net failed, help
CTS profile match only failed. Is it because of unlocked bootloader?
The bootloader unlocked screen doesn't seem to want to go away
EDIT: My bootloader is still unlocked.
EDIT: Fixed. It wasn't mentioned that you need to enable OEM unlocking in Developer options, noobs like me might get confused. Lucky I got that sorted out
djdelarosa25 said:
The bootloader unlocked screen doesn't seem to want to go away
EDIT: My bootloader is still unlocked.
EDIT: Fixed. It wasn't mentioned that you need to enable OEM unlocking in Developer options, noobs like me might get confused. Lucky I got that sorted out
Click to expand...
Click to collapse
So... Now are you in Oreo stock with locked bootloader? In boot image only shows motorola logo? Nothing of bad key or any notification?
gercdgcat said:
So... Now are you in Oreo stock with locked bootloader? In boot image only shows motorola logo? Nothing of bad key or any notification?
Click to expand...
Click to collapse
Yup, 100% stock. No more bootloader warning message. The guide did not mention that within the custom ROM that you are using, you must have OEM Unlocking under Developer options turned on before you flash the commands.
djdelarosa25 said:
Yup, 100% stock. No more bootloader warning message. The guide did not mention that within the custom ROM that you are using, you must have OEM Unlocking under Developer options turned on before you flash the commands.
Click to expand...
Click to collapse
I think OEM Unlocking only exists in the stock ROM. Regardless of whether you're on a stock ROM already or are flashing the stock ROM, as you mentioned, OEM unlocking must be turned on for the OEM locking commands to work.
Of course, with re-locking your bootloader, it's up to you if you wish to keep OEM Unlocking enabled or disabled afterwards. If you disable it, your device will not be unlockable until you boot into system, which can be more secure but if you have any boot issues, then troubleshooting is a lot more difficult, plus you have no warranty. If you leave OEM unlocking on, then you could unlock your bootloader, but then so can anyone else with physical access to your device.
echo92 said:
I think OEM Unlocking only exists in the stock ROM. Regardless of whether you're on a stock ROM already or are flashing the stock ROM, as you mentioned, OEM unlocking must be turned on for the OEM locking commands to work.
Of course, with re-locking your bootloader, it's up to you if you wish to keep OEM Unlocking enabled or disabled afterwards. If you disable it, your device will not be unlockable until you boot into system, which can be more secure but if you have any boot issues, then troubleshooting is a lot more difficult, plus you have no warranty. If you leave OEM unlocking on, then you could unlock your bootloader, but then so can anyone else with physical access to your device.
Click to expand...
Click to collapse
OEM unlocking also exists in custom ROMs. The reason that relocking your bootloader is not possible with the stock ROM is that the option is greyed out if you have your bootloader unlocked, thus making the bootloader lock commands not work. With a custom ROM, I was able to toggle OEM unlocking on, even when my bootloader was already unlocked. This allowed the bootloader lock commands to work and make the warning message disappear.

Categories

Resources