should_flash_in_userspace signature change
We should change should_flash_in_userspace to work without $ANDROID_PRODUCT_OUT being set and fall back on $OUT directory when source isn't specified This also fixes the flashing issue of flashing retrofit devices without $ANDROID_PRODUCT_OUT set. If we call fastboot update on a retrofit device, copy_avb_footer will resize buf->sz of secondary partitions to the partition size, causing us to send the unsparsed payload to the device -> "Invalid Size" issue. This is because secondary partitions are considered physical partitions on retrofit devices && should_flash_in_userspace wouldn't work if $ANDROID_PRODUCT_OUT is set, so our first return clause in copy_avb_footer doesn't catch this edge case causing us to resize the buf-> sz incorrectly. Did some testing, and also observed a case where flashing is able to succeed despite $ANDROID_PRODUCT_OUT not being set before, so there might still be some other edge case that we are still missing. Test: fastboot update on sargo without $ANDROID_PRODUCT_OUT Change-Id: I0e4781d96709b712f7d71657ec0d16d99b90214d
Loading
Please register or sign in to comment