Merge "sign_virt_apex: do not use truncate (/usr/bin)" am: 62e07dcd94

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2000671

Change-Id: I87b05956e27aa68c31ef68c246252a5485ac869f
diff --git a/apex/sign_virt_apex.py b/apex/sign_virt_apex.py
index b659b73..e782bd2 100644
--- a/apex/sign_virt_apex.py
+++ b/apex/sign_virt_apex.py
@@ -250,7 +250,8 @@
         RunCommand(args, cmd)
         # libavb expects to be able to read the maximum vbmeta size, so we must provide a partition
         # which matches this or the read will fail.
-        RunCommand(args, ['truncate', '-s', '65536', vbmeta_img])
+        with open(vbmeta_img, 'a') as f:
+            f.truncate(65536)
 
 
 class TempDirectory(object):