Moto E4 Guide To Full Stock Firmware Restore and Re-lock Bootloader Any Variant - Moto E4 Guides, News, & Discussion

Note :
Do not erase/flash Bootloader file preloader.img or preloader.bin
fastboot erase preloader
fastboot flash preloader preloader.img
Do not erase/flash partition table file pgpt.img/gpt.img or pgpt.bin/gpt.bin
fastboot erase pgpt or gpt
fastboot flash pgpt or gpt pgpt.img or gpt.img​
About :
With this guide you will restore stock firmware and re-lock your device bootloader.This guide is from Moto E4 Mediatek variant SKU XT1760 but can work with any Moto E4 Variant. Just grab the partition info and partition name in fastboot mode with fastboot command "fastboot getvar all". But this step isn't necessary if you take backup with miracle tool. It will dump whole firmware in scatter format. So, no need to worry if you have a different variant of Moto E4
This guide will give you the following :​
PHP:
<bootloader> : warranty (YES)
<bootloader> : unlocked (NO)
<bootloader> : secure (YES)
>> device unlocked (we cannot remove this warning !)
Requirement :
• Place all the firmware files here:
C:\Program Files\Minimal ADB and Fastboot\HERE
• A laptop/Desktop
• Unlocked Bootloader
• Enabled USB Debugging
• Moto E4 Any Variant
• USB Cable
• Minimal Adb & Fastboot Tool
• Miracle Tool
• Adb & Fastboot Commands
Step 1 : Boot into bootloader mode
Switch off your device
Hold power button and volume down button
When you see START release buttons
This is fastboot mode
Step 2 : Reboot into bootloader
Note : i recommended you to use a laptop than that of desktop. For continuous power supply. Fully charge your laptop battery.
Connect with USB Cable
Open fastboot command window
Type fastboot command:
PHP:
fastboot reboot bootloader
Now your device in fastboot mode
--- Do not disconnect ---
Step 3 : Flashing stock factory images
Type these fastboot commands:
Erasing partitions first
if you have a different variant of Moto E4, just write all the partitions name except bootloader(preloader) in a text file and replace them with the below partition names.​
PHP:
fastboot erase boot
fastboot erase efuse
fastboot erase expdb
fastboot erase flashinfo
fastboot erase frp
fastboot erase hw
fastboot erase keystore
fastboot erase lk
fastboot erase logo
fastboot erase metadata
fastboot erase nvdata
fastboot erase nvram
fastboot erase oem
fastboot erase oemkeystore
fastboot erase otp
fastboot erase para
fastboot erase persist
fastboot erase proinfo
fastboot erase protect1
fastboot erase protect2
fastboot erase recovery
fastboot erase seccfg
fastboot erase secro
fastboot erase tee1
fastboot erase tee2
fastboot erase utags
fastboot erase system
fastboot erase userdata
--- Do not disconnect ---
Now flash stock factory images
PHP:
fastboot flash boot boot.img
fastboot flash efuse efuse.img
fastboot flash expdb expdb.img
fastboot flash flashinfo flashinfo.img
fastboot flash frp frp.img
fastboot flash hw hw.img
fastboot flash keystore keystore.img
fastboot flash lk lk.img
fastboot flash logo logo.img
fastboot flash metadata metadata.img
fastboot flash nvdata nvdata.img
fastboot flash nvram nvram.img
fastboot flash oem oem.img
fastboot flash oemkeystore oemkeystore.img
fastboot flash otp otp.img
fastboot flash para para.img
fastboot flash persist persist.img
fastboot flash proinfo proinfo.img
fastboot flash protect1 protect1.img
fastboot flash protect2 protect2.img
fastboot flash recovery recovery.img
fastboot flash seccfg seccfg.img
fastboot flash secro secro.img
fastboot flash tee1 tee1.img
fastboot flash tee2 tee2.img
fastboot flash utags utags.img
fastboot flash system system.img
--- Do not disconnect ---
Step 4 : Re-lock bootloader
Type this fastboot command
PHP:
fastboot oem lock
Hit volume up button
Again type fastboot command
PHP:
fastboot reboot
Step 5 : Fix for system image sparse chunk
Used only when fastboot command failed to write system in system partition else when you see "sparse chunk error" wait for 10 minutes. you will see 1/20 or something operations. if not or command ended up with chunk error than use this command.​Use this fastboot command:
PHP:
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 system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
fastboot flash system system.img_sparsechunk.17
fastboot flash system system.img_sparsechunk.18
fastboot flash system system.img_sparsechunk.19
fastboot flash system system.img_sparsechunk.20
Step 6 : Do not use this fastboot command
PHP:
fastboot erase preloader
This will wipe bootloader from bootloader partition and your device ended up with permanent Hard brick.
Step 7 : Fix for bootloader(fastboot) drivers
if your device isn't recognized in fastboot mode, Download USB Drivers from below attachment. Select manually "android_winusb.inf" file while updating driver software.
Download Link :
https://drive.google.com/file/d/0B0Oo-yXGY-zUMG1XRG52dFZpV1k/view
Step 8 : How to dump stock firmware
Thread link below:
https://forum.xda-developers.com/moto-e4/how-to/how-to-backup-stock-rom-moto-e4-variants-t3654976
Guide to fix boot_dataerr in miracle tool if it failed to dump stock rom
Look at the log window in miracle tool there in driver part you will see MTK preloader USB COM PORT#7. We don't need Preloader driver right now, we need MTK Android DA USB COM PORT#7. The solution is update your device driver software to fix this problem else you won't able to dump firmware in scatter format also we don't have official factory images. This is the only method to revert on purely unrooted stock firmware.
Step 9 : Minimal Adb & Fastboot download link
https://androidmtk.com/download-minimal-adb-and-fastboot-tool
This is my last thread in Moto E4 forum and i won't support this device anymore.​

