Home
last modified time | relevance | path

Searched refs:cmd (Results 1 – 25 of 129) sorted by relevance

123456

/cts/apps/CameraITS/utils/
Dits_session_utils.py298 cmd = {}
299 cmd['cmdName'] = 'getCameraProperties'
300 self.sock.send(json.dumps(cmd).encode() + '\n'.encode())
317 cmd = {}
318 cmd['cmdName'] = 'getCameraPropertiesById'
319 cmd['cameraId'] = camera_id
320 self.sock.send(json.dumps(cmd).encode() + '\n'.encode())
375 cmd = {'cmdName': 'open', 'cameraId': self._camera_id}
376 self.sock.send(json.dumps(cmd).encode() + '\n'.encode())
382 cmd = {'cmdName': 'close'}
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DSystemUtil.java74 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/securitybulletin/src/android/security/cts/
DCVE_2021_0691.java57 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 …]
DCVE_2021_0481.java69 String cmd = "rm " + DEVICE_DIR2 + TAKE_PICTURE_FILE_NAME; in testRunDeviceTest() local
70 AdbUtils.runCommandLine(cmd, getDevice()); in testRunDeviceTest()
82cmd = "cmp -s " + DEVICE_DIR1 + TEST_FILE_NAME + " " + DEVICE_DIR2 + TAKE_PICTURE_FILE_NAME + "; e… in testRunDeviceTest()
83 String result = AdbUtils.runCommandLine(cmd, getDevice()).trim(); in testRunDeviceTest()
84 CLog.i(cmd + " -->" + result); in testRunDeviceTest()
/cts/hostsidetests/dexmetadata/host/src/com/android/cts/dexmetadata/
DBaseInstallMultiple.java96 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/
DServiceProcessController.java111 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 …]
DWatchUidRunner.java131 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/
DBaseInstallMultiple.java127 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/
DBaseInstallMultiple.java127 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/
DBaseInstallMultiple.java217 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/
Dpoc.c33 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/
DPowerPolicyTestClient.java85 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.WaitListenersCommand(this); in parseCommand()
118 cmd = new PowerPolicyTestCommand.ResetListenersCommand(this); in parseCommand()
[all …]
/cts/tests/tests/time/shell_utils/common/android/app/time/cts/shell/
DDeviceConfigShellHelper.java70 String cmd = SHELL_CMD_PREFIX + "is_sync_disabled_for_tests"; in isSyncDisabled() local
71 return mShellCommandExecutor.executeToBoolean(cmd); in isSyncDisabled()
80 String cmd = String.format( in setSyncDisabled() local
82 mShellCommandExecutor.executeToTrimmedString(cmd); in setSyncDisabled()
91 String cmd = String.format(SHELL_CMD_PREFIX + "list %s", namespace); in list() local
92 String output = mShellCommandExecutor.executeToTrimmedString(cmd); in list()
114 String cmd = String.format(SHELL_CMD_PREFIX + "put %s %s %s", namespace, key, value); in put() local
116 cmd += " default"; in put()
118 mShellCommandExecutor.executeToTrimmedString(cmd); in put()
123 String cmd = String.format(SHELL_CMD_PREFIX + "delete %s %s", namespace, key); in delete() local
[all …]
DTimeZoneDetectorShellHelper.java86 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()
DLocationTimeZoneManagerShellHelper.java161 String cmd = String.format("%s %s", SHELL_COMMAND_RECORD_PROVIDER_STATES, enabled); in recordProviderStates() local
162 mShellCommandExecutor.executeToTrimmedString(SHELL_CMD_PREFIX + cmd); in recordProviderStates()
167 String cmd = String.format("%s --%s", SHELL_COMMAND_DUMP_STATE, DUMP_STATE_OPTION_PROTO); in dumpState() local
168 return mShellCommandExecutor.executeToBytes(SHELL_CMD_PREFIX + cmd); in dumpState()
217 String cmd = String.format("%s %s %s", in sendProviderTestCommand() local
219 mShellCommandExecutor.executeToTrimmedString(SHELL_CMD_PREFIX + cmd); in sendProviderTestCommand()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hcef/
DHceFReaderActivity.java70 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()
DMyHostFelicaService.java74 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/
DCategoryTest.java28 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/app/src/android/app/cts/
DCtsAppTestUtils.java31 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/tests/tests/view/src/android/view/cts/util/
DDisableFixedToUserRotationRule.java61 private String executeShellCommand(String cmd) {
62 ParcelFileDescriptor pfd = mUiAutomation.executeShellCommand(cmd);
77 private void executeShellCommandAndPrint(String cmd) {
78 Log.i(TAG, "Command: " + cmd + " Output: " + executeShellCommand(cmd));
/cts/apps/CameraITS/tools/
Drun_all_tests.py145 def run(cmd): argument
148 subprocess.check_call(cmd.split(), stdout=devnull, stderr=subprocess.STDOUT)
163 cmd = f'{adb} shell am start {ITS_TEST_ACTIVITY} --activity-brought-to-front'
164 run(cmd)
180 cmd = (f"{adb} shell am broadcast -a {ACTION_ITS_RESULT} --es {EXTRA_VERSION}"
183 if len(cmd) > 8000:
184 logging.info('ITS command string might be too long! len:%s', len(cmd))
185 run(cmd)
202 cmd = f'adb -s {tablet_id} push {src_scene_file} {_DST_SCENE_DIR}'
203 subprocess.Popen(cmd.split())
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/
Dpoc.c43 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/suite/audio_quality/test_description/
Dprocessing_main.py86 cmd = self.readI32()
87 if (cmd == CMD_AUDIO_STEREO) or (cmd == CMD_AUDIO_MONO):
91 if (cmd == CMD_AUDIO_STEREO):
95 print i, "-th input received audio data ", dataLen, cmd
96 elif cmd == CMD_INT64:
100 elif cmd == CMD_DOUBLE:
105 self.protocolError("unknown command " + str(cmd))
/cts/tests/tests/media/src/android/media/cts/
DUtils.java84 StringBuilder cmd = new StringBuilder(); in setAppOps() local
85 cmd.append("appops set "); in setAppOps()
86 cmd.append(packageName); in setAppOps()
87 cmd.append(" "); in setAppOps()
88 cmd.append(operation); in setAppOps()
89 cmd.append(enable ? " allow" : " deny"); in setAppOps()
90 instrumentation.getUiAutomation().executeShellCommand(cmd.toString()); in setAppOps()
/cts/hostsidetests/scopedstorage/host/src/android/scopedstorage/cts/host/
DBaseHostTestCase.java32 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()

123456