diff --git a/services/native/src/usb_service.cpp b/services/native/src/usb_service.cpp index d7fc728d918aee6412f84dbceaa81b05788f1d9a..760bac148c4e2bd939c4b763c5ecd9efac556116 100644 --- a/services/native/src/usb_service.cpp +++ b/services/native/src/usb_service.cpp @@ -1629,6 +1629,11 @@ void UsbService::DumpHelp(int32_t fd) void UsbService::UnLoadSelf(UnLoadSaType type) { + if (OHOS::system::GetBoolParameter("const.security.developermode.state", true)) { + USB_HILOGI(MODULE_USB_SERVICE, "no need to unload in dev mode"); + return; + } + auto task = []() { auto samgrProxy = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (samgrProxy == nullptr) {