[GUIDE] How to restore stock firmware

Search This thread

Repepino

New member
Nov 4, 2017
1
0
I have this issue :(

PS C:\Users\paco_\Desktop\Moto z rom> fastboot flash partition gpt.bin
target reported max download size of 536870912 bytes
sending 'partition' (142 KB)...
OKAY [ 0.008s]
writing 'partition'...
(bootloader) Validating 'gpt.default.xml'
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'gpt.default.xml'
FAILED (remote failure)
finished. total time: 0.178s
PS C:\Users\paco_\Desktop\Moto z rom>

Can you help me? pls
 

techlogik

Senior Member
Aug 23, 2006
1,853
306
Coworker had the buttons stop working on the phone. ADB reboot, phone went to bootloader, buttons still didn't work.

Now, fastboot devices waiting for device screen. No commands work. Think phone just is toast. Told her to take it back to the store and see what they say, phone must be toast if fastboot and buttons won't work.

Then, after disconnecting from the bootloader/usb cable, phone just shut off. Plug the phone in, shows charging symbol..but buttons still don't work. Guess it is dead.
 

KOOLjeet

Member
Oct 10, 2012
15
1
I tried restoring using your guide.

restored from 8.1 to 7.1.1, successfully
everything worked
but i lost the signals i.e IMEI is 0 now

I have TWRP backup of my 8.1 official system, restoring the backup solves my problem.

please help, how to restore without losing IMEI no. , should I skip flashing any file from the stock firmware through ADB.
 

tag68

Senior Member
Nov 25, 2014
963
358
Moto G 2014
Moto X Play
...
please help, how to restore without losing IMEI no. ,
I have no idea how to revert the changes Oreo does to the efs partition. Maybe restoring a backup of the efs partition you did before installing Oreo the first time would help. But I can give you a warning: The things you try have a high risk of causing hard brick. I hope you are aware of that danger?
 

KOOLjeet

Member
Oct 10, 2012
15
1
I have no idea how to revert the changes Oreo does to the efs partition. Maybe restoring a backup of the efs partition you did before installing Oreo the first time would help. But I can give you a warning: The things you try have a high risk of causing hard brick. I hope you are aware of that danger?

I dont know what danger you are awaring about here? please elaborate what could possibly go wrong, beacause restroing the backup solves all the problems.
I read somewhere that i should skip executing the following commands, this will not alter my IMEI data, maybe i should give it a try. Do you have any idea about it?

fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot erase carrier
 

tag68

Senior Member
Nov 25, 2014
963
358
Moto G 2014
Moto X Play
I dont know what danger you are awaring about here? please elaborate what could possibly go wrong, beacause restroing the backup solves all the problems.
In case of hard brick it is impossible to flash. How do you want to restore the backup if you are not able to run twrp? Just have a look at the corresponding threads about hard brick, Oreo versus Nougat etc.
I read somewhere that i should skip executing the following commands, this will not alter my IMEI data, ...
Why do you think that should help?

In regards to this question my advice is that you wait with flashing until you learned more about the basics of Android. But better flash than doing OTA. Be glad while your mobile is working fine.

Your IMEI data has Oreo structure. Nougat won't be able to read it. I doubt there is a way back. That's the hard brick risk: if the installer of Oreo bootloader tries to convert efs (which contains IMEI) again and is not aware that it already has Oreo structure, you will probably get a hard brick.
 

KOOLjeet

Member
Oct 10, 2012
15
1
In regards to this question my advice is that you wait with flashing until you learned more about the basics of Android. But better flash than doing OTA. Be glad while your mobile is working fine.

Your IMEI data has Oreo structure. Nougat won't be able to read it. I doubt there is a way back. That's the hard brick risk: if the installer of Oreo bootloader tries to convert efs (which contains IMEI) again and is not aware that it already has Oreo structure, you will probably get a hard brick.

so is there any way around to restore to nougat without losing IMEI.
 

bryanisimo

New member
May 18, 2010
1
0
Worked!

I try it with a Moto Z2 Play just downloading "albus" version, I just uploaded to Android 8.0, thank you so much!
 

silgreyn

New member
Nov 7, 2018
1
0
Hi, i have a Moto Z, each time i want to send the commands via adb, i get the feedback from the phone that '' installation aborted'' I am trying to flash the stock rom. After a number of research, i came to see that there is rooting process on the other hand, but there am not ready to brick the phone. The bootloader is unlocked already and the usb debugging is turned on.

Now my question is; is there any way to deal with that ''installation aborted'' apart from rooting the phone?
Is it a must that i need to root the phone to flash stock room, of course not to overlook the ''installation aborted issue?
Help please.
 

tag68

Senior Member
Nov 25, 2014
963
358
Moto G 2014
Moto X Play
Is it a must that i need to root the phone to flash stock room, of course not to overlook the ''installation aborted issue?
It seems you do not understand what root means. Root is the possibility to execute "su" to get extended rights (log in as superuser). This means you have a ROM installed. If your ROM is not working, it is not possible to successfully root the phone.

Which part of the installation aborts? Which action fails? Where did you get the ROM from? Is it fine? Do you know of any hardware problems your phone has? Is your device recognized via USB cable, or is the installation aborted because no device is recognized?

The Moto Z has (like some similar Motos) a higher probability of getting bricked than other devices: if you downgrade the ROM to an earlier version, where the bootloader does not (fully, correctly) gets downgraded and the next try to update will cause the brick. Try to root usually is not that dangerous even if it fails - while a successful flash of ROM can cause a brick after OTA. According to your questions, you may want to look if you can ask some friend who has more knowledge about computer and Android to help you.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    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
    5
    In NOUGAT your script flash MM brick phone

    Remove

    fastboot flash partition gpt.bin
    fastboot flash bootloader bootloader.img

    Donwgrade Bootloader Brick Phone
    2
    In the future... when you receive a "new" OTA you may brick your phone... (ghost user experience)
    Original Moto X, had one and loved it and yes lots of bricks.
    1
    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
    1
    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.