[Moto Z Play Questions & Answers] KurrKurr:
OTA update problems: "oem partition failed to recover", won't boot - "bad key", ...

Hello,

I'm on the stock Nougat ROM with the January 2017 patch level (reteu, NPN25.137-24-1). I have the F2FS-kernel installed and I'm using Magisk.

Naturally, now that the latest OTA is out, I want to install it. I had the foresight to make backups of my system when it was in "mint" condition. I checked the SHA1 hashes of my backups against the hashes the latest OTA expects and they match (of course).

Since the modifications I made to the device only regard the boot partition (kernel: yes, Magisk Systemless Root: yes) I thought that I could simply flash over the stock boot.img, upgrade via OTA and re-modify the boot partition after the update (for root).

Nope.

OTA process stops at "E2004: oem partition fails to recover". I haven't touched the OEM partition!!

Also, after flashing the boot image, fastboot says "(bootloader) Image signed with key bad key" and the (annoying) message at boot states, that my system has been unlocked and can't be trusted (like it always does) with

"ID: bad key" (instead of "ID: N/A")!

But it won't boot after the 5 seconds it usually takes!!

Sure enough I, do also have a backup of my modified boot.img, so after a nandroid restore (after which it won't boot) I have to flash the modified boot.img (with root and kernel) to get it to boot again.

Why will a modified boot image boot, but the original one won't?? :confused:

To clarify, here's what I tried (roughly):

Apply OTA - Result: Error... :eek:

Flash original boot.img - Result: won't boot. :(

Flash original logo.bin to see what's going on - Result: "bad key" won't boot. :eek:

Flash rooted boot.img - Result: boots. :)

Restore TWRP nandroid backup of system and boot - Result: won't boot. "bad key" :eek:

Flash modified boot.img again - Result: boots. :)

Flashed original boot.img again and after that tried to sideload the OTA via TWRP recovery - Result: "wrong thumbprint, expected XXX but device has . " (empty thumbprint) :mad:

Modified the OTA to skip the thumbprint check (I'm sure this is the right OTA!) and sideloaded it via TWRP recovery - Result: "E2004: oem partition failed to recover"... what?! why? all partitions are as expected/in mint condition :confused:

Reflash modified boot and logo - Result: Device boots again, it's in the state I started with. :rolleyes:

Write XDA thread. :crying:

Can someone help? I'm afraid that I cannot return to total (Marshmallow) stock and do all the OTAs, because I'm on Nougat now... Anybody got an idea how to overcome the "bad key" screen and get it to boot or the apply the OTA (which is the goal here)??

I was thinking about flashing the original boot.img and try to sideload the OTA via the Android recovery and not TWRP... maybe that's the problem... :confused: :confused: :confused:

Best regards,

Chris

Edit:

I tried flashing the original boot.img and sideloaded the original (unmodified) OTA via the Android recovery and not TWRP. The result was, that the thumbprint was recognized (cool!), but it exited again with "E2004: oem partition failed to recover", Error 7...

Edit2:

This is the OTA I'm trying to apply: Download Blur_Version.25.201.5.addison.retail.en.US