yashsingh1/xdaforums huggingface dataset:
[Moto G 4G Android Development] keevre:
Can someone please reupload the Stock firmware for the retail EU XT1039?

I currently have my phone with unlocked bootloader, TWRP 2.8.3 and SlimROM 4.4. Reverting to stock will make me eligible for updates? Will I lose root access?
[Moto G 4G Android Development] Germknoedl:
try this:

http://xdaforums.com/moto-g/4g-development/rom-stock-motorola-4g-kitkat-rom-t3160127
[Moto G 4G Android Development] keevre:
I flashed logo.img and now it just stands at the logo screen (the M logo),

console says <waiting for device>

what do
[Moto G 4G Android Development] keevre:
I managed to flash the 21.13 version but the phone now says that is update. I was hoping to receive the OTA update by flashing the stock ROM.

I already made a factory reset and motorola contextual services is updates
[Moto G 4G Android Development] Germknoedl:
OTA only works with stock recovery.
[Moto G 4G Android Development] keevre:
And this doesn't change the recovery? How do I get the stock recovery then? because I thought the file recovery.img was the stock recovery!
[Moto G 4G Android Development] diordnAMRZAR:
Mine didn't update as of yet

Flashed mine with the canadian XT1040, 21.1.54 archive, piece by piece as the first post instructs. The phone works but no updates are available as of yet. Wonder if it just takes time to recognize that it needs an update? Checking with System >> Updates generates: "Your System Is Up To Date" in Big Blue letters. Well at least the nags to update are gone, but I wonder why mine doesn't see the new lollipop update immediately? Strange, non? :confused:
[Moto G 4G Android Development] sdembiske:
Not seeing carrier Lollipop update immediately ... ?

------------------------------------------------------------------------------------------------------------------

Assuming you installed the latest version: Android 4.4.4 (Retail Canada) KXB21.14-L1.65 CID14 ... ?-

- confirm your CID is a match: CID 0xE (= 14)

- confirm you are not still rooted: i.e., will not update from carrier if your phone is rooted.

- confirm latest Motorola update services app is up-to-date: Available on Play Store

- try a factory reset: making sure you have backed up your data. (I had to do this to restore

WIFI and perhaps this made the difference).

NOTE: you can also get Lollipop stock update courtesy of lost101 from here:

http://xdaforums.com/moto-g/4g-development/rom-stock-motorola-4g-lollipop-rom-t3142816

Good luck.

---------- Post added at 08:09 PM ---------- Previous post was at 07:11 PM ----------

As far as my experience goes: It does install stock recovery.

Make sure you followed the install procedure EXACTLY and reference my post here. http://xdaforums.com/showpost.php?p=63725642&postcount=849

Cheers
[Moto G 4G Android Development] diordnAMRZAR:
Still left wondering

Done all the stuff -- updated the Motorola Update Services, flashed

The .65 archive, and unrooted. Still no update on offer from Motorola. My CID is 14. What might have I messed up or elsewise missed?

Jut for fun And when I have a chance I'll restore my backup of kitkat to see if the update offers return. hopefully the ota will magically arrive beforehand.

Still baffled.
[Moto G 4G Android Development] sdembiske:
Still Baffled ...

A

---------------------------------------------------------------------------------------------------------------

All I can think is that if you installed a custom rom, that may be where the issue is arising from. Did you do a factory reset, wipe cache and dalvik cache (all in sequence and repeated again) before you installed the stock firmware copy ... ?

Another suggestion to try: Check out this fellows video on one potential solution (I have not tested it): https://www.youtube.com/watch?v=gF1KasRo2iY

If all else fails, the Lollipop update for the Canada version that I provided the link for is for Rogers/Fido (CID confirmed by lost101 and tested by me) and as there will be no further updates from what I understand for this phone model from Motorola, you might as well give that a go. After installing, back up your data and do a factory reset to restore WIFI).
[Moto G 4G Android Development] diordnAMRZAR:
Do it myself

