/platform_testing/libraries/sts-common-util/host-side/tests/src/com/android/sts/common/ |
D | MallocDebugTest.java | 58 .that(getDevice().getProperty("libc.debug.malloc.options")) in setUp() 61 .that(getDevice().getProperty("libc.debug.malloc.programs")) in setUp() 68 .that(getDevice().getProperty("libc.debug.malloc.options")) in tearDown() 71 .that(getDevice().getProperty("libc.debug.malloc.programs")) in tearDown() 87 assertTrue(getDevice().disableAdbRoot()); in testMallocDebugAutocloseableNonRoot() 90 getDevice(), "backtrace guard", "native-poc")) { in testMallocDebugAutocloseableNonRoot() 97 assertTrue("must test with rootable device", getDevice().enableAdbRoot()); in testMallocDebugAutocloseableRoot() 100 getDevice(), "backtrace guard", "native-poc")) { in testMallocDebugAutocloseableRoot() 107 assertTrue("must test with rootable device", getDevice().enableAdbRoot()); in testMallocDebugAutocloseableNonRootCleanup() 110 getDevice(), "backtrace guard", "native-poc")) { in testMallocDebugAutocloseableNonRootCleanup() [all …]
|
D | UserUtilsTest.java | 43 .that(CommandUtil.runAndCheck(getDevice(), CMD_PM_LIST_USERS).getStdout()) in setUp() 50 .that(CommandUtil.runAndCheck(getDevice(), CMD_PM_LIST_USERS).getStdout()) in tearDown() 56 assertTrue(getDevice().disableAdbRoot()); in testUserUtilsNonRoot() 58 new UserUtils.SecondaryUser(getDevice()).name(TEST_USER_NAME).withUser()) { in testUserUtilsNonRoot() 60 "device should not implicitly root to create a user", getDevice().isAdbRoot()); in testUserUtilsNonRoot() 62 .that(CommandUtil.runAndCheck(getDevice(), CMD_PM_LIST_USERS).getStdout()) in testUserUtilsNonRoot() 65 assertFalse("device should not implicitly root to cleanup", getDevice().isAdbRoot()); in testUserUtilsNonRoot() 70 assertTrue("must test with rootable device", getDevice().enableAdbRoot()); in testUserUtilsRoot() 72 new UserUtils.SecondaryUser(getDevice()).name(TEST_USER_NAME).withUser()) { in testUserUtilsRoot() 75 getDevice().isAdbRoot()); in testUserUtilsRoot() [all …]
|
D | ProcessUtilTest.java | 41 assertTrue("could not unroot", getDevice().disableAdbRoot()); in setUp() 46 assertTrue("could not unroot", getDevice().disableAdbRoot()); in tearDown() 54 getDevice(), "system_server", Pattern.compile(Pattern.quote("libc.so"))); in testFindLoadedByProcessNonRoot() 59 assertTrue("must test with rootable device", getDevice().enableAdbRoot()); in testFindLoadedByProcessMultipleProcesses() 64 getDevice(), "android", Pattern.compile(Pattern.quote("libc.so"))); in testFindLoadedByProcessMultipleProcesses() 72 assertTrue("must test with rootable device", getDevice().enableAdbRoot()); in testFindLoadedByProcessUtilRoot() 75 getDevice(), "system_server", Pattern.compile(Pattern.quote("libc.so"))); in testFindLoadedByProcessUtilRoot() 87 assertTrue("must test with rootable device", getDevice().enableAdbRoot()); in testFindLoadedByProcessUtilNoMatch() 90 getDevice(), in testFindLoadedByProcessUtilNoMatch()
|
/platform_testing/host_runners/power/src/com/android/power/ |
D | PowerRunner.java | 82 if (getDevice() == null) { in run() 90 getDevice().executeShellCommand(makeInstrDirCommand); in run() 93 NohupCommandHelper.executeAdbNohupCommand(getDevice(), instrCmd); in run() 100 getDevice().executeShellCommand("cable_breaker -a end -w -"); in run() 109 + getDevice().getIDevice().getSerialNumber() in waitForDeviceToBeDisconnected() 115 getDevice().waitForDeviceNotAvailable(mMaxWaitTimeForDeviceToBeOffline); in waitForDeviceToBeDisconnected() 116 if (getDevice().getIDevice().isOnline()) { in waitForDeviceToBeDisconnected() 119 + getDevice().getIDevice().getSerialNumber() in waitForDeviceToBeDisconnected() 125 LogUtil.CLog.i("Device " + getDevice().getIDevice().getSerialNumber() + " disconnected"); in waitForDeviceToBeDisconnected() 132 + getDevice().getIDevice().getSerialNumber() in waitForDeviceToBeConnected() [all …]
|
/platform_testing/libraries/sts-common-util/sts-sdk/package/sts-test/src/main/java/android/security/sts/ |
D | StsHostSideTestCase.java | 53 ITestDevice device = getDevice(); in testWithApp() 81 .after(r -> getDevice().executeShellV2Command("ls -l /")) in testWithNativePoc() 95 assumeTrue("could not enable root for malloc debug", getDevice().enableAdbRoot()); in testWithMallocDebug() 98 getDevice(), in testWithMallocDebug() 102 assumeTrue("could not disable root", getDevice().disableAdbRoot()); in testWithMallocDebug() 118 SystemUtil.withSetting(getDevice(), "global", "hidden_api_policy", "1")) { in testWithSetting() 129 assumeTrue("could not enable root to find library path", getDevice().enableAdbRoot()); in testWithVulnerableLibrary() 132 getDevice(), in testWithVulnerableLibrary() 136 assumeTrue("could not disable root", getDevice().disableAdbRoot()); in testWithVulnerableLibrary() 166 assumeTrue("could not enable root to collect dmesg", getDevice().enableAdbRoot()); in testWithLogMessage() [all …]
|
/platform_testing/tests/automotive/health/boottime/src/android/boottime/ |
D | BootTimeTest.java | 151 ITestDevice testDevice = testInfo.getDevice(); in beforeClassWithDevice() 179 getDevice() in testSuccessiveBootsDismissPin() 192 getDevice().enableAdbRoot(); in testSuccessiveBoot() 194 getDevice().executeShellCommand("setprop persist.debug.perfetto.boottrace 1"); in testSuccessiveBoot() 200 getDevice().nonBlockingReboot(); in testSuccessiveBoot() 201 getDevice().waitForDeviceOnline(mDeviceBootTime); in testSuccessiveBoot() 202 getDevice().enableAdbRoot(); in testSuccessiveBoot() 213 getDevice().runInstrumentationTests(mPostBootTestRunner, new CollectingTestListener()); in testSuccessiveBoot() 218 String bootLoaderVal = getDevice().getProperty(BOOT_TIME_PROP); in testSuccessiveBoot() 241 result = getDevice().executeShellV2Command(cmd); in setUpDeviceForSuccessiveBoots() [all …]
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/tradefed/testtype/ |
D | SecurityTestCase.java | 103 getDevice().waitForDeviceAvailable(); in setUp() 108 sBuildInfo.put(getDevice(), getBuild()); in setUp() 109 sAbi.put(getDevice(), getAbi()); in setUp() 110 sTestName.put(getDevice(), testName.getMethodName()); in setUp() 112 pocPusher.setDevice(getDevice()).setBuild(getBuild()).setAbi(getAbi()); in setUp() 113 sPocPusher.put(getDevice(), pocPusher); in setUp() 116 boolean wasRoot = getDevice().isAdbRoot(); in setUp() 118 if (wasRoot || getDevice().enableAdbRoot()) { in setUp() 120 getDevice().executeShellCommand("echo 2 > /proc/sys/kernel/kptr_restrict"); in setUp() 122 getDevice().disableAdbRoot(); in setUp() [all …]
|
D | RootSecurityTestCase.java | 36 assumeTrue("Could not enable adb root on device.", getDevice().enableAdbRoot()); in setUpRoot()
|
D | NonRootSecurityTestCase.java | 35 assumeTrue("Could not disable adb root on device.", getDevice().disableAdbRoot()); in setUpUnroot()
|
/platform_testing/libraries/sts-common-util/host-side/tests/src/com/android/sts/common/util/ |
D | TombstoneUtilsTest.java | 470 assumeTrue(getDevice().enableAdbRoot()); in testWithAssertNoCrashesCatchesCrashRoot() 474 CommandUtil.runAndCheck(getDevice(), "rm -f /data/tombstones/*"); in testWithAssertNoCrashesCatchesCrashRoot() 475 getDevice().disableAdbRoot(); in testWithAssertNoCrashesCatchesCrashRoot() 481 getDevice().disableAdbRoot(); in testWithAssertNoCrashesCatchesCrashNonRoot() 488 getDevice(), pgrepRegex, /* timeoutMs */ 60_000, /* expectExist */ false); in testWithAssertNoCrashesCatchesCrash() 491 getDevice(), new TombstoneUtils.Config().setIgnoreLowFaultAddress(false))) { in testWithAssertNoCrashesCatchesCrash() 493 boolean wasAdbRoot = getDevice().isAdbRoot(); in testWithAssertNoCrashesCatchesCrash() 494 assumeTrue(getDevice().enableAdbRoot()); in testWithAssertNoCrashesCatchesCrash() 496 final ITestDevice device = getDevice(); in testWithAssertNoCrashesCatchesCrash() 505 Map<Integer, String> pidsMap = ProcessUtil.waitProcessRunning(getDevice(), pgrepRegex); in testWithAssertNoCrashesCatchesCrash() [all …]
|
D | KernelVersionHostTest.java | 30 KernelVersionHost.getKernelVersion(getDevice()); in testGetKernelVersion()
|
D | UnameVersionHostTest.java | 32 String version = new UnameVersionHost(getDevice()).getUnameVersion(); in testGetUnameVersion()
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/ |
D | HostsideMainlineModuleDetector.java | 41 context.getDevice().executeShellV2Command("logcat -c"); in getPlayManagedModules() 43 context.getDevice() in getPlayManagedModules() 51 context.getDevice() in getPlayManagedModules()
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/ghidra/ |
D | Ghidra.java | 40 this.device = test.getDevice(); in Ghidra() 58 public ITestDevice getDevice() { in getDevice() method in Ghidra
|
/platform_testing/libraries/device-collectors/src/hostsidetests/src/com/android/collectors/ |
D | DeviceCollectorsTest.java | 70 new RemoteAndroidTestRunner(PACKAGE_NAME, AJUR_RUNNER, getDevice().getIDevice()); in setUp() 75 doReturn(Arrays.asList(getDevice())).when(mContext).getDevices(); in setUp() 87 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testBaseListenerRuns() 114 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testBaseListenerRuns_withExcludeFilters() 144 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testBaseListenerRuns_withIncludeAndExcludeFilters() 174 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testBaseListenerRuns_withIncludeFilters() 210 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testScheduledListenerRuns() 233 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testScheduledListenerRuns_defaultValue()
|
D | ScreenshotOnFailureCollectorHostTest.java | 67 new RemoteAndroidTestRunner(PACKAGE_NAME, AJUR_RUNNER, getDevice().getIDevice()); in setUp() 70 doReturn(Arrays.asList(getDevice())).when(mContext).getDevices(); in setUp() 110 assertTrue(getDevice().runInstrumentationTests(mTestRunner, collector)); in testScreenshotListener()
|
D | BatterystatsCollectorHostTest.java | 76 new RemoteAndroidTestRunner(PACKAGE_NAME, AJUR_RUNNER, getDevice().getIDevice()); in setUp() 78 doReturn(Arrays.asList(getDevice())).when(mContext).getDevices(); in setUp() 120 assertTrue(getDevice().runInstrumentationTests(mTestRunner, collector)); in testBatteryStatsListener_perRun() 167 assertTrue(getDevice().runInstrumentationTests(mTestRunner, collector)); in testBatteryStatsListener_perTest()
|
/platform_testing/libraries/device-collectors/src/main/java/android/device/collectors/ |
D | ScreenRecordCollector.java | 114 getDevice() in setupAdditionalArgs() 205 public UiDevice getDevice() { in getDevice() method in ScreenRecordCollector 245 getDevice() in run() 261 String[] pids = getDevice().executeShellCommand("pidof screenrecord").split(" "); in cancel() 268 getDevice().executeShellCommand(String.format("kill -2 %s", pid)); in cancel()
|
/platform_testing/libraries/device-collectors/src/hostsidetests/src/com/android/loggers/ |
D | DeviceFileLoggerHostTest.java | 62 new RemoteAndroidTestRunner(PACKAGE_NAME, AJUR_RUNNER, getDevice().getIDevice()); in setUp() 66 doReturn(Arrays.asList(getDevice())).when(mContext).getDevices(); in setUp() 75 assertTrue(getDevice().runInstrumentationTests(mTestRunner, listener)); in testFileIsLogged()
|
/platform_testing/libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/ |
D | HandheldHelperTest.java | 26 getDevice().setOrientationNatural(); in initialize()
|
/platform_testing/host_runners/boot/src/com/android/boot/ |
D | BootTimeTest.java | 425 getDevice().setDate(null); in run() 492 getDevice() in run() 529 CommandResult result = getDevice().executeShellV2Command(PERFETTO_TRACE_FILE_CHECK_CMD); in processPerfettoFile() 544 getDevice() in processPerfettoFile() 568 result = getDevice().executeShellV2Command(cmd); in setupDeviceForSuccessiveBoots() 579 getDevice().nonBlockingReboot(); in doSecondBoot() 580 getDevice().waitForDeviceOnline(); in doSecondBoot() 581 getDevice().waitForDeviceAvailable(mDeviceBootTime); in doSecondBoot() 591 getDevice().executeShellCommand("logcat -c"); in clearAndStartLogcat() 596 getDevice(), allBuffers ? LOGCAT_CMD_ALL : LOGCAT_CMD, LOGCAT_SIZE, 0); in clearAndStartLogcat() [all …]
|
/platform_testing/libraries/collectors-helper/jank/src/com/android/helpers/ |
D | SfStatsCollectionHelper.java | 76 getDevice().executeShellCommand(SFSTATS_COMMAND_ENABLE_AND_CLEAR); in startCollecting() 89 output = getDevice().executeShellCommand(SFSTATS_COMMAND_DUMP); in getMetrics() 154 getDevice().executeShellCommand(SFSTATS_COMMAND_DISABLE_AND_CLEAR); in stopCollecting() 164 protected UiDevice getDevice() { in getDevice() method in SfStatsCollectionHelper
|
D | JankCollectionHelper.java | 276 String output = getDevice().executeShellCommand(command); in clearGfxInfo() 282 String output = getDevice().executeShellCommand(command); in clearGfxInfo() 303 String output = getDevice().executeShellCommand(command); in getGfxInfoMetrics() 362 protected UiDevice getDevice() { in getDevice() method in JankCollectionHelper
|
/platform_testing/tests/example/stubtest/src/com/android/test/ |
D | DeviceLongPollingStubTest.java | 39 getDevice().executeShellCommand("log connecting_to_device"); in testDeviceLongPolling()
|
/platform_testing/libraries/collectors-helper/system/src/com/android/helpers/ |
D | ProcLoadHelper.java | 104 String output = getDevice().executeShellCommand(LOAD_CMD); in getProcLoadInLastMinute() 126 private UiDevice getDevice() { in getDevice() method in ProcLoadHelper
|