Use the new verified_boot_android command
The command is much safer. It prevents attackers from switching the
payload data right after the verification is done.
Bug: 198632602
Test: run MicrodroidHostTestCases
Change-Id: I23df11c8d3d8879fe7c36ccb5d96f3f63b4b6944
diff --git a/microdroid/uboot-env-x86_64.txt b/microdroid/uboot-env-x86_64.txt
index fabe5b4..0064cac 100644
--- a/microdroid/uboot-env-x86_64.txt
+++ b/microdroid/uboot-env-x86_64.txt
@@ -3,7 +3,7 @@
# Boot the device following the Android boot procedure
# `0` is the disk number of os_composite.img
# `a` and `_a` are the slot index for A/B
-bootcmd=avb init virtio 0 && avb verify _a && env set bootargs "$bootargs $avb_bootargs" && boot_android virtio 0 a
+bootcmd=verified_boot_android virtio 0 a
bootdelay=0
diff --git a/microdroid/uboot-env.txt b/microdroid/uboot-env.txt
index 2c5bee7..b5f3968 100644
--- a/microdroid/uboot-env.txt
+++ b/microdroid/uboot-env.txt
@@ -3,7 +3,7 @@
# Boot the device following the Android boot procedure
# `0` is the disk number of os_composite.img
# `a` and `_a` are the slot index for A/B
-bootcmd=avb init virtio 0 && avb verify _a && env set bootargs "$bootargs $avb_bootargs" && boot_android virtio 0 a
+bootcmd=verified_boot_android virtio 0 a
bootdelay=0
fdtaddr=0x80000000