[Help] Flashing 1st Gen Moto G (XT1031) Stock to CM12.1 or CM13, never boots

twig123

Member
Mar 16, 2010
30
1
0
I posted this over on the CM forums, but wanted to post here as well for visibility.

I have multiple (read as 30+) 1st Gen Boost Moto Gs (XT1031) and this has been a problem on every.... single.... one...

Stock OS Info
Android Version: 4.4.2
Baseband version: MSM8626BP_1032.355.66.00R
Kernel version: 3.4.0-gc6fc9e1-00001-gf3bf628
System version: 175.44.1.falcon_cdma.Boost.en.US
Build number: KXB20.9-1.10-1.18-1.1
Bootloader: 41.1A
Recovery: twrp-2.8.7.0.-falcon_STOCK_NOTHEME

I've also tested with the Stock 4.4.4 and 5.1 Soak Test OS versions, both have the same results as well.
Additionally, this happens regardless of whether GAPPS is flashed or not.

I've tried the following, and ALWAYS results in an endless boot that just constantly stays on the CM Android head boot animation unless I flash & boot to CM11 first:

(Note: A TWRP Factory Reset is performed before flashing each new ROM)

CM11 - cm-11-20140504-SNAPSHOT-M6-falcon.zip
Stock -> CM11 = Boots and works fine

CM12.1 - cm-12.1-20151115-NIGHTLY-falcon.zip
Stock -> CM12.1 = Endless Boot
Stock -> CM11 (without booting to OS) -> CM12.1 = Endless Boot
Stock -> CM11 (Booted once) -> CM12.1 = Boots and works fine

CM13 (all nightly versions)
Stock -> CM13 = Endless Boot
Stock -> CM11 (without booting to OS) -> CM13 = Endless boot
Stock -> CM11 (Booted once) -> CM13 = Boots and works fine

So...The only way that I can get these to boot, is if I flash CM11 AND boot into it once and THEN flash CM12.1/CM13.
What is it about the first boot of CM11 that makes CM12.1 and CM13 work? any why doesn't direct from Stock -> CM12.1/CM13 work??? Is there a Kernel or something that gets installed when CM11 boots or something?

This is driving me insane. Please help me figure this out so that I can flash directly from Stock -> CM12.1/CM13.

---

Here is an example of exactly how to reproduce this problem. From the Stock ROM, do the following:

{Unlock Bootloader}
{Enable USB Debugging}

adb reboot bootloader

fastboot flash motoboot motoboot_41.1A.img
fastboot flash logo logo.bin
fastboot flash recovery twrp-2.8.7.0.-falcon_STOCK_NOTHEME.img
fastboot reboot

adb reboot recovery

adb shell twrp wipe factoryreset
adb push cm-12.1-20151115-NIGHTLY-falcon.zip /sdcard/
adb shell twrp install /sdcard/cm-12.1-20151115-NIGHTLY-falcon.zip
adb reboot
...Device never boots, and only stays on the CM logo animation.
 
Last edited:

mardobloom

Member
Oct 10, 2010
42
4
0
I've just finished updating from Stock 5.1 (XT1033) to CM 13

Here's what I've done

1. Updated to the latest TWRP recovery
2. Copied the latest CM 13 nightly and Gapps (Pico) to internal storage
3. Reboot to recovery
4. Performed an advanced wipe. Wiping /system, /cache and /dalvik-cache
5. Performed a Factory Reset
6. Flashed both CM 13 and Gapps
7. Reboot

Wait for a few minutes.
 

twig123

Member
Mar 16, 2010
30
1
0
I've just finished updating from Stock 5.1 (XT1033) to CM 13

Here's what I've done

1. Updated to the latest TWRP recovery
2. Copied the latest CM 13 nightly and Gapps (Pico) to internal storage
3. Reboot to recovery
4. Performed an advanced wipe. Wiping /system, /cache and /dalvik-cache
5. Performed a Factory Reset
6. Flashed both CM 13 and Gapps
7. Reboot