Thanks for your helpful suggestions. The stuff in the youtube video -- found that info earlier -- this technique has yet to work -- on my phone.

Downloaded the complete L 5.1 archive for my phone, and will flash that in lieu of an OTA -- which ever comes first in 7 days.

BTW which update did you get OTA? 5.1? Or newer like 5.1.1?
[Moto G 4G Android Development] sdembiske:
-----------------------------------------------------------------------------------------------

5.1
[Moto G 4G Android Development] RootJunkie:
Hi guys,

Probably wrong thread but here goes. I have(or had) a Moto G LTE(XT1039 UK) that was working perfectly except not recognising sim. It was on Tesco 4.4.4 when I got it. Someone recommended to unlock bootloader and replace firmware with something else. I successfully unlocked bootloader and downloaded RETAIL-GB_4.3_14.10.0Q3.X-76-LGG-8_cid7_CFC_1FF_svc.xml.modaco.r3 and used fast boot to flash it.

I used minimal ADB and fastboot with MDM drivers already installed. Followed this guide https://www.youtube.com/watch?v=-L44JqysUy8 to install it. Followed it exactly and waited until nothing happened then I decided to enter recovery mode from the fastboot mode I was already in. As I did that and rebooted I got stuck in the 'Warning Unlocked Bootloader screen' and it then went blurry and screen began to turn white. It has one of three or four different effects each time I reboot(screen messes up). I can get into fastboot mode and tried the same method with same firmware twice more.

Please advise as to what to do next. I don't want to make it worse.

Thanks
[Moto G 4G Android Development] dc239:
Maybe I'm wrong but i think that you flashed Jellybean 4.3 for moto g without LTE (falcon) on the moto g with LTE (peregrine)......If you can't get into the bootloader mode or your PC can't recognise it it's most likely bricked..

If you can get into the bootloader screen try to flash stock 5.1 for XT1039 for UK region

BTW did you used a TESCO sim ? It's maybe why it can't recognise your sim
[Moto G 4G Android Development] RootJunkie:
Hi mate. Thanks for the reply.

I fixed it. Flashed 4.4.4 retail version and it worked although had to clear utag boot setting. Might have been the fsstboot commands instead of the mfastboot I was supposed to use for xml.zip files

I've successfully flashed it but it's still showing tesco baseband. This is probably normal but I was thinking that might have helped sim card problem. Sim card still not recognised.

This phone was working in another country so the sim reader and antenna are fine. I'm hoping 5.1 might help. Will try to update Motorola services and ota 5.1. Then rooting will be last option.

---------- Post added at 09:56 AM ---------- Previous post was at 09:51 AM ----------

Don't know if it previously used Tesco sim but I tried a Tesco sim as well. Didn't detect it.

I bought it from an auction. It came like this. Definitely something with firmware
[Moto G 4G Android Development] RootJunkie:
I've managed to update to 5.1. Thanks guys
[Moto G 4G Android Development] LeighR:
Hi guys, my phone seems pretty messed up. It's a XT1039 but I've accidentally wiped just about everything. I have an unlocked bootloader and I can get into fastboot but none of the options work - if I select "Recovery" (or any other option) the phone just turns off.

I've tried to flash a stock firmware image in the form of a xml.zip but when I try to mfastboot flash anything, the tools work on my PC but just hang on < waiting for device >.

Any advice would be greatly appreciated. Ideally, I'm looking for a system.img file that I can simply flash with fastboot.

Thanks
[Moto G 4G Android Development] lu99ke:
When your phone is in fastboot... and you run a cmd prompt "fast boot devices" - is your phone recognised?

Edit - make sure you are doing from your platform tools folder in your android sdk...
[Moto G 4G Android Development] LeighR:
Yes, although the mfastboot.exe is in another folder
[Moto G 4G Android Development] lu99ke:
Ok good.... So move your mfastboot to that folder and the files from the open in post and try again... good luck!
[Moto G 4G Android Development] LeighR:
I get:

