• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Flash official firmware Moto G5s Plus [sanders]

Search This thread

shu006

Senior Member
Jul 27, 2013
87
138
Kanpur
So far, we have had the guides for you to unlock the bootloader in Moto G5s Plus or how to install TWRP on Moto G5s Plus and today, I am going to show you how to download and Install stock ROM in Moto G5s Plus. So if you probably have already tried a custom ROM on the Moto G5s Plus, let me tell you how to revert to stock ROM in Moto G5s Plus and fix bootloop.

DISCLAIMER
I am not to be held responsible for any of the damage that occurs to your device during this process. You are yourself responsible for any damage done (if) to your device during this process.

REQUIREMENTS
  1. Make sure your device is charged above 80%.
  2. We recommend creating a backup of all your important files before beginning with this process.

HOW TO INSTALL STOCK ROM IN MOTO G5 PLUS:
  1. Download Moto G5s Plus Stock Firmware from below (in download section).
  2. Install Motorola Driver and ADB Fastboot Driver on your PC.
  3. Now extract stock firmware in ADB Fastboot folder.
  4. Now, turn off your device and boot into bootloader by pressing volume down button +power button simultaneously.
  5. Now, connect your device to your PC via a USB Cable.
  6. Open a command prompt window and type the following commands:

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 dsp adspso.bin
mfastboot oem fb_mode_set
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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot

Congrats, you have completed the process to Install stock ROM in Moto G5s Plus and successfully fixed the bootloop.

Downloads:

Extra Guides:

Appreciate my work?

It is a very hard task to upload 1.7GB over mobile data. Please consider making a donation If this guide helped you.
Paypal https://paypal.me/shubhmishra
 
Last edited:

kalpeshkpatil

New member
Sep 1, 2011
4
2
Image signed with key bad key

I am getting "bad key" errors for boot.img and recovery.img, can anyone help?

fastboot.exe flash boot boot.img
.
.
.
writing 'boot'...
(bootloader) Image signed with key bad key


fastboot.exe flash recovery recovery.img
.
.
.
writing 'recovery'...
(bootloader) Image signed with key bad key
 
  • Like
Reactions: Yogesh1434

kalpeshkpatil

New member
Sep 1, 2011
4
2
Do you downloaded with my link?

Yes...

---------- Post added at 05:47 PM ---------- Previous post was at 04:47 PM ----------

Do you downloaded with my link?

Did you try those flashing steps on your own device?

As per your instructions. need to flash till system.img_sparsechunk.7 but zip file does not contain system.img_sparsechunk.6 & system.img_sparsechunk.7


Dump of flashfile.xml

