1 /*
2 * Copyright (c) 2022-2023 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 #include "bundle_command_common.h"
16
17 #include "app_log_wrapper.h"
18 #include "appexecfwk_errors.h"
19 #include "bundle_mgr_proxy.h"
20 #ifdef DISTRIBUTED_BUNDLE_FRAMEWORK
21 #include "distributed_bms_proxy.h"
22 #endif
23 #ifdef ACCOUNT_ENABLE
24 #include "os_account_info.h"
25 #include "os_account_manager.h"
26 #endif
27 #include "if_system_ability_manager.h"
28 #include "iservice_registry.h"
29 #include "status_receiver_interface.h"
30 #include "system_ability_definition.h"
31
32 namespace OHOS {
33 namespace AppExecFwk {
GetBundleMgrProxy()34 sptr<IBundleMgr> BundleCommandCommon::GetBundleMgrProxy()
35 {
36 sptr<ISystemAbilityManager> systemAbilityManager =
37 SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
38 if (systemAbilityManager == nullptr) {
39 APP_LOGE("failed to get system ability mgr.");
40 return nullptr;
41 }
42
43 sptr<IRemoteObject> remoteObject = systemAbilityManager->GetSystemAbility(BUNDLE_MGR_SERVICE_SYS_ABILITY_ID);
44 if (remoteObject == nullptr) {
45 APP_LOGE("failed to get bundle manager proxy.");
46 return nullptr;
47 }
48
49 APP_LOGD("get bundle manager proxy success.");
50 return iface_cast<IBundleMgr>(remoteObject);
51 }
52
53 #ifdef DISTRIBUTED_BUNDLE_FRAMEWORK
GetDistributedBundleMgrService()54 sptr<IDistributedBms> BundleCommandCommon::GetDistributedBundleMgrService()
55 {
56 auto saMgr = OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
57 if (saMgr == nullptr) {
58 APP_LOGE("saMgr is nullptr");
59 return nullptr;
60 }
61 OHOS::sptr<OHOS::IRemoteObject> remoteObject =
62 saMgr->CheckSystemAbility(OHOS::DISTRIBUTED_BUNDLE_MGR_SERVICE_SYS_ABILITY_ID);
63 if (remoteObject == nullptr) {
64 APP_LOGE("failed to get distributed bms proxy.");
65 return nullptr;
66 }
67 return OHOS::iface_cast<IDistributedBms>(remoteObject);
68 }
69 #endif
70
GetCurrentUserId(int32_t userId)71 int32_t BundleCommandCommon::GetCurrentUserId(int32_t userId)
72 {
73 if (userId == Constants::UNSPECIFIED_USERID) {
74 std::vector<int> activeIds;
75 #ifdef ACCOUNT_ENABLE
76 int32_t ret = AccountSA::OsAccountManager::QueryActiveOsAccountIds(activeIds);
77 if (ret != 0) {
78 APP_LOGW("QueryActiveOsAccountIds failed! ret = %{public}d.", ret);
79 return userId;
80 }
81 #endif
82 if (activeIds.empty()) {
83 APP_LOGW("QueryActiveOsAccountIds activeIds empty");
84 return userId;
85 }
86 return activeIds[0];
87 }
88 return userId;
89 }
90
91 std::map<int32_t, std::string> BundleCommandCommon::bundleMessageMap_ = {
92 // error + message
93 {
94 IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR,
95 "error: install internal error.",
96 },
97 {
98 IStatusReceiver::ERR_INSTALL_HOST_INSTALLER_FAILED,
99 "error: install host installer failed.",
100 },
101 {
102 IStatusReceiver::ERR_INSTALL_PARSE_FAILED,
103 "error: install parse failed.",
104 },
105 {
106 IStatusReceiver::ERR_INSTALL_VERSION_DOWNGRADE,
107 "error: install version downgrade.",
108 },
109 {
110 IStatusReceiver::ERR_INSTALL_VERIFICATION_FAILED,
111 "error: install verification failed.",
112 },
113 {
114 IStatusReceiver::ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH,
115 "error: signature file path is invalid.",
116 },
117 {
118 IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE,
119 "error: cannot open signature file.",
120 },
121 {
122 IStatusReceiver::ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE,
123 "error: no signature file.",
124 },
125 {
126 IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL,
127 "error: fail to verify pkcs7 file.",
128 },
129 {
130 IStatusReceiver::ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL,
131 "error: fail to parse signature file.",
132 },
133 {
134 IStatusReceiver::ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED,
135 "error: signature verification failed due to not trusted app source.",
136 },
137 {
138 IStatusReceiver::ERR_INSTALL_FAILED_BAD_DIGEST,
139 "error: signature verification failed due to not bad digest.",
140 },
141 {
142 IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE,
143 "error: signature verification failed due to out of integrity.",
144 },
145 {
146 IStatusReceiver::ERR_INSTALL_FAILED_FILE_SIZE_TOO_LARGE,
147 "error: signature verification failed due to oversize file.",
148 },
149 {
150 IStatusReceiver::ERR_INSTALL_FAILED_BAD_PUBLICKEY,
151 "error: signature verification failed due to bad public key.",
152 },
153 {
154 IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE,
155 "error: signature verification failed due to bad bundle signature.",
156 },
157 {
158 IStatusReceiver::ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL,
159 "error: signature verification failed due to no profile block.",
160 },
161 {
162 IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE,
163 "error: verify signature failed.",
164 },
165 {
166 IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL,
167 "error: signature verification failed due to init source failed.",
168 },
169 {
170 IStatusReceiver::ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE,
171 "error: install incompatible signature info.",
172 },
173 {
174 IStatusReceiver::ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE,
175 "error: install sign info inconsistent.",
176 },
177 {
178 IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_EMPTY,
179 "error: install failed due to hap moduleName is empty.",
180 },
181 {
182 IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE,
183 "error: install failed due to hap moduleName duplicate.",
184 },
185 {
186 IStatusReceiver::ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM,
187 "error: install failed due to check hap hash param failed.",
188 },
189 {
190 IStatusReceiver::ERR_INSTALL_PARAM_ERROR,
191 "error: install param error.",
192 },
193 {
194 IStatusReceiver::ERR_INSTALL_PERMISSION_DENIED,
195 "error: install permission denied.",
196 },
197 {
198 IStatusReceiver::ERR_INSTALL_ENTRY_ALREADY_EXIST,
199 "error: install entry already exist.",
200 },
201 {
202 IStatusReceiver::ERR_INSTALL_STATE_ERROR,
203 "error: install state error.",
204 },
205 {
206 IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID,
207 "error: install file path invalid.",
208 },
209 {
210 IStatusReceiver::ERR_INSTALL_INVALID_HAP_NAME,
211 "error: install invalid hap name.",
212 },
213 {
214 IStatusReceiver::ERR_INSTALL_INVALID_BUNDLE_FILE,
215 "error: install invalid bundle file.",
216 },
217 {
218 IStatusReceiver::ERR_INSTALL_INVALID_HAP_SIZE,
219 "error: install invalid hap size.",
220 },
221 {
222 IStatusReceiver::ERR_INSTALL_GENERATE_UID_ERROR,
223 "error: install generate uid error.",
224 },
225 {
226 IStatusReceiver::ERR_INSTALL_INSTALLD_SERVICE_ERROR,
227 "error: install installd service error.",
228 },
229 {
230 IStatusReceiver::ERR_INSTALL_BUNDLE_MGR_SERVICE_ERROR,
231 "error: install bundle mgr service error.",
232 },
233 {
234 IStatusReceiver::ERR_INSTALL_ALREADY_EXIST,
235 "error: install already exist.",
236 },
237 {
238 IStatusReceiver::ERR_INSTALL_BUNDLENAME_NOT_SAME,
239 "error: install bundle name not same.",
240 },
241 {
242 IStatusReceiver::ERR_INSTALL_VERSIONCODE_NOT_SAME,
243 "error: install version code not same.",
244 },
245 {
246 IStatusReceiver::ERR_INSTALL_VERSIONNAME_NOT_SAME,
247 "error: install version name not same.",
248 },
249 {
250 IStatusReceiver::ERR_INSTALL_MINCOMPATIBLE_VERSIONCODE_NOT_SAME,
251 "error: install min compatible version code not same.",
252 },
253 {
254 IStatusReceiver::ERR_INSTALL_VENDOR_NOT_SAME,
255 "error: install vendor not same.",
256 },
257 {
258 IStatusReceiver::ERR_INSTALL_RELEASETYPE_TARGET_NOT_SAME,
259 "error: install releaseType target not same.",
260 },
261 {
262 IStatusReceiver::ERR_INSTALL_RELEASETYPE_NOT_SAME,
263 "error: install releaseType not same.",
264 },
265 {
266 IStatusReceiver::ERR_INSTALL_RELEASETYPE_COMPATIBLE_NOT_SAME,
267 "error: install releaseType compatible not same.",
268 },
269 {
270 IStatusReceiver::ERR_INSTALL_VERSION_NOT_COMPATIBLE,
271 "error: install version not compatible.",
272 },
273 {
274 IStatusReceiver::ERR_INSTALL_APP_DISTRIBUTION_TYPE_NOT_SAME,
275 "error: install distribution type not same.",
276 },
277 {
278 IStatusReceiver::ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME,
279 "error: install provision type not same.",
280 },
281 {
282 IStatusReceiver::ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP,
283 "error: install invalid number of entry hap.",
284 },
285 {
286 IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT,
287 "error: install failed due to insufficient disk memory.",
288 },
289 {
290 IStatusReceiver::ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED,
291 "error: install failed due to grant request permissions failed.",
292 },
293 {
294 IStatusReceiver::ERR_INSTALL_UPDATE_HAP_TOKEN_FAILED,
295 "error: install failed due to update hap token failed.",
296 },
297 {
298 IStatusReceiver::ERR_INSTALL_SINGLETON_NOT_SAME,
299 "error: install failed due to singleton not same.",
300 },
301 {
302 IStatusReceiver::ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON,
303 "error: install failed due to zero user can only install singleton app.",
304 },
305 {
306 IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED,
307 "error: install failed due to check syscap filed.",
308 },
309 {
310 IStatusReceiver::ERR_INSTALL_APPTYPE_NOT_SAME,
311 "error: install failed due to apptype not same",
312 },
313 {
314 IStatusReceiver::ERR_INSTALL_TYPE_ERROR,
315 "error: install failed due to error bundle type"
316 },
317 {
318 IStatusReceiver::ERR_INSTALL_SDK_INCOMPATIBLE,
319 "error: install failed due to older sdk version in the device"
320 },
321 {
322 IStatusReceiver::ERR_INSTALL_SO_INCOMPATIBLE,
323 "error: install failed due to native so is incompatible"
324 },
325 {
326 IStatusReceiver::ERR_INSTALL_AN_INCOMPATIBLE,
327 "error: install failed due to ark native file is incompatible"
328 },
329 {
330 IStatusReceiver::ERR_INSTALL_URI_DUPLICATE,
331 "error: install failed due to uri prefix duplicate",
332 },
333 {
334 IStatusReceiver::ERR_INSTALL_PARSE_UNEXPECTED,
335 "error: install parse unexpected.",
336 },
337 {
338 IStatusReceiver::ERR_INSTALL_PARSE_MISSING_BUNDLE,
339 "error: install parse missing bundle.",
340 },
341 {
342 IStatusReceiver::ERR_INSTALL_PARSE_MISSING_ABILITY,
343 "error: install parse missing ability.",
344 },
345 {
346 IStatusReceiver::ERR_INSTALL_PARSE_NO_PROFILE,
347 "error: install parse no profile.",
348 },
349 {
350 IStatusReceiver::ERR_INSTALL_PARSE_BAD_PROFILE,
351 "error: install parse bad profile.",
352 },
353 {
354 IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR,
355 "error: install parse profile prop type error.",
356 },
357 {
358 IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_MISSING_PROP,
359 "error: install parse profile missing prop.",
360 },
361 {
362 IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR,
363 "error: install parse profile prop check error.",
364 },
365 {
366 IStatusReceiver::ERR_INSTALL_PARSE_PERMISSION_ERROR,
367 "error: install parse permission error.",
368 },
369 {
370 IStatusReceiver::ERR_INSTALL_PARSE_RPCID_FAILED,
371 "error: install parse syscap error.",
372 },
373 {
374 IStatusReceiver::ERR_INSTALL_PARSE_NATIVE_SO_FAILED,
375 "error: install parse native so failed.",
376 },
377 {
378 IStatusReceiver::ERR_INSTALL_PARSE_AN_FAILED,
379 "error: install parse ark native file failed.",
380 },
381 {
382 IStatusReceiver::ERR_INSTALLD_PARAM_ERROR,
383 "error: installd param error.",
384 },
385 {
386 IStatusReceiver::ERR_INSTALLD_GET_PROXY_ERROR,
387 "error: installd get proxy error.",
388 },
389 {
390 IStatusReceiver::ERR_INSTALLD_CREATE_DIR_FAILED,
391 "error: installd create dir failed.",
392 },
393 {
394 IStatusReceiver::ERR_INSTALLD_CREATE_DIR_EXIST,
395 "error: installd create dir exist.",
396 },
397 {
398 IStatusReceiver::ERR_INSTALLD_CHOWN_FAILED,
399 "error: installd chown failed.",
400 },
401 {
402 IStatusReceiver::ERR_INSTALLD_REMOVE_DIR_FAILED,
403 "error: installd remove dir failed.",
404 },
405 {
406 IStatusReceiver::ERR_INSTALLD_EXTRACT_FILES_FAILED,
407 "error: installd extract files failed.",
408 },
409 {
410 IStatusReceiver::ERR_INSTALLD_RNAME_DIR_FAILED,
411 "error: installd rename dir failed.",
412 },
413 {
414 IStatusReceiver::ERR_INSTALLD_CLEAN_DIR_FAILED,
415 "error: installd clean dir failed.",
416 },
417 {
418 IStatusReceiver::ERR_INSTALLD_SET_SELINUX_LABEL_FAILED,
419 "error: installd set selinux label failed."
420 },
421 {
422 IStatusReceiver::ERR_UNINSTALL_SYSTEM_APP_ERROR,
423 "error: uninstall system app error.",
424 },
425 {
426 IStatusReceiver::ERR_UNINSTALL_KILLING_APP_ERROR,
427 "error: uninstall killing app error.",
428 },
429 {
430 IStatusReceiver::ERR_UNINSTALL_INVALID_NAME,
431 "error: uninstall invalid name.",
432 },
433 {
434 IStatusReceiver::ERR_UNINSTALL_PARAM_ERROR,
435 "error: uninstall param error.",
436 },
437 {
438 IStatusReceiver::ERR_UNINSTALL_PERMISSION_DENIED,
439 "error: uninstall permission denied.",
440 },
441 {
442 IStatusReceiver::ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR,
443 "error: uninstall bundle mgr service error.",
444 },
445 {
446 IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE,
447 "error: uninstall missing installed bundle.",
448 },
449 {
450 IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_MODULE,
451 "error: uninstall missing installed module.",
452 },
453 {
454 IStatusReceiver::ERR_FAILED_SERVICE_DIED,
455 "error: bundle manager service is died.",
456 },
457 {
458 IStatusReceiver::ERR_FAILED_GET_INSTALLER_PROXY,
459 "error: failed to get installer proxy.",
460 },
461 {
462 IStatusReceiver::ERR_USER_NOT_EXIST,
463 "error: user not exist.",
464 },
465 {
466 IStatusReceiver::ERR_USER_NOT_INSTALL_HAP,
467 "error: user does not install the hap.",
468 },
469 {
470 IStatusReceiver::ERR_OPERATION_TIME_OUT,
471 "error: operation time out.",
472 },
473 {
474 IStatusReceiver::ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME,
475 "error: moduleName is not unique.",
476 },
477 {
478 IStatusReceiver::ERR_INSTALL_INCONSISTENT_MODULE_NAME,
479 "error: moduleName is inconsistent.",
480 },
481 {
482 IStatusReceiver::ERR_INSTALL_SINGLETON_INCOMPATIBLE,
483 "error: singleton is incompatible with installed app.",
484 },
485 {
486 IStatusReceiver::ERR_INSTALL_DISALLOWED,
487 "error: disallowed install.",
488 },
489 {
490 IStatusReceiver::ERR_UNINSTALL_DISALLOWED,
491 "error: disallowed uninstall.",
492 },
493 {
494 IStatusReceiver::ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED,
495 "error: device type is not supported.",
496 },
497 {
498 IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR,
499 "error: too large size of string or array type element in the profile.",
500 },
501 {
502 IStatusReceiver::ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST,
503 "error: dependent module does not exist.",
504 },
505 {
506 IStatusReceiver::ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED,
507 "error: disallowed to share library without AllowAppShareLibrary.",
508 },
509 {
510 IStatusReceiver::ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME,
511 "error: compatible policy not same.",
512 },
513 {
514 IStatusReceiver::ERR_INSTALL_FILE_IS_SHARED_LIBRARY,
515 "error: disallowed to install cross-app shared library.",
516 },
517 {
518 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR,
519 "error: internal error of overlay installation.",
520 },
521 {
522 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME,
523 "error: invalid bundle name of overlay installation.",
524 },
525 {
526 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME,
527 "error: invalid module name of overlay installation.",
528 },
529 {
530 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE,
531 "error: invalid hap type of overlay installation.",
532 },
533 {
534 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE,
535 "error: service bundle is not supported of overlay installation.",
536 },
537 {
538 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED,
539 "error: target bundleName is missed of overlay installation.",
540 },
541 {
542 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED,
543 "error: target module name is missed of overlay installation.",
544 },
545 {
546 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME,
547 "error: target bundle name is not same when replace external overlay.",
548 },
549 {
550 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY,
551 "error: internal and external overlay installation cannot be supported.",
552 },
553 {
554 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME,
555 "error: target priority is not same when replace external overlay.",
556 },
557 {
558 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY,
559 "error: invalid priority of overlay hap.",
560 },
561 {
562 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE,
563 "error: inconsistent version code of internal overlay installation.",
564 },
565 {
566 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION,
567 "error: service is exception.",
568 },
569 {
570 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME,
571 "error: target bundle name cannot be same with bundle name.",
572 },
573 {
574 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY,
575 "error: external overlay installation only support preInstall bundle.",
576 },
577 {
578 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE,
579 "error:target bundle has different signature certificate with current bundle.",
580 },
581 {
582 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE,
583 "error: target bundle cannot be overlay bundle of external overlay installation.",
584 },
585 {
586 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE,
587 "error: target module cannot be overlay module of overlay installation",
588 },
589 {
590 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME,
591 "error: overlay type is not same.",
592 },
593 {
594 IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR,
595 "error: bundle dir is invalid.",
596 },
597 {
598 IStatusReceiver::ERR_INSTALL_ASAN_ENABLED_NOT_SAME,
599 "error: install asanEnabled not same",
600 },
601 {
602 IStatusReceiver::ERR_INSTALL_ASAN_ENABLED_NOT_SUPPORT,
603 "error: install asan enabled is not support",
604 },
605 {
606 IStatusReceiver::ERR_INSTALL_BUNDLE_TYPE_NOT_SAME,
607 "error: install bundleType not same",
608 },
609 {
610 IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST,
611 "error: shared bundle is not exist",
612 },
613 {
614 IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED,
615 "error: shared bundle is relied",
616 },
617 {
618 IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_URI_FAILED,
619 "error: uri in proxy data is wrong",
620 },
621 {
622 IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_PERMISSION_FAILED,
623 "error: apl of required permission in proxy data is too low",
624 },
625 {
626 IStatusReceiver::ERR_INSTALL_FAILED_DEBUG_NOT_SAME,
627 "error: install debug type not same",
628 },
629 {
630 IStatusReceiver::ERR_INSTALL_ISOLATION_MODE_FAILED,
631 "error: isolationMode does not match the system.",
632 },
633 {
634 IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED,
635 "error: verify code signature failed.",
636 },
637 {
638 IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID,
639 "error: code signature file is invalid",
640 },
641 {
642 IStatusReceiver::ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED,
643 "error: uninstall bundle from extension failed",
644 },
645 {
646 IStatusReceiver::ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED,
647 "error: enterprise normal/mdm bundle cannot be installed on non-enterprise device",
648 },
649 {
650 IStatusReceiver::ERR_UNKNOWN,
651 "error: unknown.",
652 }
653 };
654 } // AppExecFwk
655 } // OHOS