yashsingh1/xdaforums huggingface dataset:
[Moto G 2015 General] maxprzemo:
In the file flashfile.xml I have the following commands

<?xml version="1.0" ?>
<flashing>
<header>
<phone_model model="osprey_reteu"/>
<software_version version="osprey_reteu-user 5.1.1 LPI23.72-47 50 release-keysM8916_2020613.22.03.21.29R"/>
<subsidy_lock_config MD5="00b1a7c46832ca619f9090d3fc80ecce" name="slcf_rev_b_default_v1.0.nvm"/>
<sparsing enabled="true" max-sparse-size="268435456"/>
<interfaces>
<interface name="AP"/>
</interfaces>
</header>
<steps interface="AP">
<step operation="getvar" var="max-sparse-size"/>
<step operation="oem" var="fb_mode_set"/>
<step MD5="24686c2b4194b0782c786dafb030991a" filename="gpt.bin" operation="flash" partition="partition"/>
<step MD5="975b1f213c8d8185b0781ea969770c4c" filename="bootloader.img" operation="flash" partition="bootloader"/>
<step MD5="c751b87fe72bfe9e7335142c37a357b3" filename="logo.bin" operation="flash" partition="logo"/>
<step MD5="bd435d56348b55da05156296ede90b4e" filename="boot.img" operation="flash" partition="boot"/>
<step MD5="b561ef7de765963e9be94d60bc3b70a7" filename="recovery.img" operation="flash" partition="recovery"/>
<step MD5="d383c2fe7321c01724bf2efece371401" filename="system.img_sparsechunk.0" operation="flash" partition="system"/>
<step MD5="bd818059119b05bd2dfe789b32faf009" filename="system.img_sparsechunk.1" operation="flash" partition="system"/>
<step MD5="2450eca3d9600fe1b3c58f3a652931cc" filename="system.img_sparsechunk.2" operation="flash" partition="system"/>
<step MD5="b2fd477f53a3e8a8da9dd98f9e5953db" filename="system.img_sparsechunk.3" operation="flash" partition="system"/>
<step MD5="ec1f2cb287395a7638c6513e20a840bf" filename="system.img_sparsechunk.4" operation="flash" partition="system"/>
<step MD5="c6c7a6535ebcbc904d3089352a5e702b" filename="system.img_sparsechunk.5" operation="flash" partition="system"/>
<step MD5="b966d0c0730689c887f9e49465a8b41b" filename="NON-HLOS.bin" operation="flash" partition="modem"/>
<step operation="erase" partition="modemst1"/>
<step operation="erase" partition="modemst2"/>
<step MD5="792f1d96bc4b355492c607a6c1558402" filename="fsg.mbn" operation="flash" partition="fsg"/>
<step operation="erase" partition="cache"/>
<step operation="erase" partition="userdata"/>
<step operation="erase" partition="customize"/>
<step operation="erase" partition="clogo"/>
<step operation="oem" var="fb_mode_clear"/>
</steps>
</flashing>

Do I have add commands ?

fastboot erase customize
fastboot erase clogo

Needs it or not ?
[Moto G 2015 General] lost101:
I deliberately left them out of the commands listed in OP. For safety, and that they do not appear to be necessary.
[Moto G 2015 General] littleromeo:
Does anyone know if flashing stock rom and erasing userdata removes device protection?
[Moto G 2015 General] alexandrehdk:
Yes, because you are erasing all the configuration, including locking pins/patterns. You don't even need to reflash the system, just performing a factory reset at fastboot mode is enough for it.
[Moto G 2015 General] littleromeo:
No, factory reset doesn't erase pins/patterns if you have device protection enabled(which includes factory reset protection). This started with android 5.1 .

source: http://www.androidpolice.com/2015/0...evice-protection-feature-and-how-do-i-use-it/
[Moto G 2015 General] alexandrehdk:
By bad, I had outdated information about this topic.
[Moto G 2015 General] littleromeo:
I think since erase userdata command does the same thing as factory reset, I think it won't erase security settings. I hope someone here can confirm this.
[Moto G 2015 General] markos_7772:
Could you get any other way to change band frecs? Thanks
[Moto G 2015 General] sgloki77:
hi guys, I'm stock rooted with custom recovery so installing OTA update is not an option

upon receiving the OTA for my US version, I fired up fastboot and flashed system and radio from the latest factory image, but upon booting I couldn't turn wifi on, wtf?

fastboot commands I did

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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot reboot