Does this work for all variants?

andMego said:
Does this work for all variants?
Click to expand...
Click to collapse
yes, work with all variants.
already mentioned in OP.

kartik verma said:
This is my last thread in Moto E4 forum and i won't support this device anymore.​
Click to expand...
Click to collapse
After you came here and cluttered the forum with a crap load of pointless threads and posts? I love it! Thanks.

amarc78 said:
After you came here and cluttered the forum with a crap load of pointless threads and posts? I love it! Thanks.
Click to expand...
Click to collapse
pointless threads and posts
so my posts are useless. sorry if my posts aren't fit into your expectation.

kartik verma said:
pointless threads and posts
so my posts are useless. sorry if my posts aren't fit into your expectation.
Click to expand...
Click to collapse
Personally I'm very thankful for this post, as I couldn't figure out how to do it myself. I was able to reflash stock and lock the bootloader but it wouldn't boot since it always said it was modified, so I just returned my previous e4 with the bootloader unlocked and the noverify thing flashed.

my phone refuses to verify boot.img

KyleBryant said:
my phone refuses to verify boot.img
Click to expand...
Click to collapse
will it asks for boot.sig or anything else. let me know

I figured it out

KyleBryant said:
I figured it out
Click to expand...
Click to collapse
How?

Motorola doesn't release verified boot images. The reason it wouldn't boot for me is because I forgot to flash the no verity file lol

KyleBryant said:
Motorola doesn't release verified boot images. The reason it wouldn't boot for me is because I forgot to flash the no verity file lol
Click to expand...
Click to collapse
How do I lock the bootloader and get it to verify the boot image?

No idea

andMego said:
How do I lock the bootloader and get it to verify the boot image?
Click to expand...
Click to collapse
fastboot oem lock (relock the bootloader)
their is nothing to do with boot image. verification is for system if you changed something and didn't disable verity " MOUNT FLAG /system ro wait,verify" your device ain't gonna boot into system.
dm-verity can be disabled by two ways either remove "verify" or change the default.prop values "ro.secure=0".

kartik verma said:
fastboot oem lock (relock the bootloader)
their is nothing to do with boot image. verification is for system if you changed something and didn't disable verity " MOUNT FLAG /system ro wait,verify" your device ain't gonna boot into system.
dm-verity can be disabled by two ways either remove "verify" or change the default.prop values "ro.secure=0".
Click to expand...
Click to collapse
Before I returned my other e4 I flashed the stock images with rsdlite and then did fastboot oem lock but then the phone wouldn't boot since it said it was modified so I had to unlock the bootloader again and flash the noverify thing in TWRP. How should I have done it to be able to return the phone with the bootloader locked?

andMego said:
Before I returned my other e4 I flashed the stock images with rsdlite and then did fastboot oem lock but then the phone wouldn't boot since it said it was modified so I had to unlock the bootloader again and flash the noverify thing in TWRP. How should I have done it to be able to return the phone with the bootloader locked?
Click to expand...
Click to collapse
" it said it was modified"
First of all remove all the changes you have done in system else if you don't know where you have done changes wipe system partition and reflash system image in system partition.
don't flash gpt.img, pgpt.img, bootloader.img in fastboot mode also do not erase data in fastboot mode "fastboot erase userdata". your device must be charged upto 80% if you want your device boot after a clean flash.
as i am also facing over discharged problem.

