Status
Not open for further replies.
Search This thread

PSMDRT

Member
Oct 26, 2017
28
0
Did you flash a Latin America ROM at one time? You getvar output shows you have LA firmware on a Indian device... Are you flashing the correct firmware image?

I feel sorry, but I have to admit that I flashed XT1681-XT1683_POTTER_BRASIL_LATAM_MEXICO_7.0_NPN25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml. But, it did work. i.e., the device booted up. Only when it was on the way to install August OTA update, it never booted up again. That was the last time I saw my device with life.

Now, I'm trying to install POTTER_NPN25.137-67-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml as given here at https://forum.xda-developers.com/g5-plus/how-to/stock-firmware-npn25-137-67-5-fastboot-t3694738.

Am I doing correct? Kindly let me know.
 
Last edited:

acejavelin

Recognized Contributor
Sep 3, 2009
6,835
3,318
Lincoln, ND
I feel sorry, but I have to admit that I flashed XT1681-XT1683_POTTER_BRASIL_LATAM_MEXICO_7.0_NPN25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml. But, it did work. i.e., the device booted up. Only when it was on the way to install August OTA update, it never booted up again. That was the last time I saw my device with life.

Now, I'm trying to install POTTER_NPN25.137-67-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml as given here at https://forum.xda-developers.com/g5-plus/how-to/stock-firmware-npn25-137-67-5-fastboot-t3694738.

Am I doing correct? Kindly let me know.
Frankly... I don't know, never tried to "cross-flash" a G5, then take it back.

To be honest, your flash log looks fine, except sparcechunk.4... I would reflash the whole sequence (without locking the bootloader) and if chunk.4 fails again (or any other step), repeat the command up to 4 times to see if it will take (I am guessing this might take a time or two), then finish like normal. If it still fails after trying 4 times. STOP and issue the command "fastboot reboot-bootloader" then after it reboots back to the bootloader try to flash the chunk again.

You could try this as well, sometimes a reboot after flashing the partition table and bootloader is helpful:

Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot reboot-bootloader
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 oem fb_mode_clear
fastboot reboot
 

PSMDRT

Member
Oct 26, 2017
28
0
Frankly... I don't know, never tried to "cross-flash" a G5, then take it back.

To be honest, your flash log looks fine, except sparcechunk.4... I would reflash the whole sequence (without locking the bootloader) and if chunk.4 fails again (or any other step), repeat the command up to 4 times to see if it will take (I am guessing this might take a time or two), then finish like normal. If it still fails after trying 4 times. STOP and issue the command "fastboot reboot-bootloader" then after it reboots back to the bootloader try to flash the chunk again.

You could try this as well, sometimes a reboot after flashing the partition table and bootloader is helpful:

Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot reboot-bootloader
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 oem fb_mode_clear
fastboot reboot

Thanks @acejavelin

I've tried that. Here's the output. Please go through it.