I restored a nandroid for the time being and wifi is working, any ideas what I'm missing here?
[Moto G 2015 General] phobia09:
I did the same thing, and am experiencing the exact same issue. Wifi is not turning on.
[Moto G 2015 General] Tel864:
Someone has already mentioned that a quick way to flash is to copy and paste the commands into your cmd window. After flashing umpteen dozen roms, I've found out that this is sometimes the only way to keep from getting errors on the flash, especially with the sparsechunk files.

On the Moto G 2014 it was a common problem for a flash to give errors when you tried to flash some of the sparsechunk files. If you put all the commands in a bat file or copy and paste them then you won't get the errors. I just reflashed this AM and was getting an error on system.img_sparsechunk.4 and system.img_sparsechunk.5.

If you don't notice the error, then you'll get a boot loop and the phone won't boot.

So, if you get any type of boot loop or frozen boot, go back and verify that all your files match the instructions, then highlight and copy just the flash commands, then paste them into your cmd window and hit enter.

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 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 modem NON-HLOS.bin

fastboot erase modemst1

fastboot erase modemst2

fastboot flash fsg fsg.mbn

fastboot erase cache

fastboot erase userdata

fastboot reboot
[Moto G 2015 General] mow4cash:
Did you figure out a fix for the wifi not working? Same issue here.
[Moto G 2015 General] amp1590:
So I was trying to flash the correct factory firmware onto my phone. The sparsechunks all failed, but I still continued. Now my phone only halfway has the bootloader working. It connects to my PC as a device called Fastboot osprey S, but I can't use the cmd commands that the guide showed anymore. In the bootloader, only half the commands show properly. Power off, Recovery mode, Start and Qcom. I can also look at my phone information (IMEI, serial number, etc.) Any option (excluding info) besides power off makes my screen flash for a second every couple seconds. Also, plugging my phone into a computer instantly turns it on (to the flashing screens). Any help to factory reset my Moto G 2015?
[Moto G 2015 General] Tel864:
you don't want any to fail, since it probably won't boot if they do. Copy and paste all the commands together into the cmd window. That was the only way you could flash without errors a lot of the time with the 2nd gen Moto.

I mean copy and paste with each flash command on a separate line, not all in a string.
[Moto G 2015 General] lost101:
Are you including the following command: fastboot erase userdata?
[Moto G 2015 General] waj1234:
Yeah, following every step as per the flash by fastboot thread.
[Moto G 2015 General] lost101:
Please don't cross-post. The issue is either (a) phone is not being wiped, or (b) firmware image is not flashing. Provide a log of the fastboot flashing process - copy and paste command prompt. Take screenshots if necessary. You may need to try different flashing scenarios - different PC (or in Linux), different usb cable.
[Moto G 2015 General] waj1234:
Not got another pc to try unfortunately. Is there no way of going back to 5.1.1? If not its off back in box and I will buy something else lol. Only got the 8g as I thought MM would play nice with sd card which it dont do any better than any android version before.

When flashing 6.0 every step says Okay so assume its working correct, done it twice with same outcome. It works ok and is working now but facebook apps make playstore hang as it just sits on installing. Doing a factory reset within android just hangs on Erasing and entering recovery mode just says no command under mr green android.

Flashing 5.1.1 retail uk on my sons vodafone uk handset on same laptop went perfect though not tried putting MM on his yet and doubt I will try now.
[Moto G 2015 General] Kunu11:
[MENTION=6187905]lost1010[/MENTION] I did that and get:

C:\MM>fastboot boot recovery.img

downloading 'boot.img'...

OKAY [ 0.522s]

booting...

FAILED (remote failure)

finished. total time: 0.527s

Just some thoughts here...is E: the SD Card? Can it be that it is looking for the cache on my SD card and it is not finding it? Is there an image for the cache I can flash?
[Moto G 2015 General] waj1234:
Just add too that I have this micro sd car - 32GB MicroSDHC Card, Lexar Professional 1000X, C10, UHS-II, U3, 150MB/s and any apps installed to it are un useable and it even states that its a slow card. But its a fat card and genuine so this MM update is far from a finished product. I did get facebook apps installed but it takes 5 mins plus before they install.
[Moto G 2015 General] lost101:
That SDCARD may be the source of all your sorrow.

Everyone: Do not report issues unless you have removed SDCARD, flashed firmware image and tested ROM fully. Installing apps to SDCARD is above and beyond what this tutorial is about.
[Moto G 2015 General] waj1234:
The sd card was not inserted at any point during my issues listed. Just tried it now and moved a few apps to test. removed immediately and put it in my sons phone with 5.1.1 installed and tried same apps moved and its perfect.

