Merge "Import translations. DO NOT MERGE ANYWHERE" into main
diff --git a/build/debian/build.sh b/build/debian/build.sh
index da01695..d75c3f6 100755
--- a/build/debian/build.sh
+++ b/build/debian/build.sh
@@ -5,6 +5,8 @@
 # - Add Android-specific packages via a new class
 # - Use a stable release from debian-cloud-images
 
+SCRIPT_DIR="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
+
 show_help() {
 	echo "Usage: sudo $0 [OPTION]... [FILE]"
 	echo "Builds a debian image and save it to FILE. [sudo is required]"
@@ -170,7 +172,7 @@
 }
 
 build_rust_as_deb() {
-	pushd "$(dirname "$0")/../../guest/$1" > /dev/null
+	pushd "$SCRIPT_DIR/../../guest/$1" > /dev/null
 	cargo deb \
 		--target "${arch}-unknown-linux-gnu" \
 		--output "${debian_cloud_image}/localdebs"
@@ -180,7 +182,7 @@
 build_ttyd() {
 	local ttyd_version=1.7.7
 	local url="https://github.com/tsl0922/ttyd/archive/refs/tags/${ttyd_version}.tar.gz"
-	cp -r "$(dirname "$0")/ttyd" "${workdir}/ttyd"
+	cp -r "$SCRIPT_DIR/ttyd" "${workdir}/ttyd"
 
 	pushd "${workdir}" > /dev/null
 	wget "${url}" -O - | tar xz
@@ -199,13 +201,13 @@
 copy_android_config() {
 	local src
 	local dst
-	src="$(dirname "$0")/fai_config"
+	src="$SCRIPT_DIR/fai_config"
 	dst="${config_space}"
 
 	cp -R "${src}"/* "${dst}"
-	cp "$(dirname "$0")/image.yaml" "${resources_dir}"
+	cp "$SCRIPT_DIR/image.yaml" "${resources_dir}"
 
-	cp -R "$(dirname "$0")/localdebs/" "${debian_cloud_image}/"
+	cp -R "$SCRIPT_DIR/localdebs/" "${debian_cloud_image}/"
 	build_ttyd
 	build_rust_as_deb forwarder_guest
 	build_rust_as_deb forwarder_guest_launcher
@@ -258,7 +260,7 @@
 	            --extract "${dsc_file}"
 	pushd "linux-${debian_kver%-*}" > /dev/null
 
-	local kpatches_src="$(dirname "$0")/kernel_patches"
+	local kpatches_src="$SCRIPT_DIR/kernel_patches"
 	cp -r "${kpatches_src}/avf" debian/patches/
 	cat "${kpatches_src}/series" >> debian/patches/series
 	./debian/rules orig
@@ -316,7 +318,7 @@
 
 generate_output_package() {
 	fdisk -l "${raw_disk_image}"
-	local vm_config="$(realpath $(dirname "$0"))/vm_config.json.${arch}"
+	local vm_config="$SCRIPT_DIR/vm_config.json.${arch}"
 	local root_partition_num=1
 	local bios_partition_num=14
 	local efi_partition_num=15
diff --git a/build/debian/build_in_container.sh b/build/debian/build_in_container.sh
index 967f5ab..e3adcae 100755
--- a/build/debian/build_in_container.sh
+++ b/build/debian/build_in_container.sh
@@ -58,4 +58,4 @@
   -v "$ANDROID_BUILD_TOP/packages/modules/Virtualization:/root/Virtualization" \
   --workdir /root/Virtualization/build/debian \
   ubuntu:22.04 \
-  bash -c "/root/Virtualization/build/debian/build.sh -a $arch $release_flag $kernel_flag $save_workdir_flag $shell_condition bash"
+  bash -c "./build.sh -a $arch $release_flag $kernel_flag $save_workdir_flag $shell_condition bash"
diff --git a/guest/pvmfw/avb/src/ops.rs b/guest/pvmfw/avb/src/ops.rs
index 62bf239..780e23b 100644
--- a/guest/pvmfw/avb/src/ops.rs
+++ b/guest/pvmfw/avb/src/ops.rs
@@ -60,6 +60,14 @@
         &mut self,
         partition_name: &CStr,
     ) -> SlotVerifyResult<SlotVerifyData<'a>> {
+        // Note that this call manages to verify the initrd images using hashes contained in the
+        // (unique) VBMeta from the end of self.kernel because if
+        //
+        // - read_from_partition("vbmeta") returns AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION and
+        // - we do NOT pass AVB_SLOT_VERIFY_FLAGS_NO_VBMETA_PARTITION to slot_verify()
+        //
+        // then libavb (specifically, avb_slot_verify()) falls back to retrieving VBMeta from the
+        // footer of the "boot" partition i.e. self.kernel (see PartitionName::Kernel).
         slot_verify(
             self,
             &[partition_name],
diff --git a/guest/pvmfw/avb/tests/api_test.rs b/guest/pvmfw/avb/tests/api_test.rs
index 29a6277..df33830 100644
--- a/guest/pvmfw/avb/tests/api_test.rs
+++ b/guest/pvmfw/avb/tests/api_test.rs
@@ -356,6 +356,32 @@
 }
 
 #[test]
+fn tampered_normal_initrd_fails_verification() -> Result<()> {
+    let mut initrd = load_latest_initrd_normal()?;
+    initrd[1] = !initrd[1]; // Flip the bits
+
+    assert_payload_verification_with_initrd_fails(
+        &load_latest_signed_kernel()?,
+        &initrd,
+        &load_trusted_public_key()?,
+        SlotVerifyError::Verification(None).into(),
+    )
+}
+
+#[test]
+fn tampered_debug_initrd_fails_verification() -> Result<()> {
+    let mut initrd = load_latest_initrd_debug()?;
+    initrd[1] = !initrd[1]; // Flip the bits
+
+    assert_payload_verification_with_initrd_fails(
+        &load_latest_signed_kernel()?,
+        &initrd,
+        &load_trusted_public_key()?,
+        SlotVerifyError::Verification(None).into(),
+    )
+}
+
+#[test]
 fn tampered_vbmeta_fails_verification() -> Result<()> {
     let mut kernel = load_latest_signed_kernel()?;
     let footer = extract_avb_footer(&kernel)?;
diff --git a/guest/pvmfw/src/device_assignment.rs b/guest/pvmfw/src/device_assignment.rs
index bb2e6ce..fb485fe 100644
--- a/guest/pvmfw/src/device_assignment.rs
+++ b/guest/pvmfw/src/device_assignment.rs
@@ -166,7 +166,7 @@
     tokens: Vec<&'a [u8]>,
 }
 
-impl<'a> fmt::Debug for DtPathTokens<'a> {
+impl fmt::Debug for DtPathTokens<'_> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         let mut list = f.debug_list();
         for token in &self.tokens {
diff --git a/guest/pvmfw/src/fdt.rs b/guest/pvmfw/src/fdt.rs
index 818d342..fac9a9a 100644
--- a/guest/pvmfw/src/fdt.rs
+++ b/guest/pvmfw/src/fdt.rs
@@ -554,7 +554,7 @@
     }
 }
 
-impl<'a, const N: usize> Iterator for CellChunkIterator<'a, N> {
+impl<const N: usize> Iterator for CellChunkIterator<'_, N> {
     type Item = [u32; N];
     fn next(&mut self) -> Option<Self::Item> {
         let mut ret: Self::Item = [0; N];
diff --git a/guest/pvmfw/src/rollback.rs b/guest/pvmfw/src/rollback.rs
index 004acdb..e51b6d5 100644
--- a/guest/pvmfw/src/rollback.rs
+++ b/guest/pvmfw/src/rollback.rs
@@ -44,15 +44,16 @@
     cdi_seal: &[u8],
     instance_hash: Option<Hidden>,
 ) -> Result<(bool, Hidden, bool), RebootReason> {
-    if (should_defer_rollback_protection(fdt)?
+    if let Some(fixed) = get_fixed_rollback_protection(verified_boot_data) {
+        // Prevent attackers from impersonating well-known images.
+        perform_fixed_index_rollback_protection(verified_boot_data, fixed)?;
+        Ok((false, instance_hash.unwrap(), false))
+    } else if (should_defer_rollback_protection(fdt)?
         && verified_boot_data.has_capability(Capability::SecretkeeperProtection))
         || verified_boot_data.has_capability(Capability::TrustySecurityVm)
     {
         perform_deferred_rollback_protection(verified_boot_data)?;
         Ok((false, instance_hash.unwrap(), true))
-    } else if verified_boot_data.has_capability(Capability::RemoteAttest) {
-        perform_fixed_index_rollback_protection(verified_boot_data)?;
-        Ok((false, instance_hash.unwrap(), false))
     } else {
         perform_legacy_rollback_protection(fdt, dice_inputs, cdi_seal, instance_hash)
     }
@@ -72,11 +73,19 @@
     }
 }
 
+fn get_fixed_rollback_protection(verified_boot_data: &VerifiedBootData) -> Option<u64> {
+    if verified_boot_data.has_capability(Capability::RemoteAttest) {
+        Some(service_vm_version::VERSION)
+    } else {
+        None
+    }
+}
+
 fn perform_fixed_index_rollback_protection(
     verified_boot_data: &VerifiedBootData,
+    fixed_index: u64,
 ) -> Result<(), RebootReason> {
     info!("Performing fixed-index rollback protection");
-    let fixed_index = service_vm_version::VERSION;
     let index = verified_boot_data.rollback_index;
     if index != fixed_index {
         error!("Rollback index mismatch: expected {fixed_index}, found {index}");
diff --git a/libs/libvmbase/src/fdt/pci.rs b/libs/libvmbase/src/fdt/pci.rs
index b526f3d..fcaa806 100644
--- a/libs/libvmbase/src/fdt/pci.rs
+++ b/libs/libvmbase/src/fdt/pci.rs
@@ -14,7 +14,7 @@
 
 //! Library for working with (VirtIO) PCI devices discovered from a device tree.
 
-use core::{ffi::CStr, ops::Range};
+use core::ops::Range;
 use libfdt::{AddressRange, Fdt, FdtError, FdtNode};
 use log::debug;
 use thiserror::Error;
@@ -103,7 +103,7 @@
 
 /// Finds an FDT node with compatible=pci-host-cam-generic.
 fn pci_node(fdt: &Fdt) -> Result<FdtNode, PciError> {
-    fdt.compatible_nodes(CStr::from_bytes_with_nul(b"pci-host-cam-generic\0").unwrap())
+    fdt.compatible_nodes(c"pci-host-cam-generic")
         .map_err(PciError::FdtErrorPci)?
         .next()
         .ok_or(PciError::FdtNoPci)
diff --git a/libs/libvmbase/src/virtio/pci.rs b/libs/libvmbase/src/virtio/pci.rs
index 591ae54..c2e3301 100644
--- a/libs/libvmbase/src/virtio/pci.rs
+++ b/libs/libvmbase/src/virtio/pci.rs
@@ -104,7 +104,7 @@
     }
 }
 
-impl<'a, T: Hal, C: ConfigurationAccess> Iterator for PciTransportIterator<'a, T, C> {
+impl<T: Hal, C: ConfigurationAccess> Iterator for PciTransportIterator<'_, T, C> {
     type Item = PciTransport;
 
     fn next(&mut self) -> Option<Self::Item> {
diff --git a/tests/backcompat_test/src/main.rs b/tests/backcompat_test/src/main.rs
index bf0afa6..aa69eec 100644
--- a/tests/backcompat_test/src/main.rs
+++ b/tests/backcompat_test/src/main.rs
@@ -160,9 +160,9 @@
         .arg("--ignore-path-value")
         .arg("/avf/untrusted/instance-id")
         .arg("--ignore-path-value")
-        .arg("/chosen/linuxinitrd-start")
+        .arg("/chosen/linux,initrd-start")
         .arg("--ignore-path-value")
-        .arg("/chosen/linuxinitrd-end")
+        .arg("/chosen/linux,initrd-end")
         .arg("--ignore-path-value")
         .arg("/avf/secretkeeper_public_key")
         .arg("--ignore-path")
diff --git a/tests/hostside/Android.bp b/tests/hostside/Android.bp
index 6d7c25e..fa2ff8e 100644
--- a/tests/hostside/Android.bp
+++ b/tests/hostside/Android.bp
@@ -39,7 +39,6 @@
     ":microdroid_general_sepolicy.conf",
     ":test.com.android.virt.pem",
     ":test2.com.android.virt.pem",
-    "java/**/goldens/dt_dump_*",
 ]
 
 BINS = [
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index e8673ce..7864f3f 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -1422,138 +1422,6 @@
         }
     }
 
-    @Test
-    @Parameters(method = "osVersions")
-    @TestCaseName("{method}_os_{0}")
-    @CddTest
-    public void microdroidDeviceTreeCompat(String os) throws Exception {
-        assumeArm64Supported();
-        final String configPath = "assets/vm_config.json";
-        // Preconditions
-        assumeKernelSupported(os);
-        int mem_size = 256;
-        assertTrue("Memory size too small", mem_size >= minMemorySize());
-
-        // Start the VM with the dump DT option.
-        mMicrodroidDevice =
-                MicrodroidBuilder.fromDevicePath(getPathForPackage(PACKAGE_NAME), configPath)
-                        .debugLevel(DEBUG_LEVEL_FULL)
-                        .memoryMib(mem_size)
-                        .cpuTopology("one_cpu")
-                        .protectedVm(false)
-                        .os(SUPPORTED_OSES.get(os))
-                        .name("test_device_tree")
-                        .dumpDt("/data/local/tmp/dump_dt.dtb")
-                        .build(getAndroidDevice());
-        assertThat(mMicrodroidDevice.waitForBootComplete(BOOT_COMPLETE_TIMEOUT)).isTrue();
-
-        File goldenDt = findTestFile("dt_dump_golden.dts");
-        testGoldenDeviceTree(goldenDt.getAbsolutePath());
-    }
-
-    @Test
-    @Parameters(method = "osVersions")
-    @TestCaseName("{method}_os_{0}")
-    @CddTest
-    public void microdroidProtectedDeviceTreeCompat(String os) throws Exception {
-        assumeArm64Supported();
-        final String configPath = "assets/vm_config.json";
-        // Preconditions
-        assumeKernelSupported(os);
-        assumeVmTypeSupported(os, true);
-        int mem_size = 256;
-        assertTrue("Memory size too small", mem_size >= minMemorySize());
-
-        // Start the VM with the dump DT option.
-        mMicrodroidDevice =
-                MicrodroidBuilder.fromDevicePath(getPathForPackage(PACKAGE_NAME), configPath)
-                        .debugLevel(DEBUG_LEVEL_FULL)
-                        .memoryMib(mem_size)
-                        .cpuTopology("one_cpu")
-                        .protectedVm(true)
-                        .os(SUPPORTED_OSES.get(os))
-                        .name("test_device_tree")
-                        .dumpDt("/data/local/tmp/dump_dt.dtb")
-                        .build(getAndroidDevice());
-        assertThat(mMicrodroidDevice.waitForBootComplete(BOOT_COMPLETE_TIMEOUT)).isTrue();
-
-        File goldenDt = findTestFile("dt_dump_protected_golden.dts");
-        testGoldenDeviceTree(goldenDt.getAbsolutePath());
-    }
-
-    private void testGoldenDeviceTree(String goldenDt) throws Exception {
-        // Pull the device tree to host.
-        TestDevice device = getAndroidDevice();
-        boolean disableRoot = !device.isAdbRoot();
-        device.enableAdbRoot();
-        assumeTrue("adb root is not enabled", device.isAdbRoot());
-
-        // Pull DT from device
-        File dtb_from_device = device.pullFile("/data/local/tmp/dump_dt.dtb");
-        if (disableRoot) {
-            device.disableAdbRoot();
-        }
-
-        File dtc = findTestFile("dtc");
-
-        // Create temp file for Device tree conversion
-        File dt_dump_dts = File.createTempFile("dt_dump", "dts");
-        dt_dump_dts.delete();
-        String dt_dump_dts_path = dt_dump_dts.getAbsolutePath();
-        // Convert DT to text format.
-        CommandResult dtb_to_dts =
-                RunUtil.getDefault()
-                        .runTimedCmd(
-                                3000,
-                                dtc.getAbsolutePath(),
-                                "-I",
-                                "dtb",
-                                "-O",
-                                "dts",
-                                "-qqq",
-                                "-f",
-                                "-s",
-                                "-o",
-                                dt_dump_dts_path,
-                                dtb_from_device.getAbsolutePath());
-        assertTrue(
-                "result convert stderr: " + dtb_to_dts.getStderr(),
-                dtb_to_dts.getStderr().trim().isEmpty());
-        assertTrue(
-                "result convert stdout: " + dtb_to_dts.getStdout(),
-                dtb_to_dts.getStdout().trim().isEmpty());
-
-        // Diff device's DT with the golden DT.
-        CommandResult result_compare =
-                RunUtil.getDefault()
-                        .runTimedCmd(
-                                3000,
-                                "diff",
-                                "-u",
-                                "-w",
-                                "-I",
-                                "kaslr-seed",
-                                "-I",
-                                "instance-id",
-                                "-I",
-                                "rng-seed",
-                                "-I",
-                                "linux,initrd-end",
-                                "-I",
-                                "secretkeeper_public_key",
-                                "-I",
-                                "interrupt-map",
-                                dt_dump_dts_path,
-                                goldenDt);
-
-        assertTrue(
-                "result compare stderr: " + result_compare.getStderr(),
-                result_compare.getStderr().trim().isEmpty());
-        assertTrue(
-                "result compare stdout: " + result_compare.getStdout(),
-                result_compare.getStdout().trim().isEmpty());
-    }
-
     @Before
     public void setUp() throws Exception {
         assumeDeviceIsCapable(getDevice());
diff --git a/tests/hostside/java/com/android/microdroid/test/goldens/dt_dump_golden.dts b/tests/hostside/java/com/android/microdroid/test/goldens/dt_dump_golden.dts
deleted file mode 100644
index de9f7c5..0000000
--- a/tests/hostside/java/com/android/microdroid/test/goldens/dt_dump_golden.dts
+++ /dev/null
@@ -1,145 +0,0 @@
-/dts-v1/;
-
-/ {
-        #address-cells = <0x02>;
-        #size-cells = <0x02>;
-        compatible = "linux,dummy-virt";
-        interrupt-parent = <0x01>;
-        name = "reference";
-
-        U6_16550A@2e8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x02 0x01>;
-                reg = <0x00 0x2e8 0x00 0x08>;
-        };
-
-        U6_16550A@2f8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x02 0x01>;
-                reg = <0x00 0x2f8 0x00 0x08>;
-        };
-
-        U6_16550A@3e8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x00 0x01>;
-                reg = <0x00 0x3e8 0x00 0x08>;
-        };
-
-        U6_16550A@3f8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x00 0x01>;
-                reg = <0x00 0x3f8 0x00 0x08>;
-        };
-
-        __symbols__ {
-                intc = "/intc";
-        };
-
-        avf {
-                secretkeeper_public_key = [];
-
-                untrusted {
-                        defer-rollback-protection;
-                        instance-id = <0xf145d4f8 0x15f03952 0x5af249aa 0xfead94d8 0xb9f05746 0xd9163f48 0x7251b67b 0xe117409e 0x2b14dfa5 0xcaa8caf7 0x14176d2d 0xf88cc94b 0xeed4a59d 0x9a2d8fe5 0x5ac590f1 0xbb6c96f5>;
-                };
-        };
-
-        chosen {
-                bootargs = "panic=-1 crashkernel=17M earlycon=uart8250,mmio,0x3f8 keep_bootcon";
-                kaslr-seed = <>;
-                linux,initrd-end = <0x81200360>;
-                linux,initrd-start = <0x81000000>;
-                linux,pci-probe-only = <0x01>;
-                rng-seed = <>;
-                stdout-path = "/U6_16550A@3f8";
-        };
-
-        config {
-                kernel-address = <0x80000000>;
-                kernel-size = <0xc91000>;
-        };
-
-        cpufreq {
-                compatible = "virtual,kvm-cpufreq";
-        };
-
-        cpus {
-                #address-cells = <0x01>;
-                #size-cells = <0x00>;
-
-                cpu@0 {
-                        compatible = "arm,armv8";
-                        device_type = "cpu";
-                        phandle = <0x100>;
-                        reg = <0x00>;
-                };
-        };
-
-        intc {
-                #address-cells = <0x02>;
-                #interrupt-cells = <0x03>;
-                #size-cells = <0x02>;
-                compatible = "arm,gic-v3";
-                interrupt-controller;
-                phandle = <0x01>;
-                reg = <0x00 0x3fff0000 0x00 0x10000 0x00 0x3ffd0000 0x00 0x20000>;
-        };
-
-        memory {
-                device_type = "memory";
-                reg = <0x00 0x80000000 0x00 0x10000000>;
-        };
-
-        pci {
-                #address-cells = <0x03>;
-                #interrupt-cells = <0x01>;
-                #size-cells = <0x02>;
-                bus-range = <0x00 0x00>;
-                compatible = "pci-host-cam-generic";
-                device_type = "pci";
-                dma-coherent;
-                interrupt-map = <0x800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x04 0x04 0x1000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x05 0x04 0x1800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x06 0x04 0x2000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x07 0x04 0x2800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x08 0x04 0x3000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x09 0x04 0x3800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x0a 0x04 0x4000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x0b 0x04 0x4800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x0c 0x04>;
-                interrupt-map-mask = <0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07>;
-                ranges = <0x3000000 0x00 0x70000000 0x00 0x70000000 0x00 0x2000000 0x43000000 0x00 0x90800000 0x00 0x90800000 0xff 0x6f800000>;
-                reg = <0x00 0x72000000 0x00 0x1000000>;
-        };
-
-        pclk@3M {
-                #clock-cells = <0x00>;
-                clock-frequency = <0x2fefd8>;
-                compatible = "fixed-clock";
-                phandle = <0x18>;
-        };
-
-        psci {
-                compatible = "arm,psci-1.0\0arm,psci-0.2";
-                method = "hvc";
-        };
-
-        rtc@2000 {
-                arm,primecell-periphid = <0x41030>;
-                clock-names = "apb_pclk";
-                clocks = <0x18>;
-                compatible = "arm,primecell";
-                interrupts = <0x00 0x01 0x04>;
-                reg = <0x00 0x2000 0x00 0x1000>;
-        };
-
-        timer {
-                always-on;
-                compatible = "arm,armv8-timer";
-                interrupts = <0x01 0x0d 0x108 0x01 0x0e 0x108 0x01 0x0b 0x108 0x01 0x0a 0x108>;
-        };
-
-        vmwdt@3000 {
-                clock-frequency = <0x02>;
-                compatible = "qemu,vcpu-stall-detector";
-                interrupts = <0x01 0x0f 0x101>;
-                reg = <0x00 0x3000 0x00 0x1000>;
-                timeout-sec = <0x0a>;
-        };
-};
diff --git a/tests/hostside/java/com/android/microdroid/test/goldens/dt_dump_protected_golden.dts b/tests/hostside/java/com/android/microdroid/test/goldens/dt_dump_protected_golden.dts
deleted file mode 100644
index f09e4ff..0000000
--- a/tests/hostside/java/com/android/microdroid/test/goldens/dt_dump_protected_golden.dts
+++ /dev/null
@@ -1,159 +0,0 @@
-/dts-v1/;
-
-/ {
-        #address-cells = <0x02>;
-        #size-cells = <0x02>;
-        compatible = "linux,dummy-virt";
-        interrupt-parent = <0x01>;
-        name = "reference";
-
-        U6_16550A@2e8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x02 0x01>;
-                reg = <0x00 0x2e8 0x00 0x08>;
-        };
-
-        U6_16550A@2f8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x02 0x01>;
-                reg = <0x00 0x2f8 0x00 0x08>;
-        };
-
-        U6_16550A@3e8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x00 0x01>;
-                reg = <0x00 0x3e8 0x00 0x08>;
-        };
-
-        U6_16550A@3f8 {
-                clock-frequency = <0x1c2000>;
-                compatible = "ns16550a";
-                interrupts = <0x00 0x00 0x01>;
-                reg = <0x00 0x3f8 0x00 0x08>;
-        };
-
-        __symbols__ {
-                intc = "/intc";
-        };
-
-        avf {
-                secretkeeper_public_key = [];
-
-                untrusted {
-                        defer-rollback-protection;
-                        instance-id = <0x4d482941 0x27228238 0x11d7b28 0xaeed3076 0x88eb3fcb 0x2b9de301 0x57ff8977 0xaf8c24b6 0x55466af4 0x23beed37 0x2f976083 0xe630eb28 0x1edbc491 0xa8300897 0xeb3e9f76 0x21ea9284>;
-                };
-        };
-
-        chosen {
-                bootargs = "panic=-1 crashkernel=31M earlycon=uart8250,mmio,0x3f8 keep_bootcon";
-                kaslr-seed = <>;
-                linux,initrd-end = <0x81202104>;
-                linux,initrd-start = <0x81000000>;
-                linux,pci-probe-only = <0x01>;
-                rng-seed = <>;
-                stdout-path = "/U6_16550A@3f8";
-        };
-
-        config {
-                kernel-address = <0x80000000>;
-                kernel-size = <0xc91000>;
-        };
-
-        cpufreq {
-                compatible = "virtual,kvm-cpufreq";
-        };
-
-        cpus {
-                #address-cells = <0x01>;
-                #size-cells = <0x00>;
-
-                cpu@0 {
-                        compatible = "arm,armv8";
-                        device_type = "cpu";
-                        phandle = <0x100>;
-                        reg = <0x00>;
-                };
-        };
-
-        intc {
-                #address-cells = <0x02>;
-                #interrupt-cells = <0x03>;
-                #size-cells = <0x02>;
-                compatible = "arm,gic-v3";
-                interrupt-controller;
-                phandle = <0x01>;
-                reg = <0x00 0x3fff0000 0x00 0x10000 0x00 0x3ffd0000 0x00 0x20000>;
-        };
-
-        memory {
-                device_type = "memory";
-                reg = <0x00 0x80000000 0x00 0x10e00000>;
-        };
-
-        pci {
-                #address-cells = <0x03>;
-                #interrupt-cells = <0x01>;
-                #size-cells = <0x02>;
-                bus-range = <0x00 0x00>;
-                compatible = "pci-host-cam-generic";
-                device_type = "pci";
-                dma-coherent;
-                interrupt-map = <0x800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x04 0x04 0x1000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x05 0x04 0x1800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x06 0x04 0x2000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x07 0x04 0x2800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x08 0x04 0x3000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x09 0x04 0x3800 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x0a 0x04 0x4000 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x0b 0x04>;
-                interrupt-map-mask = <0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07 0xf800 0x00 0x00 0x07>;
-                memory-region = <0x02>;
-                ranges = <0x3000000 0x00 0x70000000 0x00 0x70000000 0x00 0x2000000 0x43000000 0x00 0x91600000 0x00 0x91600000 0xff 0x6ea00000>;
-                reg = <0x00 0x72000000 0x00 0x1000000>;
-        };
-
-        pclk@3M {
-                #clock-cells = <0x00>;
-                clock-frequency = <0x2fefd8>;
-                compatible = "fixed-clock";
-                phandle = <0x18>;
-        };
-
-        psci {
-                compatible = "arm,psci-1.0\0arm,psci-0.2";
-                method = "hvc";
-        };
-
-        reserved-memory {
-                #address-cells = <0x02>;
-                #size-cells = <0x02>;
-                ranges;
-
-                restricted_dma_reserved {
-                        alignment = <0x00 0x1000>;
-                        compatible = "restricted-dma-pool";
-                        phandle = <0x02>;
-                        size = <0x00 0xe00000>;
-                };
-        };
-
-        rtc@2000 {
-                arm,primecell-periphid = <0x41030>;
-                clock-names = "apb_pclk";
-                clocks = <0x18>;
-                compatible = "arm,primecell";
-                interrupts = <0x00 0x01 0x04>;
-                reg = <0x00 0x2000 0x00 0x1000>;
-        };
-
-        timer {
-                always-on;
-                compatible = "arm,armv8-timer";
-                interrupts = <0x01 0x0d 0x108 0x01 0x0e 0x108 0x01 0x0b 0x108 0x01 0x0a 0x108>;
-        };
-
-        vmwdt@3000 {
-                clock-frequency = <0x02>;
-                compatible = "qemu,vcpu-stall-detector";
-                interrupts = <0x01 0x0f 0x101>;
-                reg = <0x00 0x3000 0x00 0x1000>;
-                timeout-sec = <0x0a>;
-        };
-};