Home
last modified time | relevance | path

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

12345

/cts/apps/CameraITS/pymodules/its/
Ddevice.py292 cmd = {"cmdName":"open", "cameraId":self._camera_id}
293 self.sock.send(json.dumps(cmd) + "\n")
299 cmd = {"cmdName":"close"}
300 self.sock.send(json.dumps(cmd) + "\n")
320 cmd = {}
321 cmd["cmdName"] = "doVibrate"
322 cmd["pattern"] = pattern
323 self.sock.send(json.dumps(cmd) + "\n")
337 cmd = {}
338 cmd["cmdName"] = "setAudioRestriction"
[all …]
/cts/hostsidetests/dexmetadata/host/src/com/android/cts/dexmetadata/
DBaseInstallMultiple.java77 final StringBuilder cmd = new StringBuilder(); in run() local
78 cmd.append("pm install-create"); in run()
80 cmd.append(' ').append(arg); in run()
83 String result = device.executeShellCommand(cmd.toString()); in run()
108 cmd.setLength(0); in run()
109 cmd.append("pm install-write"); in run()
110 cmd.append(' ').append(sessionId); in run()
111 cmd.append(' ').append(file.getName()); in run()
112 cmd.append(' ').append(remotePath); in run()
114 result = device.executeShellCommand(cmd.toString()); in run()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DBaseInstallMultiple.java149 final StringBuilder cmd = new StringBuilder(); in run() local
150 cmd.append("pm install-create"); in run()
152 cmd.append(' ').append(arg); in run()
155 cmd.append(' ').append(AbiUtils.createAbiFlag(mAbi.getName())); in run()
158 String result = device.executeShellCommand(cmd.toString()); in run()
184 cmd.setLength(0); in run()
185 cmd.append("pm install-write"); in run()
186 cmd.append(' ').append(sessionId); in run()
187 cmd.append(' ').append(remoteName); in run()
188 cmd.append(' ').append(remotePath); in run()
[all …]
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DServiceProcessController.java108 String cmd = "appops set " + mServicePackage + " RUN_IN_BACKGROUND deny"; in denyBackgroundOp() local
109 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyBackgroundOp()
117 String cmd = "appops set " + mServicePackage + " RUN_IN_BACKGROUND allow"; in allowBackgroundOp() local
118 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowBackgroundOp()
123 String cmd = "appops set " + mServicePackage + " RUN_ANY_IN_BACKGROUND deny"; in denyAnyInBackgroundOp() local
124 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyAnyInBackgroundOp()
128 String cmd = "appops set " + mServicePackage + " RUN_ANY_IN_BACKGROUND allow"; in allowAnyInBackgroundOp() local
129 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowAnyInBackgroundOp()
133 String cmd = "am make-uid-idle " + mServicePackage; in makeUidIdle() local
134 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/common/device-side/util-axt/src/com/android/compatibility/common/util/
DSystemUtil.java71 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() argument
73 return runShellCommand(instrumentation.getUiAutomation(), cmd); in runShellCommand()
85 public static String runShellCommand(UiAutomation automation, String cmd) in runShellCommand() argument
87 return new String(runShellCommandByteOutput(automation, cmd)); in runShellCommand()
100 static byte[] runShellCommandByteOutput(UiAutomation automation, String cmd) in runShellCommandByteOutput() argument
102 Log.v(TAG, "Running command: " + cmd); in runShellCommandByteOutput()
103 if (cmd.startsWith("pm grant ") || cmd.startsWith("pm revoke ")) { in runShellCommandByteOutput()
107 ParcelFileDescriptor pfd = automation.executeShellCommand(cmd); in runShellCommandByteOutput()
116 public static String runShellCommand(String cmd) { in runShellCommand() argument
118 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand()
[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/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/apps/CameraITS/tools/
Dset_charging_limits.py31 cmd = ('adb -s %s root' % device_id)
32 process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE,
39 cmd = ('adb -s %s shell setprop persist.vendor.charge.start.level %d' % (
41 process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE,
49 cmd = ('adb -s %s shell setprop persist.vendor.charge.stop.level %d' % (
51 process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE,
60 cmd = ('adb -s %s unroot' % device_id)
61 subprocess.call(cmd.split(), stdout=subprocess.PIPE)
Dload_scene.py40 cmd = ('adb -s %s shell am force-stop com.google.android.apps.docs' %
42 subprocess.Popen(cmd.split())
65 cmd = 'adb -s %s push %s /mnt%s' % (screen_id, src_scene_file,
67 subprocess.Popen(cmd.split())
72 cmd = ("adb -s %s wait-for-device shell am start -d 'file://%s'"
74 subprocess.Popen(cmd.split())
Drotation_rig.py144 cmd = []
146 cmd.append(port.read())
147 return cmd
150 def arduino_send_cmd(port, cmd): argument
153 port.write(cmd[i])
156 def arduino_loopback_cmd(port, cmd): argument
158 arduino_send_cmd(port, cmd)
181 def convert_to_hex(cmd): argument
184 for x in cmd]
204 cmd = [struct.pack('B', i) for i in [ARDUINO_START_BYTE, int(ch), angle]]
[all …]
Darduino_servo_control.ino38 int cmd[3]; // raw input from serial buffer, 3 bytes
72 cmd[i] = Serial.read();
73 Serial.write(cmd[i]);
75 if (cmd[0] == servo_start_byte) {
76 servo_num = cmd[1];
77 angle = cmd[2];
100 else if (cmd[0] == light_start_byte) {
101 if (cmd[2] == 0) {
104 else if (cmd[2] == 1) {
Drun_all_tests.py240 def run_subprocess_with_timeout(cmd, fout, ferr, outdir): argument
254 cmd, stdout=fout, stderr=ferr, cwd=outdir)
435 cmd = "adb -s %s shell pm dump com.android.cts.verifier" % (device_id)
440 ret_code = subprocess.call(cmd.split(), stdout=fout)
506 cmd = ["python", os.path.join(os.environ["CAMERA_ITS_TOP"], "tools",
509 wake_code = subprocess.call(cmd)
561 cmd = None
567 cmd = ['python',
577 cmd = ['python',
582 if cmd is not None:
[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/security/src/android/security/cts/
DFileSystemPermissionTest.java61 String cmd = getInsecureDeviceAdbCommand(path, type); in getAllInsecureDevicesInDirAndSubdir() local
62 String output = mDevice.executeShellCommand(cmd); in getAllInsecureDevicesInDirAndSubdir()
178 List<String> cmd = new ArrayList<>(3 + args.length); in execSearchPolicy() local
179 cmd.add(searchpolicy.getPath()); in execSearchPolicy()
180 cmd.add("--libpath"); in execSearchPolicy()
181 cmd.add(libsepolwrap.getPath()); in execSearchPolicy()
183 cmd.add(arg); in execSearchPolicy()
185 return execAndCaptureOutput(cmd.toArray(new String[0]), envp); in execSearchPolicy()
204 private static byte[] execAndCaptureOutput(String[] cmd, String[] envp) in execAndCaptureOutput() argument
208 final Process p = Runtime.getRuntime().exec(cmd, envp); in execAndCaptureOutput()
[all …]
/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()
DPackageTest.java37 String cmd = MONKEY_CMD + " -v -p " + PKGS[0] + " 5000"; in testSinglePackage() local
40 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testSinglePackage()
67 String cmd = MONKEY_CMD + " -v -p " + PKGS[0] + " -p " + PKGS[1] + " 5000"; in testMultiplePackages() local
70 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testMultiplePackages()
/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/hostsidetests/net/app/src/com/android/cts/net/hostside/
DDumpOnFailureRule.java59 for (String cmd : new String[] { in onTestFailure()
65 dumpCommandOutput(out, cmd); in onTestFailure()
74 void dumpCommandOutput(FileOutputStream out, String cmd) { in dumpCommandOutput() argument
76 .getUiAutomation().executeShellCommand(cmd); in dumpCommandOutput()
78 out.write(("Output of '" + cmd + "':\n").getBytes(StandardCharsets.UTF_8)); in dumpCommandOutput()
83 Log.e(TAG, "Error dumping '" + cmd + "'", e); in dumpCommandOutput()
/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.java83 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()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DAppStandbyTests.java322 final StringBuffer cmd = new StringBuffer("settings put global alarm_manager_constants "); in updateAlarmManagerConstants() local
323 cmd.append(COMMON_SETTINGS); in updateAlarmManagerConstants()
324 executeAndLog(cmd.toString()); in updateAlarmManagerConstants()
328 final StringBuffer cmd = new StringBuffer("cmd deviceidle whitelist "); in setPowerWhitelisted() local
329 cmd.append(whitelist ? "+" : "-"); in setPowerWhitelisted()
330 cmd.append(TEST_APP_PACKAGE); in setPowerWhitelisted()
331 executeAndLog(cmd.toString()); in setPowerWhitelisted()
354 private String executeAndLog(String cmd) throws IOException { in executeAndLog() argument
355 final String output = mUiDevice.executeShellCommand(cmd).trim(); in executeAndLog()
356 Log.d(TAG, "command: [" + cmd + "], output: [" + output + "]"); in executeAndLog()

12345