161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit AbilityKit 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base'; 2261847f8eSopenharmony_ci 2361847f8eSopenharmony_ci/** 2461847f8eSopenharmony_ci * Support install, upgrade, remove and recover bundles on the devices. 2561847f8eSopenharmony_ci * 2661847f8eSopenharmony_ci * @namespace installer 2761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 2861847f8eSopenharmony_ci * @systemapi 2961847f8eSopenharmony_ci * @since 9 3061847f8eSopenharmony_ci */ 3161847f8eSopenharmony_cideclare namespace installer { 3261847f8eSopenharmony_ci /** 3361847f8eSopenharmony_ci * Obtains the interface used to install bundle. 3461847f8eSopenharmony_ci * 3561847f8eSopenharmony_ci * @param { AsyncCallback<BundleInstaller> } callback - The callback of BundleInstaller object. 3661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 3761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 3861847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 3961847f8eSopenharmony_ci * @systemapi 4061847f8eSopenharmony_ci * @since 9 4161847f8eSopenharmony_ci */ 4261847f8eSopenharmony_ci function getBundleInstaller(callback: AsyncCallback<BundleInstaller>): void; 4361847f8eSopenharmony_ci 4461847f8eSopenharmony_ci /** 4561847f8eSopenharmony_ci * Obtains the interface used to install bundle. 4661847f8eSopenharmony_ci * 4761847f8eSopenharmony_ci * @returns { Promise<BundleInstaller> } BundleInstaller object. 4861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 4961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 5061847f8eSopenharmony_ci * @systemapi 5161847f8eSopenharmony_ci * @since 9 5261847f8eSopenharmony_ci */ 5361847f8eSopenharmony_ci function getBundleInstaller(): Promise<BundleInstaller>; 5461847f8eSopenharmony_ci 5561847f8eSopenharmony_ci /** 5661847f8eSopenharmony_ci * Obtains the interface used to install bundle. 5761847f8eSopenharmony_ci * 5861847f8eSopenharmony_ci * @returns { BundleInstaller } BundleInstaller object. 5961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 6061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 6161847f8eSopenharmony_ci * @systemapi 6261847f8eSopenharmony_ci * @since 10 6361847f8eSopenharmony_ci */ 6461847f8eSopenharmony_ci function getBundleInstallerSync(): BundleInstaller; 6561847f8eSopenharmony_ci 6661847f8eSopenharmony_ci /** 6761847f8eSopenharmony_ci * Bundle installer interface, include install uninstall recover. 6861847f8eSopenharmony_ci * 6961847f8eSopenharmony_ci * @interface BundleInstaller 7061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 7161847f8eSopenharmony_ci * @systemapi 7261847f8eSopenharmony_ci * @since 9 7361847f8eSopenharmony_ci */ 7461847f8eSopenharmony_ci interface BundleInstaller { 7561847f8eSopenharmony_ci /** 7661847f8eSopenharmony_ci * Install haps for an application. 7761847f8eSopenharmony_ci * 7861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE 7961847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored. 8061847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 8161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing haps result. 8261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. 8361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 8461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 8561847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 8661847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 8761847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 8861847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 8961847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 9061847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 9161847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 9261847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 9361847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 9461847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 9561847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 9661847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 9761847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 9861847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 9961847f8eSopenharmony_ci * (required APL: system_basic or system_core). 10061847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 10161847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 10261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 10361847f8eSopenharmony_ci * @systemapi 10461847f8eSopenharmony_ci * @since 9 10561847f8eSopenharmony_ci */ 10661847f8eSopenharmony_ci /** 10761847f8eSopenharmony_ci * Install HAPs for an application. 10861847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 10961847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 11061847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 11161847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 11261847f8eSopenharmony_ci * 11361847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 11461847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 11561847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 11661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 11761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 11861847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 11961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 12061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 12161847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 12261847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 12361847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 12461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 12561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 12661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 12761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 12861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 12961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 13061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 13161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 13261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 13361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 13461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 13561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 13661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 13761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 13861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 13961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 14061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 14161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 14261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 14361847f8eSopenharmony_ci * @systemapi 14461847f8eSopenharmony_ci * @since 10 14561847f8eSopenharmony_ci */ 14661847f8eSopenharmony_ci /** 14761847f8eSopenharmony_ci * Install HAPs for an application. 14861847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 14961847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 15061847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 15161847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 15261847f8eSopenharmony_ci * 15361847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 15461847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 15561847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 15661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 15761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 15861847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 15961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 16061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 16161847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 16261847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 16361847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 16461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 16561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 16661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 16761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 16861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 16961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 17061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 17161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 17261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 17361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 17461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 17561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 17661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 17761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 17861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 17961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 18061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 18161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 18261847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 18361847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 18461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 18561847f8eSopenharmony_ci * @systemapi 18661847f8eSopenharmony_ci * @since 11 18761847f8eSopenharmony_ci */ 18861847f8eSopenharmony_ci /** 18961847f8eSopenharmony_ci * Install HAPs for an application. 19061847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 19161847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 19261847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 19361847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 19461847f8eSopenharmony_ci * 19561847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 19661847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 19761847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 19861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 19961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 20061847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 20161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 20261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 20361847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 20461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 20561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 20661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 20761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 20861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 20961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 21061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 21161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 21261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 21361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 21461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 21561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 21661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 21761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 21861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 21961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 22061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 22161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 22261847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 22361847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 22461847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled. 22561847f8eSopenharmony_ci * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed. 22661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 22761847f8eSopenharmony_ci * @systemapi 22861847f8eSopenharmony_ci * @since 12 22961847f8eSopenharmony_ci */ 23061847f8eSopenharmony_ci /** 23161847f8eSopenharmony_ci * Install HAPs for an application. 23261847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 23361847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 23461847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 23561847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 23661847f8eSopenharmony_ci * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_BUNDLE. 23761847f8eSopenharmony_ci * 23861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 23961847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 24061847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 24161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 24261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 24361847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 24461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 24561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 24661847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 24761847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 24861847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 24961847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 25061847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 25161847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 25261847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 25361847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 25461847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 25561847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 25661847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 25761847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 25861847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 25961847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 26061847f8eSopenharmony_ci * (required APL: system_basic or system_core). 26161847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 26261847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 26361847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 26461847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 26561847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 26661847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 26761847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled. 26861847f8eSopenharmony_ci * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed. 26961847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 27061847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 27161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 27261847f8eSopenharmony_ci * @systemapi 27361847f8eSopenharmony_ci * @since 13 27461847f8eSopenharmony_ci */ 27561847f8eSopenharmony_ci install(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void; 27661847f8eSopenharmony_ci 27761847f8eSopenharmony_ci /** 27861847f8eSopenharmony_ci * Install haps for an application. 27961847f8eSopenharmony_ci * 28061847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE 28161847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored. 28261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing haps result. 28361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. 28461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 28561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 28661847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 28761847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 28861847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 28961847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 29061847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 29161847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 29261847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 29361847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 29461847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 29561847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 29661847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 29761847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 29861847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 29961847f8eSopenharmony_ci * (required APL: system_basic or system_core). 30061847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 30161847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 30261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 30361847f8eSopenharmony_ci * @systemapi 30461847f8eSopenharmony_ci * @since 9 30561847f8eSopenharmony_ci */ 30661847f8eSopenharmony_ci /** 30761847f8eSopenharmony_ci * Install HAPs for an application. 30861847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 30961847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 31061847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 31161847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 31261847f8eSopenharmony_ci * 31361847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 31461847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 31561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 31661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 31761847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 31861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 31961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 32061847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 32161847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 32261847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 32361847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 32461847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 32561847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 32661847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 32761847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 32861847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 32961847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 33061847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 33161847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 33261847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 33361847f8eSopenharmony_ci * (required APL: system_basic or system_core). 33461847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 33561847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 33661847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 33761847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 33861847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 33961847f8eSopenharmony_ci * @systemapi 34061847f8eSopenharmony_ci * @since 10 34161847f8eSopenharmony_ci */ 34261847f8eSopenharmony_ci /** 34361847f8eSopenharmony_ci * Install HAPs for an application. 34461847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 34561847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 34661847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 34761847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 34861847f8eSopenharmony_ci * 34961847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 35061847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 35161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 35261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 35361847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 35461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 35561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 35661847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 35761847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 35861847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 35961847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 36061847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 36161847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 36261847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 36361847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 36461847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 36561847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 36661847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 36761847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 36861847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 36961847f8eSopenharmony_ci * (required APL: system_basic or system_core). 37061847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 37161847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 37261847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 37361847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 37461847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 37561847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 37661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 37761847f8eSopenharmony_ci * @systemapi 37861847f8eSopenharmony_ci * @since 11 37961847f8eSopenharmony_ci */ 38061847f8eSopenharmony_ci /** 38161847f8eSopenharmony_ci * Install HAPs for an application. 38261847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 38361847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 38461847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 38561847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 38661847f8eSopenharmony_ci * 38761847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 38861847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 38961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 39061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 39161847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 39261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 39361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 39461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 39561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 39661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 39761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 39861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 39961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 40061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 40161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 40261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 40361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 40461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 40561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 40661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 40761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 40861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 40961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 41061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 41161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 41261847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 41361847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 41461847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled. 41561847f8eSopenharmony_ci * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed. 41661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 41761847f8eSopenharmony_ci * @systemapi 41861847f8eSopenharmony_ci * @since 12 41961847f8eSopenharmony_ci */ 42061847f8eSopenharmony_ci /** 42161847f8eSopenharmony_ci * Install HAPs for an application. 42261847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 42361847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 42461847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 42561847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 42661847f8eSopenharmony_ci * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_BUNDLE. 42761847f8eSopenharmony_ci * 42861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 42961847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 43061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of installing HAPs result. 43161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 43261847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 43361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 43461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 43561847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 43661847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 43761847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 43861847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 43961847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 44061847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 44161847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 44261847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 44361847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 44461847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 44561847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 44661847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 44761847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 44861847f8eSopenharmony_ci * (required APL: system_basic or system_core). 44961847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 45061847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 45161847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 45261847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 45361847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 45461847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 45561847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled. 45661847f8eSopenharmony_ci * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed. 45761847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 45861847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 45961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 46061847f8eSopenharmony_ci * @systemapi 46161847f8eSopenharmony_ci * @since 13 46261847f8eSopenharmony_ci */ 46361847f8eSopenharmony_ci install(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void; 46461847f8eSopenharmony_ci 46561847f8eSopenharmony_ci /** 46661847f8eSopenharmony_ci * Install haps for an application. 46761847f8eSopenharmony_ci * 46861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE 46961847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored. 47061847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 47161847f8eSopenharmony_ci * @returns { Promise<void> } 47261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. 47361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 47461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 47561847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 47661847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 47761847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 47861847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 47961847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 48061847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 48161847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 48261847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 48361847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 48461847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 48561847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 48661847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 48761847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 48861847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 48961847f8eSopenharmony_ci * (required APL: system_basic or system_core). 49061847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 49161847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 49261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 49361847f8eSopenharmony_ci * @systemapi 49461847f8eSopenharmony_ci * @since 9 49561847f8eSopenharmony_ci */ 49661847f8eSopenharmony_ci /** 49761847f8eSopenharmony_ci * Install haps for an application. 49861847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 49961847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 50061847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 50161847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 50261847f8eSopenharmony_ci * 50361847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 50461847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 50561847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 50661847f8eSopenharmony_ci * @returns { Promise<void> } 50761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 50861847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 50961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 51061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 51161847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 51261847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 51361847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 51461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 51561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 51661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 51761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 51861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 51961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 52061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 52161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 52261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 52361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 52461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 52561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 52661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 52761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 52861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 52961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 53061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 53161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 53261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 53361847f8eSopenharmony_ci * @systemapi 53461847f8eSopenharmony_ci * @since 10 53561847f8eSopenharmony_ci */ 53661847f8eSopenharmony_ci /** 53761847f8eSopenharmony_ci * Install haps for an application. 53861847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 53961847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 54061847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 54161847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 54261847f8eSopenharmony_ci * 54361847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 54461847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 54561847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 54661847f8eSopenharmony_ci * @returns { Promise<void> } 54761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 54861847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 54961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 55061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 55161847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 55261847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 55361847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 55461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 55561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 55661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 55761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 55861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 55961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 56061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 56161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 56261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 56361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 56461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 56561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 56661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 56761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 56861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 56961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 57061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 57161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 57261847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 57361847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 57461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 57561847f8eSopenharmony_ci * @systemapi 57661847f8eSopenharmony_ci * @since 11 57761847f8eSopenharmony_ci */ 57861847f8eSopenharmony_ci /** 57961847f8eSopenharmony_ci * Install haps for an application. 58061847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 58161847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 58261847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 58361847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 58461847f8eSopenharmony_ci * 58561847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 58661847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 58761847f8eSopenharmony_ci * @param { InstallParam } [installParam] - Indicates other parameters required for the installation. 58861847f8eSopenharmony_ci * @returns { Promise<void> } 58961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 59061847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 59161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 59261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 59361847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 59461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 59561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 59661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 59761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 59861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 59961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 60061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 60161847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 60261847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 60361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 60461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 60561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 60661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 60761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 60861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 60961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 61061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 61161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 61261847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 61361847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 61461847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled. 61561847f8eSopenharmony_ci * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed. 61661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 61761847f8eSopenharmony_ci * @systemapi 61861847f8eSopenharmony_ci * @since 12 61961847f8eSopenharmony_ci */ 62061847f8eSopenharmony_ci /** 62161847f8eSopenharmony_ci * Install haps for an application. 62261847f8eSopenharmony_ci * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE. 62361847f8eSopenharmony_ci * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE. 62461847f8eSopenharmony_ci * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE. 62561847f8eSopenharmony_ci * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. 62661847f8eSopenharmony_ci * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_BUNDLE. 62761847f8eSopenharmony_ci * 62861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE 62961847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 63061847f8eSopenharmony_ci * @param { InstallParam } [installParam] - Indicates other parameters required for the installation. 63161847f8eSopenharmony_ci * @returns { Promise<void> } 63261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or 63361847f8eSopenharmony_ci * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'. 63461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 63561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 63661847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 63761847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 63861847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 63961847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 64061847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 64161847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 64261847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 64361847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 64461847f8eSopenharmony_ci * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed. 64561847f8eSopenharmony_ci * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions. 64661847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 64761847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 64861847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 64961847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 65061847f8eSopenharmony_ci * (required APL: system_basic or system_core). 65161847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 65261847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 65361847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 65461847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 65561847f8eSopenharmony_ci * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode. 65661847f8eSopenharmony_ci * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions. 65761847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled. 65861847f8eSopenharmony_ci * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed. 65961847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 66061847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 66161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 66261847f8eSopenharmony_ci * @systemapi 66361847f8eSopenharmony_ci * @since 13 66461847f8eSopenharmony_ci */ 66561847f8eSopenharmony_ci install(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>; 66661847f8eSopenharmony_ci 66761847f8eSopenharmony_ci /** 66861847f8eSopenharmony_ci * Uninstall an application. 66961847f8eSopenharmony_ci * 67061847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 67161847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 67261847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 67361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling application result. 67461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'. 67561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 67661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 67761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 67861847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 67961847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled. 68061847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled. 68161847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall. 68261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 68361847f8eSopenharmony_ci * @systemapi 68461847f8eSopenharmony_ci * @since 9 68561847f8eSopenharmony_ci */ 68661847f8eSopenharmony_ci /** 68761847f8eSopenharmony_ci * Uninstall an application. 68861847f8eSopenharmony_ci * 68961847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 69061847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 69161847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 69261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling application result. 69361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 69461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 69561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 69661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 69761847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 69861847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 69961847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled. 70061847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management. 70161847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 70261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 70361847f8eSopenharmony_ci * @systemapi 70461847f8eSopenharmony_ci * @since 12 70561847f8eSopenharmony_ci */ 70661847f8eSopenharmony_ci /** 70761847f8eSopenharmony_ci * Uninstall an application. 70861847f8eSopenharmony_ci * 70961847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 71061847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 71161847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 71261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling application result. 71361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 71461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 71561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 71661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 71761847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 71861847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 71961847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled. 72061847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management. 72161847f8eSopenharmony_ci * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled. 72261847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 72361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 72461847f8eSopenharmony_ci * @systemapi 72561847f8eSopenharmony_ci * @since 13 72661847f8eSopenharmony_ci */ 72761847f8eSopenharmony_ci uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void; 72861847f8eSopenharmony_ci 72961847f8eSopenharmony_ci /** 73061847f8eSopenharmony_ci * Uninstall an application. 73161847f8eSopenharmony_ci * 73261847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 73361847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 73461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling application result. 73561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'. 73661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 73761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 73861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 73961847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled. 74061847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled. 74161847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall. 74261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 74361847f8eSopenharmony_ci * @systemapi 74461847f8eSopenharmony_ci * @since 9 74561847f8eSopenharmony_ci */ 74661847f8eSopenharmony_ci /** 74761847f8eSopenharmony_ci * Uninstall an application. 74861847f8eSopenharmony_ci * 74961847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 75061847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 75161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling application result. 75261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 75361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 75461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 75561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 75661847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 75761847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled. 75861847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management. 75961847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 76061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 76161847f8eSopenharmony_ci * @systemapi 76261847f8eSopenharmony_ci * @since 12 76361847f8eSopenharmony_ci */ 76461847f8eSopenharmony_ci /** 76561847f8eSopenharmony_ci * Uninstall an application. 76661847f8eSopenharmony_ci * 76761847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 76861847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 76961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling application result. 77061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 77161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 77261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 77361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 77461847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 77561847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled. 77661847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management. 77761847f8eSopenharmony_ci * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled. 77861847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 77961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 78061847f8eSopenharmony_ci * @systemapi 78161847f8eSopenharmony_ci * @since 13 78261847f8eSopenharmony_ci */ 78361847f8eSopenharmony_ci uninstall(bundleName: string, callback: AsyncCallback<void>): void; 78461847f8eSopenharmony_ci 78561847f8eSopenharmony_ci /** 78661847f8eSopenharmony_ci * Uninstall an application. 78761847f8eSopenharmony_ci * 78861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 78961847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 79061847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 79161847f8eSopenharmony_ci * @returns { Promise<void> } 79261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'. 79361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 79461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 79561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 79661847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 79761847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled. 79861847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled. 79961847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall. 80061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 80161847f8eSopenharmony_ci * @systemapi 80261847f8eSopenharmony_ci * @since 9 80361847f8eSopenharmony_ci */ 80461847f8eSopenharmony_ci /** 80561847f8eSopenharmony_ci * Uninstall an application. 80661847f8eSopenharmony_ci * 80761847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 80861847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 80961847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 81061847f8eSopenharmony_ci * @returns { Promise<void> } 81161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 81261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 81361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 81461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 81561847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 81661847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 81761847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled. 81861847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management. 81961847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 82061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 82161847f8eSopenharmony_ci * @systemapi 82261847f8eSopenharmony_ci * @since 12 82361847f8eSopenharmony_ci */ 82461847f8eSopenharmony_ci /** 82561847f8eSopenharmony_ci * Uninstall an application. 82661847f8eSopenharmony_ci * 82761847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 82861847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. 82961847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 83061847f8eSopenharmony_ci * @returns { Promise<void> } 83161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 83261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 83361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 83461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 83561847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 83661847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 83761847f8eSopenharmony_ci * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled. 83861847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management. 83961847f8eSopenharmony_ci * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled. 84061847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 84161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 84261847f8eSopenharmony_ci * @systemapi 84361847f8eSopenharmony_ci * @since 13 84461847f8eSopenharmony_ci */ 84561847f8eSopenharmony_ci uninstall(bundleName: string, installParam?: InstallParam): Promise<void>; 84661847f8eSopenharmony_ci 84761847f8eSopenharmony_ci /** 84861847f8eSopenharmony_ci * Recover an application. 84961847f8eSopenharmony_ci * 85061847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE 85161847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be recovered. 85261847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the recover. 85361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of recovering application result. 85461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'. 85561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 85661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 85761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 85861847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 85961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 86061847f8eSopenharmony_ci * @systemapi 86161847f8eSopenharmony_ci * @since 9 86261847f8eSopenharmony_ci */ 86361847f8eSopenharmony_ci /** 86461847f8eSopenharmony_ci * Recover an application. 86561847f8eSopenharmony_ci * 86661847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE 86761847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be recovered. 86861847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the recover. 86961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of recovering application result. 87061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'. 87161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 87261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 87361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 87461847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 87561847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited 87661847f8eSopenharmony_ci * <br>from being installed on this device or by specified users. 87761847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 87861847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 87961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 88061847f8eSopenharmony_ci * @systemapi 88161847f8eSopenharmony_ci * @since 13 88261847f8eSopenharmony_ci */ 88361847f8eSopenharmony_ci recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void; 88461847f8eSopenharmony_ci 88561847f8eSopenharmony_ci /** 88661847f8eSopenharmony_ci * Recover an application. 88761847f8eSopenharmony_ci * 88861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE 88961847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be recovered. 89061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of recovering application result. 89161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'. 89261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 89361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 89461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 89561847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 89661847f8eSopenharmony_ci * @systemapi 89761847f8eSopenharmony_ci * @since 9 89861847f8eSopenharmony_ci */ 89961847f8eSopenharmony_ci /** 90061847f8eSopenharmony_ci * Recover an application. 90161847f8eSopenharmony_ci * 90261847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE 90361847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be recovered. 90461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of recovering application result. 90561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'. 90661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 90761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 90861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 90961847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited 91061847f8eSopenharmony_ci * <br>from being installed on this device or by specified users. 91161847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 91261847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 91361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 91461847f8eSopenharmony_ci * @systemapi 91561847f8eSopenharmony_ci * @since 13 91661847f8eSopenharmony_ci */ 91761847f8eSopenharmony_ci recover(bundleName: string, callback: AsyncCallback<void>): void; 91861847f8eSopenharmony_ci 91961847f8eSopenharmony_ci /** 92061847f8eSopenharmony_ci * Recover an application. 92161847f8eSopenharmony_ci * 92261847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE 92361847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be recovered. 92461847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the recover. 92561847f8eSopenharmony_ci * @returns { Promise<void> } 92661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'. 92761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 92861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 92961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 93061847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 93161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 93261847f8eSopenharmony_ci * @systemapi 93361847f8eSopenharmony_ci * @since 9 93461847f8eSopenharmony_ci */ 93561847f8eSopenharmony_ci /** 93661847f8eSopenharmony_ci * Recover an application. 93761847f8eSopenharmony_ci * 93861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE 93961847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be recovered. 94061847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the recover. 94161847f8eSopenharmony_ci * @returns { Promise<void> } 94261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'. 94361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 94461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 94561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 94661847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 94761847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited 94861847f8eSopenharmony_ci * <br>from being installed on this device or by specified users. 94961847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 95061847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 95161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 95261847f8eSopenharmony_ci * @systemapi 95361847f8eSopenharmony_ci * @since 13 95461847f8eSopenharmony_ci */ 95561847f8eSopenharmony_ci recover(bundleName: string, installParam?: InstallParam): Promise<void>; 95661847f8eSopenharmony_ci 95761847f8eSopenharmony_ci /** 95861847f8eSopenharmony_ci * Uninstall a shared bundle. 95961847f8eSopenharmony_ci * 96061847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 96161847f8eSopenharmony_ci * @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall. 96261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of uninstalling shared bundle result. 96361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 96461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 96561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 96661847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 96761847f8eSopenharmony_ci * @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications. 96861847f8eSopenharmony_ci * @throws { BusinessError } 17700038 - The specified shared bundle does not exist. 96961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 97061847f8eSopenharmony_ci * @systemapi 97161847f8eSopenharmony_ci * @since 10 97261847f8eSopenharmony_ci */ 97361847f8eSopenharmony_ci uninstall(uninstallParam: UninstallParam, callback: AsyncCallback<void>): void; 97461847f8eSopenharmony_ci 97561847f8eSopenharmony_ci /** 97661847f8eSopenharmony_ci * Uninstall a shared bundle. 97761847f8eSopenharmony_ci * 97861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 97961847f8eSopenharmony_ci * @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall. 98061847f8eSopenharmony_ci * @returns { Promise<void> } 98161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 98261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 98361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 98461847f8eSopenharmony_ci * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled. 98561847f8eSopenharmony_ci * @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications. 98661847f8eSopenharmony_ci * @throws { BusinessError } 17700038 - The specified shared bundle does not exist. 98761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 98861847f8eSopenharmony_ci * @systemapi 98961847f8eSopenharmony_ci * @since 10 99061847f8eSopenharmony_ci */ 99161847f8eSopenharmony_ci uninstall(uninstallParam: UninstallParam): Promise<void>; 99261847f8eSopenharmony_ci 99361847f8eSopenharmony_ci /** 99461847f8eSopenharmony_ci * Updates this enterprise application. 99561847f8eSopenharmony_ci * 99661847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_SELF_BUNDLE 99761847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 99861847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 99961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result. 100061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'. 100161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 100261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 100361847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 100461847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 100561847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 100661847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 100761847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 100861847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 100961847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 101061847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 101161847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 101261847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 101361847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 101461847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 101561847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 101661847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 101761847f8eSopenharmony_ci * (required APL: system_basic or system_core). 101861847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 101961847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 102061847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 102161847f8eSopenharmony_ci * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application. 102261847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 102361847f8eSopenharmony_ci * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. 102461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 102561847f8eSopenharmony_ci * @systemapi 102661847f8eSopenharmony_ci * @since 10 102761847f8eSopenharmony_ci */ 102861847f8eSopenharmony_ci /** 102961847f8eSopenharmony_ci * Updates this enterprise application. 103061847f8eSopenharmony_ci * 103161847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_SELF_BUNDLE 103261847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 103361847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 103461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result. 103561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'. 103661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 103761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 103861847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 103961847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 104061847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 104161847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 104261847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 104361847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 104461847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 104561847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 104661847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 104761847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 104861847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 104961847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 105061847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 105161847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 105261847f8eSopenharmony_ci * (required APL: system_basic or system_core). 105361847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 105461847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 105561847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 105661847f8eSopenharmony_ci * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application. 105761847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 105861847f8eSopenharmony_ci * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. 105961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 106061847f8eSopenharmony_ci * @systemapi 106161847f8eSopenharmony_ci * @since 12 106261847f8eSopenharmony_ci */ 106361847f8eSopenharmony_ci updateBundleForSelf(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void; 106461847f8eSopenharmony_ci 106561847f8eSopenharmony_ci /** 106661847f8eSopenharmony_ci * Updates this enterprise application. 106761847f8eSopenharmony_ci * 106861847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_SELF_BUNDLE 106961847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 107061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result. 107161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'. 107261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 107361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 107461847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 107561847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 107661847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 107761847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 107861847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 107961847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 108061847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 108161847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 108261847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 108361847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 108461847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 108561847f8eSopenharmony_ci * (required APL: system_basic or system_core). 108661847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 108761847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 108861847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 108961847f8eSopenharmony_ci * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application. 109061847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 109161847f8eSopenharmony_ci * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. 109261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 109361847f8eSopenharmony_ci * @systemapi 109461847f8eSopenharmony_ci * @since 10 109561847f8eSopenharmony_ci */ 109661847f8eSopenharmony_ci /** 109761847f8eSopenharmony_ci * Updates this enterprise application. 109861847f8eSopenharmony_ci * 109961847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_SELF_BUNDLE 110061847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 110161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result. 110261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'. 110361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 110461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 110561847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 110661847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 110761847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 110861847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 110961847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 111061847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 111161847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 111261847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 111361847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 111461847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 111561847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 111661847f8eSopenharmony_ci * (required APL: system_basic or system_core). 111761847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 111861847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 111961847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 112061847f8eSopenharmony_ci * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application. 112161847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 112261847f8eSopenharmony_ci * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. 112361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 112461847f8eSopenharmony_ci * @systemapi 112561847f8eSopenharmony_ci * @since 12 112661847f8eSopenharmony_ci */ 112761847f8eSopenharmony_ci updateBundleForSelf(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void; 112861847f8eSopenharmony_ci 112961847f8eSopenharmony_ci /** 113061847f8eSopenharmony_ci * Updates this enterprise application. 113161847f8eSopenharmony_ci * 113261847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_SELF_BUNDLE 113361847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 113461847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 113561847f8eSopenharmony_ci * @returns { Promise<void> } 113661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'. 113761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 113861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 113961847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 114061847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 114161847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 114261847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 114361847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 114461847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 114561847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 114661847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 114761847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 114861847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 114961847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 115061847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 115161847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 115261847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 115361847f8eSopenharmony_ci * (required APL: system_basic or system_core). 115461847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 115561847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 115661847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 115761847f8eSopenharmony_ci * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application. 115861847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 115961847f8eSopenharmony_ci * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. 116061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 116161847f8eSopenharmony_ci * @systemapi 116261847f8eSopenharmony_ci * @since 10 116361847f8eSopenharmony_ci */ 116461847f8eSopenharmony_ci /** 116561847f8eSopenharmony_ci * Updates this enterprise application. 116661847f8eSopenharmony_ci * 116761847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_SELF_BUNDLE 116861847f8eSopenharmony_ci * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored. 116961847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the installation. 117061847f8eSopenharmony_ci * @returns { Promise<void> } 117161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'. 117261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 117361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 117461847f8eSopenharmony_ci * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 117561847f8eSopenharmony_ci * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000. 117661847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The specified user ID is not found. 117761847f8eSopenharmony_ci * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. 117861847f8eSopenharmony_ci * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. 117961847f8eSopenharmony_ci * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. 118061847f8eSopenharmony_ci * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. 118161847f8eSopenharmony_ci * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. 118261847f8eSopenharmony_ci * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. 118361847f8eSopenharmony_ci * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist. 118461847f8eSopenharmony_ci * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths. 118561847f8eSopenharmony_ci * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install. 118661847f8eSopenharmony_ci * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy. 118761847f8eSopenharmony_ci * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy 118861847f8eSopenharmony_ci * (required APL: system_basic or system_core). 118961847f8eSopenharmony_ci * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported. 119061847f8eSopenharmony_ci * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode. 119161847f8eSopenharmony_ci * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed. 119261847f8eSopenharmony_ci * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application. 119361847f8eSopenharmony_ci * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device. 119461847f8eSopenharmony_ci * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. 119561847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 119661847f8eSopenharmony_ci * @systemapi 119761847f8eSopenharmony_ci * @since 12 119861847f8eSopenharmony_ci */ 119961847f8eSopenharmony_ci updateBundleForSelf(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>; 120061847f8eSopenharmony_ci 120161847f8eSopenharmony_ci /** 120261847f8eSopenharmony_ci * Uninstall updates for a pre-installed application. 120361847f8eSopenharmony_ci * 120461847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 120561847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates. 120661847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 120761847f8eSopenharmony_ci * @returns { Promise<void> } 120861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 120961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 121061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 121161847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 121261847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall. 121361847f8eSopenharmony_ci * @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed. 121461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 121561847f8eSopenharmony_ci * @systemapi 121661847f8eSopenharmony_ci * @since 12 121761847f8eSopenharmony_ci */ 121861847f8eSopenharmony_ci /** 121961847f8eSopenharmony_ci * Uninstall updates for a pre-installed application. 122061847f8eSopenharmony_ci * 122161847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 122261847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates. 122361847f8eSopenharmony_ci * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. 122461847f8eSopenharmony_ci * @returns { Promise<void> } 122561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. 122661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 122761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 122861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name is not found. 122961847f8eSopenharmony_ci * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall. 123061847f8eSopenharmony_ci * @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed. 123161847f8eSopenharmony_ci * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled. 123261847f8eSopenharmony_ci * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. 123361847f8eSopenharmony_ci * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same 123461847f8eSopenharmony_ci * <br>bundle name but different signature information exists on the device. 123561847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 123661847f8eSopenharmony_ci * @systemapi 123761847f8eSopenharmony_ci * @since 13 123861847f8eSopenharmony_ci */ 123961847f8eSopenharmony_ci uninstallUpdates(bundleName: string, installParam?: InstallParam): Promise<void>; 124061847f8eSopenharmony_ci 124161847f8eSopenharmony_ci /** 124261847f8eSopenharmony_ci * Add extend resources. 124361847f8eSopenharmony_ci * 124461847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE 124561847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundleName. 124661847f8eSopenharmony_ci * @param { Array<string> } filePaths - Indicates the file path for extend resources. 124761847f8eSopenharmony_ci * @returns { Promise<void> } Returns addExtResource result. 124861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 124961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 125061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 125161847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundleName is not found. 125261847f8eSopenharmony_ci * @throws { BusinessError } 17700301 - AddExtResource failed due to parse file failed. 125361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 125461847f8eSopenharmony_ci * @systemapi 125561847f8eSopenharmony_ci * @since 12 125661847f8eSopenharmony_ci */ 125761847f8eSopenharmony_ci addExtResource(bundleName: string, filePaths: Array<string>): Promise<void>; 125861847f8eSopenharmony_ci 125961847f8eSopenharmony_ci /** 126061847f8eSopenharmony_ci * Remove extend resources. 126161847f8eSopenharmony_ci * 126261847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE 126361847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundleName. 126461847f8eSopenharmony_ci * @param { Array<string> } moduleNames - Indicates the moduleNames for extend resources. 126561847f8eSopenharmony_ci * @returns { Promise<void> } Returns removeExtResource result. 126661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 126761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 126861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 126961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundleName is not found. 127061847f8eSopenharmony_ci * @throws { BusinessError } 17700302 - RemoveExtResource failed due to module does not exist. 127161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 127261847f8eSopenharmony_ci * @systemapi 127361847f8eSopenharmony_ci * @since 12 127461847f8eSopenharmony_ci */ 127561847f8eSopenharmony_ci removeExtResource(bundleName: string, moduleNames: Array<string>): Promise<void>; 127661847f8eSopenharmony_ci 127761847f8eSopenharmony_ci /** 127861847f8eSopenharmony_ci * Create clone instance for an application. 127961847f8eSopenharmony_ci * 128061847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_CLONE_BUNDLE 128161847f8eSopenharmony_ci * @param { string } bundleName - Indicates the path where the HAP of the application is stored. 128261847f8eSopenharmony_ci * @param { CreateAppCloneParam } [createAppCloneParam] Indicates the optional params of create clone app. 128361847f8eSopenharmony_ci * @returns { Promise<number> } Return the appIndex of the clone application. 128461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_CLONE_BUNDLE'. 128561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 128661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 128761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user. 128861847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The userId is invalid. 128961847f8eSopenharmony_ci * @throws { BusinessError } 17700061 - The appIndex is not in valid range or already exists. 129061847f8eSopenharmony_ci * @throws { BusinessError } 17700069 - The app does not support the creation of an appClone instance. 129161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 129261847f8eSopenharmony_ci * @systemapi 129361847f8eSopenharmony_ci * @since 12 129461847f8eSopenharmony_ci */ 129561847f8eSopenharmony_ci createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise<number>; 129661847f8eSopenharmony_ci 129761847f8eSopenharmony_ci /** 129861847f8eSopenharmony_ci * Destroy clone instance for an application. 129961847f8eSopenharmony_ci * 130061847f8eSopenharmony_ci * @permission ohos.permission.UNINSTALL_CLONE_BUNDLE 130161847f8eSopenharmony_ci * @param { string } bundleName - Indicates the path where the HAP of the application is stored. 130261847f8eSopenharmony_ci * @param { number } appIndex - Indicates the clone application's index. 130361847f8eSopenharmony_ci * @param { number } [userId] - userId Indicates the user ID. 130461847f8eSopenharmony_ci * @returns { Promise<void> } 130561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.UNINSTALL_CLONE_BUNDLE'. 130661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 130761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 130861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user. 130961847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The userId is invalid. 131061847f8eSopenharmony_ci * @throws { BusinessError } 17700061 - AppIndex not in valid range. 131161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 131261847f8eSopenharmony_ci * @systemapi 131361847f8eSopenharmony_ci * @since 12 131461847f8eSopenharmony_ci */ 131561847f8eSopenharmony_ci destroyAppClone(bundleName: string, appIndex: number, userId?: number): Promise<void>; 131661847f8eSopenharmony_ci 131761847f8eSopenharmony_ci /** 131861847f8eSopenharmony_ci * Install application by bundle name with specified user. 131961847f8eSopenharmony_ci * 132061847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE 132161847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of application. 132261847f8eSopenharmony_ci * @param { number } [userId] - userId Indicates the user ID. 132361847f8eSopenharmony_ci * @returns { Promise<void> } 132461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. 132561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 132661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 132761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user. 132861847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The userId is invalid. 132961847f8eSopenharmony_ci * @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle. 133061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 133161847f8eSopenharmony_ci * @systemapi 133261847f8eSopenharmony_ci * @since 12 133361847f8eSopenharmony_ci */ 133461847f8eSopenharmony_ci /** 133561847f8eSopenharmony_ci * Install application by bundle name with specified user. 133661847f8eSopenharmony_ci * 133761847f8eSopenharmony_ci * @permission ohos.permission.INSTALL_BUNDLE 133861847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of application. 133961847f8eSopenharmony_ci * @param { number } [userId] - userId Indicates the user ID. 134061847f8eSopenharmony_ci * @returns { Promise<void> } 134161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. 134261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. 134361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 134461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user. 134561847f8eSopenharmony_ci * @throws { BusinessError } 17700004 - The userId is invalid. 134661847f8eSopenharmony_ci * @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle. 134761847f8eSopenharmony_ci * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited 134861847f8eSopenharmony_ci * <br>from being installed on this device or by specified users. 134961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 135061847f8eSopenharmony_ci * @systemapi 135161847f8eSopenharmony_ci * @since 13 135261847f8eSopenharmony_ci */ 135361847f8eSopenharmony_ci installPreexistingApp(bundleName: string, userId?: number): Promise<void>; 135461847f8eSopenharmony_ci } 135561847f8eSopenharmony_ci 135661847f8eSopenharmony_ci /** 135761847f8eSopenharmony_ci * Provides parameters required for hashParam. 135861847f8eSopenharmony_ci * 135961847f8eSopenharmony_ci * @typedef HashParam 136061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 136161847f8eSopenharmony_ci * @systemapi 136261847f8eSopenharmony_ci * @since 9 136361847f8eSopenharmony_ci */ 136461847f8eSopenharmony_ci export interface HashParam { 136561847f8eSopenharmony_ci /** 136661847f8eSopenharmony_ci * Indicates the moduleName 136761847f8eSopenharmony_ci * 136861847f8eSopenharmony_ci * @type { string } 136961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 137061847f8eSopenharmony_ci * @systemapi 137161847f8eSopenharmony_ci * @since 9 137261847f8eSopenharmony_ci */ 137361847f8eSopenharmony_ci moduleName: string; 137461847f8eSopenharmony_ci 137561847f8eSopenharmony_ci /** 137661847f8eSopenharmony_ci * Indicates the hash value 137761847f8eSopenharmony_ci * 137861847f8eSopenharmony_ci * @type { string } 137961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 138061847f8eSopenharmony_ci * @systemapi 138161847f8eSopenharmony_ci * @since 9 138261847f8eSopenharmony_ci */ 138361847f8eSopenharmony_ci hashValue: string; 138461847f8eSopenharmony_ci } 138561847f8eSopenharmony_ci 138661847f8eSopenharmony_ci /** 138761847f8eSopenharmony_ci * Provides parameters required for VerifyCodeParam. 138861847f8eSopenharmony_ci * 138961847f8eSopenharmony_ci * @typedef VerifyCodeParam 139061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 139161847f8eSopenharmony_ci * @systemapi 139261847f8eSopenharmony_ci * @since 10 139361847f8eSopenharmony_ci * @deprecated since 11 139461847f8eSopenharmony_ci */ 139561847f8eSopenharmony_ci export interface VerifyCodeParam { 139661847f8eSopenharmony_ci /** 139761847f8eSopenharmony_ci * Indicates the moduleName which hopes to be processed with code signature. 139861847f8eSopenharmony_ci * 139961847f8eSopenharmony_ci * @type { string } 140061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 140161847f8eSopenharmony_ci * @systemapi 140261847f8eSopenharmony_ci * @since 10 140361847f8eSopenharmony_ci * @deprecated since 11 140461847f8eSopenharmony_ci */ 140561847f8eSopenharmony_ci moduleName: string; 140661847f8eSopenharmony_ci 140761847f8eSopenharmony_ci /** 140861847f8eSopenharmony_ci * Indicates the path where the code signature file of the corresponding HAP is stored. 140961847f8eSopenharmony_ci * 141061847f8eSopenharmony_ci * @type { string } 141161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 141261847f8eSopenharmony_ci * @systemapi 141361847f8eSopenharmony_ci * @since 10 141461847f8eSopenharmony_ci * @deprecated since 11 141561847f8eSopenharmony_ci */ 141661847f8eSopenharmony_ci signatureFilePath: string; 141761847f8eSopenharmony_ci } 141861847f8eSopenharmony_ci 141961847f8eSopenharmony_ci /** 142061847f8eSopenharmony_ci * Provides parameters required for PGOParam. 142161847f8eSopenharmony_ci * 142261847f8eSopenharmony_ci * @typedef PGOParam 142361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 142461847f8eSopenharmony_ci * @systemapi 142561847f8eSopenharmony_ci * @since 11 142661847f8eSopenharmony_ci */ 142761847f8eSopenharmony_ci export interface PGOParam { 142861847f8eSopenharmony_ci /** 142961847f8eSopenharmony_ci * Indicates the moduleName that need to store profile-guided optimization(PGO) file. 143061847f8eSopenharmony_ci * 143161847f8eSopenharmony_ci * @type { string } 143261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 143361847f8eSopenharmony_ci * @systemapi 143461847f8eSopenharmony_ci * @since 11 143561847f8eSopenharmony_ci */ 143661847f8eSopenharmony_ci moduleName: string; 143761847f8eSopenharmony_ci 143861847f8eSopenharmony_ci /** 143961847f8eSopenharmony_ci * Indicates the path where the profile-guided optimization(PGO) file is stored. 144061847f8eSopenharmony_ci * 144161847f8eSopenharmony_ci * @type { string } 144261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 144361847f8eSopenharmony_ci * @systemapi 144461847f8eSopenharmony_ci * @since 11 144561847f8eSopenharmony_ci */ 144661847f8eSopenharmony_ci pgoFilePath: string; 144761847f8eSopenharmony_ci } 144861847f8eSopenharmony_ci 144961847f8eSopenharmony_ci /** 145061847f8eSopenharmony_ci * Provides parameters required for installing or uninstalling an application. 145161847f8eSopenharmony_ci * 145261847f8eSopenharmony_ci * @typedef InstallParam 145361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 145461847f8eSopenharmony_ci * @systemapi 145561847f8eSopenharmony_ci * @since 9 145661847f8eSopenharmony_ci */ 145761847f8eSopenharmony_ci export interface InstallParam { 145861847f8eSopenharmony_ci /** 145961847f8eSopenharmony_ci * Indicates the user id 146061847f8eSopenharmony_ci * 146161847f8eSopenharmony_ci * @type { ?number } 146261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 146361847f8eSopenharmony_ci * @systemapi 146461847f8eSopenharmony_ci * @since 9 146561847f8eSopenharmony_ci */ 146661847f8eSopenharmony_ci userId?: number; 146761847f8eSopenharmony_ci 146861847f8eSopenharmony_ci /** 146961847f8eSopenharmony_ci * Indicates the installation type. The value 0x00 means normal installation, 0x01 means overwrite installation, and 0x10 means installation-free. 147061847f8eSopenharmony_ci * 147161847f8eSopenharmony_ci * @type { ?number } 147261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 147361847f8eSopenharmony_ci * @systemapi 147461847f8eSopenharmony_ci * @since 9 147561847f8eSopenharmony_ci */ 147661847f8eSopenharmony_ci installFlag?: number; 147761847f8eSopenharmony_ci 147861847f8eSopenharmony_ci /** 147961847f8eSopenharmony_ci * Indicates whether the param has data 148061847f8eSopenharmony_ci * 148161847f8eSopenharmony_ci * @type { ?boolean } 148261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 148361847f8eSopenharmony_ci * @systemapi 148461847f8eSopenharmony_ci * @since 9 148561847f8eSopenharmony_ci */ 148661847f8eSopenharmony_ci isKeepData?: boolean; 148761847f8eSopenharmony_ci 148861847f8eSopenharmony_ci /** 148961847f8eSopenharmony_ci * Indicates the hash params 149061847f8eSopenharmony_ci * 149161847f8eSopenharmony_ci * @type { ?Array<HashParam> } 149261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 149361847f8eSopenharmony_ci * @systemapi 149461847f8eSopenharmony_ci * @since 9 149561847f8eSopenharmony_ci */ 149661847f8eSopenharmony_ci hashParams?: Array<HashParam>; 149761847f8eSopenharmony_ci 149861847f8eSopenharmony_ci /** 149961847f8eSopenharmony_ci * Indicates the deadline of the crowdtesting bundle 150061847f8eSopenharmony_ci * 150161847f8eSopenharmony_ci * @type { ?number } 150261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 150361847f8eSopenharmony_ci * @systemapi 150461847f8eSopenharmony_ci * @since 9 150561847f8eSopenharmony_ci */ 150661847f8eSopenharmony_ci crowdtestDeadline?: number; 150761847f8eSopenharmony_ci 150861847f8eSopenharmony_ci /** 150961847f8eSopenharmony_ci * Indicates the shared bundle dir paths. 151061847f8eSopenharmony_ci * 151161847f8eSopenharmony_ci * @type { ?Array<String> } 151261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 151361847f8eSopenharmony_ci * @systemapi 151461847f8eSopenharmony_ci * @since 10 151561847f8eSopenharmony_ci */ 151661847f8eSopenharmony_ci sharedBundleDirPaths?: Array<String>; 151761847f8eSopenharmony_ci 151861847f8eSopenharmony_ci /** 151961847f8eSopenharmony_ci * Indicates the distribution type specified during bundle installation. 152061847f8eSopenharmony_ci * 152161847f8eSopenharmony_ci * @type { ?string } 152261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 152361847f8eSopenharmony_ci * @systemapi 152461847f8eSopenharmony_ci * @since 10 152561847f8eSopenharmony_ci */ 152661847f8eSopenharmony_ci specifiedDistributionType?: string; 152761847f8eSopenharmony_ci 152861847f8eSopenharmony_ci /** 152961847f8eSopenharmony_ci * Indicates the additional information during bundle installation. 153061847f8eSopenharmony_ci * 153161847f8eSopenharmony_ci * @type { ?string } 153261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 153361847f8eSopenharmony_ci * @systemapi 153461847f8eSopenharmony_ci * @since 10 153561847f8eSopenharmony_ci */ 153661847f8eSopenharmony_ci additionalInfo?: string; 153761847f8eSopenharmony_ci 153861847f8eSopenharmony_ci /** 153961847f8eSopenharmony_ci * Indicates the verification code param. 154061847f8eSopenharmony_ci * 154161847f8eSopenharmony_ci * @type { ?Array<VerifyCodeParam> } 154261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 154361847f8eSopenharmony_ci * @systemapi 154461847f8eSopenharmony_ci * @since 10 154561847f8eSopenharmony_ci * @deprecated since 11 154661847f8eSopenharmony_ci */ 154761847f8eSopenharmony_ci verifyCodeParams?: Array<VerifyCodeParam>; 154861847f8eSopenharmony_ci 154961847f8eSopenharmony_ci /** 155061847f8eSopenharmony_ci * Indicates the profile-guided optimization(PGO) params. 155161847f8eSopenharmony_ci * 155261847f8eSopenharmony_ci * @type { ?Array<PGOParam> } 155361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 155461847f8eSopenharmony_ci * @systemapi 155561847f8eSopenharmony_ci * @since 11 155661847f8eSopenharmony_ci */ 155761847f8eSopenharmony_ci pgoParams?: Array<PGOParam>; 155861847f8eSopenharmony_ci } 155961847f8eSopenharmony_ci 156061847f8eSopenharmony_ci /** 156161847f8eSopenharmony_ci * Provides parameters required for uninstalling shared bundle. 156261847f8eSopenharmony_ci * 156361847f8eSopenharmony_ci * @typedef UninstallParam 156461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 156561847f8eSopenharmony_ci * @systemapi 156661847f8eSopenharmony_ci * @since 10 156761847f8eSopenharmony_ci */ 156861847f8eSopenharmony_ci export interface UninstallParam { 156961847f8eSopenharmony_ci /** 157061847f8eSopenharmony_ci * Indicates the shared bundle name 157161847f8eSopenharmony_ci * 157261847f8eSopenharmony_ci * @type { string } 157361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 157461847f8eSopenharmony_ci * @systemapi 157561847f8eSopenharmony_ci * @since 10 157661847f8eSopenharmony_ci */ 157761847f8eSopenharmony_ci bundleName: string; 157861847f8eSopenharmony_ci 157961847f8eSopenharmony_ci /** 158061847f8eSopenharmony_ci * Indicates the shared version code. If default, indicates that all version sharing bundles are uninstalled 158161847f8eSopenharmony_ci * 158261847f8eSopenharmony_ci * @type { ?number } 158361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 158461847f8eSopenharmony_ci * @systemapi 158561847f8eSopenharmony_ci * @since 10 158661847f8eSopenharmony_ci */ 158761847f8eSopenharmony_ci versionCode?: number; 158861847f8eSopenharmony_ci } 158961847f8eSopenharmony_ci 159061847f8eSopenharmony_ci /** 159161847f8eSopenharmony_ci * Provides parameters required for creating clone app. 159261847f8eSopenharmony_ci * 159361847f8eSopenharmony_ci * @typedef CreateAppCloneParam 159461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 159561847f8eSopenharmony_ci * @systemapi 159661847f8eSopenharmony_ci * @since 12 159761847f8eSopenharmony_ci */ 159861847f8eSopenharmony_ci export interface CreateAppCloneParam { 159961847f8eSopenharmony_ci /** 160061847f8eSopenharmony_ci * Indicates the user id 160161847f8eSopenharmony_ci * 160261847f8eSopenharmony_ci * @type { ?number } 160361847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 160461847f8eSopenharmony_ci * @systemapi 160561847f8eSopenharmony_ci * @since 12 160661847f8eSopenharmony_ci */ 160761847f8eSopenharmony_ci userId?: number; 160861847f8eSopenharmony_ci /** 160961847f8eSopenharmony_ci * Indicates the appIndex of MultiApp 161061847f8eSopenharmony_ci * 161161847f8eSopenharmony_ci * @type { ?number } 161261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.Core 161361847f8eSopenharmony_ci * @systemapi 161461847f8eSopenharmony_ci * @since 12 161561847f8eSopenharmony_ci */ 161661847f8eSopenharmony_ci appIndex?: number; 161761847f8eSopenharmony_ci } 161861847f8eSopenharmony_ci} 161961847f8eSopenharmony_ci 162061847f8eSopenharmony_ciexport default installer; 1621