Just hope there will be a way to go back to 5.1.1 as mine is not the same phone. Still takes an age to factory restore and still no command message in recovery mode. Tried again to fastboot 6.0, no errors at any stage but still same. I could not even sell it as it is at the moment.
[Moto G 2015 General] jakeflake:
Hey,

Does anyone know how to do the stuff operating on a mac? I got Android Studio, but I am not sure if this works, Im pretty clueless. Thanks!
[Moto G 2015 General] lost101:
I think you can use the files included here on Mac:

https://www.androidfilehost.com/?fid=24052804347802267​

To test:

./adb devices

./fastboot devices​
[Moto G 2015 General] jakeflake:
So Its basically the same procedure, and i just add ./ in front of every command?

And a last question, I know it sounds stupid but how do I navigate to the path where the files are? It just shows me that its in mydrivesname>motog(thats the folder name). How do I write that in the terminal?

Thanks for the quick answer!
[Moto G 2015 General] lost101:
Please use Google to answer such questions.
[Moto G 2015 General] lost101:
To anyone unable to access recovery options, these are the official instructions: (Scroll down the 'External Reset')

https://motorola-global-portal.cust...prod_answer_detail/a_id/105537/p/30,6720,9390​

The following command may be required:

fastboot erase cache​
[Moto G 2015 General] waj1234:
Thanks for posting that link. I wiped mine that way and installed 6.0 again as cant go back to 5.1.1 then wiped it again in recovery before first boot and its a different phone. Though both Facebook and facebook groups took a while to install compared to all the other apps byt did eventually. Maybe they need an update for MM, who knows. It is now running smooth though almost no space left. Shame sd cards are useless still but next time I will get a larger memory.:good:
[Moto G 2015 General] lost101:
Glad to hear that resolved it.
[Moto G 2015 General] willygoodboy:
Hello guys i followed this tuto with the "XT1541_OSPREY_RETEU_6.0_MPI24.65-33.1_cid7" firmware and now the phone says start up failed, your device didnt start up successfully. Use the software repair assistant on your computer......

My phone is a XT1541, all the flash steps was okay.

What's wrong

Please help
[Moto G 2015 General] lost101:
Did you do a "Factory Data Reset" in Android Settings prior to flashing? See post above about how to do this in Stock Recovery:

http://xdaforums.com/showpost.php?p=65151849&postcount=393​
[Moto G 2015 General] kiekeboeboe:
Is there a difference, doing a factory reset in android, or doing it in recovery?
[Moto G 2015 General] willygoodboy:
Yes i did this before.

I forgot to say that The bootloader say "failed to validate system image"

Thanks
[Moto G 2015 General] lost101:
Check the names of the files in the firmware folder. Do not simply copy and paste commands from the tutorial. You need to flash all sparsechunks. Provide a log. Show me the contents of command prompt. Take screenshots if necessary.
[Moto G 2015 General] lost101:
There should not be any difference, but as you see from the comments above - factory reset in Android failed to do the job properly in that case.
[Moto G 2015 General] Richard9026:
What do these commands do ?

fastboot oem fb_mode_set

fastboot erase customize

fastboot erase clogo

fastboot oem fb_mode_clear
[Moto G 2015 General] lost101:
All can be omitted, but are part of the default series of flashing commands. 'customize' and 'clogo' are two partitions that can be safely wiped. 'oem fb_mode' simply forces the phone to reboot into fastboot mode if something interrupted the flashing process - i.e phone rebooted accidentally.
[Moto G 2015 General] willygoodboy:
Hello lost101

Thanks for your help. I verified the names of files and i saw that i forget the sparsechunks 6. I'm an idiot. sorry for this. you're right i copied and pasted from tuto.

Thanks again
[Moto G 2015 General] Weekndz:
Can someone help me? i install a wrong firmware and now my phone say Startup Failed. and i try to install the 2 gb version and get no sucess, and try to back to lollipop and fall again, because my boot is locked. please help me. XT1550 1GB RAM 16 GB stroge
[Moto G 2015 General] apina666:
hi. i have xt1541 and have custom rom and twrp in it. now i want to flash stock 6.0 firmware, can i just flash everythin in fastboot or should i first flash stock 5.1.1 before flashing stock6.0 firmware?
[Moto G 2015 General] lost101:
Read the first post. Change the names of sparsechunks to match actual files in firmware folder. Provide a log. Show me command prompt results - take screenshots

