[SOLVED ]"Patching system image unconditionally..." - can't install CM at all.

_ab

New member
Mar 14, 2016
1
2
0
I faced similar problem.
It was solved by flashing via fastboot stock nonGPE ROM prior to CM.
To be exact, i've got xt1032 GPE 16Gb and used ROM named XT1032_FALCON_RETEU_5.1_LPB23.13-56_cid7_CFC.xml.zip.
 

papandreoos

Member
Feb 11, 2012
35
5
0
I faced similar problem.
It was solved by flashing via fastboot stock nonGPE ROM prior to CM.
To be exact, i've got xt1032 GPE 16Gb and used ROM named XT1032_FALCON_RETEU_5.1_LPB23.13-56_cid7_CFC.xml.zip.
can you please expand?
how did you flash via fastboot? did you extract the zip? please give details.
i don't know how to do it :).

what recovery did you used? twrp? philz? CWM?
after you installed XT1032_FALCON_RETEU_5.1_LPB23.13-56_cid7_CFC.xml.zip rom, you first start the phone to see if the installation was successful and android 5.1 is working, and then shutdown the phone and boot again into recovery?
and if i'm correct, after you enter again to recovery what kind of wipe/format exactly did you do before installing CM?
thanks!
 
Last edited:

papandreoos

Member
Feb 11, 2012
35
5
0
I faced similar problem.
It was solved by flashing via fastboot stock nonGPE ROM prior to CM.
To be exact, i've got xt1032 GPE 16Gb and used ROM named XT1032_FALCON_RETEU_5.1_LPB23.13-56_cid7_CFC.xml.zip.
Unbelievable it's working!!!
thank you very much.
i found your rom here:
https://www.androidfilehost.com/?fid=24052804347848287
after downloading i extract the ZIP.
then i flashed via mfastboot.
i'm using linux to flash so this is how all the proccess looked like:
PHP:
sudo mfastboot flash partition gpt.bin
sudo mfastboot flash motoboot motoboot.img
sudo mfastboot flash logo logo.bin
sudo mfastboot flash boot boot.img
sudo mfastboot flash recovery recovery.img
sudo mfastboot flash system system.img_sparsechunk.0
sudo mfastboot flash system system.img_sparsechunk.1
sudo mfastboot flash system system.img_sparsechunk.2
sudo mfastboot flash system system.img_sparsechunk.3
sudo mfastboot flash modem NON-HLOS.bin
sudo mfastboot erase modemst1 
sudo mfastboot erase modemst2 
sudo mfastboot flash fsg fsg.mbn
sudo mfastboot erase cache 
sudo mfastboot erase userdata 
sudo mfastboot reboot
(in windows there is no need for "sudo")
i did it line by line(but you can do a batch file. i don't know how)
all worked great besides erasing the userdata that didn't succeed.
i ignored it and continue.
i open the phone and the phone started with the newly android 5.1.
after it finished starting, i powered off the device and get into fastboot mode.
then i flashed the latest TWRP recovery from here:
http://forum.xda-developers.com/moto-g/development/recovery-twrp-2-8-2-0-touch-recovery-t2980621
and after that i move the latest(to this date) cm 13 rom into the device.
from TWRP recovery i flashed the CM rom and it was a successful flash!!! :).
after that i download slim mini gapps from here:
https://www.androidfilehost.com/?w=files&flid=48213
move it to sdcard and from TWRP i flashed it.
when i boot up again there was a problem with the downloaded gapps from before(it gave me a message the never stoped appearing).
so i again go into twrp and from there i did a factory reset, open the phone and now i have a working cm with gapps without a problem :)


