Use xxd directly rather than head and hexdump
Test: build OTA and manual apply
Change-Id: I4ae6da33e1ea784c00e4fdf9893f3887950bab4c
Fixes: 120681840
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index 71117ae..5c6e6d7 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -419,7 +419,7 @@
# If the partition is stored as an Android sparse image file, we need to
# convert them to a raw image for the update.
- local magic=$(head --bytes=4 "${part_file}" | hexdump -e '1/1 "%.2x"')
+ local magic=$(xxd -p -l4 "${part_file}")
if [[ "${magic}" == "3aff26ed" ]]; then
local temp_sparse=$(create_tempfile "${part}.sparse.XXXXXX")
echo "Converting Android sparse image ${part}.img to RAW."