[Huawei Ascend XT Questions & Answers] scrungydoolittle:
Hopefully, this will allow someone to solve the encryption problem with TWRP now.

But they will probably be doing stuff that will break our TWRP and ROOT solutions.

Anyone know how to PREVENT the OTA update?

---------- Post added at 07:07 PM ---------- Previous post was at 06:59 PM ----------

So does anyone have any idea of what the .transfer.list is and how it operates?

For example:

3

529254

1286

23785

move 6a77a755d7ab13bf0b2c09342f220cdb94d9a0cf 2,393161,393167 6 2,355024,355030

imgdiff 0 198 13263cb7ce553bf5f20571d994c085b38564c10f 6cc6aa9bb46a18e4911e8b0fde8be0072da52703 2,393181,393183 2 2,355326,355328

move cf90b6a8fc37b07a5237be7459ce617773208e7c 2,578583,578594 11 2,565855,565866

move 98c5929ad18693277d30d946a8df7c125e6959cf 2,415210,415215 5 2,355359,355364

move 5fd048e775288b3a20a450204c2e779849904a19 2,576232,576280 48 2,563504,563552

move bfde98a2ee0e9a530950e8980cf968f953389a68 2,575849,575863 14 2,563121,563135

...

bsdiff 198 30431040 3b088862c0289f04c0cb896d88c670f4c185c461 d580339beb4d3835ba6de7d2ad6db06a1c3ed347 2,663,17218 17279 2,663,17942

I'm betting that these check for modifications so blocks in the system directory etc, and if it find them, wipes them out?

Is there anyway to block the verification scripts?

---------- Post added at 07:26 PM ---------- Previous post was at 07:07 PM ----------

Inoticed that the pr-script says

mountencrypt("/data") is this what we need to be able update the data correctly in a TWRP backup?

updater-script does this it:

hw_write_raw_image("version.img", "/dev/block/bootdevice/by-name/version", "1");

hmm. wonder what hw_write_raw_image function does :) perhaps it can be called by an app?

It also looks like there is a SHA256RSA.img file, that I don't recall seeing a SHA256RSA partition for when I looked through the /dev/ files...

and how does hw_apply_patch work? It's clear that it spcifies the file to patch, followed by a - then a hex string , a number, and another hex string. I assume that it searches for the first one, and replaces with the the second one, but what is that middle number?

tue block_image_update seems to be running a package_extract against a transfer list, using a new.dat file and a patch.dat file.

I'm guessing that the transfer list specifies rom locations, the new.dat specifies new data and the patch is a data file that gives a pattern to match and a pattern to replace?

I'm also assuming that the cert.rsa and cert.sf file along with the sha256 would supply the decryption keys for the data directory?

It would be nice to be able to remove certain images from the update and replace them. For example, replace recovery img with the image with

TWRP installed.

This will definitely kill magisk rooted phones, cause it wipes out the boot.img which I think is how magisk roots the phone. And I wonder what the hell they are patching in firefox?

If one wanted to take this update zip file, and use it to replace the recovery and possibly the boot image, could it be used to create a flashable zip file with TWRP and BOOT (rooted with magisk)?

AND, can anyone use the provided new boot, and patch it with magisk?

Just a ton of questions, mostly noob's.

---------- Post added at 07:40 PM ---------- Previous post was at 07:26 PM ----------

It doesn't appear to touch the system partition directly. is that correct?

The cert.sf appears to be a list of files and their hashes. Presumably one would have to alter the has for the boot image, if one wants to replace

the boot image? The same for TWRP. Would that be correct?