Include standard headers when allocating space
GMSCore pass content of payload_properties.txt to update_engine when
calling allocateSpace, make upate_device.py do the same for better
testing fidelity.
Test: th
Change-Id: I57968523320c310a2882c1474897d1e822bc73d9
diff --git a/scripts/update_device.py b/scripts/update_device.py
index f94774b..8b9fbe9 100755
--- a/scripts/update_device.py
+++ b/scripts/update_device.py
@@ -517,10 +517,12 @@
metadata_path = "/data/ota_package/metadata"
if args.allocate_only:
+ with zipfile.ZipFile(args.otafile, "r") as zfp:
+ headers = zfp.read("payload_properties.txt").decode()
if PushMetadata(dut, args.otafile, metadata_path):
dut.adb([
"shell", "update_engine_client", "--allocate",
- "--metadata={}".format(metadata_path)])
+ "--metadata={} --headers='{}'".format(metadata_path, headers)])
# Return 0, as we are executing ADB commands here, no work needed after
# this point
return 0