[Moto G General] Paul L.:
NOTICE:

THIS IS ABOUT: "

Error executing updater-binary

" while flashing CM-12 or Lollipop based ROMs. Check you recovery log to find EXACTLY WHAT HAPPENED, if you have bugs related to lseek64 and blkdiscard. Then THIS IS PROBABLY RELATED TO YOUR PROBLEM. OTHERWISE, IT IS NOT RELATED TO THIS,

STAY AWAY.

To check your recovery logs. On TWRP -> Advanced -> Copy Log to SD after trying to flash - > Inspect the Log on your computer and search for blkdiscard or lseek64 and errors around them.

Here is the usual disclaimer about how I blame you for bricking your device by doing risky stuff, and by reading this you acknowledge you are doing this at your own risk. And if you point me, blaming me for you destroying your own device, I'll laugh at you. Yada yada yada.

As far as I know, this fixed it for me, so I am sharing it.

This started with the findings of [MENTION=5298252]murderered[/MENTION], so go thank him.

Original post from him:

In a nutshell, Google Play Edition devices seem to have a different partition allocation (number of blocks per partition?) that will basically break anything using the new raw block images format that Lollipop uses to flash partitions.

This SHOULD ONLY HAPPEN ON THE GPE 4.4.4 OTA (XT1032?).

XT1033 Users who converted to 4.4.3, you are safe.

YET,

I HAVEN'T CONFIRMED THAT HIS HAPPENS FOR ALL GPE DEVICES OUT THERE WITH THE 4.4.4 OTA

. FOR THE SAKE OF THIS GUIDE I'LL ASUME THAT THIS HAPPENS UNIVERSALLY.

Motorola, in example, still uses the /system layout, associated with a patching system for their Lollipop soak test OTA for XT1033.

Screenshot of the /system subfolder from the Lollipop XT1033 OTA.

OK [MENTION=5298252]murderered[/MENTION] (and mostly anyone that has a GPE device with Android 4.4.4), I found a solution for flashing CM12 with the "Error executing updater-binary". Yet it's quite complicated because of the restrictive nature of the 4.4.4 bootloader.

NOTICE:

Check you recovery log to find EXACTLY WHAT HAPPENED, if you have bugs related to lseek64 and blkdiscard. Then THIS IS PROBABLY RELATED TO YOUR PROBLEM. OTHERWISE,

STAY AWAY.

Basically, you will need to download the following:

1. Either a Retail or a carrier version of the full 4.4.2 ROM (one you can flash via fastboot). It seriously needs to be a full rom, you can skip this if you instead find a full 4.4.4 ROM, because you need the system.img and boot.img. Do not use the GPE one, it has to be RETAIL/CARRIER and RETAIL/CARRIER ONLY.

1.1. You don't exactly need the 4.4.2 ROM as long as you can push to your sdcard via recovery (not sure why, but I couldn't on TWRP 2.8.1.0).

1.2.

I still recommend it

because if something derps in the way (like, "suddenly" you can't push through your recovery anymore), you can correct this with it.

2. Then the corresponding 4.4.4 OTA update to your 4.4.2 ROM. Unless, you found a full 4.4.4 stock ROM or you can push through recovery. You'll need most of the bootloader files and the gpt.bin from it (as it is a 4.4.4 version it won't be rejected by fastboot).

3. Patience, it took me 5 hours to finally acomplish it.

4. the lastest mfastboot (this will not work, or, atleast it didn't work for me, with the Android SDK one). I used this as I was also inspecting the Lollipop OTA. Kudos to [MENTION=5103750]W3ND31[/MENTION], who uploaded it (seriously, go thank him to for posting the OTA in the first place, he deserves it): https://docs.google.com/file/d/0B4PT9WP-u_z9NXRBWF9EV2lGcWs/edit

So, I'll try to not sound too cryptic on this, but if you find something you don't understand is preferable to just PM me (and try to explain as much as you can, seriously, I get tired quite easily because I have already been a ROM porter quite a few times).

The steps are simple, but it's quite easy to mess it up (and I didn't exactly have much caution as being experienced in this,

but you should

).