<?xml version="1.0" ?>
<flashing>
<header>
<phone_model model="sanders"/>
<software_version version="sanders-user 7.1.1 NPS26.116-26 30 release-keysM8953_24.34.07.35R"/>
<subsidy_lock_config MD5="d41d8cd98f00b204e9800998ecf8427e" name="slcf_rev_d_default_v1.0.nvm"/>
<regulatory_config SHA1="da39a3ee5e6b4b0d3255bfef95601890afd80709" name="regulatory_info_default.png"/>
<sparsing enabled="true" max-sparse-size="536870912"/>
<interfaces>
<interface name="AP"/>
</interfaces>
</header>
<steps interface="AP">
<step operation="getvar" var="max-sparse-size"/>
<step operation="oem" var="fb_mode_set"/>
<step MD5="4d30144384efd54e892d3a5d475da52d" filename="gpt.bin" operation="flash" partition="partition"/>
<step MD5="8c7298070396e989a461dbdc0ca55535" filename="bootloader.img" operation="flash" partition="bootloader"/>
<step MD5="6e51ab1b8ba45a8482fbd83d3fec0a25" filename="NON-HLOS.bin" operation="flash" partition="modem"/>
<step MD5="d355d3139959110c2c1e47eb3cba84e9" filename="fsg.mbn" operation="flash" partition="fsg"/>
<step operation="erase" partition="modemst1"/>
<step operation="erase" partition="modemst2"/>
<step MD5="c9b57ad201dab362d78be342dc4d940b" filename="adspso.bin" operation="flash" partition="dsp"/>
<step MD5="3b4dd09434646887c87f0de65575227b" filename="logo.bin" operation="flash" partition="logo"/>
<step MD5="69bd98642139af434b37ba7ee0a8f156" filename="boot.img" operation="flash" partition="boot"/>
<step MD5="2ec9770410c5d047bf84bd69eeb3bb58" filename="recovery.img" operation="flash" partition="recovery"/>
<step MD5="5b165bb32cdc0784c99c9a52695455f6" filename="system.img_sparsechunk.0" operation="flash" partition="system"/>
<step MD5="340cc3a6e0095ec7fa5aba191c72fea2" filename="system.img_sparsechunk.1" operation="flash" partition="system"/>
<step MD5="330f4d029d40a24253f154e824292af3" filename="system.img_sparsechunk.2" operation="flash" partition="system"/>
<step MD5="4158753c1704bf9b25f13659c7a02798" filename="system.img_sparsechunk.3" operation="flash" partition="system"/>
<step MD5="59a3df40240476f2b9398dfad30cb7d2" filename="system.img_sparsechunk.4" operation="flash" partition="system"/>
<step MD5="1cc5a89ea9c0f5b4be838c00906499a6" filename="system.img_sparsechunk.5" operation="flash" partition="system"/>
<step MD5="3f82aeba215c9c65347048a8d7b607fe" filename="oem.img" operation="flash" partition="oem"/>
<step operation="erase" partition="cache"/>
<step operation="erase" partition="userdata"/>
<step operation="erase" partition="DDR"/>
<step operation="oem" var="fb_mode_clear"/>
</steps>
</flashing>
 
  • Like
Reactions: shu006

shu006

Senior Member
Jul 27, 2013
87
138
Kanpur
Yes...

---------- Post added at 05:47 PM ---------- Previous post was at 04:47 PM ----------



Did you try those flashing steps on your own device?

As per your instructions. need to flash till system.img_sparsechunk.7 but zip file does not contain system.img_sparsechunk.6 & system.img_sparsechunk.7


Dump of flashfile.xml

<?xml version="1.0" ?>
<flashing>
<header>
<phone_model model="sanders"/>
<software_version version="sanders-user 7.1.1 NPS26.116-26 30 release-keysM8953_24.34.07.35R"/>
<subsidy_lock_config MD5="d41d8cd98f00b204e9800998ecf8427e" name="slcf_rev_d_default_v1.0.nvm"/>
<regulatory_config SHA1="da39a3ee5e6b4b0d3255bfef95601890afd80709" name="regulatory_info_default.png"/>
<sparsing enabled="true" max-sparse-size="536870912"/>
<interfaces>
<interface name="AP"/>
</interfaces>
</header>
<steps interface="AP">
<step operation="getvar" var="max-sparse-size"/>
<step operation="oem" var="fb_mode_set"/>
<step MD5="4d30144384efd54e892d3a5d475da52d" filename="gpt.bin" operation="flash" partition="partition"/>
<step MD5="8c7298070396e989a461dbdc0ca55535" filename="bootloader.img" operation="flash" partition="bootloader"/>
<step MD5="6e51ab1b8ba45a8482fbd83d3fec0a25" filename="NON-HLOS.bin" operation="flash" partition="modem"/>
<step MD5="d355d3139959110c2c1e47eb3cba84e9" filename="fsg.mbn" operation="flash" partition="fsg"/>
<step operation="erase" partition="modemst1"/>
<step operation="erase" partition="modemst2"/>
<step MD5="c9b57ad201dab362d78be342dc4d940b" filename="adspso.bin" operation="flash" partition="dsp"/>
<step MD5="3b4dd09434646887c87f0de65575227b" filename="logo.bin" operation="flash" partition="logo"/>
<step MD5="69bd98642139af434b37ba7ee0a8f156" filename="boot.img" operation="flash" partition="boot"/>
<step MD5="2ec9770410c5d047bf84bd69eeb3bb58" filename="recovery.img" operation="flash" partition="recovery"/>
<step MD5="5b165bb32cdc0784c99c9a52695455f6" filename="system.img_sparsechunk.0" operation="flash" partition="system"/>
<step MD5="340cc3a6e0095ec7fa5aba191c72fea2" filename="system.img_sparsechunk.1" operation="flash" partition="system"/>
<step MD5="330f4d029d40a24253f154e824292af3" filename="system.img_sparsechunk.2" operation="flash" partition="system"/>
<step MD5="4158753c1704bf9b25f13659c7a02798" filename="system.img_sparsechunk.3" operation="flash" partition="system"/>
<step MD5="59a3df40240476f2b9398dfad30cb7d2" filename="system.img_sparsechunk.4" operation="flash" partition="system"/>
<step MD5="1cc5a89ea9c0f5b4be838c00906499a6" filename="system.img_sparsechunk.5" operation="flash" partition="system"/>
<step MD5="3f82aeba215c9c65347048a8d7b607fe" filename="oem.img" operation="flash" partition="oem"/>
<step operation="erase" partition="cache"/>
<step operation="erase" partition="userdata"/>
<step operation="erase" partition="DDR"/>
<step operation="oem" var="fb_mode_clear"/>
</steps>
</flashing>

