diff --git a/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java b/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java index e4ebdefb1a5..8e8dba82d7d 100644 --- a/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java +++ b/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java @@ -51,7 +51,12 @@ public class Enable16KbTest extends BaseHostJUnit4Test { @Test @AppModeFull public void enable16KbToggle() throws Exception { - assertTrue(isPackageInstalled(APP_PACKAGE)); + // Wait for 2 mins device to be online + getDevice().waitForDeviceOnline(120000); + if (!isPackageInstalled(APP_PACKAGE)) { + //If test app has failed for some reason, retry installation + installTestApp(); + } // Check if developer option is enabled otherwise exit getDevice().enableAdbRoot();