Just flash the 6.0 firmware image. If anything else was required, I would have said so in the tutorial.
[Moto G 2015 General] Weekndz:
How i do that?? i try install 6.0 2GB Version in 1GB Version, no sucess, try back to lollipop, no sucess again, now my phone is bricked, and my bootloader blocked. what i need do??

XT1550 1GB Ram 16 Storage
[Moto G 2015 General] lost101:
Did you do a "Factory Data Reset" in Android Settings prior to flashing? Here is how to do it in Stock Recovery: (Scroll down to 'External Reset')

http://xdaforums.com/showpost.php?p=65151849&postcount=393​
[Moto G 2015 General] Weekndz:
[IMG="Error"]https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xtf1/v/t35.0-12/12696635_183983778630374_1797060962_o.jpg?oh=794561156a762c7984e77b1693834749&oe=56B90576&__gda__=1454895290_4c1ce7f0fa1720c1f6c76d71889f6aee[/IMG]

See that, this happens when i put the 2gb ram rom in my 1gb

this happens when i try install the 5.1
[Moto G 2015 General] lost101:
How are you flashing the files, in command prompt? Show me what is being said there. Copy and paste the screen.

The following command might make Stock Recovery work:

fastboot erase userdata​
[Moto G 2015 General] lost101:
[MENTION=7091729]Weekndz[/MENTION] - Don't use a directory name with spaces. " Moto g 5.1" is bad news. "Motog_firmware51" is better.
[Moto G 2015 General] Weekndz:
in the prompt i extract all rom files with adb, and type that:

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 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 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 i tipe that, show that for me:

all that in the XT1550 2GB RAM ROM

and the my is XT1550 1GB RAM ROM

---------- Post added at 10:31 PM ---------- Previous post was at 10:28 PM ----------

right, i will try again it "Motog_firmware51"
[Moto G 2015 General] kiekeboeboe:
Could it be there are 6 sparsechunks?
[Moto G 2015 General] Weekndz:
Same ****, fail in the 6.0 2GB.

https://scontent-dfw1-1.xx.fbcdn.ne...=9ae95c739ef895c5db21000b864f8c5c&oe=56B8DF20

Fail in BootImage, Recovery Image and in all sparsechunk..
[Moto G 2015 General] lost101:
You where warned in first post not to flash a firmware image for a model different from your own. You may be stuck now. You cannot unlock Bootloader unless you have activated "Enable OEM unlock" in Android > Settings > Developer settings. That is the only way around the 'preflash validation' error.

I guess you now have to wait for the XT1550 1GB 6.0 Firmware Image to become available. Alternatively, you can take the risk and try flashing the Dual-SIM XT1543 Retail Brazil 1GB 6.0 Firmware image.
[Moto G 2015 General] Weekndz:
Don't have any Brazillian XT1550, Its only Asian, is that version i'm trying to install.. i don't put other versions O.o
[Moto G 2015 General] lost101:
I'm suggesting to you a Dual-SIM 6.0 1GB Firmware image that may work on your Dual-SIM XT1550.
[Moto G 2015 General] Azyreal:
Hello, I've tried to flash my XT1541 Europe 2GB model with Android 6 using this tutorial, but I didn't flash the sixth sparsechunk... Now I'm blocked on bootloader screen with the error, "Failed to pass validation, backup to fastboot". I assume I get that error because of the sixth file I didn't flashed, can I re-do the tutorial or do I have to do something else, like flash my old version (or am I stuck with a brick and cannot do anything with it until the end of time?)? I hope you can help me!
[Moto G 2015 General] lost101:
Re-do tutorial, only flashing sparsechunk files in your firmware folder.
[Moto G 2015 General] Azyreal:
Hello! Thank you for your time, it's working great now! I hope 6.0 is good and not as buggy as everyone says :)
[Moto G 2015 General] Zavxda:
Ok I have tried this a couple times and am getting preflash validation failed for 'boot' and sparsechunks say (bootloader) Invalid signed image

(bootloader) Preflash validation failed... Please help moto g 3rd gen 1540
[Moto G 2015 General] lost101:
What is the update history of your device? Have you ever updated to MM? What image are you now trying to flash?
[Moto G 2015 General] Zavxda:
Yeah I accidentally went to 6.0 and I need 5.1... I am using the stock image for Moto g 3, 5.1.1. I just tried to do it again the 'software' way and had same results. I forgot to mention partition got.bin also failed. It says (okay) but then after 'writing' it says preflash failed and remote failure...