Wait for a few minutes.
Exact same steps on my XT1031, waited 6 hours, still didn't boot.
But if I flash CM11, boot to it once, then factory reset and install CM13... it will boot just fine. What magic does CM11 do that CM12.1/CM13 aren't doing?!

As a side note, the TRWP Factory Reset option wipes /system /cache and /dalvik-cache... so step #4 is redundant.... but I did it anyways.

Edit: I guess I skipped step #1 ... didn't realize that TWRP 3.0.2.0 was available for "falcon". I'll try this later tonight and see if it fixes the issue or not.
https://dl.twrp.me/falcon/
 
Last edited:

mardobloom

Member
Oct 10, 2010
42
4
0
As a side note, the TRWP Factory Reset option wipes /system /cache and /dalvik-cache... so step #4 is redundant.... but I did it anyways.
I followed the steps to perform a clean update from the official thread of CM 13 but when I tried to install the zip file it says that the data is incompatible and I needed to perform a factory reset. So that's why I've added that additional step so that there won't be any problems while installing CM 13. :laugh:

Edit: I guess I skipped step #1 ... didn't realize that TWRP 3.0.2.0 was available for "falcon". I'll try this later tonight and see if it fixes the issue or not.
https://dl.twrp.me/falcon/
Okay try first with that one i.e. TWRP 3.02.0. If that doesn't work then maybe you can try this one from here :- http://forum.xda-developers.com/moto-g/development/recovery-twrp-2-8-2-0-touch-recovery-t2980621 <------- This one worked fine for me i.e twrp-3.0.0.0_2-falcon following the above steps which I've mentioned.

P.S. I'm currently on baseband 1032.3116.98.00R - Retail Asia
 
Last edited:

twig123

Member
Mar 16, 2010
30
1
0
I followed the steps to perform a clean update from the official thread of CM 13 but when I tried to install the zip file it says that the data is incompatible and I needed to perform a factory reset. So that's why I've added that additional step so that there won't be any problems while installing CM 13. :laugh:



Okay try first with that one i.e. TWRP 3.02.0. If that doesn't work then maybe you can try this one from here :- http://forum.xda-developers.com/moto-g/development/recovery-twrp-2-8-2-0-touch-recovery-t2980621 <------- This one worked fine for me i.e twrp-3.0.0.0_2-falcon following the above steps which I've mentioned.

P.S. I'm currently on baseband 1032.3116.98.00R - Retail Asia
Nope. Flashed back to stock to test, updated to TWRP 3.0.2.0, attempted to flash to the latest CM13 nightly... still endless boot (waited 30min and it just stayed on the boot animation).
I'll try the recovery you mentioned later.... although, I also tried CM's own Nightly recovery... and the same thing happens with that as well.
 
Last edited:

twig123

Member
Mar 16, 2010
30
1
0
I tried with the recovery you mentioned, and the same thing happens.

However, the story unfolds...

Recovery log when flashing from Stock-to-CM11:
http://pastebin.com/M0EGdLwu

Recovery log when flashing from Stock-to-CM12.1:
http://pastebin.com/HaderDW2

In the Stock-to-CM12.1 log.... it doesn't appear that anything is copied! if you look at the Stock-to-CM11 log, after the "Installing zip file '/sdcard/cm-11-20140504-SNAPSHOT-M6-falcon.zip'" line, it has a bunch of "minzip: Extracted file" lines. Comparing that to the Stock-to-CM12.1 long, none of those such lines exist in the log! I see the CM12.1 ROM file has a "system.new.dat" file, instead of all of the files extracted in the "system" folder, like the CM11 ROM has... not sure if that is causing the problem or not.

If none of the files are getting copied, that would explain why it never boots.... but this doesn't tell me how to fix it... or why CM11 doesn't have a problem, but CM12.1 and CM13 DO have a problem.
 
Last edited:

mardobloom

