cros_generate_update_payload: Use e2cp instead of mounting STATE.

In old test images (about 1 year or older) we need to patch the kernel
in KERN-A with a vblock found in a file in the STATE partition. This
file was accessed mount the stateful partition read-only and copying the
file there, requiring this script to be run as root and leading to some
race conditions stated in

This patch uses the e2cp tool instead to copy this file out of the
stateful partition and patch the kernel with it.

TEST=`cros_generate_update_payload --extract` on old lumpy 2913.331.0 test image extracts the same kernel.

Change-Id: I48e4ad369f7451d8ad824450bfad8f7d0d6c7b2c
Reviewed-by: Gabe Black <>
Tested-by: Alex Deymo <>
Trybot-Ready: Alex Deymo <>
Commit-Queue: Alex Deymo <>
1 file changed