kartik verma said:
" it said it was modified"
First of all remove all the changes you have done in system else if you don't know where you have done changes wipe system partition and reflash system image in system partition.
don't flash gpt.img, pgpt.img, bootloader.img in fastboot mode also do not erase data in fastboot mode "fastboot erase userdata". your device must be charged upto 80% if you want your device boot after a clean flash.
as i am also facing over discharged problem.
Click to expand...
Click to collapse
Kartik dude tell me if this is possible....
To roll back I flash unmodified stock boot image and flash stock recovery through fastboot - reboot system - reset -relock bootloader.....can I able to do this?

drganbds said:
Kartik dude tell me if this is possible....
To roll back I flash unmodified stock boot image and flash stock recovery through fastboot - reboot system - reset -relock bootloader.....can I able to do this?
Click to expand...
Click to collapse
follow this method :
erase partitions only if you have factory images
fastboot erase recovery
fastboot flash recovery recovery.img
fastboot erase boot
fastboot flash boot boot.img
erase system if you done changes in system partition. if not leave this step
fastboot erase system
fastboot flash system system.img

kartik verma said:
follow this method :
erase partitions only if you have factory images
fastboot erase recovery
fastboot flash recovery recovery.img
fastboot erase boot
fastboot flash boot boot.img
erase system if you done changes in system partition. if not leave this step
fastboot erase system
fastboot flash system system.img
Click to expand...
Click to collapse
Excellent then do me a favour buddy I need stock recovery and unmodified boot images of Moto e4 mediatek variant.

drganbds said:
Excellent then do me a favour buddy I need stock recovery and unmodified boot images of Moto e4 mediatek variant.
Click to expand...
Click to collapse
i will upload official factory images when i get free time

Related

How to restore to stock?

