/cts/apps/CameraITS/pymodules/its/ |
D | device.py | 287 cmd = {"cmdName":"open", "cameraId":self._camera_id} 288 self.sock.send(json.dumps(cmd) + "\n") 294 cmd = {"cmdName":"close"} 295 self.sock.send(json.dumps(cmd) + "\n") 315 cmd = {} 316 cmd["cmdName"] = "doVibrate" 317 cmd["pattern"] = pattern 318 self.sock.send(json.dumps(cmd) + "\n") 329 cmd = {} 330 cmd["cmdName"] = "checkSensorExistence" [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | SystemUtil.java | 68 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() argument 70 return runShellCommand(instrumentation.getUiAutomation(), cmd); in runShellCommand() 82 public static String runShellCommand(UiAutomation automation, String cmd) in runShellCommand() argument 84 Log.v(TAG, "Running command: " + cmd); in runShellCommand() 85 if (cmd.startsWith("pm grant ") || cmd.startsWith("pm revoke ")) { in runShellCommand() 89 ParcelFileDescriptor pfd = automation.executeShellCommand(cmd); in runShellCommand() 104 public static String runShellCommand(String cmd) { in runShellCommand() argument 106 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand() 117 public static String runShellCommand(String cmd, Predicate<String> resultChecker) { in runShellCommand() argument 118 final String result = runShellCommand(cmd); in runShellCommand() [all …]
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | BaseInstallMultiple.java | 133 final StringBuilder cmd = new StringBuilder(); in run() local 134 cmd.append("pm install-create"); in run() 136 cmd.append(' ').append(arg); in run() 139 cmd.append(' ').append(AbiUtils.createAbiFlag(mAbi.getName())); in run() 142 String result = device.executeShellCommand(cmd.toString()); in run() 167 cmd.setLength(0); in run() 168 cmd.append("pm install-write"); in run() 169 cmd.append(' ').append(sessionId); in run() 170 cmd.append(' ').append(i + "_" + apk.getName()); in run() 171 cmd.append(' ').append(remotePath); in run() [all …]
|
/cts/hostsidetests/dexmetadata/host/src/com/android/cts/dexmetadata/ |
D | BaseInstallMultiple.java | 77 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/common/device-side/util/src/com/android/compatibility/common/util/ |
D | SystemUtil.java | 68 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() argument 70 Log.v(TAG, "Running command: " + cmd); in runShellCommand() 71 if (cmd.startsWith("pm grant ") || cmd.startsWith("pm revoke ")) { in runShellCommand() 75 ParcelFileDescriptor pfd = instrumentation.getUiAutomation().executeShellCommand(cmd); in runShellCommand() 90 public static String runShellCommand(String cmd) { in runShellCommand() argument 92 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand() 103 public static String runShellCommand(String cmd, Predicate<String> resultChecker) { in runShellCommand() argument 104 final String result = runShellCommand(cmd); in runShellCommand() 106 assertTrue("Assertion failed. Command was: " + cmd + "\n" in runShellCommand() 116 public static String runShellCommandForNoOutput(String cmd) { in runShellCommandForNoOutput() argument [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/apps/CameraITS/tools/ |
D | run_parallel_tests.py | 73 for cmd in cmds: 74 print "running: ", cmd 75 proc = Process(target=run_cmd, args=(cmd,)) 92 cmd = ['python', 101 cmd.append('chart=%s' % chart_host_id) 103 cmd.append('skip_scene_validation') 105 return cmd 107 def run_cmd(cmd): argument 110 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 123 cmd = ['python', os.path.join(os.environ['CAMERA_ITS_TOP'], 'tools', [all …]
|
D | set_charging_limits.py | 31 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)
|
D | load_scene.py | 38 cmd = ('adb -s %s shell am force-stop com.google.android.apps.docs' % 40 subprocess.Popen(cmd.split()) 63 cmd = 'adb -s %s push %s /mnt%s' % (screen_id, src_scene_file, 65 subprocess.Popen(cmd.split()) 70 cmd = ("adb -s %s wait-for-device shell am start -d 'file://%s'" 72 subprocess.Popen(cmd.split())
|
D | run_all_tests.py | 106 def run_subprocess_with_timeout(cmd, fout, ferr, outdir): argument 120 cmd, stdout=fout, stderr=ferr, cwd=outdir) 323 cmd = "adb -s %s shell pm dump com.android.cts.verifier" % (device_id) 328 ret_code = subprocess.call(cmd.split(), stdout=fout) 394 cmd = ["python", os.path.join(os.environ["CAMERA_ITS_TOP"], "tools", 397 wake_code = subprocess.call(cmd) 440 cmd = None 446 cmd = ['python', 456 cmd = ['python', 461 if cmd is not None: [all …]
|
/cts/tests/app/src/android/app/cts/android/app/cts/tools/ |
D | ServiceProcessController.java | 108 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() 122 String cmd = "am make-uid-idle " + mServicePackage; in makeUidIdle() local 123 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in makeUidIdle() 127 String cmd = "cmd deviceidle whitelist -" + mServicePackage; in removeFromWhitelist() local 128 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromWhitelist() 132 String cmd = "cmd deviceidle whitelist +" + mServicePackage; in addToWhitelist() local 133 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in addToWhitelist() [all …]
|
D | WatchUidRunner.java | 130 public void expect(int cmd, String procState) { in expect() argument 131 expect(cmd, procState, mDefaultWaitTime); in expect() 134 public void expect(int cmd, String procState, long timeout) { in expect() argument 136 String[] line = waitForNextLine(waitUntil, cmd, procState); in expect() 137 if (!COMMAND_TO_STRING[cmd].equals(line[1])) { in expect() 138 String msg = "Expected cmd " + COMMAND_TO_STRING[cmd] in expect() 154 public void waitFor(int cmd, String procState) { in waitFor() argument 155 waitFor(cmd, procState, mDefaultWaitTime); in waitFor() 158 public void waitFor(int cmd, String procState, long timeout) { in waitFor() argument 161 String[] line = waitForNextLine(waitUntil, cmd, procState); in waitFor() [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/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/security/src/android/cts/security/ |
D | FileSystemPermissionTest.java | 61 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/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()
|
D | PackageTest.java | 37 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/suite/audio_quality/test_description/ |
D | processing_main.py | 86 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/app/src/android/app/cts/ |
D | ActivityManagerProcessStateTest.java | 168 private String executeShellCmd(String cmd) throws Exception { in executeShellCmd() argument 169 final String result = SystemUtil.runShellCommand(getInstrumentation(), cmd); in executeShellCmd() 170 Log.d(TAG, String.format("Output for '%s': %s", cmd, result)); in executeShellCmd() 457 String cmd = "appops set " + SIMPLE_PACKAGE_NAME + " RUN_IN_BACKGROUND deny"; in testBackgroundCheckService() local 458 String result = SystemUtil.runShellCommand(getInstrumentation(), cmd); in testBackgroundCheckService() 465 cmd = "am make-uid-idle " + SIMPLE_PACKAGE_NAME; in testBackgroundCheckService() 466 result = SystemUtil.runShellCommand(getInstrumentation(), cmd); in testBackgroundCheckService() 469 cmd = "cmd deviceidle whitelist -" + SIMPLE_PACKAGE_NAME; in testBackgroundCheckService() 470 result = SystemUtil.runShellCommand(getInstrumentation(), cmd); in testBackgroundCheckService() 488 cmd = String.format("cmd deviceidle tempwhitelist -d %d %s", in testBackgroundCheckService() [all …]
|
D | DownloadManagerTestBase.java | 93 final String cmd = String.format("content update --uri %s --bind %s:s:%s", in updateUri() local 95 final String res = runShellCommand(cmd).trim(); in updateUri() 113 final String cmd = String.format("content query --uri %s --projection %s --user %s", in getMediaStoreUri() local 115 final String res = runShellCommand(cmd).trim(); in getMediaStoreUri() 207 final String cmd = "dd of=" + file.getAbsolutePath(); in writeToFileFromShell() local 209 .getUiAutomation().executeShellCommandRw(cmd); in writeToFileFromShell() 219 Log.d(TAG, "Output of '" + cmd + "': '" + res + "'"); in writeToFileFromShell() 236 final String cmd = "cat " + file.getAbsolutePath(); in assertFileContents() local 237 final String output = runShellCommand(cmd); in assertFileContents() 238 Log.d(TAG, "Output of '" + cmd + "': '" + output + "'"); in assertFileContents()
|
/cts/tests/tests/media/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()
|
/cts/hostsidetests/net/src/com/android/cts/net/ |
D | NetPolicyTestsPreparer.java | 58 private String executeCmd(String cmd) throws DeviceNotAvailableException { in executeCmd() argument 59 final String output = mDevice.executeShellCommand(cmd).trim(); in executeCmd() 60 LogUtil.CLog.d("Output for '%s': %s", cmd, output); in executeCmd()
|
/cts/hostsidetests/theme/ |
D | android_device.py | 34 def run_adb_command(self, cmd, timeout=None): argument 35 adb_cmd = "adb -s %s %s" % (self._serial, cmd) 42 def run_shell_command(self, cmd): argument 43 return self.run_adb_command("shell %s" % cmd)
|