Want to install the stock firmware on your Motorola Moto G5S? then you are in the right place. In this guide, we will help you in installing the official stock firmware on Moto G5S (codenamed montana) variant XT1791. Stock firmware comes in handy when you mess up your device to root it or install a mod or custom ROM. To be on the safe side, we always ask our users to download the official firmware on their PC and save it.

By installing firmware flash file on Moto G5S XT1791, you can unbrick, restore, fix any software related issue, downgrade or upgrade, resolve any bugs or lag on your device. To install the Moto G5S XT1791 firmware, you need the ADB and Fastboot tool on your computer.

Motorola XT1791 Firmware Flash Files:

Steps to Install Motorola XT1791 Firmware Flash File

If you have downloaded the firmware, then follow this guide to flash the stock firmware manually on your Motorola G5S XT1791. Make sure to follow the steps carefully.

Pre-Requirements:

  • This ROM is supported for the Motorola XT1791 (montana) variant only.
  • Make sure that your device should be charged at least 50% or higher.
  • You will require a PC or Laptop with a USB Data Cable.
  • We always recommend our readers take a full data backup of the device for safety purposes.
  • Install Motorola USB Drivers and Rescue and Smart Assistant Tool on your PC
  • To flash, you must download the ADB and Fastboot tool

Firmware Installation Guide:

Check out the firmware flashing guide below for the Motorola G5S XT1791. First, make sure to install or extract the adb and fastboot tool on your PC. Now enter the bootloader on your device.

Disclaimer:

Step 1. Bootloader Mode

Enter bootloader mode on your phone. To boot first, turn your phone off. Once your device turned off completely, press and hold volume down, and turn it on. You should see the bootloader screen.

Step 2. Connect Your Device to PC:

After booting your Motorola G5S into bootloader mode, now connect it to the PC using the USB Cable.

Step 3. Download Stock ROM/Firmware:

To get the full ROM, you can use the LMSA or Rescue and Smart Assistant Tool. Download the zip file and copy it to somewhere on your PC. LMSA tool will unzip the file and will remove the zip file you downloaded.

You can also download the full stock ROM from the above download flash file section on this guide.

Step 4. Flashing Guide:

  • The next step is to open the command window and go to the adb folder
  • Enter the following command to flash the firmware.
  • 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 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 cache
  • mfastboot erase userdata
  • mfastboot erase DDR
  • mfastboot oem fb_mode_clear
  • mfastboot reboot
  • Now your device will reboot into bootloader with the firmware you installed.

That’s it, guys. We hope this guide was helpful to you. Feel free to ask in the comment below for additional queries.

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 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 cache mfastboot erase userdata mfastboot erase DDR mfastboot oem fb_mode_clear mfastboot reboot