[Miscellaneous Android Development] Dib Membrane:
Confirmed Pie OTA hashes; case-sensitivity prevents installing from TWRP

Thanks, Snacks — I completely forgot logcat could be used that way. And makes sense that I wasn't seeing the message with the CatLog app on my unrooted R2, since without root, the adb debug privileges are necessary to see most of the messages.

On my device, I had already started and paused download of the update, and unfortunately that logcat message doesn't appear when you restart an update download, nor when it completes. It probably does if you restart from scratch, but I didn't try that as my Internet is not that fast, and a 1.29 GB download takes awhile. Therefore, after some failed attempts to do a search for all files named *.zip, I just poked around on the device with the TWRP file manager until I found that the OTA had been saved as /cache/update.zip (a location you can't access from within Android if you don't have root).

I ran checksums of the update.zip file and got the same results as your 4ae51f05a63ed93282671c3667f18c15668282a3.zip:

MD5: 3a07db094cb0e905bca405559079d165
SHA-1: 4ae51f05a63ed93282671c3667f18c15668282a3
SHA-256: d52009fb146517c49d7a337ea8b628882bc04b36616aa5b5122f1a87c1e87798
SHA-512: 07c0bc767f64521ce4ba72616c93820ce9e5001cba75a10d928674e9b78506f7938720132ca01a9995eca77dfb9c9d318a67c8dab0f068660acff5d42bf84ee9
SHA3-256: 04f21f6a6171b4c1064e2e89dfcf2f78442838c9d82e99fdd88dc60a629b42b5
SHA3-512: 40c331bbe9313261386378c8a882fa648af67ba4fcd36fd1abb867a0528ef36659b5efe149437dffff3316f8da0534b5b5f1fe0043b7e3b6002bc889847a0192

So there are no unique IDs in the update ZIP, which is good.

Yes, definitely helpful; thanks again. Unfortunately when I rebooted into TWRP after completing the OTA redownload, it attempted to automatically install the update, but failed with this output:

Running Recovery Commands

Installing zip file '/cache/update.zip'

Checking for Digest file...

E3004: This package is for "Z5151" devices; this is a "z5151".

Updater process ended with ERROR: 7

Error installing zip file '/cache/update.zip'

Done processing script file​

I extracted the update.zip contents on my PC and did a search for that error message:

% find . -type f -exec fgrep -Hn "package is for" {} \;

./META-INF/com/google/android/updater-script:1:getprop("ro.product.device") == "Z5151" || abort("E3004: This package is for "Z5151" devices; this is a "" + getprop("ro.product.device") + "".");​

According to https://xdaforums.com/wiki/Device_codename:

Write down the value of the ro.product.device parameter. This will be your device codename. The [codename] corresponds to the project code name of the device itself. This is almost never the sales name of the device. If you have built CM before (and again, you better have!), you should be familiar with the concept of a code name for each device. Like the vendor name, the codename is always lowercase and contains no spaces.​

So, weird that the update script expects uppercase "Z5151". Just ZTE sloppiness?

It would be very easy to remove that first line from the updater-script and then re-zip everything (there doesn't seem to be any checksum that needs to be regenerated), but I'm concerned that besides the capitalization of the device codename, there might be other assumptions that don't hold when running the update under TWRP, and it might mess something up.

Seems like it would be safer to restore the original recovery partition and then let it do the update. Of course, to do that, I'd have to figure out how to properly reflash just the recovery partition without touching the other ones. Also, if TWRP fails to work after the Pie update (even when installed after the update rather than before it), not sure if it would be possible to still install Magisk somehow at that point (e.g. disguise it as an OTA update)?

Anyone have any thoughts on those two alternatives? Anyone successfully installed the Pie OTA with TWRP?

So you've already updated your R2 to 9? Have you tried to do the TWRP and Magisk installs since doing that? Any luck?