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 enum HdcCommand { 17 // core commands types 18 CMD_KERNEL_HELP = 0, 19 CMD_KERNEL_HANDSHAKE = 1, 20 CMD_KERNEL_CHANNEL_CLOSE = 2, 21 CMD_KERNEL_SERVER_KILL = 3, 22 CMD_KERNEL_TARGET_DISCOVER = 4, 23 CMD_KERNEL_TARGET_LIST = 5, 24 CMD_KERNEL_TARGET_ANY = 6, 25 CMD_KERNEL_TARGET_CONNECT = 7, 26 CMD_KERNEL_TARGET_DISCONNECT = 8, 27 CMD_KERNEL_ECHO = 9, 28 CMD_KERNEL_ECHO_RAW = 10, 29 CMD_KERNEL_ENABLE_KEEPALIVE = 11, 30 CMD_KERNEL_WAKEUP_SLAVETASK = 12, 31 // One-pass simple commands 32 CMD_UNITY_COMMAND_HEAD = 1000, // not use 33 CMD_UNITY_EXECUTE = 1001, 34 CMD_UNITY_REMOUNT = 1002, 35 CMD_UNITY_REBOOT = 1003, 36 CMD_UNITY_RUNMODE = 1004, 37 CMD_UNITY_HILOG = 1005, 38 CMD_UNITY_TERMINATE = 1006, 39 CMD_UNITY_ROOTRUN = 1007, 40 CMD_JDWP_LIST = 1008, 41 CMD_JDWP_TRACK = 1009, 42 CMD_UNITY_COMMAND_TAIL = 1010, // not use 43 // It will be separated from unity in the near future 44 CMD_UNITY_BUGREPORT_INIT = 1011, 45 CMD_UNITY_BUGREPORT_DATA = 1012, 46 // Shell commands types 47 CMD_SHELL_INIT = 2000, 48 CMD_SHELL_DATA = 2001, 49 // File commands 50 CMD_FILE_INIT = 3000, 51 CMD_FILE_CHECK = 3001, 52 CMD_FILE_BEGIN = 3002, 53 CMD_FILE_DATA = 3003, 54 CMD_FILE_FINISH = 3004, 55 // App commands 56 CMD_APP_SIDELOAD = 3005, 57 CMD_APP_INIT = 3500, 58 CMD_APP_CHECK = 3501, 59 CMD_APP_BEGIN = 3502, 60 CMD_APP_DATA = 3503, 61 CMD_APP_FINISH = 3504, 62 CMD_APP_UNINSTALL = 3505, 63} 64