Home
last modified time | relevance | path

Searched refs:getDevice (Results 1 – 25 of 48) sorted by relevance

12

/platform_testing/libraries/sts-common-util/host-side/tests/src/com/android/sts/common/
DMallocDebugTest.java58 .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 …]
DUserUtilsTest.java43 .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 …]
DProcessUtilTest.java41 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/
DPowerRunner.java82 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/
DStsHostSideTestCase.java53 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/
DBootTimeTest.java151 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/
DSecurityTestCase.java103 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 …]
DRootSecurityTestCase.java36 assumeTrue("Could not enable adb root on device.", getDevice().enableAdbRoot()); in setUpRoot()
DNonRootSecurityTestCase.java35 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/
DTombstoneUtilsTest.java470 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 …]
DKernelVersionHostTest.java30 KernelVersionHost.getKernelVersion(getDevice()); in testGetKernelVersion()
DUnameVersionHostTest.java32 String version = new UnameVersionHost(getDevice()).getUnameVersion(); in testGetUnameVersion()
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/
DHostsideMainlineModuleDetector.java41 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/
DGhidra.java40 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/
DDeviceCollectorsTest.java70 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()
DScreenshotOnFailureCollectorHostTest.java67 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()
DBatterystatsCollectorHostTest.java76 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/
DScreenRecordCollector.java114 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/
DDeviceFileLoggerHostTest.java62 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/
DHandheldHelperTest.java26 getDevice().setOrientationNatural(); in initialize()
/platform_testing/host_runners/boot/src/com/android/boot/
DBootTimeTest.java425 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/
DSfStatsCollectionHelper.java76 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
DJankCollectionHelper.java276 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/
DDeviceLongPollingStubTest.java39 getDevice().executeShellCommand("log connecting_to_device"); in testDeviceLongPolling()
/platform_testing/libraries/collectors-helper/system/src/com/android/helpers/
DProcLoadHelper.java104 String output = getDevice().executeShellCommand(LOAD_CMD); in getProcLoadInLastMinute()
126 private UiDevice getDevice() { in getDevice() method in ProcLoadHelper

12