I am using a rooted Z Play XT1635-02 and would like to un-root the device and restore it to stock. Can someone recommend a thread for me to follow. Thanks
[email protected] said:
I am using a rooted Z Play XT1635-02 and would like to un-root the device and restore it to stock. Can someone recommend a thread for me to follow. Thanks
Click to expand...
Click to collapse
download ROM from here[1] ( select appropriate country/region )
[1] https://mirrors.lolinet.com/firmware/moto/addison/official/
for flashing instructions ..go here [2]
[2] https://forum.xda-developers.com/mo...de-how-to-flash-factory-image-return-t3261486
jatinkhatri said:
download ROM from here[1] ( select appropriate country/region )
[1] https://mirrors.lolinet.com/firmware/moto/addison/official/
for flashing instructions ..go here [2]
[2] https://forum.xda-developers.com/mo...de-how-to-flash-factory-image-return-t3261486
Click to expand...
Click to collapse
Is this finally the SIGNED stock firmware? I've been dying to have it since I know the unsigned won't allow you to relock the bootloader.
Euroter said:
Is this finally the SIGNED stock firmware? I've been dying to have it since I know the unsigned won't allow you to relock the bootloader.
Click to expand...
Click to collapse
You'll never relock your bootloader , it's over and I can't understand why people think it makes a difference, moto has given you the unlocking key by asking for that key you are unlocked and unlock forever.
Read the unlocking agreement page from moto. You signed off on it.
You'll never ever see signed firmware from moto anyways , they keep them in house, all you'll ever see is unsigned firmware packages.
https://forum.xda-developers.com/moto-z-play/how-to/autoscript-install-firmware-downgrade-t3558118
Euroter said:
Is this finally the SIGNED stock firmware? I've been dying to have it since I know the unsigned won't allow you to relock the bootloader.
Click to expand...
Click to collapse
Nope...
core720 said:
https://forum.xda-developers.com/moto-z-play/how-to/autoscript-install-firmware-downgrade-t3558118
Click to expand...
Click to collapse
Please help. I successfully unlock bootloader and twrp but my big mistake was i erase user data via fastboot. My phones memory is empty. I tried to adb push zip file and whenever i flash it via twrp error says unable to mount data. I want to return in stock can u help me flashing/unbricking my mzp? I have the Android N firmware from russia. Can u teach me a step by step guide how should i survive my phone pleaseeeeee... thanks in advance
Kap_Tutan said:
Please help. I successfully unlock bootloader and twrp but my big mistake was i erase user data via fastboot. My phones memory is empty. I tried to adb push zip file and whenever i flash it via twrp error says unable to mount data. I want to return in stock can u help me flashing/unbricking my mzp? I have the Android N firmware from russia. Can u teach me a step by step guide how should i survive my phone pleaseeeeee... thanks in advance
Click to expand...
Click to collapse
Download the stock ROM ...extract it and run following commands turn by turn from the extracted folder ( you must have ADB tools installed )
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 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 erase cache
fastboot erase userdata
fastboot reboot
Hope this helps
jatinkhatri said:
Download the stock ROM ...extract it and run following commands turn by turn from the extracted folder ( you must have ADB tools installed )
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 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 erase cache
fastboot erase userdata
fastboot reboot
Hope this helps
Click to expand...
Click to collapse
Hi sir one of my friend telling that i dont need to flash the bootloader.img because it will make my device brick. He means that downgrading bootloader will be a problem? Please confirm
Kap_Tutan said:
Hi sir one of my friend telling that i dont need to flash the bootloader.img because it will make my device brick. He means that downgrading bootloader will be a problem? Please confirm
Click to expand...
Click to collapse
Yeah ...that can happen if you are on newer bootloader
So Skip bootloader.img
Moto Z Play Bricked
I have Moto Z Play. My device is totally bricked. When i try to boot my device it wont boot. Even fastboot mode wont work. When I connect this device to laptop, in device manager it shows Qualcomm HS-USB QDLoader 9008 & Notification LED Beside front Camera Constantly Starts Blinking. I had tried all the methods shown on XDA but i didnt find any solution from it.
If any one of a member from XDA knows this solution then please tell me.
Contact no- +91 9970631435
email- [email protected]
name- Mohammadzain Thakur
I want LOS14.1 on my phone, but it's better to keep on stock 7.1.1? Normally you are right, because it's stupid to change the rom just because the number (7.1.1 to 7.1.2).

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

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:
rishivg said:
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
Click to expand...
Click to collapse
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?
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!
Not working. Its says cant be downgrade.
No does not work with the XT 1685 and reteu
surjeet.vishwas said:
Not working. Its says cant be downgrade.
Click to expand...
Click to collapse
what is your model number?
rishivg said:
what is your model number?
Click to expand...
Click to collapse
Xt1686 but i download another stock rom
surjeet.vishwas said:
Xt1686 but i download another stock rom
Click to expand...
Click to collapse
okay that is why it gave you error, try with the file that is mentioned in the post
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.
Gingernut78 said:
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.
Click to expand...
Click to collapse
yes exactly! you ll need to flash the whole previous build again...
rishivg said:
yes exactly! you ll need to flash the whole previous build again...
Click to expand...
Click to collapse
You can flash a previous build but it won't lock the bootloader that is the problem.
Gingernut78 said:
You can flash a previous build but it won't lock the bootloader that is the problem.
Click to expand...
Click to collapse
it will
rishivg said:
it will
Click to expand...
Click to collapse
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.
rishivg said:
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:
Click to expand...
Click to collapse
thank you so much you safe my life:good
rishivg said:
yes exactly! you ll need to flash the whole previous build again...
Click to expand...
Click to collapse
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.
ksvirdi105 said:
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.
Click to expand...
Click to collapse
dont flash the bootloader! ignore that command and report!:fingers-crossed:
rishivg said:
dont flash the bootloader! ignore that command and report!:fingers-crossed:
Click to expand...
Click to collapse
Are you sure it will work perfectly. No bricking and stuff?? which commands should i skip.
And once i flash it will i be able to get ota to august patch and relock?
ksvirdi105 said:
Are you sure it will work perfectly. No bricking and stuff??
Click to expand...
Click to collapse
it wont brick your device.. try it out:good:
rishivg said:
it wont brick your device.. try it out:good:
Click to expand...
Click to collapse
Once i flash it will i be able to get ota updates.
ksvirdi105 said:
Once i flash it will i be able to get ota updates.
Click to expand...
Click to collapse
lock your bootloader, you ll get updates but not security updates.. I dont know why? Need some help from developers

Flashing Instructions stock rom. Please HELP

