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

Solution to flash stock rom(factory image) via fastboot and locking the bootloader..

Search This thread

rishivg

Senior Member
Apr 14, 2015
454
204
22
navi mumbai
OnePlus 5
Xiaomi Poco F1
Hey Guys,
I recently had hardbricked my potter device.. Was unable to flash any rom, not even stock rom and I didnt find any thread in this forum which could have helped me.
I unbricked my device, flashed the stock rom and locked the bootloader,
The following steps will also get you unbrick your device... So, I would like to share the steps with all of you.
Note that this isnt only for unbricking, this can be done by any user who wants to flash stock rom and lock their bootloader.

Step 1: Download your potter rom from the following link: https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/
"POTTER_RETAIL_7.0_NPNS25.137-33-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip" download the following zip file.

Step 2: Download Minimal adb and fastboot from the following link: https://androidfilehost.com/?fid=745425885120698566

Step 3: Install Minimal adb and fastboot and extract the downloaded rom to the same folder where you have installed Minimal And fastboot package.

Step 4: After extracting open command prompt in that folder (where you have extracted the rom/ the adb and fastboot folder)

Step 5: Now boot your phone into your bootloader by pressing volume down+ power button at the same time.

Step 6: Type the following in your command prompt: fastboot devices
If it detects your device move to the next step, if it does not then you will have to install drivers for your device.

Step 7: Now Copy the following code and paste it to your command prompt:

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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
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

Step 8: This will completely wipe your data and install stock 7.0 OS on your potter device. Note that this does not lock your bootloader.

Step 9: Boot your device to check if it boots and if it works.... now if you want to lock your bootloader move to the next step.

Step 10: Reboot again into your bootloader.

Step 11: Again follow the step 4, step 5 and step 6.

Step 12: Now paste the following commands in the command prompt:

fastboot oem lock
fastboot oem lock
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 boot boot.img
fastboot oem lock

Step 13: Reboot your device...

In this way you will be able to move to stock rom and lock your bootloader..


Please do comment if this works for you too and if you find any issues...

Thank you!!
All the Best!!:fingers-crossed::fingers-crossed::good::good:
 

Attachments

  • commands.txt
    898 bytes · Views: 3,273
  • Untitled.jpg
    Untitled.jpg
    118.8 KB · Views: 6,834
  • Untitled1.jpg
    Untitled1.jpg
    119 KB · Views: 6,729
  • Untitled2.jpg
    Untitled2.jpg
    127.2 KB · Views: 6,690

acejavelin