Code:
G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot oem fb_mode_set
< waiting for device >
...
OKAY [  0.005s]
finished. total time: 0.005s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash partition gpt.bin
target reported max download size of 536870912 bytes
sending 'partition' (45 KB)...
OKAY [  0.000s]
writing 'partition'...
(bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
(bootloader) Flashing primary GPT image...
(bootloader) Flashing backup GPT image...
OKAY [  0.156s]
finished. total time: 0.156s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.165s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.447s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.450s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.469s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.173s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.455s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.469s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.453s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.453s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.453s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.183s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
(bootloader) Preflash validation failed
(bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.466s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.016s]
finished. total time: 0.016s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash logo logo.bin
target reported max download size of 536870912 bytes
sending 'logo' (2186 KB)...
OKAY [  0.078s]
writing 'logo'...
OKAY [  0.078s]
finished. total time: 0.156s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash boot boot.img
target reported max download size of 536870912 bytes
sending 'boot' (16384 KB)...
OKAY [  0.538s]
writing 'boot'...
(bootloader) Image signed with key bad key
OKAY [  0.319s]
finished. total time: 0.857s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash recovery recovery.img
target reported max download size of 536870912 bytes
sending 'recovery' (20580 KB)...
OKAY [  0.679s]
writing 'recovery'...
(bootloader) Image signed with key bad key
OKAY [  0.423s]
finished. total time: 1.103s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash dsp adspso.bin
target reported max download size of 536870912 bytes
sending 'dsp' (16384 KB)...
OKAY [  0.532s]
writing 'dsp'...
OKAY [  0.176s]
finished. total time: 0.708s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash oem oem.img
target reported max download size of 536870912 bytes
sending 'oem' (94831 KB)...
OKAY [  3.031s]
writing 'oem'...
OKAY [  0.761s]
finished. total time: 3.792s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash system system.img_sparsechunk.0
target reported max download size of 536870912 bytes
sending 'system' (517379 KB)...
OKAY [ 16.550s]
writing 'system'...
OKAY [  4.157s]
finished. total time: 20.707s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash system system.img_sparsechunk.0
target reported max download size of 536870912 bytes
sending 'system' (517379 KB)...
OKAY [ 16.516s]
writing 'system'...
OKAY [  4.107s]
finished. total time: 20.623s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash system system.img_sparsechunk.1
target reported max download size of 536870912 bytes
sending 'system' (500979 KB)...
OKAY [ 16.032s]
writing 'system'...
OKAY [  4.019s]
finished. total time: 20.051s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash system system.img_sparsechunk.2
target reported max download size of 536870912 bytes
sending 'system' (523539 KB)...
OKAY [ 16.727s]
writing 'system'...
OKAY [  3.677s]
finished. total time: 20.404s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash system system.img_sparsechunk.3
target reported max download size of 536870912 bytes
sending 'system' (506655 KB)...
OKAY [ 16.179s]
writing 'system'...
OKAY [  3.862s]
finished. total time: 20.042s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash system system.img_sparsechunk.4
target reported max download size of 536870912 bytes
sending 'system' (444811 KB)...
OKAY [ 14.171s]
writing 'system'...
OKAY [  3.432s]
finished. total time: 17.604s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash modem NON-HLOS.bin
target reported max download size of 536870912 bytes
sending 'modem' (75160 KB)...
OKAY [  2.421s]
writing 'modem'...
OKAY [  0.642s]
finished. total time: 3.063s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot erase modemst1
erasing 'modemst1'...
OKAY [  0.016s]
finished. total time: 0.016s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot erase modemst2
erasing 'modemst2'...
OKAY [  0.031s]
finished. total time: 0.031s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash fsg fsg.mbn
target reported max download size of 536870912 bytes
sending 'fsg' (2500 KB)...
OKAY [  0.084s]
writing 'fsg'...
OKAY [  0.075s]
finished. total time: 0.162s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot erase cache
erasing 'cache'...
OKAY [  0.016s]
finished. total time: 0.016s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot erase userdata
erasing 'userdata'...
OKAY [  0.041s]
finished. total time: 0.041s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot oem fb_mode_clear
...
OKAY [  0.016s]
finished. total time: 0.016s

G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot reboot
rebooting...

finished. total time: 0.016s

G:\SOFTWARE\Herramientas ADB\platform-tools>

Please correct me if I wrong as I am quite new to these. But, if you see, the chunks were being flashed without any errors or exceptions. But, the third step of the code is what seems the issue as the output has some failures shown.

Here's it again.

Code:
G:\SOFTWARE\Herramientas ADB\platform-tools>fastboot flash bootloader bootloader.img
target reported max download size of 536870912 bytes
sending 'bootloader' (5115 KB)...
OKAY [  0.172s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image tz failed validation
[COLOR="Red"](bootloader) Preflash validation failed[/COLOR]
[COLOR="red"](bootloader) Security version downgrade
(bootloader) Image devcfg failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)[/COLOR]
finished. total time: 0.453s

I've tried this multiple times. There seems to be no change in the output. As soon as I execute the last step fastboot reboot, the device wouldn't reboot.
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,835
3,318
Lincoln, ND
Frankly... I don't know, never tried to "cross-flash" a G5, then take it back.

To be honest, your flash log looks fine, except sparcechunk.4... I would reflash the whole sequence (without locking the bootloader) and if chunk.4 fails again (or any other step), repeat the command up to 4 times to see if it will take (I am guessing this might take a time or two), then finish like normal. If it still fails after trying 4 times. STOP and issue the command "fastboot reboot-bootloader" then after it reboots back to the bootloader try to flash the chunk again.

You could try this as well, sometimes a reboot after flashing the partition table and bootloader is helpful:



Thanks @acejavelin

I've tried that. Here's the output. Please go through it.




Please correct me if I wrong as I am quite new to these. But, if you see, the chunks were being flashed without any errors or exceptions. But, the third step of the code is what seems the issue as the output has some failures shown.

Here's it again.



I've tried this multiple times. There seems to be no change in the output. As soon as I execute the last step fastboot reboot, the device wouldn't reboot.
I see now... Basically the phone is seeing what you are doing as attempt to downgrade, which is troublesome on Moto devices. You need a newer Indian DS factory image than the LA one you have installed, problem is I don't think we have one yet.
 
  • Like
Reactions: PSMDRT

Dyscalculic

Senior Member
Jan 24, 2012
55
16
If I do not want to erase user data and only meaning to revert to stock rom from a rooted version of stock rom, can I just delete the fastboot erase userdata and live happily ever after, or will the new stock rom conflict with any app settings/ data that I really must erase everything. Dreading having to reinstall the apps and recover data on a soon-to-be-non-rooted devices.
 

spiritflare01

Senior Member
Sep 19, 2015
117
13
Toronto
reflash after locking bootloader?

Thanks for this.

You say after relocking bootloader we should flash again all the commands??

>And After Flashing it Please Re-flash the whole firmware >again :


Just want to make sure that is clearly what you mean?

Are we able to flash once bootloader is locked?
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,835
3,318
Lincoln, ND
Thanks for this.

You say after relocking bootloader we should flash again all the commands??

>And After Flashing it Please Re-flash the whole firmware >again :


Just want to make sure that is clearly what you mean?

Are we able to flash once bootloader is locked?
Yes... As long as it's a digitally signed stock image and you are not downgrading you can flash with a locked bootloader.
 
  • Like
Reactions: spiritflare01

neodarklink

Senior Member
Jan 10, 2012
57
16
Salta

Outfield303

Senior Member
Nov 6, 2016
286
220
I requested early in this post if can flash this one to my G5+ (XT1680) or if someone is able to find one accurate.
Its a Moto G5 plus from Argentina (specifications here), thanks in advice. Sorry for my English.
4) NPN25.137-15 for Brazil-Mexico varient (XT1681 - XT1683)
Download
You can flash the above firmware as long as you already had NPN25.137-15
 
  • Like