Member
Oct 10, 2010
42
4
0
I tried with the recovery you mentioned, and the same thing happens.

However, the story unfolds...

Recovery log when flashing from Stock-to-CM11:
http://pastebin.com/M0EGdLwu

Recovery log when flashing from Stock-to-CM12.1:
http://pastebin.com/HaderDW2

In the Stock-to-CM12.1 log.... it doesn't appear that anything is copied! if you look at the Stock-to-CM11 log, after the "Installing zip file '/sdcard/cm-11-20140504-SNAPSHOT-M6-falcon.zip'" line, it has a bunch of "minzip: Extracted file" lines. Comparing that to the Stock-to-CM12.1 long, none of those such lines exist in the log! I see the CM12.1 ROM file has a "system.new.dat" file, instead of all of the files extracted in the "system" folder, like the CM11 ROM has... not sure if that is causing the problem or not.

If none of the files are getting copied, that would explain why it never boots.... but this doesn't tell me how to fix it... or why CM11 doesn't have a problem, but CM12.1 and CM13 DO have a problem.
Backup first and try to restore your phone to stock firmware using the instructions over here. ----------> http://forum.xda-developers.com/showthread.php?p=47820707#post47820707

And choose the firmware version which is related to your phone. They will be something like this:-

XT1031_FALCON_BOOST_5.1_LPB23.13-56_cid9_CFC.xml.zip
XT1031_FALCON_REPW_5.1_LPB23.13-51-R.10_cid6_CFC.xml.zip
XT1031_FALCON_USC_5.1_LPB23.13-33.6_cid9_CFC.xml.zip
XT1031_FALCON_USC_5.1_LPBS23.13-33.6-2_cid9_CFC.xml.zip
 
Last edited:

twig123

Member
Mar 16, 2010
30
1
0
Backup first and try to restore your phone to stock firmware using the instructions over here. ----------> http://forum.xda-developers.com/showthread.php?p=47820707#post47820707

And choose the firmware version which is related to your phone. They will be something like this:-

XT1031_FALCON_BOOST_5.1_LPB23.13-56_cid9_CFC.xml.zip
XT1031_FALCON_REPW_5.1_LPB23.13-51-R.10_cid6_CFC.xml.zip
XT1031_FALCON_USC_5.1_LPB23.13-33.6_cid9_CFC.xml.zip
XT1031_FALCON_USC_5.1_LPBS23.13-33.6-2_cid9_CFC.xml.zip
Thanks for the suggestion, but I've already flashed to stock (XT1031_FALCON_BOOST_5.1 in this case).
The issue is coming FROM stock to CM12.1 or CM13 that is the problem, but Stock->CM11->CM12.1/CM13 works fine.
I don't want to have to install CM11 every time just to get a bootable rom... :-\
 

mardobloom

Member
Oct 10, 2010
42
4
0
Thanks for the suggestion, but I've already flashed to stock (XT1031_FALCON_BOOST_5.1 in this case).
The issue is coming FROM stock to CM12.1 or CM13 that is the problem, but Stock->CM11->CM12.1/CM13 works fine.
I don't want to have to install CM11 every time just to get a bootable rom... :-\
Save the recovery log while upgrading from CM11 to CM 12.1 to see what's the difference between that one which works and Stock to CM12.1/13
 

twig123

Member
Mar 16, 2010
30
1
0
After playing with trying to flash CM13 directly for quite a long time.... I've come to the conclusions that something with the partition wipes don't actually work within the CM13 setup script, nor from Custom Recovery!

However, I found a workaround! Wiping the partitions from the Bootloader, instead of from Custom Recovery, allows a flash of CM13 to boot properly!
(The question still stands as to why CM11 doesn't have this issue, but CM12.1 and CM13 do...... but I have a workaround, so I'm not too worried about it)

I made a Windows Batch script to automate this flashing process, which I posted over on the CM Forum:
https://forum.cyanogenmod.org/topic...-to-cm121-or-cm13-never-boots/#comment-601380