Recognized Contributor
Sep 3, 2009
6,835
3,321
Lincoln, ND
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
The quoted lines are redundant (surely they gave you an error since they don't exist in the G5+ firmware)

Otherwise, pretty standard Moto stuff... interesting that in 5th gen stuff you can lock after only flashing system sparsechunks, almost all previous devices required a complete flash with wipe to relock. https://firmware.center/firmware/Motorola/Moto G5 Plus/Stock/ is another good source for stock factory ROM's (it is the official repo of FirmwareTeam), and Minimal ADB and Fastboot has a lots of "hacks" out there, so it is best to only reference the original source: https://forum.xda-developers.com/showthread.php?t=2317790

I am extremely familiar with previous Moto device, but am curious on this device what is the bootloader status number after relocking with this method and do you still get the unlocked warning screen after relocking like on previous Moto devices?
 
Last edited:
  • Like
Reactions: 5xonlineage

manos78

Senior Member
Jan 17, 2014
808
307
Hi,

Great if this guide works (not tested by me). However, it sounds viable. :good:

In any case, I suggest to put the original device and retail versions witht the link of the firmware. For example:
- XT1680 & retus: "POTTER_RETAIL_7.0_NPNS25.137-33-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip"

This is necessary. For example my is XT1685 and RETEU, then this file is not for me! :confused:
 

Gingernut78

Senior Member
Sep 17, 2011
585
212
This only works if you are on a previous or the exact same build. If you have already installed the August ota atm you can't relock the bootloader.
 

echo92

Senior Member
Jan 1, 2017
3,732
1,989
Plymouth

The firmware will only re-lock your bootloader in that case if it's of the same or newer patch level as your bootloader. Older firmwares, as Gingernut78 pointed out, will get you back to stock, but if you're on the August 2017 patch level (and your bootloader is at the August 2017 patch level as well), you need a August 2017 or later stock ROM to re-lock your bootloader.
 

coolman9999

Member
Aug 3, 2010
18
5
Hey Guys,
I recently had hardbricked my potter device.. Was unable to flash any rom, not even stock rom and I didnt find any thread in this forum which could have helped me.
I unbricked my device, flashed the stock rom and locked the bootloader,
The following steps will also get you unbrick your device... So, I would like to share the steps with all of you.
Note that this isnt only for unbricking, this can be done by any user who wants to flash stock rom and lock their bootloader.

Step 1: Download your potter rom from the following link: https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/
"POTTER_RETAIL_7.0_NPNS25.137-33-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip" download the following zip file.

Step 2: Download Minimal adb and fastboot from the following link: https://androidfilehost.com/?fid=745425885120698566

Step 3: Install Minimal adb and fastboot and extract the downloaded rom to the same folder where you have installed Minimal And fastboot package.

Step 4: After extracting open command prompt in that folder (where you have extracted the rom/ the adb and fastboot folder)

Step 5: Now boot your phone into your bootloader by pressing volume down+ power button at the same time.

Step 6: Type the following in your command prompt: fastboot devices
If it detects your device move to the next step, if it does not then you will have to install drivers for your device.

Step 7: Now Copy the following code and paste it to your command prompt:

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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
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

Step 8: This will completely wipe your data and install stock 7.0 OS on your potter device. Note that this does not lock your bootloader.

Step 9: Boot your device to check if it boots and if it works.... now if you want to lock your bootloader move to the next step.

Step 10: Reboot again into your bootloader.

Step 11: Again follow the step 4, step 5 and step 6.

Step 12: Now paste the following commands in the command prompt:

fastboot oem lock
fastboot oem lock
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 boot boot.img
fastboot oem lock

Step 13: Reboot your device...

In this way you will be able to move to stock rom and lock your bootloader..


Please do comment if this works for you too and if you find any issues...

Thank you!!
All the Best!!:fingers-crossed::fingers-crossed::good::good:
thank you so much you safe my life:good
 

rishivg

Senior Member
Apr 14, 2015
454
204
22
navi mumbai
OnePlus 5
Xiaomi Poco F1
Please let me know how. I'm on August security patch. Xt1686 67 5 build indian version. I can flash only 67 5 build stock rom. When i try flashing older stock roms, it says bootloader version downgrade. Please please tell me how i can fully go back to stock.

dont flash the bootloader! ignore that command and report!:fingers-crossed:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Hey Guys,
    I recently had hardbricked my potter device.. Was unable to flash any rom, not even stock rom and I didnt find any thread in this forum which could have helped me.
    I unbricked my device, flashed the stock rom and locked the bootloader,
    The following steps will also get you unbrick your device... So, I would like to share the steps with all of you.
    Note that this isnt only for unbricking, this can be done by any user who wants to flash stock rom and lock their bootloader.

    Step 1: Download your potter rom from the following link: https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/
    "POTTER_RETAIL_7.0_NPNS25.137-33-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip" download the following zip file.

    Step 2: Download Minimal adb and fastboot from the following link: https://androidfilehost.com/?fid=745425885120698566

    Step 3: Install Minimal adb and fastboot and extract the downloaded rom to the same folder where you have installed Minimal And fastboot package.

    Step 4: After extracting open command prompt in that folder (where you have extracted the rom/ the adb and fastboot folder)

    Step 5: Now boot your phone into your bootloader by pressing volume down+ power button at the same time.

    Step 6: Type the following in your command prompt: fastboot devices
    If it detects your device move to the next step, if it does not then you will have to install drivers for your device.

    Step 7: Now Copy the following code and paste it to your command prompt:

    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 system system.img_sparsechunk.5
    fastboot flash system system.img_sparsechunk.6
    fastboot flash system system.img_sparsechunk.7
    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

    Step 8: This will completely wipe your data and install stock 7.0 OS on your potter device. Note that this does not lock your bootloader.

    Step 9: Boot your device to check if it boots and if it works.... now if you want to lock your bootloader move to the next step.

    Step 10: Reboot again into your bootloader.

    Step 11: Again follow the step 4, step 5 and step 6.

    Step 12: Now paste the following commands in the command prompt:

    fastboot oem lock
    fastboot oem lock
    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 boot boot.img
    fastboot oem lock

    Step 13: Reboot your device...

    In this way you will be able to move to stock rom and lock your bootloader..


    Please do comment if this works for you too and if you find any issues...

    Thank you!!
    All the Best!!:fingers-crossed::fingers-crossed::good::good:
    3
    Hey man, can you send a new like for the Braziliam ROM (XT1683)? (the one you sent is not working anymore) :(

    For Brazil/India stock ROMs, you'll want the NPN25.137-92 series of firmwares. You can download the NPNS25.137-92-10 April 2018 security patch firmware or the NPNS25.137-92-14 June 2018 security patch firmware from here: https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/
    2
    the stock flash worked thanks so much for that but, when I tried to lock the bootloader in cmd it kept giving me a remote failure for the---below
    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
    I don't know what to do can anyone help?
    2
    How do I fix the (bootloader) permission denied, FAILED (remote failure) message. The process works fine until I get to the "fastboot erase customize" step. Any help is appreciated.
    Try to omit the fastboot erase customize command. It's just for customizations made by Moto maker.

    Sent from my Moto G5 Plus using XDA Labs
    2
    Like an idiot I didn't back anything up... But my IMEI is 0
    then you will have to reflash one of the oreo roms, boot up and get your signal. Then in TWRP back up your efs partition, save it, and then go through the reverting to stock process again. After booting this time, go back into recovery and restore your efs partition.