Reactions: neodarklink

PSMDRT

Member
Oct 26, 2017
28
0
I see now... Basically the phone is seeing what you are doing as attempt to downgrade, which is troublesome on Moto devices. You need a newer Indian DS factory image than the LA one you have installed, problem is I don't think we have one yet.

Could you please elaborate?
 

echo92

Senior Member
Jan 1, 2017
3,732
1,989
Plymouth
Sorry I forgot to mention compilation NPNS25.137-15-11, it has an extra S it would make any difference? Thanks.

Unfortunately, that extra S would likely make a difference. The NPN25.137-15 firmware may give you issues as it would revert your device down at least 2 update levels (think you get NPNS25.137-15.5 then NPNS25.137-15-11). Thus if you flashed the NPN25.137-15 firmware (but still have a newer bootloader from the -11 firmware) then taking an OTA update may hard brick your device. You would not be able to downgrade your bootloader as the newer firmware would block the security downgrade.

Thus, I'd look for a NPNS25.137-15-11 stock ROM if possible.
 
  • Like
Reactions: neodarklink

neodarklink

Senior Member
Jan 10, 2012
57
16
Salta
Unfortunately, that extra S would likely make a difference. The NPN25.137-15 firmware may give you issues as it would revert your device down at least 2 update levels (think you get NPNS25.137-15.5 then NPNS25.137-15-11). Thus if you flashed the NPN25.137-15 firmware (but still have a newer bootloader from the -11 firmware) then taking an OTA update may hard brick your device. You would not be able to downgrade your bootloader as the newer firmware would block the security downgrade.

Thus, I'd look for a NPNS25.137-15-11 stock ROM if possible.

As you said when I started for first time recieved the two updates one after the other, so I have to wait somebody upload the correct firmware, thanks for everything
 

PSMDRT

Member
Oct 26, 2017
28
0

22sumit

Senior Member
Mar 1, 2014
173
33
request someone to clarify by these below line:
You can Skip GPT and Boot-loader Partitions if you want
But Keep in mind that You Cannot DOWNGRADE These 2 Partitions.
What does the downgrading mean here?
For clarification, I'm currently on Resurrection Remix 5.8.4 showing android version 7.1.1
 

