cros_generate_update_payload: Don't do sudo when calling cgpt.

cros_generate_update_payload was using partoffset and partsize from which call sudo before running cgpt to detect the
offset and size of a partition. This is ok in the context of, since they are often called over a block device,
but in cros_generate_update_payload the images are regular files.

This patch stops including and uses its own simpler
version of these functions that don't call sudo.

TEST=Ran cros_generate_update_payload as a regular user.

Change-Id: I57d16460ee411e0f7670d7e16d611718c83be2df
Trybot-Ready: Alex Deymo <>
Tested-by: Alex Deymo <>
Reviewed-by: Don Garrett <>
Commit-Queue: Alex Deymo <>
1 file changed