Fix FirmwareDtboVerification#testVerifyOverlay

The original verification command is incorrect. Correct the argument to
fix the test failure.

Bug: 157964098
Test: atest FirmwareDtboVerification
Change-Id: I0d525cea2ccb2f90b20e72db3ba9aea2afe27a46
diff --git a/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java b/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java
index 20729be..62a805e 100644
--- a/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java
+++ b/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java
@@ -214,16 +214,6 @@
         CLog.d("overlay_idx_string=%s", overlay_idx_string);
         Assert.assertNotEquals(
                 "Kernel command line missing androidboot.dtbo_idx", overlay_idx_string.length(), 0);
-        ArrayList<String> overlayArg = new ArrayList<>();
-        for (String overlay_idx : overlay_idx_string.split(",")) {
-            String overlayFileName = "dumped_dtbo." + overlay_idx.replaceAll("\\s+$", "");
-            File overlayFile = new File(mTemptFolder, overlayFileName);
-            File remoteOverLayFile = new File(mDeviceTestRoot, overlayFileName);
-            if (!mDevice.pushFile(overlayFile, remoteOverLayFile.getAbsolutePath())) {
-                Assert.fail("Push " + overlayFile + "fail!");
-            }
-            overlayArg.add(overlayFileName);
-        }
         String verificationTestPath = null;
         String ufdtVerifier = "ufdt_verify_overlay";
         ArrayList<String> matchedResults =
@@ -246,8 +236,20 @@
         cmdResult = mDevice.executeShellV2Command(String.format(copyCommand));
         Assert.assertEquals("Unable to copy to " + remoteFinalDTPath, cmdResult.getStatus(),
                 CommandStatus.SUCCESS);
+        ArrayList<String> overlayArg = new ArrayList<>();
+        for (String overlay_idx : overlay_idx_string.split(",")) {
+            String overlayFileName = "dumped_dtbo." + overlay_idx.replaceAll("\\s+$", "");
+            File overlayFile = new File(mTemptFolder, overlayFileName);
+            // Push the dumped overlay dtbo files to the same direcly of ufdt_verify_overlay
+            File remoteOverLayFile = new File(ufdtVerifierParent, overlayFileName);
+            CLog.d("Push remoteOverLayFile %s", remoteOverLayFile);
+            if (!mDevice.pushFile(overlayFile, remoteOverLayFile.getAbsolutePath())) {
+                Assert.fail("Push " + overlayFile + "fail!");
+            }
+            overlayArg.add(overlayFileName);
+        }
         String verifyCmd = String.format("cd %s && ./ufdt_verify_overlay final_dt %s",
-                ufdtVerifierParent, remoteFinalDTPath);
+                ufdtVerifierParent, String.join(" ", overlayArg));
         CLog.d(verifyCmd);
         cmdResult = mDevice.executeShellV2Command(verifyCmd);
         Assert.assertEquals("Incorrect Overlay Application:" + cmdResult.getStderr(),