xt610

Member
May 6, 2013
25
3
Hello!, Please Link for Firmware RETLA 25.137-78-4

The name of the file is: POTTER_NPNS25.137-78-4_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.rar
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 28
    Disclaimer :
    Code:
     I am not responsible for bricked devices, dead SD cards,
     thermonuclear war, or you getting fired because the alarm app failed. 
     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.
     and[COLOR="Red"] I am also not responsible for anything happens as a result of flashing these files[/COLOR]

    Hey Guys,
    Here are the Stock Firmwares for potter


    Lets Proceed :

    1) Install Minimal ADB and Fastboot
    https://www.androidfilehost.com/?fid=745425885120698566

    2) Extract stock firmware zip

    3) Now copy all the stuff that is in this zip into the folder where you extract the firmware.

    4) Turn on ADB debugging from dev options menu and use 'adb reboot-bootloader' (Without quotes) in cmd to reboot your phone into boot-loader mode

    5) Open the extracted firmware folder then press SHIFT+right click in the folder where you extract the firmware and select 'open command window here' option

    6) and then Paste the following commands and hit Enter :

    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

    This Script will not Re-Lock Your Boot-loader


    But if you want to Re-lock your bootloader, then use the following commands: (Thanks to @Nirbhay2 and @aSaro12)
    Code:
    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
    And After Flashing it Please Re-flash the whole firmware again :
    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
    But if you Don't want to do it manually, Here's the automated BAT script for you;
    Just copy and paste it to the extracted folder (Thanks to @Tech_Savvy) : Download Here
    This Script will not Re-lock the Boot-loader

    ----

    You can Skip GPT and Boot-loader Partitions if you want
    But Keep in mind that You Cannot DOWNGRADE These 2 Partitions
    And if you try to do so, then you'll Possibly end up with HardBrick
    You will need the appropriate version of the firmware according to your device version
    SO PROCEED WITH CAUTION


    Firmware Download Links :

    1) NPN25.137-67-5 for XT1686 (Indian Varient)
    Download Directly from Motorola Servers
    Mirror 1 -pCloud
    Mirror 2 -Google Drive
    Mirror 3 -Dropbox
    ---
    2) NPN25.137-35-5 for all Amazon (US) variants : Link N/A
    and NPNS25.137-83 for Non-US Amazon Variant : Link N/A
    and for the Non-Amazon Variants NPN25.137-83 : Link N/A
    ---
    3) NPNS25.137-35-5 for Retail GB varient (Thanks to skooter32 for info) Link N/A
    And NPN25.137-83 : Link N/A
    ---
    4) NPN25.137-15 for Brazil-Mexico varient (XT1681 - XT1683) Link N/A
    -----

    Choose Carefully which one to flash


    Special Thanks to rikk and @anuraag.neo For Capturing Indian varient zip!​
    if you like my work then please hit that THANKS ? Button!
    2
    I got my phone hardbrick once. However after looking different forums and trying out things my phone came back to life. But when i try to flash stock rom, i just can't flash it as it keeps on saying can't downgrade. If i skip those 2 gpt and bootloader, can i flash the stock rom? Currently i am using twrp flashed firmware.

    You should be okay to flash the stock ROM without flashing GPT and bootloader, however I would suggest do not accept OTA updates. Accepting OTA updates whilst having a bootloader of a different patch level or from a different device (as in the unbrick guide) might hard brick you again. OTA updates are only suitable for devices that have the bootloader and system at the same patch level.

    Else, I'd suggest flashing a newer TWRP flashable firmware build, as these don't generally affect your bootloader and there appears to be a NPN25.137-67-5 build https://forum.xda-developers.com/g5-plus/development/rom-twrp-flashable-stock-builds-t3675616
    2
    currently i am on resurrection remix nougat android -7.1.2_r24 - NJH47D , kernal 3.18.62-lineage-g86cdbd9, device model XT1686. can i flash this firmware? i am downloading NPN25.137-67-5 for XT1686 (Indian Varient). i am from INDIA.

    Yes, you can Flash the following firmware :

    1
    This work on xt1687?

    Don't think so, the XT1687 should be the US variant of the G5 Plus, and the NPN25.137-67-5 is the Indian ROM.

    You probably want to look for the NPN25.137-83 stock ROM.
    1
    Thread closed at the request of the OP
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone