How to Install Stock ROM on Moto G5S XT1791 (Firmware Guide)

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.

How to Install Stock ROM on Moto G5S XT1791 (Firmware Guide)

Motorola XT1791 Firmware Flash Files:

Flash File Name: OPPS28.65-37-7-11
Model: XT1791
Android Version: 8.1 Oreo

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.



GetDroidTips will not be held responsible for any kind of hardware or software damage to your device by following this guide. Proceed at your own risk

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.

bootloader mode

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.

device rescue Motorola Rescue and Smart Assistant Tool

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

Step 4. Flashing Guide:

  1. The next step is to open the command window and go to the adb folder Open Command Window here
  2. 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
  3. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.