target: max-sparse-size: 256MB

error: cannot load 'gpt.bin': No Error

edit1: I had to extract the XML file and copy all the files into the same folder as everything else (platform-tools). Everything flashed ok and the phone appears to be booting :) I'm hanging on the boot animation at the moment, hopefully it will run.

edit2: It worked! Thanks :)
[Moto G 4G Android Development] erpampa92:
the link does not work
[Moto G 4G Android Development] lost101:
http://xdaforums.com/moto-g/general/index-moto-g-falcon-factory-firmware-t3110795​
[Moto G 4G Android Development] lu99ke:
No probs :)
[Moto G 4G Android Development] aamszia:
so slow speed .. wben on new links ..

i am recieving 5 Kb/sec
[Moto G 4G Android Development] lost101:
Peregrine Stock Firmware Images also available here:

http://xdaforums.com/moto-g/general/index-moto-g-falcon-factory-firmware-t3110795​
[Moto G 4G Android Development] croissanwish:
*disclaimer: I'm still fairly new to this!*

Hi. Could anyone help me with this issue? (below is a little bit of background!)

My moto g originally came with the ics variant of the firmware, but I upgraded to kk after the update. So now, I have USC_XT1042_4.4.4_KXB21.14-L1.41_cid9_CFC. The nightly build of cyanogenmod became really unstable, and I didn't do any backups (whoops!), so now I have to roll back to stock firmware using adb.

(/backgroud)

In the many times I've tried it, I get the following error message (copied from command prompt):

And, from my device, I'll see "version downgraged fro primary_gpt"