Before the first step,

ensure you can push through the sdcard via ADB easily

, test it NOW; this is not mandatory, yet it will probably save you a lot of time; and, because later, you will not be able to test it.

We will have to wipe /data partition, so backup EVERYTHING.

0. Have a ROM ready to flash, like CM12, and all it's requirements, GApps, SuperSU, the DSP Fix, everything.

1. First of all, go to fastboot mode (advice: have a decent battery level, it shouldn't take long, just an advice anyway).

2. On your PC, extract the mfastboot binaries to a empty folder.

3. Then extract emmc_appsboot.mbn, fsg.mbn, gpt.bin, rpm.mbn, sbl1_8226.mbn, sdi.mbn, tz.mbn FROM THE 4.4.4 OTA/FULL Image. All these to the same folder where mfastboot is.

4. Extract the system.img or system_sparsechunk's (it should be in sparse images, if it isn't, well, that is why I used the mfastboot) and boot.img from the FULL 4.4.2 STOCK ROM to the folder too.

5. Connect to the phone to the PC and make sure it's recognized if you haven't already.

6. Open a terminal, like cmd or PowerShell and change directory to where your mfastboot.exe is.

7. Run the following :

mfastboot flash sbl1 sbl1_8226.mbn
mfastboot flash aboot emmc_appsboot.mbn
mfastboot flash rpm rpm.mbn
mfastboot flash tz tz.mbn
mfastboot flash fsg fsg.mbn
mfastboot flash sdi sdi.mbn
mfastboot flash partition gpt.bin

8. Select recovery on the menu (recovery shouldn't have been messed up, still, you have a fastboot terminal, if run into problems, flash your custom recovery again). And wait for it to boot (it could take more time than usual). You'll notice that most partitions are "broken" (by the noticeable errors thrown by your recovery),

format /system, /cache, and /data

(hope you remembered to backup as I said before).

9.A. Now, if you could push zips through recovery via adb, it's time to test it again. Mount the sdcard on your recovery menu, pray for salvation, and try to push your ROM via ADB through recovery and flash it (via adb sideload, or manually, whatever). I didn't have the luck here, but it should work just fine. Remember to also push SuperSU and your gapps. If successfull, Skip to 15. If not, continue reading.

9.B. If you couldn't push zips through adb, like me. Then you will have to use the 4.4.2 stuff I said you should download as a recomendation.

Attention: As I don't know how recoveries other than TWRP handle formatting in certain filesystems, you may need to flash TWRP for the following.

10. You will have to (temporarilly) format your /data partition to f2fs, so if you are still on your recovery, go and do that. (TWRP > Wipe > Advanced Wipe > select /data > Format > Tap F2FS > Confirm)

11. Go back to fastboot mode in your phone and go back to your computer terminal of choice.

12. Run the following (and read, seriously, READ):

12.A. If your stock 4.4.2 ROM download didn't have sparse images, mfastboot will handle do this for you instead:

mfastboot flash system system.img

12.B. If your stock 4.4.2 ROM download did have sparse images, flash them one by one. Example:

mfastboot flash system system_sparsechunk1
mfastboot flash system system_sparsechunk2
mfastboot flash system system_sparsechunk3

13. And finally flash the boot.img

mfastboot flash boot boot.img

14. Once you did this, reboot to Android. If it BOOTS, then is a good sign, your partition table matches with whatever the bootloader or Android wants.

14.1. If your device is stuck in a bootloop, then you may have to go to recovery and wipe /data and /cache (and remember, /data needs to be f2fs). Anything else, I blame you.

.15. Do the Setup Wizard (don't even bother to sign in to Google), and copy your files to the sdcard. Don't worry about the Android version on your device (4.4.3), because we have everything else to the 4.4.4 version (bootloader and gpt.bin are the important ones)

16. Since this is related to CM12... Just go to recovery and pray to the gods of the software for success. Atleast mine booted...