1# EDM 2 3 4Enterprise Device Manager (EDM) provides debugging and testing capabilities for device management applications. For example, it can be used to enable or disable extended enterprise device management capabilities. 5 6> **NOTE** 7> 8> Before using this tool, you must obtain the <!--Del-->[<!--DelEnd-->hdc tool<!--Del-->](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md)<!--DelEnd--> and run the **hdc shell** command. 9 10 11## help 12 Displays help information of EDM. 13 14 **Return value** 15 16 Returns the help information. 17 18 **Method** 19 20 21 ```bash 22 edm help 23 ``` 24 25 26## enable-admin 27Enables the extended enterprise device management capabilities of a component. The target component must be an [EnterpriseAdminExtensionAbility](../mdm/mdm-kit-admin.md). 28 29| Parameter| Description | 30| -------- |-------------------| 31| -h/--help | Help information. | 32| -n/--bundle-name | Bundle name. This parameter is mandatory.| 33| -a/--ability-name | Ability name. This parameter is mandatory.| 34 35 **Return value** 36 37Returns "enable-admin success." if the component is enabled; returns "error: xxx" and the corresponding error information otherwise. 38 39| Return value | Description | 40| ------------------------------------------------------------ | ------------------------------------------------------------ | 41| enable-admin success. | The component is enabled. | 42| error: command requires option. | **bundleName** and **abilityName** are not passed in. | 43| error: -n, --bundle-name option requires an argument. | The input value of **bundleName** is empty. | 44| error: -a, --ability-name option requires an argument. | The input value of **abilityName** is empty. | 45| error: unknown option. | An unknown parameter is passed in. | 46| error: -n <bundle-name> is expected. | **bundleName** is not passed in. | 47| error: -a <ability-name> is expected. | **abilityName** is not passed in. | 48| error: the administrator ability component is invalid. | The input value of **bundleName** or **abilityName** is incorrect, or the component is not an EnterpriseAdminExtensionAbility. | 49| error: failed to enable the administrator application of the device. | The component fails to be enabled. | 50 51 **Method** 52 53 54 ```bash 55 edm enable-admin -n <bundleName> -a <abilityName> 56 ``` 57 58 **Example** 59 60```bash 61# Enable the EnterpriseAdminExtensionAbility whose bundle name is com.example.mdmsample and class name is EnterpriseAdminAbility. 62edm enable-admin -n com.example.mdmsample -a com.example.mdmsample.EnterpriseAdminAbility 63``` 64 65 66## disable-admin 67Disables the extended enterprise device management capabilities of a component. The target component must be an [EnterpriseAdminExtensionAbility](../mdm/mdm-kit-admin.md). 68 69| Parameter | Description | 70| ---------------- | ---------------------- | 71| -h/--help | Help information. | 72| -n/--bundle-name | Bundle name. This parameter is mandatory.| 73 74 **Return value** 75 76Returns "disable-admin success." if the component is disabled; returns "error: xxx" and the corresponding error information otherwise. 77 78| Return value | Description | 79| ------------------------------------------------------------ | ---------------------- | 80| disable-admin success. | The component is disabled. | 81| error: command requires option. | **bundleName** is not passed in. | 82| error: -n, --bundle-name option requires an argument. | The input value of **bundleName** is empty.| 83| error: unknown option. | An unknown parameter is passed in. | 84| error: -n <bundle-name> is expected. | **bundleName** is not passed in. | 85| error: failed to disable the administrator application of the device. | The component fails to be disabled. | 86 87 **Method** 88 89 90 ```bash 91 edm disable-admin -n <bundleName> 92 ``` 93 94 **Example** 95 96 97 ```bash 98# Disable the EnterpriseAdminExtensionAbility whose bundle name is com.example.mdmsample. 99edm disable-admin -n com.example.mdmsample 100 ``` 101