Can anybody provide with the flashing instruction for moto g5
yolomonkey said:
Can anybody provide with the flashing instruction for moto g5
Click to expand...
Click to collapse
Assuming you have fastboot installed on your pc
Download firmware and unzip to where you have fastboot
Open command prompt at fastboot location with firmware
type the following although I have marked lines that you should not use unless you have to as flashing wrong firmware can damage your device
Code:
fastboot oem fb_mode_set Only required if you wish to relock bootloader - if not skip it
fastboot flash partition gpt.bin Do not use unless you want to repartition your device - incorrect file will damage your phone
fastboot flash bootloader bootloader.img Do not use unless you want to replace the bootloader - flashing wrong file will hard brick
fastboot flash logo logo.bin No need to flash if you are going to flash a custom rom after and have already flashed a modded version
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 Will erase everything on internal storage but you need to do it
fastboot erase customize Not sure about this - might be for other device
fastboot erase clogo Not sure about this - might be for other device
fastboot oem fb_mode_clear Only required to relock bootloader if you used the very first command
fastboot reboot
NOt working
My device keeps booting to the recovery
even though i flashed my recovery. it boots to twrp
yolomonkey said:
My device keeps booting to the recovery
even though i flashed my recovery. it boots to twrp
Click to expand...
Click to collapse
have you read the FAQs on my twrp thread because the answer is there (assuming you have flashed a custom rom and can boot it through the bootloader by selecting start)
TheFixItMan said:
have you read the FAQs on my twrp thread because the answer is there (assuming you have flashed a custom rom and can boot it through the bootloader by selecting start)
Click to expand...
Click to collapse
could you please link it. I am so grateful for you replying this fast
yolomonkey said:
could you please link it. I am so grateful for you replying this fast
Click to expand...
Click to collapse
https://forum.xda-developers.com/g5/development/official-twrp-3-1-1-0-moto-g5-t3699737
FAQs are on 2nd post

How do I relock bootloader and go back to stock on moto G5s?

