diff --git a/frameworks/src/bundle_command.cpp b/frameworks/src/bundle_command.cpp index 2855098cc28464c69aa7f3cdf2454e4efacddc52..ab61020f554496c45f81a32a01ad62ef9e2d117e 100644 --- a/frameworks/src/bundle_command.cpp +++ b/frameworks/src/bundle_command.cpp @@ -925,6 +925,7 @@ ErrCode BundleManagerShellCommand::RunAsUninstallCommand() InstallParam installParam; installParam.userId = userId; installParam.isKeepData = isKeepData; + installParam.parameters.emplace(Constants::VERIFY_UNINSTALL_RULE_KEY, Constants::VERIFY_UNINSTALL_RULE_VALUE); int32_t uninstallResult = UninstallOperation(bundleName, moduleName, installParam); if (uninstallResult == OHOS::ERR_OK) { resultReceiver_ = STRING_UNINSTALL_BUNDLE_OK + "\n"; diff --git a/frameworks/src/bundle_command_common.cpp b/frameworks/src/bundle_command_common.cpp index 0aac05c46607273e42edec613362e7aefd2a4fab..943d4a972e4af6a1fb5499b0e87178e482e639c2 100644 --- a/frameworks/src/bundle_command_common.cpp +++ b/frameworks/src/bundle_command_common.cpp @@ -699,6 +699,10 @@ std::map BundleCommandCommon::bundleMessageMap_ = { IStatusReceiver::ERR_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL, "error: Encrypted bundle cannot be installed by shell without root." }, + { + IStatusReceiver::ERR_UNINSTALL_DISPOSED_RULE_DENIED, + "error: Failed to uninstall the app because the app is locked." + }, { IStatusReceiver::ERR_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED, "error: Bundle cannot be installed because the appId is not same with preinstalled bundle."