Thanks
[Moto G 2015 General] lost101:
FAQ in post #2 states:

Can I restore Factory Firmware if my Bootloader is locked?

Yes. However attempting to downgrade to an older version of Android may fail. Even with an unlocked Bootloader, downgrading cannot be guaranteed.​
[Moto G 2015 General] Zavxda:
So then it will just not work on this phone??? :confused:
[Moto G 2015 General] lost101:
You can't downgrade with a Locked Bootloader. If you choose to unlock, then maybe the downgrade would work. However it's safer to flash one of the XT1540 Stock ROMs from here:

http://xdaforums.com/2015-moto-g/development/rom-stock-motorola-rom-collection-t3296964​
[Moto G 2015 General] Tel864:
Awful, you're assuming people actually read the directions and FAQ. [emoji1]
[Moto G 2015 General] BurningKoala:
It should be possible to downgrade, you shouldn't flash the boot loader and the partition gpt
[Moto G 2015 General] jacbelfer:
It's truth ?
[Moto G 2015 General] lost101:
Yes, you can skip other files and only flash the system.img_sparsechunks. However if those are giving a "preflash validation" error - then they won't flash at all. Unlocking the Bootloader can sometimes remove this error.
[Moto G 2015 General] Zavxda:
I actually read all of the directions many time but the directions do not state "fail" mean that the phone will completely ignore the comands and restart in current OS version like normal...

More awful to assume I didn't read them... Lol

---------- Post added at 10:39 PM ---------- Previous post was at 10:26 PM ----------

Now when I turn on(or off) the phone it boots directly to the bootloader... I can stil boot if i select start. If I take a look in the logs it says utag "bootmode" configured as fastboot. lol

How can I change this back?
[Moto G 2015 General] axbom:
Thank you very much for an easy to understand guide! I'm experiencing a few problems though. I've got a XT 1541 and I'm using the 6.0 version flash. I had trouble with the phone bootlooping so I decided to give this a go. Did a factory reset, followed the guide but missed one sparsechunk file (should've ready the FAQ..). I then redid the whole procedure including all sparsechunk files, which did not help with the bootlooping and now I can't get to the recovery menu from the fastboot menu to factory reset(just goes into bootloop). Everything said OKAY both times. After this I tried to just flashing the sparsechunk files, which then said something along the lines of not enough memory. When trying to use for example fastboot oem fb_mode_set nothing happens now and when trying fastboot erase cache it just says "FAILED (command write failed (Unknown error)). Any ideas on how to fix this?

Thanks!
[Moto G 2015 General] jcalderonv74:
Did you already this command from fastboot?

fastboot oem fb_mode_clear

While in fastboot loop, this command exits the loop and allows your device to reboot normally.

Enviado desde mi MotoG3 mediante Tapatalk
[Moto G 2015 General] Zavxda:
I think so but I am not sure I did it correctly... I did it from the same folder that all the 5.1.1 files are... Does it matter?

I don't think it's in the loop... Not like it keeps restarting just when I power on or off (or plug in the usb to computer)it goes to bootloader and then I can select start or shut down
[Moto G 2015 General] jcalderonv74:
Yeah I understood that is called fastboot loop.. Retry that command should clear the flag that forces the phone to startup on fastboot mode

Google it you will find a lot of info ;)

Good luck

Make me Know if helps

Enviado desde mi MotoG3 mediante Tapatalk
[Moto G 2015 General] Zavxda:
Well this time it worked. Thanks a lot for your your help! I think when I did the Google search it came up with an older slightly different comand that didn't work. So glad it worked...
[Moto G 2015 General] kosmasgr:
hello :) Folder from MM Retail Europe (1GB) - XT1541_OSPREY_RETEU_6.0_MPI24.65-33.1_cid7 has also system.img_sparsechunk.6 :confused: Need to flash it also with fastboot ?
[Moto G 2015 General] lost101:
First post states:

NOTE: system.img_sparsechunks may differ in number + name - Always check contents of folder you're working with.​

This guide cannot be blindly followed due to the above reason.
[Moto G 2015 General] eemgee:
I've flashed the eu. 2GB image on a French retail phone but it's still showing as French on the about screen. Has it flashed our am I missing something. I used rsd life to flash
[Moto G 2015 General] Mimisf:
i can't flash 5.1.1 image in xt1541 upgraded to MM.it fails in the first steps. Help please?