Thank you for correcting me. fixed. :):)
 

TwoPointZero

Senior Member
Apr 15, 2012
64
38
Hi there,
Which device is this image valid for?

Versions: XT1803 (Europe); XT1805 (Europe, Dual SIM); XT1806 (USA); XT1804 (India); XT1802 (Brazil)
 

Sachi315

Senior Member
Sep 23, 2013
122
48
OnePlus 8T
I have been using this .bat i made following the servicefile.xml order

if your way is better i will use it, but i followed the order in the servicefile.xml the issue i have been running into is that my bootloader is unlocked but any bootloader command such as fastboot erase system -w comes back with a bootloader denied which i dont understand. Also when flashing my bootloader and recovery are saying signed with bad key. Im gonna try your stock rom and see if it makes a difference. I hope i dont have to lock and relock again to fix this that would be annoying.

echo off
mfastboot getvar max-sparse-size
mfastboot oem fb_mode_set
mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img
mfastboot flash modem NON-HLOS.bin
mfastboot flash fsg fsg.mbn
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash dsp adspso.bin
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash oem oem.img
mfastboot erase DDR
mfastboot erase cache
mfastboot erase userdata
mfastboot erase customize
mfastboot erase clogo
mfastboot oem fb_mode_clear
pause
mfastboot reboot
exit
 

Sachi315

Senior Member
Sep 23, 2013
122
48
OnePlus 8T
i followed the servicefile.xml order is this alright?

Thank you for correcting me. fixed. :):)

I have been using this .bat i made following the servicefile.xml order
if your way is better i will use it, but i followed the order in the servicefile.xml the issue i have been running into is that my bootloader is unlocked but any bootloader command such as fastboot erase system -w comes back with a bootloader denied which i dont understand. Also when flashing my bootloader and recovery are saying signed with bad key. Im gonna try your stock rom and see if it makes a difference. I hope i dont have to lock and relock again to fix this that would be annoying.

echo off
mfastboot getvar max-sparse-size
mfastboot oem fb_mode_set
mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img
mfastboot flash modem NON-HLOS.bin
mfastboot flash fsg fsg.mbn
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash dsp adspso.bin
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash oem oem.img
mfastboot erase DDR
mfastboot erase cache
mfastboot erase userdata
mfastboot erase customize
mfastboot erase clogo
mfastboot oem fb_mode_clear
pause
mfastboot reboot
exit
 

Schrotty35

Senior Member
Oct 30, 2010
4,407
616
Vienna
I get this error:

