XT1040 - Reviving bad Lollipop flash/downgrade/bootloader 41.18

iyurcic95

Senior Member
Oct 8, 2011
54
3
0
San Juan
Hi everyone!
First of all, sorry for my bad english and I'll try to be as specific as possiblee :)

At the start of the year, on February, I tryed to flash an Lollipop ROM in to my XT1040 but I dont realice that the 5.0 Rom was for Moto's G 3G, not 4G/LTE.
The big big problem here, was that my bootloader in the failed try of install 5.0, was updated to v41.18. In that moment, wernt Stock Lollipop's ROMs for my Peregrine (Pregrine = XT1040 = Moto G 4G/LTE) and the KitKat roms only works with an lower version of bootloader (I dont really know that is correct). The worst thing: I wasnt able to downgrade my bootloader to a lower version, I dont know why but I was in this forum and after a few days I finally give up :(
This is my original thread of the problem. http://forum.xda-developers.com/moto-g/help/bootloader-preflash-validation-failed-t3022173
If you enter there you will be able to see a lot of problems that I had.
This were the diferent problems that I found every time I tryed to do something:

Code:
(bootloader) Preflash validation failed
FAILED (remote failure)
Code:
E: Unable to mount "/data"
E: Unable to mount "/cache"
E: Unable to mount "/system"
E: Unable to mount internal storage
Code:
mke2fs -T ext4 /dev/block/mmcblk0p8
Code:
Opening update package...
Installing update...
detected filesystem ext4 for /dev/block/plataform/msm_sdcc.1/by-name/system at /system: invalid argument
unmount of /system failed; no such volume
detected filesystem f2fs for /dev/block/plataform
E: Error in /tmp/update.zip
(Status 1)
Installation aborted.
A few hours ago, I try to take back to life my Moto G and I did it. I was already resigned without any kind of hope and the screens wake up with the Lollipop loading screen :D
So, I come here to share with all of you how I found the solution :cowboy:

I am not responsible for any physical or logical damage to your device. Proceed with these steps under your full responsibility. I am not a developer or a total expert on the subject. I just come to share with you a solution to this problem that I'm looking since a few months. Read the whole thread before proceeding. Assure yourself that your situation fits with what that I'm expressing in this thread. All this based by my experience. In this case, my bootloader it's UNLOCKED.
So... Lets start :cool:

0) Download MotorolaDeviceManager 2.5.4 if you dont have the drivers or the PC dont recognizes the phone.
http://storage.googleapis.com/tetheredupgrades/MotorolaDeviceManager_2.5.4.exe
Download and Install Java Development Kit (JDK)
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html?ssSourceSiteId=otnes

1) Download "SDK Tools Only" and unzip it.
http://dl.google.com/android/android-sdk_r24.3.3-windows.zip
-----A) Open "SDK Manager" and download "Android SDK Platform-tools" (this will create and extra folder called "Platform-tools" in the path/root of your SDK Tools folder)

2) Download TWPR (TeamWinRecoveryProject) from this link: https://drive.google.com/file/d/0B8G1DiONZVg8Uk9BZFFueHlneEU/edit [thanks Somcom3X]
-----A) Copy/Move the file (*.img) to the "Platform-Tools" folder "X:\...\Android SDK\platform-tools"
3) Download CWM (ClockWorkMod) from this link: https://mega.co.nz/#!sdRBTKQZ!Km20ItpCMi34ph6X6yS98_JOtMTANNinAC_dihtyoSY [thanks shabbypenguin]
-----A) Copy/Move the file (*.img) to the "Platform-Tools" folder "X:\...\Android SDK\platform-tools"

4) Download "Lollipop's XT1040 - AOSP 5.1.1 (LMY48B)" and keep it on hand: https://drive.google.com/open?id=0B7zFFABEUl1XYUt1S0dKdHJGRVE&authuser=0 [I don't know who is the autor]

5) Navegate to "X:\Windows\System32\" and COPY the "cmd.exe" file to "X:\...\Android SDK\platform-tools" (this step can be skipped)

6) Turn your device into "fastboot" mode pressing the "PowerButton" and "VolumeDownButton" at the same time for a while.
-----A) Plug the USB Cable to the device and to the computer, and wait until the PC install the drivers or recognizes the phone.

7) Navegate to "X:\...\Android SDK\platform-tools"
-----A) Open the "cmd.exe" file that you copy in the step 5. If you skip that step, press "SHIFT" + "RightClick" into a free space of the folder and select the option "Open Command Windows Here"
-----B) Write or paste this command:
Code:
fastboot flash recovery peregrine-twrp2.7.1.0.img
8) In the "FastbootMode" of your device, navegate with "VolDwn" and Enter with "VolUp", and select "Recovery"
-----A) Press "Wipe" button in the screen
-----B) Select "Format Data" and write "Yes". When it finish, press "Back" two times.
-----C) Select "Advanced Wipe", then select "Data", "cache" and "system" and Swipe with your finger to start Wiping. Then, press "Back" three times. (If you can't wipe this partitions, go to the end of this thread and read the notes)
-----D) Select "Reboot", and reboot the phone into "Fastboot" Mode

