/cts/apps/CameraITS/utils/ |
D | its_session_utils.py | 332 cmd = {} 333 cmd['cmdName'] = 'getCameraProperties' 334 self.sock.send(json.dumps(cmd).encode() + '\n'.encode()) 351 cmd = {} 352 cmd['cmdName'] = 'getCameraPropertiesById' 353 cmd['cameraId'] = camera_id 354 self.sock.send(json.dumps(cmd).encode() + '\n'.encode()) 409 cmd = {'cmdName': 'open', 'cameraId': self._camera_id} 410 self.sock.send(json.dumps(cmd).encode() + '\n'.encode()) 416 cmd = {'cmdName': 'close'} [all …]
|
D | video_processing_utils.py | 85 cmd = ['ffmpeg', 99 _ = subprocess.call(cmd) 158 cmd = [ 162 _ = subprocess.call(cmd)
|
/cts/hostsidetests/securitybulletin/src/android/security/cts/ |
D | CVE_2021_0691.java | 57 String cmd; in testRunDeviceTest() local 66 cmd = "cd " + DEVICE_TMP_DIR + "; cat " + SCRIPT_NAME; in testRunDeviceTest() 67 CLog.i("repro script: " + cmd); in testRunDeviceTest() 68 CLog.i(AdbUtils.runCommandLine(cmd, getDevice())); in testRunDeviceTest() 75 cmd = "find " + DEVICE_APP_DIR + " -name \"*" + TEST_PKG + "*==\""; in testRunDeviceTest() 76 String appDir = AdbUtils.runCommandLine(cmd, getDevice()).trim(); in testRunDeviceTest() 77 CLog.i("look for appDir: " + cmd); in testRunDeviceTest() 81 cmd = "su 1000 " + DEVICE_TMP_DIR + SCRIPT_NAME + " " + appDir; in testRunDeviceTest() 82 result = AdbUtils.runCommandLine(cmd, getDevice()); in testRunDeviceTest() 83 CLog.i("command: " + cmd); in testRunDeviceTest() [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | SystemUtil.java | 74 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() argument 76 return runShellCommand(instrumentation.getUiAutomation(), cmd); in runShellCommand() 88 public static String runShellCommand(UiAutomation automation, String cmd) in runShellCommand() argument 90 return new String(runShellCommandByteOutput(automation, cmd)); in runShellCommand() 103 static byte[] runShellCommandByteOutput(UiAutomation automation, String cmd) in runShellCommandByteOutput() argument 105 checkCommandBeforeRunning(cmd); in runShellCommandByteOutput() 106 ParcelFileDescriptor pfd = automation.executeShellCommand(cmd); in runShellCommandByteOutput() 112 private static void checkCommandBeforeRunning(String cmd) { in checkCommandBeforeRunning() argument 113 Log.v(TAG, "Running command: " + cmd); in checkCommandBeforeRunning() 114 if (cmd.startsWith("pm grant ") || cmd.startsWith("pm revoke ")) { in checkCommandBeforeRunning() [all …]
|
/cts/hostsidetests/dexmetadata/host/src/com/android/cts/dexmetadata/ |
D | BaseInstallMultiple.java | 96 final StringBuilder cmd = new StringBuilder(); in run() local 97 cmd.append("pm install-create"); in run() 99 cmd.append(' ').append(arg); in run() 102 String result = device.executeShellCommand(cmd.toString()); in run() 133 cmd.setLength(0); in run() 134 cmd.append("pm install-write"); in run() 135 cmd.append(' ').append(sessionId); in run() 136 cmd.append(' ').append(name); in run() 137 cmd.append(' ').append(remotePath); in run() 139 result = device.executeShellCommand(cmd.toString()); in run() [all …]
|
/cts/tests/app/src/android/app/cts/android/app/cts/tools/ |
D | ServiceProcessController.java | 111 String cmd = "appops set --user " + mUserId + " " in denyBackgroundOp() local 113 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyBackgroundOp() 121 String cmd = "appops set --user " + mUserId + " " in allowBackgroundOp() local 123 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowBackgroundOp() 128 String cmd = "appops set --user " + mUserId + " " in denyAnyInBackgroundOp() local 130 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyAnyInBackgroundOp() 134 String cmd = "appops set --user " + mUserId + " " in allowAnyInBackgroundOp() local 136 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowAnyInBackgroundOp() 140 String cmd = "am make-uid-idle " + mServicePackage; in makeUidIdle() local 141 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in makeUidIdle() [all …]
|
D | WatchUidRunner.java | 131 public void expect(int cmd, String procState) { in expect() argument 132 expect(cmd, procState, mDefaultWaitTime); in expect() 135 public void expect(int cmd, String procState, long timeout) { in expect() argument 137 String[] line = waitForNextLine(waitUntil, cmd, procState, 0); in expect() 138 if (!COMMAND_TO_STRING[cmd].equals(line[1])) { in expect() 139 String msg = "Expected cmd " + COMMAND_TO_STRING[cmd] in expect() 155 public void waitFor(int cmd) { in waitFor() argument 156 waitFor(cmd, null, null, mDefaultWaitTime); in waitFor() 159 public void waitFor(int cmd, long timeout) { in waitFor() argument 160 waitFor(cmd, null, null, timeout); in waitFor() [all …]
|
/cts/hostsidetests/classloaders/useslibrary/src/android/classloaders/cts/ |
D | BaseInstallMultiple.java | 127 final StringBuilder cmd = new StringBuilder(); in run() local 128 cmd.append("pm install-create"); in run() 130 cmd.append(' ').append(arg); in run() 133 cmd.append(' ').append(AbiUtils.createAbiFlag(mAbi.getName())); in run() 136 String result = device.executeShellCommand(cmd.toString()); in run() 161 cmd.setLength(0); in run() 162 cmd.append("pm install-write"); in run() 163 cmd.append(' ').append(sessionId); in run() 164 cmd.append(' ').append(i + "_" + apk.getName()); in run() 165 cmd.append(' ').append(remotePath); in run() [all …]
|
/cts/hostsidetests/classloaders/splits/src/android/classloaders/cts/ |
D | BaseInstallMultiple.java | 127 final StringBuilder cmd = new StringBuilder(); in run() local 128 cmd.append("pm install-create"); in run() 130 cmd.append(' ').append(arg); in run() 133 cmd.append(' ').append(AbiUtils.createAbiFlag(mAbi.getName())); in run() 136 String result = device.executeShellCommand(cmd.toString()); in run() 161 cmd.setLength(0); in run() 162 cmd.append("pm install-write"); in run() 163 cmd.append(' ').append(sessionId); in run() 164 cmd.append(' ').append(i + "_" + apk.getName()); in run() 165 cmd.append(' ').append(remotePath); in run() [all …]
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | BaseInstallMultiple.java | 217 final StringBuilder cmd = new StringBuilder(); in runNonIncremental() local 218 cmd.append("pm install-create"); in runNonIncremental() 220 cmd.append(' ').append(arg); in runNonIncremental() 223 cmd.append(' ').append(AbiUtils.createAbiFlag(mAbi.getName())); in runNonIncremental() 226 String result = device.executeShellCommand(cmd.toString()); in runNonIncremental() 257 cmd.setLength(0); in runNonIncremental() 258 cmd.append("pm install-write"); in runNonIncremental() 259 cmd.append(' ').append(sessionId); in runNonIncremental() 260 cmd.append(' ').append(remoteName); in runNonIncremental() 261 cmd.append(' ').append(remotePath); in runNonIncremental() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-13273/ |
D | poc.c | 33 static int cmd; variable 45 while (cmd != 1 && cmd != -1) { in thread_entry() 49 if (cmd != -1) { in thread_entry() 77 cmd = 0; in main() 96 cmd = -1; in main() 118 cmd = 1; in main()
|
/cts/hostsidetests/car/app/src/android/car/cts/app/ |
D | PowerPolicyTestClient.java | 85 PowerPolicyTestCommand cmd = null; in parseCommand() local 89 return cmd; in parseCommand() 97 cmd = new PowerPolicyTestCommand.SetTestCommand(this, tokens[1]); in parseCommand() 100 cmd = new PowerPolicyTestCommand.ClearTestCommand(this); in parseCommand() 103 cmd = new PowerPolicyTestCommand.DumpPolicyCommand(this); in parseCommand() 106 cmd = new PowerPolicyTestCommand.AddListenerCommand(this, tokens[1]); in parseCommand() 109 cmd = new PowerPolicyTestCommand.RemoveListenerCommand(this, tokens[1]); in parseCommand() 112 cmd = new PowerPolicyTestCommand.DumpListenerCommand(this, tokens[1]); in parseCommand() 115 cmd = new PowerPolicyTestCommand.CheckListenersCommand(this); in parseCommand() 118 cmd = new PowerPolicyTestCommand.ResetListenersCommand(this); in parseCommand() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hcef/ |
D | HceFReaderActivity.java | 70 byte[] cmd = new byte[2 + nfcid2.length]; in createSuccessCommand() 71 cmd[0] = (byte) (2 + nfcid2.length); in createSuccessCommand() 72 cmd[1] = MyHostFelicaService.CMD_SUCCESS; in createSuccessCommand() 73 System.arraycopy(nfcid2, 0, cmd, 2, nfcid2.length); in createSuccessCommand() 74 return cmd; in createSuccessCommand() 77 static boolean verifyResponse(byte[] cmd, byte[] resp) { in verifyResponse() argument 82 if (resp.length != cmd.length) return false; in verifyResponse() 88 if (resp[i] != cmd[i]) return false; in verifyResponse()
|
D | MyHostFelicaService.java | 74 byte cmd = bytes[1]; in processNfcFPacket() 75 if (cmd == CMD_REQUEST_SYSTEM_CODES) { in processNfcFPacket() 77 } else if (cmd == CMD_ECHO) { in processNfcFPacket() 79 } else if (cmd == CMD_SUCCESS) { in processNfcFPacket()
|
/cts/hostsidetests/monkey/src/com/android/cts/monkey/ |
D | CategoryTest.java | 28 String cmd = MONKEY_CMD + " -v -p " + PKGS[0] + " 5000"; in testDefaultCategories() local 31 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testDefaultCategories() 43 String cmd = MONKEY_CMD + " -v -p " + PKGS[0] in testSingleCategory() local 47 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testSingleCategory() 73 String cmd = MONKEY_CMD + " -v -p " + PKGS[0] in testMultipleCategories() local 78 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testMultipleCategories()
|
/cts/tests/tests/time/shell_utils/common/android/app/time/cts/shell/ |
D | LocationTimeZoneManagerShellHelper.java | 118 String cmd = SHELL_COMMAND_CLEAR_RECORDED_PROVIDER_STATES; in clearRecordedProviderStates() local 119 mShellCommandExecutor.executeToTrimmedString(SHELL_CMD_PREFIX + cmd); in clearRecordedProviderStates() 127 String cmd = String.format("%s --%s", SHELL_COMMAND_DUMP_STATE, DUMP_STATE_OPTION_PROTO); in dumpState() local 128 return mShellCommandExecutor.executeToBytes(SHELL_CMD_PREFIX + cmd); in dumpState() 139 String cmd = String.format("%s %s %s %s", in startWithTestProviders() local 144 mShellCommandExecutor.executeToBytes(SHELL_CMD_PREFIX + cmd); in startWithTestProviders()
|
D | DeviceConfigShellHelper.java | 75 String cmd = SHELL_CMD_PREFIX + "get_sync_disabled_for_tests"; in getSyncDisabled() local 76 return mShellCommandExecutor.executeToTrimmedString(cmd); in getSyncDisabled() 85 String cmd = String.format( in setSyncDisabled() local 87 mShellCommandExecutor.executeToTrimmedString(cmd); in setSyncDisabled() 96 String cmd = String.format(SHELL_CMD_PREFIX + "list %s", namespace); in list() local 97 String output = mShellCommandExecutor.executeToTrimmedString(cmd); in list() 119 String cmd = String.format(SHELL_CMD_PREFIX + "put %s %s %s", namespace, key, value); in put() local 121 cmd += " default"; in put() 123 mShellCommandExecutor.executeToTrimmedString(cmd); in put() 128 String cmd = String.format(SHELL_CMD_PREFIX + "delete %s %s", namespace, key); in delete() local [all …]
|
D | TimeZoneDetectorShellHelper.java | 86 String cmd = String.format("%s %s", SHELL_COMMAND_SET_AUTO_DETECTION_ENABLED, enabled); in setAutoDetectionEnabled() local 87 mShellCommandExecutor.executeToTrimmedString(SHELL_CMD_PREFIX + cmd); in setAutoDetectionEnabled() 98 String cmd = String.format("%s %s", SHELL_COMMAND_SET_GEO_DETECTION_ENABLED, enabled); in setGeoDetectionEnabled() local 99 mShellCommandExecutor.executeToTrimmedString(SHELL_CMD_PREFIX + cmd); in setGeoDetectionEnabled()
|
/cts/tests/app/src/android/app/cts/ |
D | CtsAppTestUtils.java | 31 public static String executeShellCmd(Instrumentation instrumentation, String cmd) in executeShellCmd() argument 33 final String result = SystemUtil.runShellCommand(instrumentation, cmd); in executeShellCmd() 34 Log.d(TAG, String.format("Output for '%s': %s", cmd, result)); in executeShellCmd() 64 String cmd = "am make-uid-idle " + packageName; in makeUidIdle() local 65 return executeShellCmd(instrumentation, cmd); in makeUidIdle()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/ |
D | poc.c | 43 char cmd[MAX_STRLEN]; in getMemoryUsage() local 45 memset(cmd, 0, MAX_STRLEN); in getMemoryUsage() 47 sprintf(cmd, "cat /proc/%d/maps | grep anon:linker_alloc]", getpid()); in getMemoryUsage() 48 FILE *fpMem = popen(cmd, "r"); in getMemoryUsage()
|
/cts/tests/backup/src/android/backup/cts/ |
D | AgentBindingTest.java | 110 final StringBuilder cmd = new StringBuilder("pm "); in setComponentEnabledSetting() local 113 cmd.append("default-state "); in setComponentEnabledSetting() 116 cmd.append("enable "); in setComponentEnabledSetting() 119 cmd.append("disable "); in setComponentEnabledSetting() 122 cmd.append("disable-user "); in setComponentEnabledSetting() 125 cmd.append("disable-until-used "); in setComponentEnabledSetting() 130 cmd.append("--user cur ").append(componentName.flattenToString()); in setComponentEnabledSetting() 131 getBackupUtils().executeShellCommandSync(cmd.toString()); in setComponentEnabledSetting()
|
/cts/hostsidetests/car_builtin/src/android/car/cts/builtin/ |
D | CtsCarShellCommand.java | 43 String cmd = mCommand; in executeWith() local 45 cmd = mCommand + " " + String.join(" ", mCommandArgs); in executeWith() 47 mCommandReturn = mDevice.executeShellCommand(cmd).trim(); in executeWith()
|
/cts/apps/CameraITS/tools/ |
D | run_all_tests.py | 150 def run(cmd): argument 153 subprocess.check_call(cmd.split(), stdout=devnull, stderr=subprocess.STDOUT) 168 cmd = f'{adb} shell am start {ITS_TEST_ACTIVITY} --activity-brought-to-front' 169 run(cmd) 185 cmd = (f"{adb} shell am broadcast -a {ACTION_ITS_RESULT} --es {EXTRA_VERSION}" 188 if len(cmd) > 8000: 189 logging.info('ITS command string might be too long! len:%s', len(cmd)) 190 run(cmd) 207 cmd = f'adb -s {tablet_id} push {src_scene_file} {_DST_SCENE_DIR}' 208 subprocess.Popen(cmd.split()) [all …]
|
/cts/hostsidetests/scopedstorage/host/src/android/scopedstorage/cts/host/ |
D | BaseHostTestCase.java | 32 protected String executeShellCommand(String cmd, Object... args) throws Exception { in executeShellCommand() argument 33 return getDevice().executeShellCommand(String.format(cmd, args)); in executeShellCommand() 36 protected CommandResult executeShellV2Command(String cmd, Object... args) throws Exception { in executeShellV2Command() argument 37 return getDevice().executeShellV2Command(String.format(cmd, args)); in executeShellV2Command()
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | Utils.java | 83 StringBuilder cmd = new StringBuilder(); in setAppOps() local 84 cmd.append("appops set "); in setAppOps() 85 cmd.append(packageName); in setAppOps() 86 cmd.append(" "); in setAppOps() 87 cmd.append(operation); in setAppOps() 88 cmd.append(enable ? " allow" : " deny"); in setAppOps() 89 instrumentation.getUiAutomation().executeShellCommand(cmd.toString()); in setAppOps()
|