(bootloader) Permission denied
FAILED (remote failure)
finished. total time: 0.007s
erasing 'clogo'...
(bootloader) Permission denied
FAILED (remote failure)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    So far, we have had the guides for you to unlock the bootloader in Moto G5s Plus or how to install TWRP on Moto G5s Plus and today, I am going to show you how to download and Install stock ROM in Moto G5s Plus. So if you probably have already tried a custom ROM on the Moto G5s Plus, let me tell you how to revert to stock ROM in Moto G5s Plus and fix bootloop.

    DISCLAIMER
    I am not to be held responsible for any of the damage that occurs to your device during this process. You are yourself responsible for any damage done (if) to your device during this process.

    REQUIREMENTS
    1. Make sure your device is charged above 80%.
    2. We recommend creating a backup of all your important files before beginning with this process.

    HOW TO INSTALL STOCK ROM IN MOTO G5 PLUS:
    1. Download Moto G5s Plus Stock Firmware from below (in download section).
    2. Install Motorola Driver and ADB Fastboot Driver on your PC.
    3. Now extract stock firmware in ADB Fastboot folder.
    4. Now, turn off your device and boot into bootloader by pressing volume down button +power button simultaneously.
    5. Now, connect your device to your PC via a USB Cable.
    6. Open a command prompt window and type the following commands:

    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 dsp adspso.bin
    mfastboot oem fb_mode_set
    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 modem NON-HLOS.bin
    fastboot erase modemst1
    fastboot erase modemst2
    fastboot flash fsg fsg.mbn
    fastboot erase cache
    fastboot erase userdata
    fastboot erase customize
    fastboot erase clogo
    fastboot oem fb_mode_clear
    fastboot reboot

    Congrats, you have completed the process to Install stock ROM in Moto G5s Plus and successfully fixed the bootloop.

    Downloads:

    Extra Guides:

    Appreciate my work?

    It is a very hard task to upload 1.7GB over mobile data. Please consider making a donation If this guide helped you.
    Paypal https://paypal.me/shubhmishra
    9
    The version posted in the OP is outdated, current version is NPS26.116-45. I posted this US Retail version here:
    https://mega.nz/#!lOB20ZiY!NIwJdF5w-9rNGtZKEALqZvewagcTu5Z1cr7bbBeAnYA

    Note that also the flash sequence in the OP is incorrect. There are commands for erasing partitions that do not even exist on this phone, and command for erasing one that should be erased is missing. Checking the servicefile.xml in the firmware the sequence is:
    Code:
    mfastboot getvar max-sparse-size
    mfastboot oem fb_mode_set
    mfastboot flash partition gpt.bin
    mfastboot flash bootloader bootloader.img
    mfastboot flash modem NON-HLOS.bin
    mfastboot flash fsg fsg.mbn
    mfastboot erase modemst1
    mfastboot erase modemst2
    mfastboot flash dsp adspso.bin
    mfastboot flash logo logo.bin
    mfastboot flash boot boot.img
    mfastboot flash recovery recovery.img
    mfastboot flash system system.img_sparsechunk.0
    mfastboot flash system system.img_sparsechunk.1
    mfastboot flash system system.img_sparsechunk.2
    mfastboot flash system system.img_sparsechunk.3
    mfastboot flash system system.img_sparsechunk.4
    mfastboot flash system system.img_sparsechunk.5
    mfastboot flash oem oem.img
    mfastboot erase DDR
    mfastboot erase cache
    mfastboot erase userdata
    mfastboot oem fb_mode_clear
    mfastboot reboot

    I actually own this device and flashed this firmware on my own 64 GB XT1806 and it works great.
    3
    Please can anyone make twrp flashable latest firmware for X1804?
    I'm currently on a custom rom and didnt take a backup! :(
    You can take firmware from firmware.center site and flash it, then update in official way.

    Sent from Moto G (5S) Plus via Tapatalk
    3
    Will it relock the bootloader ?

    Use this command after flashing stock rom
    fastboot oem lock
    3
    Seriously, what's wrong with everyone. A little info pops up about Oreo and folks ignorantly interpret that as an immediate rollout.
    Then a bunch of "anyone get it yet?" posts.
    That article posted above says nothing really and the author didn't even get Oreo. Waste of an article.

    Funny, and sad, how easy it is.


    Moto G5S Plus XT1806, AOSiP 8.1 ROM, microG (NoGapps), MultiROM, Tapatalk 4.9.5

    Come on now, it gives them one more thing to complain about ;). If they didn't have things to complain about they would all just run around thoroughly confused and dazed. Besides that, you think it's bad now wait until oreo gets here. Let the complaining begin.