p.s.
the only "bad" thing is the annoying "warning Bootloader unlocked" message that suddenly appeared(after the installation of android 5.1).
you can see it here:
https://i.ytimg.com/vi/Shn8wk4nGGU/maxresdefault.jpg
to solve this i downloaded from here:
http://forum.xda-developers.com/showthread.php?t=2710817
new logo(it comes in ZIP file that needs to be extracted), and flashed it (when i inside fastboot mode), with this command:
sudo fastboot flash logo PATH-TO-logo.bin (i.e. you need to specify the exact path to logo.bin)
in my linux computer, logo.bin was on desktop so what i really wrote is this:
sudo fastboot flash logo Desktop/logo.bin
after finished and starting the device i saw the new logo and the warning message disappear.
 
Last edited:

sabithmk

Member
Jul 7, 2014
47
20
0
The problem is EXT4 file system.

The problem is the file system. Moto G GPE uses EXT4 file system were the stock rom uses F2FS file system. Goto wipe -> advance wipe -> change file system in the twrp recovery..

Then things will works. :fingers-crossed: :good:
 

geoslake

Senior Member
Oct 31, 2010
201
21
48
The problem is the file system. Moto G GPE uses EXT4 file system were the stock rom uses F2FS file system. Goto wipe -> advance wipe -> change file system in the twrp recovery..

Then things will works. :fingers-crossed: :good:
Did that and it didnt help. Will try the above method now.

---------- Post added at 05:47 AM ---------- Previous post was at 04:58 AM ----------

Did that and it didnt help. Will try the above method now.
Above method (flash XT1032_FALCON_RETEU_5.1_LPB23.13-56_cid7_CFC.xml.zip) confirmed working.

!!! BUT DONT WIPE SYSTEM WHEN INSTALLING THE NEW CM ROM !!!
(actually i didnt wipe anything when installing, i did a factory reset once in CM13)

Now running resurrection remix. Thanks guys
 
Last edited:

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
203
!!! BUT DONT WIPE SYSTEM WHEN INSTALLING THE NEW CM ROM !!!
why? did you try that and something went wrong? or is it just an assumed magical incantation?

reading this thread, it looks like GPE and moto have different /system partition sizes: maybe GPE /system is smaller, then system image doesn't fit, and stupid flashing code just dies there silently. will look for partition table dumps next.
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
203
my assumption was correct, MOTO /system is 976.0 MiB, while GPE /system is 840.0 MiB.

this seems to make flashing fail (stupidly silently) as CM's image padded to moto's partition size doesn't fit in the GPE's partition.

but there's another thing: google made a horrible mistake on top of moto's. moto didn't align most partitions on the phone, which at a minimum causes performance issues but can also cause reliability issues. then came google and left most things the way they were but they aligned the cache partition. they could have just left a hole in front of the partition but instead they created a misaligned partition "padC" to pad the hole. this means that they changed the partitioning number of all following partitions (cache, system, kpan and userdata) and created hell: recoveries, kernels, roms, flashing tools, etc need to detect the partition layout or risk borking everything.

also, they repurposed another presumably empty partition "padA" as "metadata" to store encryption metadata, whereas moto presumably used an encryption footer in moto.
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
203
A BETTER SOLUTION

a simpler and better fix exists for this issue. instead of converting the device to non-GPE
(in particular, to avoid flashing bootloaders) you just need to update the partition table, as follows:

1) make sure TWRP 3 is working fine.

2) in TWRP, make sure you can either:
- push files from the PC via adb,
- or transfer files from the PC via MTP,
- or adb sideload zips from the PC.

3) get the attached gpt-XXX.bin file.

4) reboot to bootloader and flash it:
fastboot flash partition gpt-XXX.bin

5) reboot to TWRP and:
- wipe cache
- wipe system
- format data

note: make sure you format data; FORMAT IT, don't just wipe it!

6) now transfer your CM and gapps files and flash them (or else sideload them).

7) profit! :)


(this procedure is completely reversible by flashing a GPE gpt.bin file.)
 

Attachments

pyrosirys

New member
Nov 23, 2015
2
1
0
A BETTER SOLUTION

a simpler and better fix exists for this issue. instead of converting the device to non-GPE
(in particular, to avoid flashing bootloaders) you just need to update the partition table, as follows:

