[ROM][8.1][STOCK][MONTANA] Android 8.1.0 Oreo - Stock Firmware (Fastboot & TWRP)

Search This thread

b33taurus

New member
Mar 25, 2014
4
0
Hello. I installed OREO 8.1 on MOTO 1799-22. The front camera and NSF do not work. No one will tell you the solution? Thank you friends.

Did you flashed complete rom with bootloader command? Its obvious because witout flashing bootloder you would not be in this situation. Actually I flashed wrong rom on my xt1799-2 and now screen dont turn on but detecting in Fastboot mode. Cannot flash original bootloder due to lower version. So can I flash that 8.1 rom as it has higjer version of bootloader. My only concern is that will my phone turn on after complete flashing of this rom??
 

rocky57

Member
Aug 20, 2009
12
0
Hi, unfortunately, I have removed my IMEI (I should read a guide before - I was thinking that everything is easy as it was with older phones). Additional issues are that I don't know why Baseband is unknown. I was coming back from Pixel to Stock 8.1, I tried to return to Pixel 9.0 but it didn't help. Currently, both IMEIs are equal to 0 and baseband in the unknown. Guys, any ideas on how and if I can fix this, or I will have a phone without phone functionality? fastboot getvar all returns correct IMEI. I have XT1794 from PLAYPL, I moved from Play rom to Pixel 9.0 official, and then wanted to do downgrade, then troubles started ... and of course - I don't have EFS partition backup.
 
Last edited:

iChronox

Member
Feb 29, 2016
25
3
Hi, unfortunately, I have removed my IMEI (I should read a guide before - I was thinking that everything is easy as it was with older phones). Additional issues are that I don't know why Baseband is unknown. I was coming back from Pixel to Stock 8.1, I tried to return to Pixel 9.0 but it didn't help. Currently, both IMEIs are equal to 0 and baseband in the unknown. Guys, any ideas on how and if I can fix this, or I will have a phone without phone functionality? fastboot getvar all returns correct IMEI. I have XT1794 from PLAYPL, I moved from Play rom to Pixel 9.0 official, and then wanted to do downgrade, then troubles started ... and of course - I don't have EFS partition backup.

