/platform_testing/tests/automotive/mobly_tests/utilities/ |
D | spectatio_utils.py | 37 def __init__(self, device): argument 38 self.device = device 43 self.device.mbs.deviceIsConnected() 47 self.device.mbs.openAppGrid() 51 self.device.mbs.dialANumber(callee_number) 56 self.device.mbs.endCall() 69 return self.device.mbs.getDialingNumber() 73 return self.device.mbs.getUserProfilePhoneNumber() 78 return self.device.mbs.getHomeAddress() 82 return self.device.mbs.getDeviceSummary() [all …]
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/ |
D | OverlayFsUtils.java | 36 import com.android.tradefed.device.DeviceNotAvailableException; 37 import com.android.tradefed.device.ITestDevice; 74 ITestDevice device = test.getDevice(); in makeWritable() local 75 assertNotNull("device not set.", device); in makeWritable() 80 if (!workingDirs.containsKey(device)) { in makeWritable() 82 workingDirs.put(device, dirs); in makeWritable() 84 dirs = workingDirs.get(device); in makeWritable() 96 CommandResult res = device.executeShellV2Command("mount | grep -q " + id); in makeWritable() 102 assertTrue("Can't acquire root for " + device.getSerialNumber(), device.enableAdbRoot()); in makeWritable() 105 String statOut = runAndCheck(device, "stat -c '%U %G %a %C' '" + dir + "'").getStdout(); in makeWritable() [all …]
|
D | SystemUtil.java | 23 import com.android.tradefed.device.DeviceNotAvailableException; 24 import com.android.tradefed.device.ITestDevice; 42 final ITestDevice device, final String name, final String value) in withProperty() argument 44 final String oldValue = device.getProperty(name); in withProperty() 45 assumeTrue("Could not set property: " + name, device.setProperty(name, value)); in withProperty() 51 device.setProperty(name, oldValue == null ? "" : oldValue)); in withProperty() 66 final ITestDevice device, final String namespace, final String key, String value) 68 String getSettingRes = device.getSetting(namespace, key); 71 device.setSetting(namespace, key, value); 74 device.getSetting(namespace, key), [all …]
|
D | ProcessUtil.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.IFileEntry; 22 import com.android.tradefed.device.ITestDevice; 76 public static Optional<Map<Integer, String>> pidsOf(ITestDevice device, String pgrepRegex) in pidsOf() argument 81 device.executeShellV2Command(String.format("pgrep -f -l %s", pgrepRegex)); in pidsOf() 107 public static Optional<Integer> pidOf(ITestDevice device, String pgrepRegex) in pidOf() argument 109 Optional<Map<Integer, String>> pids = pidsOf(device, pgrepRegex); in pidOf() 126 public static Map<Integer, String> waitProcessRunning(ITestDevice device, String pgrepRegex) in waitProcessRunning() argument 128 return waitProcessRunning(device, pgrepRegex, PROCESS_WAIT_TIMEOUT_MS); in waitProcessRunning() 140 ITestDevice device, String pgrepRegex, long timeoutMs) in waitProcessRunning() argument [all …]
|
D | DumpsysUtils.java | 19 import com.android.tradefed.device.ITestDevice; 40 public static String getRawDumpsys(ITestDevice device, String args) throws Exception { in getRawDumpsys() argument 41 CommandResult output = device.executeShellV2Command("dumpsys " + args); in getRawDumpsys() 63 ITestDevice device, in getParsedDumpsys() argument 75 String rawOutput = getRawDumpsys(device, String.format("%s %s", service, arguments)); in getParsedDumpsys() 96 ITestDevice device, String service, String pattern, int matcherFlag) throws Exception { in getParsedDumpsys() argument 97 return getParsedDumpsys(device, service, null /* args */, pattern, matcherFlag); in getParsedDumpsys() 108 public static boolean hasActivityResumed(ITestDevice device, String activityName) in hasActivityResumed() argument 111 device, in hasActivityResumed() 127 public static boolean isActivityVisible(ITestDevice device, String activityName) in isActivityVisible() argument [all …]
|
D | MallocDebug.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 56 ITestDevice device, String mallocDebugOption, String processName, boolean isService) in MallocDebug() argument 58 mDevice = device; in MallocDebug() 60 mWasAdbRoot = device.isAdbRoot(); in MallocDebug() 62 String previousProperty = device.getProperty(MALLOC_DEBUG_OPTIONS_PROP); in MallocDebug() 70 SystemUtil.withProperty(device, MALLOC_DEBUG_OPTIONS_PROP, mallocDebugOption); in MallocDebug() 72 SystemUtil.withProperty(device, MALLOC_DEBUG_PROGRAM_PROP, processName); in MallocDebug() 74 CommandUtil.runAndCheck(device, "logcat -c"); in MallocDebug() 79 mProcessKill = ProcessUtil.withProcessKill(device, processName, null); in MallocDebug() [all …]
|
D | RootcanalUtils.java | 62 import com.android.tradefed.device.DeviceNotAvailableException; 63 import com.android.tradefed.device.ITestDevice; 85 ITestDevice device = test.getDevice(); in finished() local 86 assertNotNull("Device not set", device); in finished() 88 device.enableAdbRoot(); in finished() 90 device, "android\\.hardware\\.bluetooth@1\\.1-service\\.sim", 10_000, false); in finished() 91 runAndCheck(device, String.format("rm -rf '%s'", LOCK_FILENAME)); in finished() 92 device.disableAdbRoot(); in finished() 95 device.waitForDeviceAvailable(); in finished() 96 CommandResult res = device.executeShellV2Command("svc bluetooth enable"); in finished() [all …]
|
D | FridaUtils.java | 30 import com.android.tradefed.device.DeviceNotAvailableException; 31 import com.android.tradefed.device.ITestDevice; 78 private final ITestDevice device; field in FridaUtils 84 private FridaUtils(ITestDevice device, IBuildInfo buildInfo) in FridaUtils() argument 86 this.device = device; in FridaUtils() 94 fridaAbi = getFridaAbiFor(device); in FridaUtils() 127 device.enableAdbRoot(); in FridaUtils() 129 device.pushFile(localFridaExe, remoteFridaExeName); in FridaUtils() 130 runAndCheck(device, String.format("chmod a+x '%s'", remoteFridaExeName)); in FridaUtils() 132 device.disableAdbRoot(); in FridaUtils() [all …]
|
D | CommandUtil.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.ITestDevice; 39 public static CommandResult runAndCheck(ITestDevice device, String cmd) in runAndCheck() argument 41 return runAndCheck(device, cmd, 0); in runAndCheck() 52 public static CommandResult runAndCheck(ITestDevice device, String cmd, int retries) in runAndCheck() argument 59 res = device.executeShellV2Command(cmd); in runAndCheck()
|
D | NativePocMallocDebugAsserter.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 52 public AutoCloseable withAutoCloseable(NativePoc nativePoc, ITestDevice device) in withAutoCloseable() argument 56 device, mallocDebugOptions, mallocDebugOnService.get()); in withAutoCloseable() 59 device, mallocDebugOptions, nativePoc.pocName()); in withAutoCloseable()
|
D | NativePoc.java | 27 import com.android.tradefed.device.DeviceNotAvailableException; 28 import com.android.tradefed.device.ITestDevice; 238 ITestDevice device = test.getDevice(); in runPocAndAssert() local 240 try (AutoCloseable aPoc = withPoc(test, device); in runPocAndAssert() argument 241 AutoCloseable aRes = withResourcesUpload(device); in runPocAndAssert() 242 AutoCloseable aAssert = asserter().withAutoCloseable(this, device)) { in runPocAndAssert() 254 device.executeShellV2Command( in runPocAndAssert() 273 private AutoCloseable withPoc(final BaseHostJUnit4Test test, final ITestDevice device) in withPoc() argument 276 new PocPusher().setDevice(device).setBuild(test.getBuild()).setAbi(test.getAbi()); in withPoc() 285 device.executeShellV2Command(String.format("chmod 777 '%s'", remoteFile)); in withPoc() [all …]
|
D | PocPusher.java | 24 import com.android.tradefed.device.DeviceNotAvailableException; 25 import com.android.tradefed.device.ITestDevice; 40 private ITestDevice device = null; field in PocPusher 63 device.deleteFile(file); in finished() 72 public PocPusher setDevice(ITestDevice device) { in setDevice() argument 73 this.device = device; in setDevice() 135 device.pushFile(localFile, remoteFile); in pushFile()
|
D | NativePocCrashAsserter.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 52 public AutoCloseable withAutoCloseable(NativePoc nativePoc, ITestDevice device) in withAutoCloseable() argument 57 return TombstoneUtils.withAssertNoSecurityCrashes(device, tombstoneConfig); in withAutoCloseable()
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/util/ |
D | KernelVersionHost.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 34 public static KernelVersion getKernelVersion(ITestDevice device) in getKernelVersion() argument 38 CommandResult res = CommandUtil.runAndCheck(device, "uname -r"); in getKernelVersion() 48 public static boolean isKernelVersionEqualTo(ITestDevice device, String testVersion) in isKernelVersionEqualTo() argument 50 KernelVersion deviceKernelVersion = getKernelVersion(device); in isKernelVersionEqualTo() 61 public static boolean isKernelVersionLessThan(ITestDevice device, String testVersion) in isKernelVersionLessThan() argument 63 KernelVersion deviceKernelVersion = getKernelVersion(device); in isKernelVersionLessThan() 74 public static boolean isKernelVersionLessThanEqualTo(ITestDevice device, String testVersion) in isKernelVersionLessThanEqualTo() argument 76 KernelVersion deviceKernelVersion = getKernelVersion(device); in isKernelVersionLessThanEqualTo() [all …]
|
D | UnameVersionHost.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 29 private final ITestDevice device; field in UnameVersionHost 32 public UnameVersionHost(ITestDevice device) { in UnameVersionHost() argument 33 this.device = device; in UnameVersionHost() 43 CommandResult res = CommandUtil.runAndCheck(device, "uname -v"); in getUnameVersion()
|
/platform_testing/libraries/aupt-lib/src/android/support/test/aupt/ |
D | UiWatchers.java | 43 final UiDevice device = UiDevice.getInstance(instr); in registerAnrAndCrashWatchers() local 46 device.registerWatcher("AnrWatcher", new UiWatcher() { in registerAnrAndCrashWatchers() 49 UiObject2 window = device.findObject( in registerAnrAndCrashWatchers() 54 postHandler(device); in registerAnrAndCrashWatchers() 61 device.registerWatcher("CrashWatcher", new UiWatcher() { in registerAnrAndCrashWatchers() 64 UiObject2 window = device.findObject( in registerAnrAndCrashWatchers() 69 postHandler(device); in registerAnrAndCrashWatchers() 80 final UiDevice device = UiDevice.getInstance(instr); in removeAnrAndCrashWatchers() local 81 device.removeWatcher("AnrWatcher"); in removeAnrAndCrashWatchers() 82 device.removeWatcher("CrashWatcher"); in removeAnrAndCrashWatchers() [all …]
|
/platform_testing/host_runners/utils/src/com/android/runner/utils/ |
D | NohupCommandHelper.java | 20 import com.android.tradefed.device.CollectingOutputReceiver; 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 43 public static void executeAdbNohupCommand(ITestDevice device, String cmd, int timeout) in executeAdbNohupCommand() argument 48 "%s/%s", device.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE), NOHUP_LOG); in executeAdbNohupCommand() 50 if (!device.doesFileExist(out.getParent())) { in executeAdbNohupCommand() 77 device.getSerialNumber(), finalCommand); in executeAdbNohupCommand() 79 device.executeShellCommand( in executeAdbNohupCommand() 97 public static void executeAdbNohupCommand(ITestDevice device, String cmd) in executeAdbNohupCommand() argument 99 executeAdbNohupCommand(device, cmd, DEFAULT_TIMEOUT); in executeAdbNohupCommand()
|
/platform_testing/libraries/sts-common-util/host-side/tests/src/com/android/sts/common/ |
D | NativePocTest.java | 32 import com.android.tradefed.device.ITestDevice; 77 @Mock private ITestDevice device; field in NativePocTest 108 iContext.addAllocatedDevice("device1", device); in setup() 116 when(device.executeShellV2Command(startsWith("chmod "))).thenReturn(SUCCESS_RESULT); in setup() 117 when(device.executeShellV2Command(startsWith("test "))).thenReturn(SUCCESS_RESULT); in setup() 127 when(device.executeShellV2Command(anyString(), anyLong(), any(), anyInt())) in testBasicPocExecution() 133 verify(device) in testBasicPocExecution() 139 verify(device).deleteFile(REMOTE_POC_FILE); in testBasicPocExecution() 140 verifyNoMoreInteractions(device); in testBasicPocExecution() 145 when(device.executeShellV2Command(anyString(), anyLong(), any(), anyInt())) in testPocExecutionWithArgsAndEnvVarsAndTimeout() [all …]
|
/platform_testing/tests/featureflag/src/android/test/featureflag/ |
D | FeatureFlagTest.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 45 private ITestDevice device; field in FeatureFlagTest 59 device.executeShellV2Command( in getFlagValue() 72 public void setDevice(ITestDevice device) { in setDevice() argument 73 this.device = device; in setDevice() 78 return this.device; in getDevice()
|
/platform_testing/libraries/health/rules/src/android/platform/test/rule/ |
D | BaseOrientationRule.kt | 99 private val device: UiDevice = constant 117 if (orientation == NATURAL) device.naturalOrientation else orientation in setOrientationOverride() 119 if (device.stableOrientation == expectedOrientation) { in setOrientationOverride() 131 device.stableOrientation == expectedOrientation in setOrientationOverride() 138 if (device.isNaturalOrientation) { in changeOrientation() 139 device.setOrientationLeft() in changeOrientation() 141 device.setOrientationNatural() in changeOrientation() 147 return device.stableOrientation in waitForOrientationToSettle() 151 device.setOrientationNatural() in clearOrientationOverride() 153 device.unfreezeRotation() in clearOrientationOverride()
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/tradefed/testtype/ |
D | SecurityTestCase.java | 34 import com.android.tradefed.device.DeviceNotAvailableException; 35 import com.android.tradefed.device.ITestDevice; 36 import com.android.tradefed.device.WifiHelper; 164 public static IBuildInfo getBuildInfo(ITestDevice device) { in getBuildInfo() argument 165 return sBuildInfo.get(device); in getBuildInfo() 168 public static IAbi getAbi(ITestDevice device) { in getAbi() argument 169 return sAbi.get(device); in getAbi() 172 public static String getTestName(ITestDevice device) { in getTestName() argument 173 return sTestName.get(device); in getTestName() 176 public static PocPusher getPocPusher(ITestDevice device) { in getPocPusher() argument [all …]
|
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/ghidra/ |
D | Ghidra.java | 21 import com.android.tradefed.device.ITestDevice; 27 private ITestDevice device; field in Ghidra 40 this.device = test.getDevice(); in Ghidra() 59 return device; in getDevice()
|
/platform_testing/libraries/device-collectors/src/test/java/android/device/collectors/ |
D | TotalPssMetricListenerTest.java | 17 package android.device.collectors; 19 import static android.device.collectors.TotalPssMetricListener.PROCESS_NAMES_KEY; 20 import static android.device.collectors.TotalPssMetricListener.PROCESS_SEPARATOR; 21 import static android.device.collectors.TotalPssMetricListener.MIN_ITERATIONS_KEY; 22 import static android.device.collectors.TotalPssMetricListener.MAX_ITERATIONS_KEY; 23 import static android.device.collectors.TotalPssMetricListener.SLEEP_TIME_KEY; 24 import static android.device.collectors.TotalPssMetricListener.THRESHOLD_KEY;
|
/platform_testing/libraries/device-collectors/src/main/java/android/device/loggers/ |
D | LogFileLogger.java | 16 package android.device.loggers; 18 import android.device.collectors.BaseMetricListener; 19 import android.device.collectors.DataRecord; 20 import android.device.collectors.util.SendToInstrumentation;
|
/platform_testing/libraries/flicker/src/android/tools/flicker/rules/ |
D | ChangeDisplayOrientationRule.kt | 88 val device: UiDevice = UiDevice.getInstance(instrumentation) in setRotation() constant 92 Rotation.ROTATION_270 -> device.setOrientationRight() in setRotation() 93 Rotation.ROTATION_90 -> device.setOrientationLeft() in setRotation() 94 Rotation.ROTATION_0 -> device.setOrientationNatural() in setRotation() 95 else -> device.setOrientationNatural() in setRotation() 105 device.freezeRotation() in setRotation()
|