Now I know I did everything correct because I put mfastboot in the correct folder (the folder that's being used in adb), and my bootloader is unlocked (I get the warning screen during startup).

I am using the correct firmware (as I have generated my device info using adb a while back and it matched with the firmware I downloaded from this thread)

Even though I did everything correctly, when I reboot, I still get the unstable version of the cyanogen mod I was running, and not stock. Does anyone know where the problem is? I can provide more info if needed.

Thanks in advance!
[Moto G 4G Android Development] lu99ke:
Try a lollipop FW as opposed to KK

I think there may be issues with trying to go backdown to a KK FW after the bootloader has been upped to LP ( your CM version would have been LP or MM right? )
[Moto G 4G Android Development] croissanwish:
Right, I am running a nightly build of CM and it's LP. I'll try the lollipop FW and I'll report the results, thanks!

EDIT:

Still no dice. I used the firmware with the following name: XT1042_PEREGRINE_USC_5.1_LPB23.13-60_cid9_CFC

EDIT2:

So I ran 'getvar all' and my FW version is 4.4.3. That means my firmware changed from an XT1042 to an XT1045 somehow. In either case, I need a xt1045 4.4.3 FW. The given download sources at the beginning of this thread for this FW is currently down, however. Does anyone know a mirror I can download the xt1045 4.4.3 FW from?

EDIT3:

So I used the really slow file factory host for the xt1045 4.4.3 firmware and, when I used adb, it still didn't return to stock :'(
[Moto G 4G Android Development] lost101:
Can you provide the full system version info from: Settings > About phone?

Firmware Images are available here:

http://xdaforums.com/moto-g/general/index-moto-g-falcon-factory-firmware-t3110795​

Be careful with firmware older than 5.1 - accepting OTA updates may hard-brick the phone. You will also get constant nagging to upgrade. See FAQ in Firmware Image Index for info on how to disable OTA Updates.

If your boot loader is unlocked and for best experience, try the USC 5.1 Optimized ROM from here: (Follow flashing instructions exactly)

http://xdaforums.com/moto-g/4g-development/rom-stock-motorola-4g-lollipop-rom-t3142816​
[Moto G 4G Android Development] croissanwish:
Thank you for your reply. I actually can not provide my full system version. The nightly build of Cyanogen I'm currently running is very unstable (Every app and process force closes rendering the phone useless when on).

I can give you what I get from 'fastboot getvar all', if that helps.

I tried almost every FM for the xt1042 and xt1045 from the first link you provided me, and I tried to sideload the USC 5.1 optimized rom with no avail.

EDIT: my ota updates are off, my bootloader is unlocked, and here is what the 'getvar all' command return:
[Moto G 4G Android Development] lost101:
[MENTION=6336709]croissanwish[/MENTION] - First of all, fastboot is in no way user-friendly. It will completely fail to flash anything - yet have the outward appearance of amazing success. Provide fastboot logs. Copy and paste command prompt. Take screen-shots if necessary.

Secondly, when flashing the Optimized ROM. I include some very specific flashing instructions in that thread, that need to be followed - to the letter.
[Moto G 4G Android Development] lost101:
[MENTION=6336709]croissanwish[/MENTION] - Are you flashing all of the 'system.img_sparsechunk' files in the actual firmware folder and have named them correctly in the fastboot commands?

You are not supposed to cut and paste the example commands, but tailor to each individual firmware image.

The 'preflash validation' error is due to flashing an older firmware image when you have already flashed the 5.1 Bootloader. This may also be a reason why the firmware image is not flashing / Android is not booting.
[Moto G 4G Android Development] croissanwish:
Yes. I ensured I am using the exact name of the files, and I have the mfastboot.exe in the same folder.

Good observation. I haven't tried the xt1045 5.1 FW yet, so I'll give that a go! :fingers-crossed:

I'll report my results. Thanks.

EDIT:

Alright, so tried to install both xt1045 5.1 firmware versions (XT1045_PEREGRINE_RETUS_5.1_LPB23.13-37_cid9_CFC and XT1045_PEREGRINE_RETUS_5.1_LPB23.13-61_cid9_CFC) and I am still getting the same issues, however, there are no more 'preflash vaidation failed' messages, so that's a plus. I ensured that I typed the correct filenames and copied mfastboot into the folder I opened the command window from.
[Moto G 4G Android Development] lost101:
[MENTION=5714068]@croissanwish[/MENTION] - I don't see where you state what actually are your issues? I'm going to assume Android is not booting?
[Moto G 4G Android Development] croissanwish:
Oh, sorry, [MENTION=1006674]lost101[/MENTION] .

I am trying to flash my moto g back to stock using adb. Each time I try to do so, I don't go back to stock. Instead, I go to the rom that I have previously installed on my device (CM 12 nightly build).

So, it's as you said (I think), android isn't booting, and, instead, cyanogen mod is.
[Moto G 4G Android Development] lost101:
Apologies, I see now you did describe this before. For the record, CyanogenMOD is Android.

I suspect I know what your problem is. Corrupt emmc. Certain partitions have become read-only, including /system. This is why you cannot remove CyanogenMOD.

It's a common 'old-age' problem for Moto G and there is no cure. The only work-around I know is that someone managed to reinstall CyanogenMOD or another AOSP ROM via custom recovery.
[Moto G 4G Android Development] croissanwish:
Ahhh, I see. I'll still try to to find the solution to that problem. If, so, I'll let everyone know when I do! Thank you so much for your help!
[Moto G 4G Android Development] schrickz:
Try another stock firmware. I've got the same problem too with moto E a month ago. The stock firmware you've flashed it's not for your moto G.

My ? to U'r ?
[Moto G 4G Android Development] Marshall0121:
Hi, i have a rootet Moto G LTE xt1039 with installed 5.1 and can not update because of root and want to go back to normal to sell it.

Can i do this with this tutorial? :confused:(sry for noob question)
[Moto G 4G Android Development] lu99ke:
Absolutely... But... Select a LP fw as you will prob have issues if you try to go back to 4.4 .. Also if you have unlocked your bootloader... the warning screen on boot will remain..
[Moto G 4G Android Development] martinisok:
Not sure where you would get the LP firmware.

You could follow this tutorial but miss out the lines motoboot.img and gpt.bin. This would get you 4.4 then do an ota update to get latest LP.
[Moto G 4G Android Development] lu99ke:
Link to full list of MOTO FWs here - look for file factory link under step b)

Xt1039 LP FWs on page 17...

http://xdaforums.com/showthread.php?t=2542219

Just make sure you match your CID... I used this Fw on my Xt1039 just the other day and worked a charm... No OTA update required
[Moto G 4G Android Development] ErvinsAndroid:
I am on lollipop, will there be any problems?

Hi there, I tried to install a custom recovery like twrp or cyanogenmod recovery in the xt1039 but the custom recovery wouldn't install. All the steps I performed were correct, unlocked bootloader, fastboot mode, adb drivers working correctly.

I tried to install the latest twrp, the message on my computer was that it was installed, but when I tried to boot into recovery, the phone would simply turn off.

No idea what causes this. I tried to root the phone but rooting also failed. Therefore I am trying to return it to stock, lollipop or kit kat, both ok.

If I use your instructions to revert it to stock, is there a chance I might encounter any problems? I am still on Lollipop stock with an unlocked bootloader and root but without the binary or busybox.

Thanks,

Ervin
[Moto G 4G Android Development] pio80:
Hi , maybe have you got simply solution, step by step [emoji1] how to restore a proper permission of system and data partitions ? Thanks
[Moto G 4G Android Development] lost101:
You are off-topic and I believe I already answered your question above. Corrupt emmc (read-only) has no solution.
[Moto G 4G Android Development] pio80:
Beautiful [emoji22]
[Moto G 4G Android Development] hottabi489:
Hello, friends. Can i update my Moto G XT1045 Cricket to android 5? now i have 4.4.4 and locked bootloader.
[Moto G 4G Android Development] Vermillion96:
Yes, why not? Unlock the bootloader in first place.

However, you should know that if you flash Android 5.1, you´ll upgrade your bootloader. If you want to come back to Kitkat, you´ll have a screen-flickering issue. That is because the kernel of Kitkat is not 100% compatible with the bootloader of Lollipop.
[Moto G 4G Android Development] ejlmd:
I have the same device (Cricket XT1045) as well. AFAIK the bootloader cannot be unlocked.
[Moto G 4G Android Development] xwalero:
The Filefactory link for Moto G LTE (XT1040) LATIN AMERICA RETAIL is down :( can someone reupload it?

btw, the CID app said 0xC, I'm assuming that's 12 in hex, but I'm still not sure which one to download... I live in Chile and I bought this phone from someone else.
[Moto G 4G Android Development] lost101:
[MENTION=4357757]xwalero[/MENTION] - You can flash any XT1040 firmware image you want.

[INDEX] Moto G [Falcon][Peregrine] Factory Firmware Images​
[Moto G 4G Android Development] audinswfc:
Can anyone help me find stock 5.1 EE GB firmware for XT1039 please?
[Moto G 4G Android Development] lost101:
The post above yours links to all available Firmware Images. No image for EE GB has ever been made available - did EE GB actually sell their own branded XT1039?

FYI, any XT1039 Firmware Image can be flashed on any XT1039.
[Moto G 4G Android Development] Budrkarolis:
Please refresh links XT1039 for Europe, thx

Please refresh links XT1039 for Europe, thx
[Moto G 4G Android Development] lost101:
[INDEX] Moto G [Falcon][Peregrine] Factory Firmware Images​
[Moto G 4G Android Development] tip_ex:
Hi Guys,

I have been reading this thread several times, before relocking a device i have been given. I am a newbee, and I have several questions. Hope somebody can help as this is old. My phone is XT1040 Virgin Mobile Canada.

Let's start with one question.

I have installed cid getter, and ro.boot.cid=0xE.

I am not sure which file to download, as all files says CID12 or CID14, not CIDE.

However the file section shows only: Android 4.4.4 (Retail Canada) KXB21.14-L1.65 CID14. Is that the one ?

Thank you.
[Moto G 4G Android Development] lost101:
Visit the index thread above your post for latest available firmware images. CID14 is for your handset.
[Moto G 4G Android Development] tip_ex:
Hi. Thank you for your input.

I will d/l this: Retail Canada - XT1040_PEREGRINE_RETCA_5.1_LPBS23.13-35.5-1_cid14 (Newer Build) from the post above mine, and will try it.

Thanks again.
[Moto G 4G Android Development] tip_ex:
Hello All.

I have d/led the firmware and i see that everything from the multiple command lines are in it. Which is awesome. it doesn't seem to be too complicated.

Here is my 2nd question. What version of mfastboot needs to be used? and if you have a link, it would be much appreciated, that way I am sure that i am d/ling the right file.

Thank you.

---------- Post added at 03:35 AM ---------- Previous post was at 03:31 AM ----------

Hello All.

never mind the above. I found this. I will try it, and let you guys know the outcome.

http://xdaforums.com/general/rooting-roms/using-mfastboot-exe-to-unbrick-motorola-t3203518
[Moto G 4G Android Development] tip_ex:
Hi again.

I have followed the procedure, and everything went fine on the first time. Everything completed correctly. The issue is that I am not able to log in to google.

- I have tried 4 different accounts (my whole family), and it acknowledges it since it sends an e-mail saying new login bla bla bla.

- if i put a wrong password it tells me that the password is wrong.

The behavior is that google play services stop working, and starts the procedure of sign in again.

I have tried the following:

- delete all data for all goolgle app.

- reset the account to default.

- clear the cache

Still the same thing.

I am wondering if you or anyone came across the same issue and have an idea that can guide me.

Right now, i am downloading some older firmware to test.

Found out I cannot downgrade firmware.

writing 'partition'...

(bootloader) Preflash validation failed

FAILED (remote failure)

Thank you.
[Moto G 4G Android Development] lost101:
[MENTION=7923864]tip_ex[/MENTION] - When flashing firmware image, did you include the fastboot command: mfastboot erase userdata?

Also, use this version of mfastboot: https://www.androidfilehost.com/?fid=24052804347778493

Final note; do not downgrade via firmware image. Use custom Stock ROMs with OTA Updates disabled:

[ROM][PEREGRINE][5.1][STOCK] Stock Motorola 4G Lollipop ROM Collection​

[ROM][PEREGRINE][4.4.4][STOCK][FLASHABLE ZIP] Stock Motorola 4G KitKat ROM Collection​
[Moto G 4G Android Development] staknhalo:
Hi, I am getting the same error. Whenever I try to log into my Google Account upon first boot (or anytime after), Google Play Services crashes and I'm not/never logged in. Yes, I did use 'erase userdata'. I can skip it, but can never log in.

Edit: I just skipped initial sign in, went to Chrome and downloaded the latest Play Services from APK Mirror and it all worked after that.
[Moto G 4G Android Development] jilebi:
Hi,

I have a US Moto G LTE XT1045 Cricket with CID0x10 and stock ROM 4.4.4. Bootloader is locked and phone is not rooted. I have read this entire thread, but could not find a conclusive answer. Hence, the following question. Can somebody please help/share?

I would like to upgrade to Stock ROM Lollipop 5.1 from ATT posted in OP, filename - XT1045_PEREGRINE_ATT_5.1_LPB23.13-61_cid1_CFC.xml.zip, using fastboot. I am planning to only flash the system partition using the following commands

mfastboot flash system system.img_sparsechunk.0

mfastboot flash system system.img_sparsechunk.1

mfastboot flash system system.img_sparsechunk.2

mfastboot flash system system.img_sparsechunk.3

mfastboot flash system system.img_sparsechunk.4

Please let me know - will it work even if bootloader is locked and CID does not match (0x10 for cricket vs 0x01 for ATT)? or Will it brick? Should I use some other commands? Thanks!