Hi, I had this same issue. (on my case caused by flashing "fingerprint sensor fix" on TWRP). (I'm also on Pixel Experience after fixing it).

To fix try the following

1. Flash stock recovery via fastboot (NOT TWRP) , and then boot and update via OTA (wifi) until no more updates shows up. (You will LOSE ALL DATA, MAKE A BACKUP BEFORE).

This worked for my XT1791, good luck!
 

hjbuzzi

Member
Jul 10, 2017
29
10
Samsung Galaxy S20 FE
I am also having a hard time trying to go back to Stock after installing Pixel Experience ROM. The guides in this thread were not helpful to restore my Moto G5S XT1792 back to stock.
I need to say that I had no problems with my IMEIs because I used TWRP to make a full backup right after unlocking the bootloader, therefore when I "lost" my IMEIs I just flashed the correct module manually (do not remember the name of the module right now).

After failing to restore stock ROM as indicated in this thread, I found a Lenovo software that was able to flash the stock ROM again without using TWRP. It automatically downloaded the correct ROM and flashed it.
The software is LENOVO MOTO SMART ASSISTANT
https://support.lenovo.com/br/en/downloads/ds101291

After flashing stock ROM using Lenovo Smart Assistant I was back to the latest stock ROM 8.1.
The issues I have so far are:
- the message about phone being rooted still appears when turning the phone on.
- I cannot make any calls to emergency numbers. It dials the number (police, ambulance, etc) and it drops the call immediately

EDIT: obviously there is a thread about Lenovo Smart Assistant here in XDA:
https://forum.xda-developers.com/general/general/update-moto-lenovo-moto-smart-assistant-t3951714
 
Last edited:

smbfission

Member
Apr 12, 2020
17
0

Code:
#include "std_disclaimer.h"

/*
 * Your warranty is now void... Well, probably not.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 * A lot.
 *
 * Tl;dr: if your device crashes and burns, I'm sorry, but I'm not to be blamed.
 */

Hey guys.

This is a guide on how to install official Android 8.1.0 "Oreo" on our beloved, forgotten, poor Moto G5s (montana). As you all may know, Lenovorola still hasn't released Oreo for everyone worldwide. Only a few Latin American countries are receiving the update, with Brazil due to receive it Soon™, since we've already received the August security patch (still Nougat though :/).
Update 2018.09.29: Brazil and India have also started receiving Oreo, but with a different build (OPP28.65-37-2).
However, this is Lenovorola we're dealing with, so I went ahead, captured the OTA and created a TWRP flashable zip, by patching the June firmware (NPPS26.102-49-11) with said OTA. And also, there's the standard .xml.zip to be used with fastboot, directly from Moto.
For those of you who want to keep everything stock, locked bootloader and all, I recommend going with the fastboot zip. For those who already have unlocked their phone's bootloaders and have TWRP installed, or are coming from a custom ROM but don't want to fiddle around with fastboot, you should use the TWRP flashable zip.

I can't stress this enough. ALWAYS BACK UP YOUR STUFF!!!! Do a TWRP backup (data, system, boot). I recommend backing up the contents of your internal storage as well. And for those willing to downgrade at some point, back up your persist and efs partitions, otherwise you'll lose IMEI!

Oh, and I assume you already have adb, fastboot and the Motorola USB drivers installed. In case you don't...
Motorola USB Drivers
Android SDK Platform Tools (includes adb & fastboot)
If you use Linux, you don't need to install any drivers, but you may have to configure udev to allow fastboot to detect your device. But that, along with telling how to configure adb and fastboot, is beyond the scope of this thread.
I don't know how things work in the Apple side, so kindly don't ask me how to do that on macOS.

This firmware should work on all Moto G5s models (XT1791/2/3/4/5/7). I can't tell if it works on model XT1799-2 (aka Green Pomelo / Qingyou).

A few warnings:
1. Forced encryption has not been disabled. So, if your phone is not encrypted, it will be encrypted again upon the very first boot. Don't interrupt the process, otherwise you'll lose ALL of your data! (You can flash @Zackptg5's dm-verity / forced encryption disabler if you want to)
2. Xposed doesn't work, whether it's installed to /system or via Magisk (systemless). I've already opened an issue on GitHub and am awaiting a reply.
3. (Fastboot only) Updating to this firmware will also update your bootloader and partition table. If you're unsure about that and/or afraid of a possible hard brick, skip the gpt and bootloader lines.
4. Please install the proper build for your software channel. For retbr and retin, use OPP28.65-37-2. For the other channels, go with OPP28.65-37.
5. If your phone's software channel is retbr or retin and you have already flashed the -37 build, you can simply dirty flash the -37-2 build over it. No need to factory reset / fastboot erase userdata.

With that out of the way, let's get to what matters most.



Installation Guide:


Thanks to:
@NZedPred for the excellent tutorial on how to build flashable zips based on stock firmware and/or OTAs
@Cesarcami53 for telling us that the update was out for retla
@erfanoabdi for his Motorola OTA Link Generator and IMG Patch Tools
@lohanbarth for mirroring the fastboot zips to AFH / Mega
In case I forgot someone, please do let me know.

flashable zip is gone
 

Sonnenstuhl

Member
Jan 19, 2019
6
4
"4. Please install the proper build for your software channel. For retbr and retin, use OPP28.65-37-2. For the other channels, go with OPP28.65-37"

My phone used to be on channel reteu. What version am I supposed to use - because as "other channels" only retla is shown. Retla seems to stand for "Retail Latin America". So I can choose between Brazil/India or Latin America. Not close to EU... :confused: Will it update properly anyway? I want to be able to use the current LineageOS 17.1 rom so I need Oreo firmware.
 

drgonzo1881

Member
Nov 2, 2014
33
15
"4. Please install the proper build for your software channel. For retbr and retin, use OPP28.65-37-2. For the other channels, go with OPP28.65-37"

My phone used to be on channel reteu. What version am I supposed to use - because as "other channels" only retla is shown. Retla seems to stand for "Retail Latin America". So I can choose between Brazil/India or Latin America. Not close to EU... :confused: Will it update properly anyway? I want to be able to use the current LineageOS 17.1 rom so I need Oreo firmware.

Hi,
i flashed the needed parts from this with fastboot:
https://mirrors.lolinet.com/firmware/moto/montana/official/RETEU/
and LOS 17.1 works perfect (look in this thread, the very last post for the parts and in the thread for flashing stock roms)
 

pepoxxx

Member
Mar 15, 2014
14
0
please guys can u help me_i have a moto g5s with lcd remplacement, dont work touchscreen with android 8, i downgrade to android 7.1.1 touch work well but not signal, imei and baseband ok, please need recover signal with android 7
 

memetix

Senior Member
Nov 24, 2013
55
1
Thanks for this - i came from LOS 14.1, TWRP flashed this using the latest TWRP v3.4.0-1 and everything seems to be working perfectly. I then tried to flash recovery but i keep getting:

d:\Android\mfastboot-v2>fastboot flash recovery twrp-montana-3.2.3-r1.img
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:recovery: not found
target reported max download size of 536870912 bytes
sending 'recovery' (15914 KB)...
OKAY [ 0.531s]
writing 'recovery'...
(bootloader) Image not signed or corrupt
OKAY [ 0.170s]
finished. total time: 0.711s

I also tried the latest TWRP - v3.4.0-1 and get the same. I can fastboot boot both of these images but cant write them to the phone either via fastboot or from within the recovery. When I try to boot into recovery from the BL i get the sick android picture with "no command". I'm still on the old bootloader BC.06 maybe this is the reason? In the settings menu it says the bootloader is unlocked and also when I boot into the bootloader it says its unlocked so I dont think the BL has been relocked.
How can I get back a recovery and root? I want to get onto LOS 15, 16 or 17...Should I try the fastboot method to load this ROM and the new bootloader?
Thanks.

UPDATE: I fixed this by following this guide https://www.androidinfotech.com/root-moto-g5s-plus-oreo/. For some reason changing the file name of the recovery image to "recovery.img" seemed to work.
 
Last edited:

PeriaXZ1

New member
Feb 4, 2021
2
1
TWRP Flashable ZIP -Google Drive) link doesnt work anymore !!!!!
Please update the link, we cant proceed without it.
TWRP Flashable ZIP (Google Drive)
1612427603782.png

 
  • Like
Reactions: quantum_espresso

Top Liked Posts

  • There are no posts matching your filters.
  • 32

    Code:
    #include "std_disclaimer.h"
    
    /*
     * Your warranty is now void... Well, probably not.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     * A lot.
     *
     * Tl;dr: if your device crashes and burns, I'm sorry, but I'm not to be blamed.
     */

    Hey guys.

    This is a guide on how to install official Android 8.1.0 "Oreo" on our beloved, forgotten, poor Moto G5s (montana). As you all may know, Lenovorola still hasn't released Oreo for everyone worldwide. Only a few Latin American countries are receiving the update, with Brazil due to receive it Soon™, since we've already received the August security patch (still Nougat though :/).
    Update 2018.09.29: Brazil and India have also started receiving Oreo, but with a different build (OPP28.65-37-2).
    However, this is Lenovorola we're dealing with, so I went ahead, captured the OTA and created a TWRP flashable zip, by patching the June firmware (NPPS26.102-49-11) with said OTA. And also, there's the standard .xml.zip to be used with fastboot, directly from Moto.
    For those of you who want to keep everything stock, locked bootloader and all, I recommend going with the fastboot zip. For those who already have unlocked their phone's bootloaders and have TWRP installed, or are coming from a custom ROM but don't want to fiddle around with fastboot, you should use the TWRP flashable zip.

    I can't stress this enough. ALWAYS BACK UP YOUR STUFF!!!! Do a TWRP backup (data, system, boot). I recommend backing up the contents of your internal storage as well. And for those willing to downgrade at some point, back up your persist and efs partitions, otherwise you'll lose IMEI!

    Oh, and I assume you already have adb, fastboot and the Motorola USB drivers installed. In case you don't...
    Motorola USB Drivers
    Android SDK Platform Tools (includes adb & fastboot)
    If you use Linux, you don't need to install any drivers, but you may have to configure udev to allow fastboot to detect your device. But that, along with telling how to configure adb and fastboot, is beyond the scope of this thread.
    I don't know how things work in the Apple side, so kindly don't ask me how to do that on macOS.

    This firmware should work on all Moto G5s models (XT1791/2/3/4/5/7). I can't tell if it works on model XT1799-2 (aka Green Pomelo / Qingyou).

    A few warnings:
    1. Forced encryption has not been disabled. So, if your phone is not encrypted, it will be encrypted again upon the very first boot. Don't interrupt the process, otherwise you'll lose ALL of your data! (You can flash @Zackptg5's dm-verity / forced encryption disabler if you want to)
    2. Xposed doesn't work, whether it's installed to /system or via Magisk (systemless). I've already opened an issue on GitHub and am awaiting a reply.
    3. (Fastboot only) Updating to this firmware will also update your bootloader and partition table. If you're unsure about that and/or afraid of a possible hard brick, skip the gpt and bootloader lines.
    4. Please install the proper build for your software channel. For retbr and retin, use OPP28.65-37-2. For the other channels, go with OPP28.65-37.
    5. If your phone's software channel is retbr or retin and you have already flashed the -37 build, you can simply dirty flash the -37-2 build over it. No need to factory reset / fastboot erase userdata.

    With that out of the way, let's get to what matters most.


    Installation Guide:
    Fastboot ZIP:
    1. Download (obviously)
    2. Extract the contents to a folder of your choice
    3. Go to the folder which you extracted the files to
    3. Inside the folder, open a command prompt, PowerShell, terminal or whatever you use as a command line interface
    4. Put your device into fastboot mode if you haven't already done that (just hold Vol Down + Power for a while) and connect it to your PC
    5. Execute the following commands:
    Code:
    fastboot oem fb_mode_set
    fastboot flash partition gpt.bin
    fastboot flash bootloader bootloader.img
    fastboot flash boot boot.img
    fastboot flash recovery recovery.img
    fastboot flash dsp adspso.bin
    fastboot flash logo logo.bin
    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 modem NON-HLOS.bin
    fastboot erase modemst1
    fastboot erase modemst2
    fastboot flash fsg fsg.mbn
    fastboot erase cache
    fastboot erase userdata
    fastboot erase DDR
    fastboot oem fb_mode_clear
    reboot
    6. Have fun
    TWRP Flashable ZIP:
    1. Download (duh)
    2. Put the file at the root of your internal storage (/sdcard)
    3. Reboot to TWRP
    4. Do a factory reset (optional if coming from stock Nougat) and then format /system
    (If your device is encrypted and you want to remove encryption, you will have to format /data and then flash the forceencrypt disabler I mentioned above after flashing the ROM)
    5. Flash the zip
    6. Reboot
    7. Have fun
    Thanks to:
    @NZedPred for the excellent tutorial on how to build flashable zips based on stock firmware and/or OTAs
    @Cesarcami53 for telling us that the update was out for retla
    @erfanoabdi for his Motorola OTA Link Generator and IMG Patch Tools
    @lohanbarth for mirroring the fastboot zips to AFH / Mega
    In case I forgot someone, please do let me know.
    9
    And as a bonus, have this nice little dark boot logo from me, which hides that dreaded "N/A" and also "bad key" things. Extract the zip file and flash the logo3.bin file inside using fastboot:
    Code:
    fastboot flash logo logo3.bin
    5
    F.A.Q. (Read this before crying!!!!)

    Q: Why did you come up with this?
    A: Because Lenovorola is pulling a Samsung, taking forever to officially deliver the Oreo update to everyone.

    Q: ERMAHGERD DIS ROM SUCKZ, MAH BATTERY IS DEAD IN 30 MINS, PLZ HALP!
    A: Please do blame Motorola, or yourself, or your apps' developers, but not me. I haven't got anything to do with that. I haven't changed anything.

    Q: What works and what doesn't?
    In theory, everything should work, and nothing should be broken, since this is a stock ROM.

    Q: Will you add feature xyz?
    A: No.

    Q: Why no inbuilt root/Magisk/xyz/abc?
    A: Because not. 1. There's something called freedom of choice, and that must be respected. / 2. I want to keep everything as bit-perfect as possible, and as close as possible to what you would get by flashing a real OTA.

    Q: How do I report bugs?
    A: If you wanna report a bug, send me a logcat. In case of a kernel panic, /proc/last_kmsg will help.

    Q: How do I flash this?
    A: I suggest you scroll up and read the OP. The instructions are there.

    Q: How do I tweak this ROM?
    A: For theming, there's full OMS/Substratum support. Xposed doesn't work, so no extra tweaks for now.

    Q: This kid is such a n00b!
    A: Oh well then, why don't you go do something like this yourself, instead of criticizing my work and wasting your time?
    3
    Lenovorola has finally (albeit slowly) started to deliver Oreo over-the-air here in Brazil. I guess India has already started receiving it as well. As for the retus, reteu and retapac channels... You should be receiving it Soon™ (especially retus).

    P.S.: For those who don't know what the ruddy hell "Soon™" means, click here.

    Edit: Both retbr and retin channels are receiving build OPP28.65-37-2 (someone in India please confirm this). I will upload said build here as soon as it's available, both in fastboot and TWRP formats.
    3
    Thanks to:
    @NZedPred for the excellent tutorial on how to build flashable zips based on stock firmware and/or OTAs
    [/SIZE]

    Hey man, I am so thankful that someone has found my guide and made something for another device.

    Well done, and best of luck with this thread. :good: