• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16export class CmdConstant {
17  static CMD_TRACE_FILE_SIZE = 'hdc_std shell  stat --format=%s ';
18  static CMD_SHELL = 'hdc_std shell ';
19  static CMD_MOUNT = 'hdc_std shell mount -o remount,rw /';
20  static CMD_GET_PROCESS = 'hdc_std shell ps -A -opid,cmd';
21  static CMD_GET_APP_NMAE = 'hdc_std shell ps -A -ocmd';
22  static CMD_GET_CPU_COUNT = "hdc_std shell grep -c 'processor' /proc/cpuinfo";
23  static CMD_GET_HIPERF_EVENTS = 'hdc_std shell hiperf list';
24  static CMD_GET_VERSION = 'hdc_std shell param get const.product.software.version';
25  static CMD_GET_DEBUG_PROCESS = `hdc shell netstat -anp |grep Panda |grep -v grep | sed \'s/.* \\([0-9]*\\)\\/.*/\\1/\' |xargs -r ps -A -opid,cmd`;
26  static CMD_HDC_DEVICES = 'hdc_std list targets';
27  static CMD_MOUNT_DEVICES = 'hdc_std -t {0} shell mount -o remount,rw /';
28  static CMD_GET_PROCESS_DEVICES = 'hdc_std -t {0} shell ps -A -opid,cmd';
29  static CMD_GET_APP_NMAE_DEVICES = 'hdc_std -t {0} shell ps -A -ocmd';
30  static CMD_GET_CPU_COUNT_DEVICES = "hdc_std -t {0} shell grep -c 'processor' /proc/cpuinfo";
31  static CMD_GET_HIPERF_EVENTS_DEVICES = 'hdc_std -t {0} shell hiperf list';
32  static CMD_FIEL_RECV_DEVICES = 'hdc_std -t {0} file recv {1} ./';
33  static CMS_HDC_STOP = 'hdc_std -t {0} shell killall -2 hiprofiler_cmd';
34  static CMS_STOP = 'hdc_std shell killall -2 hiprofiler_cmd';
35  static CMS_HDC_CANCEL =
36    'hdc_std -t {0} shell killall hiprofilerd hiprofiler_plugins native_daemon hiperf hiebpf hiprofiler_cmd';
37  static CMS_CANCEL = 'hdc_std shell killall hiprofilerd hiprofiler_plugins native_daemon hiperf hiebpf hiprofiler_cmd';
38  static CMD_GET_VERSION_DEVICES = 'hdc_std -t {0} shell param get const.product.software.version';
39  static CMD_GET_DEBUG_PROCESS_DEVICES = `hdc_std -t {0} shell netstat -anp |grep Panda
40  |grep -v grep | sed \'s/.* \\([0-9]*\\)\\/.*/\\1/\' |xargs -r ps -A -opid,cmd`;
41  static CMD_CLEAR_LONG_FOLD = 'hdc_std shell rm -rf ';
42  static CMD_MKDIR_LONG_FOLD = 'hdc_std shell mkdir ';
43  static CMD_GET_LONG_FILES = 'hdc_std shell ls ';
44}
45