Loading tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java +19 −4 Original line number Diff line number Diff line Loading @@ -123,16 +123,27 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { } boolean found = false; boolean remountSystem = false; boolean remountVendor = false; for (String file : files) { CommandResult result = getDevice().executeShellV2Command("ls " + file); if (result.getStatus() == CommandStatus.SUCCESS) { found = true; break; if (file.startsWith("/system")) { remountSystem = true; } else if (file.startsWith("/vendor")) { remountVendor = true; } } } if (found) { if (remountSystem) { getDevice().remountSystemWritable(); } if (remountVendor) { getDevice().remountVendorWritable(); } for (String file : files) { getDevice().executeShellCommand("rm -rf " + file); } Loading @@ -150,7 +161,11 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } if ("system".equals(partition)) { getDevice().remountSystemWritable(); } else if ("vendor".equals(partition)) { getDevice().remountVendorWritable(); } assertTrue(getDevice().pushFile(apex, "/" + partition + "/apex/" + fileName)); } Loading @@ -158,7 +173,7 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } getDevice().remountSystemWritable(); getDevice().remountVendorWritable(); File file = File.createTempFile("test-vendor-apex-allow-list", ".xml"); try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { final String fmt = Loading Loading
tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java +19 −4 Original line number Diff line number Diff line Loading @@ -123,16 +123,27 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { } boolean found = false; boolean remountSystem = false; boolean remountVendor = false; for (String file : files) { CommandResult result = getDevice().executeShellV2Command("ls " + file); if (result.getStatus() == CommandStatus.SUCCESS) { found = true; break; if (file.startsWith("/system")) { remountSystem = true; } else if (file.startsWith("/vendor")) { remountVendor = true; } } } if (found) { if (remountSystem) { getDevice().remountSystemWritable(); } if (remountVendor) { getDevice().remountVendorWritable(); } for (String file : files) { getDevice().executeShellCommand("rm -rf " + file); } Loading @@ -150,7 +161,11 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } if ("system".equals(partition)) { getDevice().remountSystemWritable(); } else if ("vendor".equals(partition)) { getDevice().remountVendorWritable(); } assertTrue(getDevice().pushFile(apex, "/" + partition + "/apex/" + fileName)); } Loading @@ -158,7 +173,7 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } getDevice().remountSystemWritable(); getDevice().remountVendorWritable(); File file = File.createTempFile("test-vendor-apex-allow-list", ".xml"); try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { final String fmt = Loading