Use xxd directly rather than head and hexdump
I hit this when trying to switch the AOSP build to toybox head (which
doesn't yet support --bytes). I'll add --bytes and --lines anyway, but
just using xxd seems like a better way to do this?
Test: builds
Change-Id: I2bd2d3467b70c98534468d37da6794fe705652d3
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index e66edae..71117ae 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -336,7 +336,7 @@
# Brillo images are zip files. We detect the 4-byte magic header of the zip
# file.
- local magic=$(head --bytes=4 "${image}" | hexdump -e '1/1 "%.2x"')
+ local magic=$(xxd -p -l4 "${image}")
if [[ "${magic}" == "504b0304" ]]; then
echo "Detected .zip file, extracting Brillo image."
extract_image_brillo "$@"