9) Go back to the "cmd.exe" windows that you opened in the step 7.
-----A) Write or paste this command:
Code:
fastboot flash recovery CWM-6.0.5.0-peregrine.img
10) Start the "RecoveryMode" of your device again.
-----A) Navegate to "Mount and Storage" using the "Vol+" and "Vol-". Enter with the "PwrButton"
-----B) Select "mount USB Storage"
-----C) In the computer, copy the "aosp_peregrine_5.1.1_LMY48B_eng.elitemovil.20150527.115216.zip" file to your Mass Storage of the device.
-----D) Navegate to the main menu of the "RecoveryMode". (Now, you can unplug the USB cable)
-----E) Select "install zip"
-----F) Select "chose zip from /external_sd"
-----G) Select "aosp_peregrine_5.1.1_LMY48B_eng.elitemovil.20150527.115216.zip", select "Yes" and begin the installation.
-----H) Once the instalation of the ROM finish, navegate to the main menu of the "RecoveryMode" again for one last time.
-----I) Select "wipe data/factory reset" and select "Yes"
-----J) Select "wipe cache partition" and select "Yes"
-----K) Finally, select "reboot system now" and dicide if you want to Root your phone.

At this time, your device should be starting with the Lollipop's animation. After about 5 minutes, the initiation will finish and you can start using your phone, seting up all the configurations first like if the phone is just bought.

I hope this guide help all the people who have this problem. Surfing the web I realice that there are a lot of persons who have the same problem. I know that all of us, at some point, need a hand.

Note 1: If when you try to wipe system and cache you cant becouse it says "Unable to mount", skip the step 8 and go directly to the step 9. Then, go to "Mount and storage" of the ClockWorkMod Recovery menu and format "/data", "/system" and "/cache". Finally, continue with step 10.
Note 2: I dont know why but, when I tryed to format data, system and cache with CWMRecovery, I couldn't do it, so I used this two Recoverys.
Note 3 If one of the links die, let me know, so I asked to their owners if they can upload again. Anyway, I have uploaded the files in my cloud and, if is necessary, with the consent of their owners, I share the link with which you need.
 
Last edited:
  • Like
Reactions: GSebas and necktru

xSkArx

Senior Member
Jan 23, 2012
176
21
18
Santiago
Hi, first of all Thanks, I used this method and work, but with a little changes:

I flashed twrp 2.8.1 and work, no needed to install cwm

Thanks
 

Victorhtf

New member
Aug 22, 2015
1
0
0
Someone can help me?

SOMEONE PLEASE HELP ME I HAVE TO DOWNGRADE IN MY MOTO G XT1039 4G ANDROID 5.1 LOLLIPOP KITKAT PRO 4.4.4, I USED A ROM "XT1039_RETAIL-US-EU-SS_4.4.4_KXB21.14-L1.56-1_cid12_CFC_1FF.xml "WAS MAKING THOSE CODES ACROSS CMD BUT AFTER EACH cODE THAT I put appeared" BOOTLOADER: PREFLASH VALIDATION FAILED "continued pUTTING THE CODES TO THE LAST AID IN THE LAST cODE I GAVE REBOOT IN MOBILE AND HE NOT BACK PRO 4.4.4 cONTINUED IN 5.1 BUT NOT WORK DATA NETWORK (OPERATORS AND NEITHER WIFI ON) SOMEONE HELP ME? I DO NOT KNOW WHAT TO DO , MY IMEI DONT APPEAR
 

Chris Kurisu

Senior Member
Jan 7, 2014
62
17
0
Hi, first of all Thanks, I used this method and work, but with a little changes:
I flashed twrp 2.8.1 and work, no needed to install cwm
Thanks
I am considering trying a lollipop-based rom on my Moto G (XT1031) but in doing my due diligence I seem to be reading conflicting information.

I have an unlocked bootloader (praise Motorola :angel:) and I want to try CM. But I won't do it unless it's guaranteed that I can revert to my daily driver (Slim). I have already been bitten once by upgrading (f**k Samsung and their Knox).

1. Many posts say: "Once your have the lollipop bootloader you cannot revert to the KitKat bootloader without bricking".
2. Others (as in this post) say that you can revert.

I humbly ask for a definitive answer, if possible.
 

megamejo

Senior Member
Apr 9, 2015
71
16
0
I am considering trying a lollipop-based rom on my Moto G (XT1031) but in doing my due diligence I seem to be reading conflicting information.

I have an unlocked bootloader (praise Motorola :angel:) and I want to try CM. But I won't do it unless it's guaranteed that I can revert to my daily driver (Slim). I have already been bitten once by upgrading (f**k Samsung and their Knox).

1. Many posts say: "Once your have the lollipop bootloader you cannot revert to the KitKat bootloader without bricking".
2. Others (as in this post) say that you can revert.

I humbly ask for a definitive answer, if possible.
There are many posts that yo can follow to downgrade to a previous android version, bt its impossible to downgrade the boot due the preflash validation, so yo can downgrade without flashing this part bt the best would be to search this post and follow it carefully. Hope yo don´t mess p yor phone.
 

fernando_jack

New member
May 28, 2017
4
0
0
oh man, thank you so much!!
I followed your problem since the other post, praying to ends with happy ending.. I installed the wrong ROM (xt1032) and was stuck in bootloader too..

So, I did these steps (except using CWM - just TWRP - as someone already said here).

Now, is there a way to keep walking to other ROMs again?
I try to install CM14, CM14.1, CM13, LineageOS 14.1,even the stock 5.1 and 5.1 untouched, etc... without success... It always fails when installing..

It seems that the only ROM possible to use from now to the end of the days is this ASOP youve posted... is it really correct?