[HOW-TO] Revert from an Oreo Custom ROM to stock and install Official Oreo via OTA

Search This thread

arodeodream

Member
Feb 4, 2015
26
1
the thread provides zip for sanders and mentions pottere g5 plus in the posts. I am a sanders user and now am confused.
Am a PE custom rom user and due to lack of volte..I did sort of stock rom flashing with commands back then and lost IMEI.
After trying and looking for every way to make it work ..I unfortunately ended up nowhere and installed PE rom to get back to least the LTE .
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    I decided to make this thread so people won't brick their devices/lose their IMEI/explode their phone when trying to update to the recently leaked/released Oreo Motorola ROM.

    This is very information dense. Please, read this and the linked threads carefully and do not miss any step unless told so.

    WARNING: This will erase all your data, reset all your settings. MAKE BACKUPS.

    I also do not hold responsibility for any negative outcomes out of following this tutorial.
    Always look for as many sources of information as you can. There is always something that isn't 100% correct in every tutorial.


    Also, making it clear. This is for those who are currently on an Oreo CUSTOM ROM such as Lineage, Pixel Experience or other.

    Preparation Steps:
    1. Backup all your important files to your PC. You should do that since everything will be reset.
    2. Make sure your phone is well charged. 80% at least. You want to be safe.
    3. Boot into fastboot.
    4. Install Minimal ADB and Fastboot.
    5. In the command prompt of Minimal ADB and Fastboot, type:
      Code:
      fastboot getvar all
    6. You will see a bunch of lines come up on the screen. Scroll and look for
      Code:
      (bootloader) ro.build.fingerprint[0]
      .
      This will tell the last version of the Stock ROM (Nougat) you had installed.
      Example: "NPNS25.137-92-4" Yours won't/may not be the same.
    7. Write it down somewhere. You will need this version number.
    8. Open this link https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/ to download the exact version you found. If anything, download a version above the one you found. Never an inferior. Those are Motorola's Official Nougat ROMs.
    9. Keep it somewhere accessible in your PC and extract the zip. Remember where you put it, you will need it later.
    10. You will now proceed to check your persist partition. Aka: The thing everyone overlooks and screws your IMEI.
    11. IMPORTANT: Take a look at https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147 to find out if your persist partition has permission issues and see if it's recoverable. It is 99% likely that if you are on a custom Oreo ROM that the permissions won't be intact.
    12. If that is the case (most likely), download NZedPred's TWRP Persist Restore zip into your phone.
    13. Feel free to skip these last steps if you have a backup of your persist and efs.
    14. Reboot into recovery and using the most recent TWRP make a backup of your persist and efs. (Information about this can be found on the second post of the "Fix Persist" thread. I am not willing to write a thousand instructions on one thread for the sake of not overcomplicating things.) //****ty steps: have/flash most recent TWRP > backup > select persist and efs > profit
    15. These backups should be on a TWRP folder of the internal storage of your Moto G5. Reboot the phone (or mount USB) and copy that folder to your PC. In case anything goes wrong you will have a copy of your persist.

    Steps:
    1. Reboot into recovery (TWRP) using your preferred method. (Be it by the buttons, or via ADB (adb reboot recovery)).
    2. Flash the TWRP Persist Restore zip.
    3. Reboot into bootloader
    4. Open (on your PC ofc) the folder with the extracted files of the Stock ROM zip (NOUGAT).
    5. Open the extracted files folder then press Shift+RMB (Right Mouse Click/Button) and select "Open Command Prompt here" (It may work with Powershell??? If anything, write a post here)
    6. For a quick test, type
      Code:
       fastboot
      In case an error pops-up and tells you that it can't recognize such a command. Follow this article https://www.xda-developers.com/adb-fastboot-any-directory-windows-linux/ to add Minimal ADB and Fastboot to your system environment variables
    7. Now, make sure that the path to the left of the typing cursor is the path of the folder where you have your extracted Nougat ROM files.
    8. Please, for your phone's OTA update ability sake. Make sure that you are flashing the exact version you had before. The version you found by running fastboot getvar all.
    9. The commands below will attempt to update the bootloader and gpt. You should NEVER flash an older version of the bootloader.
    10. If you wish, you can skip the GPT/Bootloader commands. I haven't done myself because I flashed the correct version I had before anyway.
    11. Copy and paste these commands and press enter in the CMD.

    12. Code:
      fastboot oem fb_mode_set
      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
      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 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
    13. This will flash the Stock Nougat ROM you have downloaded and will reboot your phone. If all goes well you will be back on Nougat, set up your device as normal.
    14. Attention, everything has been reset, erased, wiped.

    Oreo OTA Steps:
    1. After setting up everything, check for OTA's. You should be safe to install them. If you are on a recent firmware, you may only need to install security ones. Keep installing and checking until it says there are no more updates available.
    2. This is where people **** up when they downgrade their bootloader by flashing an older Stock ROM than the one they had before.
    3. Before proceeding, double check that there aren't any OTAs available or that Oreo is available at the time of reading this.
    4. If Oreo is officially available, skip all of these steps and be happy.
    5. Otherwise, if at the time of reading, there is a ZIP of the Oreo ROM that matches your region. Download it.
      In case of RETLA, RETBR, and RETIN, at the time of writing, this is the correct file:
      https://mega.nz/#!DxdSVaJb!5VEht-s6HYCNOZ2hXXVIPdFBqmWCuAvQL1Wzmp7rhZk or https://drive.google.com/open?id=1ZmtSW40oZi1EXD0PsRib3dqIeF9vauAY
    6. In case you are on RETUS, RETAPAC, RETEU, etc. You may need another file that may not be available. The best course of action would be to wait for the Official OTA. :good:
    7. Download it and put in the root of the internal storage of your Moto G5 Plus.
    8. Go to the Settings app. In the Settings app, you'll want to find the OTA App (Motorola Update Services) by showing System apps and enable storage permissions.
    9. Before you proceed: This is apparently indeed the official OTA that they will ship, which seems to be the same as the Soak 4. It's seemingly stable here, so, you should be fine to use that.
    10. Check on your phone for an OTA.
    11. Reboot it.
    12. Check for an update again. There will be a prompt telling you about copying "system" files. Accept it.
    13. After a while, another prompt will ask you about the update. There won't be a changelog, this is normal. Make sure your device is charged and install it.
    14. Wait for the update to complete and you're done.


    Tips:

    Feel free to correct me on any mistake. It took me about an hour (or more) to write this and I could have potentially overlooked an important detail.
    2
    In short terms: Don't downgrade.
    Everything else is ok.

    Sent from my Moto G5 Plus using XDA Labs
    2
    Oh okay, I will be going back to Oreo itself. Is it okay to flash the latest Oreo even though I was on the older update when I switched to a custom ROM?
    You can flash the latest oreo firmware for your device, it doesn't matter if you go from older to latest, but if you go from latest to older version it will brick your device, so be alert when you download the firmware.
    2
    You should use retin software as you are from India and you should use the latest version of retin to have the latest firmware.you can get retin firmware form here.https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

    And then just go for flashing as given then for bootloader lock procedure.

    For flashing you need Motorola drivers and ADB tool to flash, extract the firmware in the ADB folder and open ADB start entering the command from here


    And the enter this commands to lock the bootloader:-



    I am on arrow os pie, want to get it back to stock. Should i backup persist? As per the quoted message, that step isn't mentioned. Thanks in advance.
    For flashing oreo you don't need persist backup as there is no problem in oreo. But if you going for nougat then take a back up of Persist, so in case you lost IMEI then you can get back you presist. But for any unknown problem in future it will better to take a back up presist.
    1
    I successfully flashed nougat thnx to your guide.i have downloaded the oreo update but where to put it the update is not being detected in system update
    I m an Indian user so retin variant and dwnlf the oreo file provided by you.
    The zip file needs to be placed in the internal memory and not within any folder in the internal memory (i.e in the root directory of internal memory), after that you need to give storage permission to the updater app and reboot. After reboot, you need to check for updates and the updater app should now be able to pick up the zip file you placed in internal memory as a new system update