Use bsdiff to generate recovery-from-boot.p for system-root-image.
This CL handles a path that uses system-root-image on non-A/B device. For this path, we can't generate recovery-from-boot patch with imgdiff, because boot/recovery images contain different number of entries (only recovery iamge has ramdisk image now). Using BOARD_USES_FULL_RECOVERY_IMAGE can work around the issue, at the cost of extra size. Compared to carrying full recovery image, this CL saves the cost of the kernel size, by putting a patch that's roughly the size of the recovery ramdisk. The applypatch executable already detects and handles a bsdiff patch automatically. No change required to that end. Note that it won't further reduce the patch size by handling that ramdisk entry specially, because (a) that's the only difference between the two images; and (b) there's no corresponding data in boot image to be diff'd against. Bug: 72731506 Test: `m dist` with aosp_angler-userdebug. Check the device can install recovery image successfully (after intentionally corrupting the recovery image). Test: Build aosp_angler-userdebug with BOARD_BUILD_SYSTEM_ROOT_IMAGE set. Verify the generated patch files. Test: Run validate_target_files.py with the target_files.zips. Change-Id: I69c06f51ba8c39ae059c5e9a6872a9f10600cf17 Merged-In: I69c06f51ba8c39ae059c5e9a6872a9f10600cf17 (cherry picked from commit 6d5d6239)
Loading
Please register or sign in to comment