1) make sure TWRP 3 is working fine.

2) in TWRP, make sure you can either:
- push files from the PC via adb,
- or transfer files from the PC via MTP,
- or adb sideload zips from the PC.

3) get the attached gpt-XXX.bin file.

4) reboot to bootloader and flash it:
fastboot flash partition gpt-XXX.bin

5) reboot to TWRP and:
- wipe cache
- wipe system
- format data

note: make sure you format data; FORMAT IT, don't just wipe it!

6) now transfer your CM and gapps files and flash them (or else sideload them).

7) profit! :)


(this procedure is completely reversible by flashing a GPE gpt.bin file.)
Thanks this method worked for me and it was really easy. I'm just replying to confirm to other people know that this works.
 
  • Like
Reactions: Lanchon

Dewzone

Senior Member
Mar 23, 2014
62
4
0
Kathmandu
A BETTER SOLUTION

a simpler and better fix exists for this issue. instead of converting the device to non-GPE
(in particular, to avoid flashing bootloaders) you just need to update the partition table, as follows:

1) make sure TWRP 3 is working fine.

2) in TWRP, make sure you can either:
- push files from the PC via adb,
- or transfer files from the PC via MTP,
- or adb sideload zips from the PC.

3) get the attached gpt-XXX.bin file.

4) reboot to bootloader and flash it:
fastboot flash partition gpt-XXX.bin

5) reboot to TWRP and:
- wipe cache
- wipe system
- format data

note: make sure you format data; FORMAT IT, don't just wipe it!

6) now transfer your CM and gapps files and flash them (or else sideload them).

7) profit! :)


(this procedure is completely reversible by flashing a GPE gpt.bin file.)

is there a file for htc m8 too ? exact same problem
 

creepercast888

New member
Oct 15, 2015
2
1
0
This fixed the problem for me :)

Make sure the file is unblocked in windows file manager, most of them are blocked due to windows security! :)
1. Select .zip recovery file in Windows File Explorer.
2. Right click and Properties.
3. At the bottom, check Unblock.
4. Hit OK.
5. Transfer your file to TWRP Folder or anywhere for flashing.
Hope this helps you!:good:
 

Lilgilno

New member
Mar 15, 2016
2
0
0
S3 i9300

i flashed 4.4.4 stock from here:
http://forum.xda-developers.com/moto-g/development/rom-stock-motorola-rom-collection-t2854688

i used the untouched version:
Retail EU 4.4.4 Stock ROM (Untouched) (457mb)
https://docs.google.com/uc?id=0B6RNTe4ygItBVFlwN2pqWmV1VXc&export=download

so far it's working.
i boot into the stock and it's 4.4.4.
the screen is flickering but it's stock 4.4.4.

now i'm gonna try flash this latest snapshot of CM11:
cm-11-20140504-SNAPSHOT-M6-falcon.zip
from here:
https://download.cyanogenmod.org/?device=falcon

i now into fastboot mode, installing TWRP 3.0.0.0:
fastboot flash recovery twrp-3.0.0.0-falcon.img
success!

get into recovery now.
sha1 verified.
copy CM11 into phone
i'm still on TWRP.
i now wipe data, cache, dalvik cache and system.
done.

now i'll try flash CM11 :)

WOW!!!

after couple of seconds (maybe 30-40) it's done.
i reboot into CM11 without a problem (just the flickering screen again, but never mind. i'm not planing to stay in CM11).
the android version in latest CM11 is 4.4.2

now i'm gonna try to flash CM12 :)

get into recovery again.
sha1 verified.
copy cm-12.1-20151117-SNAPSHOT-YOG7DAO1K9-falcon into device.
wiping data, cache, dalvik cache and system again.

flashing!
not working :(
i again stuck in " "Patching system image unconditionally..." forever.

(going back to GPE 5.1)

How can you apply that on samsugn s3 i9300