!1561 delete kserver and kdaemon command && revise help document

Merge pull request !1561 from WANGTAO/0918_help
This commit is contained in:
openharmony_ci 2024-09-19 14:29:01 +00:00 committed by Gitee
commit 51435d0406
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 8 additions and 29 deletions

View File

@ -132,8 +132,6 @@ const string CMDSTR_TARGET_DISCOVER = "discover";
const string CMDSTR_SERVICE_START = "start";
const string CMDSTR_SERVICE_KILL = "kill";
const string CMDSTR_GENERATE_KEY = "keygen";
const string CMDSTR_KILL_SERVER = "kserver";
const string CMDSTR_KILL_DAEMON = "kdaemon";
const string CMDSTR_LIST_TARGETS = "list targets";
const string CMDSTR_CHECK_SERVER = "checkserver";
const string CMDSTR_CHECK_DEVICE = "checkdevice";

View File

@ -143,8 +143,7 @@ enum HdcCommand {
CMD_KERNEL_HELP = 0,
CMD_KERNEL_HANDSHAKE,
CMD_KERNEL_CHANNEL_CLOSE,
CMD_KERNEL_SERVER_KILL,
CMD_KERNEL_TARGET_DISCOVER,
CMD_KERNEL_TARGET_DISCOVER = 4,
CMD_KERNEL_TARGET_LIST,
CMD_KERNEL_TARGET_ANY,
CMD_KERNEL_TARGET_CONNECT,
@ -163,8 +162,7 @@ enum HdcCommand {
CMD_UNITY_REBOOT,
CMD_UNITY_RUNMODE,
CMD_UNITY_HILOG,
CMD_UNITY_TERMINATE,
CMD_UNITY_ROOTRUN,
CMD_UNITY_ROOTRUN = 1007,
CMD_JDWP_LIST,
CMD_JDWP_TRACK,
CMD_UNITY_COMMAND_TAIL, // not use

View File

@ -202,7 +202,6 @@ bool HdcDaemon::RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uin
case CMD_UNITY_RUNMODE:
case CMD_UNITY_HILOG:
case CMD_UNITY_ROOTRUN:
case CMD_UNITY_TERMINATE:
case CMD_UNITY_BUGREPORT_INIT:
case CMD_JDWP_LIST:
case CMD_JDWP_TRACK:
@ -828,7 +827,6 @@ bool HdcDaemon::CheckControl(const uint16_t command)
case CMD_UNITY_RUNMODE:
case CMD_UNITY_HILOG:
case CMD_UNITY_ROOTRUN:
case CMD_UNITY_TERMINATE:
case CMD_UNITY_BUGREPORT_INIT:
case CMD_JDWP_LIST:
case CMD_JDWP_TRACK:

View File

@ -385,10 +385,6 @@ bool HdcDaemonUnity::CommandDispatch(const uint16_t command, uint8_t *payload, c
daemon->PostStopInstanceMessage(restart);
break;
}
case CMD_UNITY_TERMINATE: {
daemon->PostStopInstanceMessage(!strcmp(const_cast<char *>(strPayload.c_str()), "1"));
break;
}
case CMD_UNITY_BUGREPORT_INIT: {
currentDataCommand = CMD_UNITY_BUGREPORT_DATA;
ExecuteShell("hidumper");

View File

@ -181,7 +181,6 @@ string HdcClient::AutoConnectKey(string &doCommand, const string &preConnectKey)
vecNoConnectKeyCommand.push_back(CMDSTR_CONNECT_TARGET);
vecNoConnectKeyCommand.push_back(CMDSTR_CHECK_DEVICE);
vecNoConnectKeyCommand.push_back(CMDSTR_WAIT_FOR);
vecNoConnectKeyCommand.push_back(CMDSTR_KILL_SERVER);
vecNoConnectKeyCommand.push_back(CMDSTR_FORWARD_FPORT + " ls");
vecNoConnectKeyCommand.push_back(CMDSTR_FORWARD_FPORT + " rm");
for (string v : vecNoConnectKeyCommand) {

View File

@ -66,8 +66,6 @@ int IsRegisterCommand(string &outCommand, const char *cmd, const char *cmdnext)
registerCommand.push_back(CMDSTR_SERVICE_KILL);
registerCommand.push_back(CMDSTR_SERVICE_START);
registerCommand.push_back(CMDSTR_GENERATE_KEY);
registerCommand.push_back(CMDSTR_KILL_SERVER);
registerCommand.push_back(CMDSTR_KILL_DAEMON);
registerCommand.push_back(CMDSTR_APP_INSTALL);
registerCommand.push_back(CMDSTR_APP_UNINSTALL);
registerCommand.push_back(CMDSTR_TARGET_MOUNT);

View File

@ -521,12 +521,6 @@ bool HdcServerForClient::DoCommandLocal(HChannel hChannel, void *formatCommandIn
CommandRemoveSession(hChannel, formatCommand->parameters.c_str());
break;
}
case CMD_KERNEL_SERVER_KILL: {
WRITE_LOG(LOG_DEBUG, "Recv server kill command");
uv_stop(loopMain);
ret = true;
break;
}
// task will be global taskTherefore, it can only be controlled in the global session.
case CMD_FORWARD_LIST: {
HForwardInfo hfi = nullptr; // dummy
@ -646,7 +640,6 @@ bool HdcServerForClient::DoCommandRemote(HChannel hChannel, void *formatCommandI
case CMD_SHELL_INIT:
case CMD_SHELL_DATA:
case CMD_UNITY_EXECUTE:
case CMD_UNITY_TERMINATE:
case CMD_UNITY_REMOUNT:
case CMD_UNITY_REBOOT:
case CMD_UNITY_RUNMODE:

View File

@ -34,6 +34,7 @@ namespace TranslateCommand {
"\n"
"service commands(on daemon):\n"
" target mount - Set /system /vendor partition read-write\n"
" wait - Wait for the device to become available\n"
" target boot [-bootloader|-recovery] - Reboot the device or boot into bootloader\\recovery.\n"
" target boot [MODE] - Reboot the into MODE.\n"
" smode [-r] - Restart daemon with root permissions, '-r' to cancel root\n"
@ -80,7 +81,10 @@ namespace TranslateCommand {
" shell [COMMAND...] - Run shell command (interactive shell if no command given)\n"
" bugreport [FILE] - Return all information from the device, stored in file if "
"FILE is specified\n"
" jpid - List pids of processes hosting a JDWP transport\n"
" jpid - List PIDs of processes hosting a JDWP transport\n"
" track-jpid [-a|-p] - Track PIDs of debug processes hosting a JDWP transport\n"
" -a: include debug and release processes\n"
" -p: don't display debug and release tags\n"
"\n"
"security commands:\n"
" keygen FILE - Generate public/private key; key stored in FILE and FILE.pub\n"
@ -167,7 +171,7 @@ namespace TranslateCommand {
" shell [COMMAND...] - Run shell command (interactive shell if no command given)\n"
" bugreport [FILE] - Return all information from the device, stored in file if FILE "
"is specified\n"
" jpid - List pids of processes hosting a JDWP transport\n"
" jpid - List PIDs of processes hosting a JDWP transport\n"
" sideload [PATH] - Sideload the given full OTA package\n"
"\n"
"security commands:\n"
@ -349,11 +353,6 @@ namespace TranslateCommand {
|| !strncmp(input.c_str(), string(CMDSTR_FORWARD_RPORT + " ").c_str(),
CMDSTR_FORWARD_RPORT.size() + 1)) {
stringError = ForwardPort(input.c_str(), outCmd);
} else if (!strcmp(input.c_str(), CMDSTR_KILL_SERVER.c_str())) {
outCmd->cmdFlag = CMD_KERNEL_SERVER_KILL;
} else if (!strcmp(input.c_str(), CMDSTR_KILL_DAEMON.c_str())) {
outCmd->cmdFlag = CMD_UNITY_TERMINATE;
outCmd->parameters = "0";
} else if (!strncmp(input.c_str(), CMDSTR_APP_INSTALL.c_str(), CMDSTR_APP_INSTALL.size())) {
outCmd->cmdFlag = CMD_APP_INIT;
outCmd->parameters = input;