[Android Software Development] petefoth:
@kurtn Thanks for your responses which mostly seem to be about signature mismatches between the ROM to be installed and the currently installed ROM.

My query is not about that, but about mismatches between the ROM to be installed and the recovery used to install it. It comes after reading this issue, which suggests that LOS Recovery - at the time the issue was raised - would not install a new ROM with the signature different from the recovery. This issue is what started this project off down the road of making `recovery.img` and `boot.img` files available separately from the main ROM `zip` file. I'm pretty sure that that is not an issue with current versions of LOS Recovery.

I am also pretty sure that we / our users can do all we / they need to do using either the LOS supplied recovery (whether that is in a `recovery.img`, `boot.img`,`vendor_boot.img` or any other file) or the recovery included in the ROM zip file (or a third-party recovery such as TWRP), and that we therefore don't need to publish whatever images are available in the `PACKAGING` directory in the `out/target/product` build tree as well as the main ROM `zip`.

The use cases we need to support are:

1. Manually installing L4M for the first time, replacing stock, LOS, or any other custom ROM. I think we can achieve that following the LOS installation instructions, using the recovery supplied by LOS (or TWRP or other third-party recovery). The recovery may report a signature mismatch, but we can ignore that (or wipe the system partition if needed) and carry on with the installation

2. Manually installing an updated L4M ROM using whatever recovery is in place or, by temporarily booting to a (LOS-supplied) recovery image - again following the LOS instructions. There won't be a signature mistmact between the twp ROMs, since they are both signed with our keys. Even if there were, we could proceed as for 1.

3. Installing an OTA update of L4M. Again, they keys of the two ROMs are going to match, so there should not be a problem

Are you sure about that? When I have used TWRP to e.g. swap between ROMs (l4m to /e/OS to Iode) TWRP just flashes the new ROM zip file, without raising any error. The existing system partition gets overwritten by the system image in the new ROM. I often need to format data partition, but never system (at least not in the last couple of years).

Interesting to note that /e/OS, who have their own reasons for wanting to provide their own, branded, recovery instead of using LOS recovery, go to quite a lot of trouble to work out which of the the built `.img` files to use as the recovery: see this code in their `build.sh`. It looks like a neat solution, and certainly better than our current strategy of "let's publish any `.img` file that looks interesting" :)

Interesting too that IodéOS don't bother with a recovery at all: they use `mka dist` to produce an `-img.zip` file which can be installed / flashed using `fastboot`. (I tried that with L4M. It worked localy using a manifest to pull in the vendor blobs for a specific device, but died with an interesting error - `posix_spawn: Argument list too long` - when pulling in the blobs for all devices using the `INCLUDE_PROPRIETARY` flag)