A friend unlocked its bootloader and tried to root it with no success.
The phone works but only boots through fastboot, because when I press the power button it enters fastboot mode instead of booting.
I don't know what happened, as I was not the one who tried to root, so I just wanted to know how to revert back to stock and relock the bootloader, since the phone works normally.
freeZbies said:
A friend unlocked its bootloader and tried to root it with no success.
The phone works but only boots through fastboot, because when I press the power button it enters fastboot mode instead of booting.
I don't know what happened, as I was not the one who tried to root, so I just wanted to know how to revert back to stock and relock the bootloader, since the phone works normally.
Click to expand...
Click to collapse
If they flashed twrp and your phone can only be started normally through the bootloader see
https://forum.xda-developers.com/g5/how-to/fix-phone-reboots-recovery-mode-started-t3705325
If you want to root the phone stock can only be rooted with a system root
Most roots now use a systemless root which is not compatible with the stock kernel
You either need a custom rom to use the latest magisk root or if you want to stick with stock use an old version of magisk (can't remember which really old version works) or use supersu but flash the config zip first and set to system as default will be systemless
With regards to flashing stock download firmware and run these fastboot commands assuming you have fastboot set up on your pc
fastboot oem fb_mode_set
fastboot flash partition gpt.bin (do not flash unless you want to repartition the phone)
fastboot flash bootloader bootloader.img (do not flash unless you really need to replace the 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 erase customize (ignore any error)
fastboot erase clogo (ignore any error)
fastboot oem fb_mode_clear
fastboot reboot
To lock the bootloader do the above and then go back to the bootloader mode & enter these fastboot commands
fastboot oem lock
fastboot oem lock (yes type it again)
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
Then once restarted refresh all the firmware again with the commands from earlier
I have seen though that some boot.img are not officially signed so it may not lock
TheFixItMan said:
If they flashed twrp and your phone can only be started normally through the bootloader see
https://forum.xda-developers.com/g5/how-to/fix-phone-reboots-recovery-mode-started-t3705325
If you want to root the phone stock can only be rooted with a system root
Most roots now use a systemless root which is not compatible with the stock kernel
You either need a custom rom to use the latest magisk root or if you want to stick with stock use an old version of magisk (can't remember which really old version works) or use supersu but flash the config zip first and set to system as default will be systemless
With regards to flashing stock download firmware and run these fastboot commands assuming you have fastboot set up on your pc
fastboot oem fb_mode_set
fastboot flash partition gpt.bin (do not flash unless you want to repartition the phone)
fastboot flash bootloader bootloader.img (do not flash unless you really need to replace the 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 erase customize (ignore any error)
fastboot erase clogo (ignore any error)
fastboot oem fb_mode_clear
fastboot reboot
To lock the bootloader do the above and then go back to the bootloader mode & enter these fastboot commands
fastboot oem lock
fastboot oem lock (yes type it again)
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
Then once restarted refresh all the firmware again with the commands from the first post
I have seen though that some boot.img are not officially signed so it may not lock
Click to expand...
Click to collapse
Yes, thank you.
I was checking the relocking guides here in xda and seems signed boot images are the problem. Anyways, I'll check to see if it works.
freeZbies said:
Yes, thank you.
I was checking the relocking guides here in xda and seems signed boot images are the problem. Anyways, I'll check to see if it works.
Click to expand...
Click to collapse
Also just noticed you are talking about the Moto G5s - this is the Moto G5 Cedric forum
The Moto G5s forum is located
https://forum.xda-developers.com/moto-g5s
TheFixItMan said:
Also just noticed you are talking about the Moto G5s - this is the Moto G5 Cedric forum
The Moto G5s forum is located
https://forum.xda-developers.com/moto-g5s
Click to expand...
Click to collapse
Oh thanks, I'm gonna check it there, because it's indeed a Moto G5S.
Only thing I'd like to say is that on the XDA Labs app the only forum shown when I search for Moto G5S is the Moto G5 forum, no variants are presented, whom should I report this to, so that it can be fixed?
freeZbies said:
Oh thanks, I'm gonna check it there, because it's indeed a Moto G5S.
Only thing I'd like to say is that on the XDA Labs app the only forum shown when I search for Moto G5S is the Moto G5 forum, no variants are presented, whom should I report this to, so that it can be fixed?
Click to expand...
Click to collapse
No idea - don't use the app
The email on the Google play listing says
[email protected]
The thread for the app is
https://forum.xda-developers.com/android/apps-games/labs-t3241866

i want stock rom for moto g5 XT1676 to unbrick by blankflashing

hey
please i want help i want stock rom for moto g5 XT1676 to unbrick by blank-flashing and how do it in steps on my dead phone
sorry for bad english
my phone moto g5 rooted when i try to unroot by minimal adb past wtong stock rom in Minimal ADB and Fastboot folder when i intered command and i pasted this order :
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
//////////////////////////////////////////// after this step ended my phone not strat or boot /just white led blinking when connected by charger
mention / my phone is moto g5 xt1676 rooted but i flashed this stock CEDRIC_NPP25.137-93_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,forMotor ola Moto G5(XT1672) but my phone Motorola Moto G5(XT1676) please help me
If you can no longer get into the bootloader to flash correct firmware via fastboot see
https://forum.xda-developers.com/g5/how-to/rooted-moto-g5-run-morning-post-image-t3776012
TheFixItMan said:
If you can no longer get into the bootloader to flash correct firmware via fastboot see
https://forum.xda-developers.com/g5/how-to/rooted-moto-g5-run-morning-post-image-t3776012
Click to expand...
Click to collapse
after i did this steps and finshed the last command the phone not open
waleedzzz said:
after i did this steps and finshed the last command the phone not open
Click to expand...
Click to collapse
Did gpt & bootloader flash correctly?
Did you get errors flashing these?
Read the last few posts on that thread!
You can still boot with the sd card but to boot without it gpt & bootloader must be flashed successfully using firmware that is equal or newer to the version already installed
If you bricked your phone flashing an 8.1 soak test ota you may have to wait until 8.1 firmware is released
TheFixItMan said:
Did gpt & bootloader flash correctly?
Did you get errors flashing these?
Read the last few posts on that thread!
You can still boot with the sd card but to boot without it gpt & bootloader must be flashed successfully using firmware that is equal or newer to the version already installed
If you bricked your phone flashing an 8.1 soak test ota you may have to wait until 8.1 firmware is released
Click to expand...
Click to collapse
i soloved by this method These two files are those that are damaged when doing downgrade on your G5 bike
therefore here I leave you the most updated
so that the flashees and your phone can light up without the SD
if you flash these two you will not need to flash a complete firmware
Just open the folder that says Fastboot and click on the MAF32.exe file or START.bat
Once there you will insert the micro sd on your g5 motorcycle and turn it on in fastboot mode and take out the sd
and then connect your motorcycle g5 that is on and flash these commands
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
and that would be everything and you could start your phone without the micro SD
the link to slow

Categories

Resources