Before running and debugging the OpenHarmony app on a real device, you need to sign the app. This section describes how to configure the signature of an OpenHarmony app. Operation instructions are the same in _HUAWEI DevEco Studio User Guide_ except this section. For details, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387). See the following figure for the process of configuring app signature information.
-[Generating an App Certificate](#section136609429562)
-[Generating the App Profile](#section2048641015325)
Before running and debugging the OpenHarmony app on a real device, you need to sign the app. This section describes how to configure the signature of an OpenHarmony app. Operation instructions are the same in _HUAWEI DevEco Studio User Guide_ except this section. For details, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387). See the following figure for the process of configuring app signature information.
## Generating a Key Store and CSR<a name="section153146467405"></a>
## Generating a Key Store and CSR
OpenHarmony uses digital certificates \(.cer\) and **Profile** files \(.p7b\) to ensure app integrity. Before applying for these files, you need to generate a key store \(.p12\) and a certificate signing request \(.csr\). You can do so in DevEco Studio or a command-line tool.
OpenHarmony uses digital certificates (.cer) and **Profile** files (.p7b) to ensure app integrity. Before applying for these files, you need to generate a key store (.p12) and a certificate signing request (.csr). You can do so in DevEco Studio or a command-line tool.
### In DevEco Studio<a name="section1298903211472"></a>
1. On the menu bar, choose **Build**\>**Generate Key and CSR**.
>If you have a local key, click **Skip** in the **Generate Key** window and use the key to generate a CSR file.
1. On the menu bar, choose **Build**>**Generate Key and CSR**.
2. In **Key Store File**, click **Choose Existing** to select an existing key store \(.p12 file that contains a key\) or **New** to create one. The following describes how to create a key store.
> If you have a local key, click **Skip** in the **Generate Key** window and use the key to generate a CSR file.
2. In **Key Store File**, click **Choose Existing** to select an existing key store (.p12 file that contains a key) or **New** to create one. The following describes how to create a key store.
3. In the **Create Key Store** dialog box, set the following parameters and click **OK**.
3. In the **Create Key Store** dialog box, set the following parameters and click **OK**.
-**Key Store File**: Select the path for storing the key store.
-**Password**: Set the key store password, which must contain at least 8 characters that include two types of the following: uppercase letters, lowercase letters, digits, and special characters. Do not lose the password as it will be used later in configuring the signature.
-**Confirm Password**: Enter the key store password again.
- **Key Store File**: Select the path for storing the key store.
- **Password**: Set the key store password, which must contain at least 8 characters that include two types of the following: uppercase letters, lowercase letters, digits, and special characters. Do not lose the password as it will be used later in configuring the signature.
- **Confirm Password**: Enter the key store password again.
4. In the **Generate Key** window, set the following parameters and click **Next**.
![](figures/en-us_image_0000001152674854.png)
-**Alias**: Enter the alias of the key, which is used to identify the key name. Do not lose the alias as it will be used later in configuring the signature.
-**Password**: password of the key, which is automatically filled in and the same as the keystore password.
-**Validity**: Specify the certificate validity period. A validity period of 25 years or longer is recommended to cover the entire lifecycle of your app/service.
-**Certificate**: Enter basic certificate information.
4. In the **Generate Key** window, set the following parameters and click **Next**.
5. In the **Generate CSR** window, select the key and set the storage path of the CSR file.
- **Alias**: Enter the alias of the key, which is used to identify the key name. Do not lose the alias as it will be used later in configuring the signature.
- **Password**: password of the key, which is automatically filled in and the same as the keystore password.
- **Validity**: Specify the certificate validity period. A validity period of 25 years or longer is recommended to cover the entire lifecycle of your app/service.
- **Certificate**: Enter basic certificate information.
6. Click **OK**. You can then obtain the generated keystore file (.p12) and CSR file (.csr) from the storage path.
3. Run the following command to generate a key store. This example creates a key store named **ide_demo_app.p12** and saves it to the root directory of the D drive.
### In a Command-Line Tool<a name="section1276462024811"></a>
> Record the values of **alias**, **storepass**, and **keypass**, which will be used in [Configuring App Signature Information](#configuring-app-signature-information).
-**alias**: alias of the key, which is used to identify the key name.
![](figures/en-us_image_0000001248045243.png)
-**sigalg**: signature algorithm, which is automatically set to **SHA256withECDSA** and cannot be changed.
-**dname**:
-**C**: country/region code, such as **CN**.
-**O**: organization name, such as **HUAWEI**.
-**OU**: organization unit name, such as **HUAWEI IDE**.
-**CN**: your first name and last name. Set this parameter to be the same as **alias**.
-**validity**: certificate validity period. It is recommended that you set this parameter to **9125** (25 years).
-**storepass**: key store password, which must contain at least 8 characters that include two types of the following: uppercase letters, lowercase letters, digits, and special characters. Do not lose the password as it will be used later in configuring the signature.
-**keypass**: password of the key. The value must be the same as that of **storepass**.
4. Run the following command. After the command is executed, enter the **storepass** to generate a CSR in .csr format.
2. Switch to the directory where the Keytool is located.
-**alias**: The value must be the same as the alias set in 3.
3. Run the following command to generate a key store. This example creates a key store named **ide\_demo\_app.p12** and saves it to the root directory of the D drive.
-**file**: name of the generated CSR. The file name extension is .csr.
Use the CSR generated in [Generating a Key Store and CSR](#generating-a-key-store-and-csr) to generate the digital certificate required for app signing. The method is as follows:
>Record the values of **alias**, **storepass**, and **keypass**, which will be used in [Configuring App Signature Information](#section10152423193310).
Go to the **Sdk\toolchains\lib** directory where the OpenHarmony SDK is saved (see [Configuring the OpenHarmony SDK](../quick-start/configuring-openharmony-sdk.md) for details) in the DevEco Studio installation directory, and run the following command in the CLI. If the **keytool** command cannot be executed, add the JDK environment variables to the system environment variables. You only need to modify the input and output to quickly generate a certificate. That is, modify **-infile** to specify the path of the CSR and **-outfile** to specify the name and path of the output certificate.
- **alias**: alias of the key, which is used to identify the key name.
- **sigalg**: signature algorithm, which is automatically set to **SHA256withECDSA** and cannot be changed.
- **dname**:
- **C**: country/region code, such as **CN**.
- **O**: organization name, such as **HUAWEI**.
- **OU**: organization unit name, such as **HUAWEI IDE**.
- **CN**: your first name and last name. Set this parameter to be the same as **alias**.
```
- **validity**: certificate validity period. It is recommended that you set this parameter to **9125** \(25 years\).
- **storepass**: key store password, which must contain at least 8 characters that include two types of the following: uppercase letters, lowercase letters, digits, and special characters. Do not lose the password as it will be used later in configuring the signature.
```
- **keypass**: password of the key. The value must be the same as that of **storepass**.
Refer to the following descriptions about the parameters in the command:
4. Run the following command. After the command is executed, enter the **storepass** to generate a CSR in .csr format.
-**alias**: alias of the CA private key used for issuing certificates. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified.
-**outfile**: name and path of the certificate chain file.
- **alias**: The value must be the same as the alias set in 3.
- **file**: name of the generated CSR. The file name extension is .csr.
-**keystore**: path of the CA key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\toolchains\lib** of the OpenHarmony SDK. This parameter cannot be modified. Note that the **OpenHarmony.p12** file is not the .p12 file generated in [Generating a Key Store and CSR](#generating-a-key-store-and-csr).
-**sigalg**: certificate signature algorithm. This parameter cannot be modified.
## Generating an App Certificate<a name="section136609429562"></a>
-**storepass**: key store password. The password is **123456** and cannot be changed.
Use the CSR generated in [Generating a Key Store and CSR](#section153146467405) to generate the digital certificate required for app signing. The method is as follows:
-**ext**: certificate extension. This parameter cannot be modified.
Go to the **Sdk\\toolchains\\lib** directory where the OpenHarmony SDK is saved \(see [Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md) for details\) in the DevEco Studio installation directory, and run the following command in the CLI. If the **keytool** command cannot be executed, add the JDK environment variables to the system environment variables. You only need to modify the input and output to quickly generate a certificate. That is, modify **-infile** to specify the path of the CSR and **-outfile** to specify the name and path of the output certificate.
-**validity**: certificate validity period, which is user-defined.
-**rfc**: specifies the output file format. This parameter cannot be modified.
Refer to the following descriptions about the parameters in the command:
-**alias**: alias of the CA private key used for issuing certificates. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified.
-**infile**: path of the CSR file.
-**outfile**: name and path of the certificate chain file.
-**keystore**: path of the CA key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified. Note that the **OpenHarmony.p12** file is not the .p12 file generated in [Generating a Key Store and CSR](#section153146467405).
-**sigalg**: certificate signature algorithm. This parameter cannot be modified.
-**storepass**: key store password. The password is **123456** and cannot be changed.
-**ext**: certificate extension. This parameter cannot be modified.
-**validity**: certificate validity period, which is user-defined.
-**rfc**: specifies the output file format. This parameter cannot be modified.
## Generating the App Profile
## Generating the App Profile<a name="section2048641015325"></a>
The profile contains the following inforamtion about the OpenHarmony app: bundle name, digital certificate information, certificate permissions that can be applied for by the app, and devices where the app can be debugged (the device list will be empty if the app type is Release). Each app package must contain a profile file.
The profile contains the following inforamtion about the OpenHarmony app: bundle name, digital certificate information, certificate permissions that can be applied for by the app, and devices where the app can be debugged \(the device list will be empty if the app type is Release\). Each app package must contain a profile file.
Go to the **Sdk\toolchains\lib** directory, open the command-line tool, and run the following command.
Go to the **Sdk\\toolchains\\lib** directory, open the command-line tool, and run the following command.
Refer to the following descriptions about the parameters in the command:
Refer to the following descriptions about the parameters in the command:
-**provisionsigtool**: tool for generating the profile which is stored in **Sdk\toolchains\lib** of the OpenHarmony SDK.
-**provisionsigtool**: tool for generating the profile which is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK.
-**in**: path of the profile template which is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-**in**: path of the profile template which is stored in **Sdk\toolchains\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-**out**: name and path of the profile.
-**keystore**: path of the key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-**out**: name and path of the profile.
-**storepass**: key store password. The password is **123456** and cannot be changed.
-**alias**: alias of the private key used for app signing. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified.
-**keystore**: path of the key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\toolchains\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-**sigalg**: certificate signature algorithm. This parameter cannot be modified.
-**cert**: path of the certificate of the signature profile. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-**storepass**: key store password. The password is **123456** and cannot be changed.
-**validity**: certificate validity period, which is user-defined.
-**developer-id**: developer ID, which is a user-defined character string.
-**alias**: alias of the private key used for app signing. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified.
-**bundle-name**: app bundle name.
-**permission**\(optional\): If permissions are not required, this field can be left empty. You can add multiple restricted permissions in the following way: ohos.permission.READ\_CONTACTS, ohos.permission.WRITE\_CONTACTS.
-**sigalg**: certificate signature algorithm. This parameter cannot be modified.
-**distribution-certificate**: certificate generated in [Generating an App Certificate](#section136609429562).
-**cert**: path of the certificate of the signature profile. The file is stored in **Sdk\toolchains\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-**validity**: certificate validity period, which is user-defined.
-**developer-id**: developer ID, which is a user-defined character string.
-**bundle-name**: app bundle name.
-**permission** (optional): If permissions are not required, this field can be left empty. You can add multiple restricted permissions in the following way: ohos.permission.READ_CONTACTS, ohos.permission.WRITE_CONTACTS.
-**distribution-certificate**: certificate generated in [Generating an App Certificate](#generating-an-app-certificate).
## Configuring App Signature Information
Before debugging on a real device, use the private key file (.p12), certificate file (.cer), and profile file (.p7b) to sign the target module.
Go to **File**>**Project Structure**>**Project**>**Signing Configs**>**debug**, deselect **Automatically generate signing**, and configure the signature information of the specified module.
-**Store File**: Select the key store file with the file name extension .p12, which is generated in [Generating a Key Store and CSR](#generating-a-key-store-and-csr).
-**Store Password**: Enter the key store password, which is the same as the key store password entered in [Generating a Key Store and CSR](#generating-a-key-store-and-csr).
-**Key Alias**: Enter the alias of the key, which is the same as the alias entered in [Generating a Key Store and CSR](#generating-a-key-store-and-csr).
-**Key Password**: Enter the key password, which is the same as the value of **Store Password**.
Before debugging on a real device, use the private key file \(.p12\), certificate file \(.cer\), and profile file \(.p7b\) to sign the target module.
-**Sign Alg**: Specify the signature algorithm, which has a fixed value of **SHA256withECDSA**.
Go to **File**\>**Project Structure**\>**Project**\>**Signing Configs**\>**debug**, deselect **Automatically generate signing**, and configure the signature information of the specified module.
-**Profile File**: Select the .p7b profile file generated in [Generating the App Profile](#generating-the-app-profile).
-**Store File**: Select the key store file with the file name extension .p12, which is generated in [Generating a Key Store and CSR](#section153146467405).
-**Store Password**: Enter the key store password, which is the same as the key store password entered in [Generating a Key Store and CSR](#section153146467405).
-**Key Alias**: Enter the alias of the key, which is the same as the alias entered in [Generating a Key Store and CSR](#section153146467405).
-**Key Password**: Enter the key password, which is the same as the value of **Store Password**.
-**Sign Alg**: Specify the signature algorithm, which has a fixed value of **SHA256withECDSA**.
-**Profile File**: Select the .p7b profile file generated in [Generating the App Profile](#section2048641015325).
-**Certpath File**: Select the .cer debug certificate generated in [Generating an App Certificate](#section136609429562).
-**Certpath File**: Select the .cer debug certificate generated in [Generating an App Certificate](#generating-an-app-certificate).
By default, the type of a HAP package compiled using DevEco Studio is set to **debug**. For a release type, click the **OhosBuild Variants** tab in the lower left corner of the project and set the type to **release**. For details about how to compile and build the HAP, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/build_hap-0000001053342418).
By default, the type of a HAP package compiled using DevEco Studio is set to **debug**. For a release type, click the **OhosBuild Variants** tab in the lower left corner of the project and set the type to **release**. For details about how to compile and build the HAP, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/build_hap-0000001053342418).
1. Open DevEco Studio. If this is the first time you are using it, select **Do not import settings** and click **OK**.
</tr>
</thead>
2. Follow the wizard to set **npm registry**. DevEco Studio has been preconfigured with the corresponding registry. Click **Start using DevEco Studio** to go to the next step.
> If the **Set up HTTP Proxy** page is displayed, it indicates that your network requires a proxy. In this case, set up the DevEco Studio proxy, npm proxy, and Gradle proxy according to [References](#references), and then download the OpenHarmony SDK.
<tdclass="cellrowborder"valign="top"width="49.99%"headers="mcps1.1.4.1.3 "><pid="p54625885713"><aname="p54625885713"></a><aname="p54625885713"></a>SDK for JS.</p>
</td>
3. Follow the wizard to download the SDK. By default, the OpenHarmony SDK will be downloaded. You can download the SDK to the default **user** directory or a local path that does not contain any Chinese characters. Then click **Next**.
<tdclass="cellrowborder"valign="top"width="49.99%"headers="mcps1.1.4.1.3 "><pid="p7471158105711"><aname="p7471158105711"></a><aname="p7471158105711"></a>Includes compiling, packaging, signing, database management, and other tools that are required to develop OpenHarmony apps.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.1.4.1.2 "><pid="p1238951018"><aname="p1238951018"></a><aname="p1238951018"></a>OpenHarmony app previewer, which can be used to view the UI layout during app development.</p>
</td>
</tr>
</tbody>
</table>
1. Open DevEco Studio. If this is the first time you are using it, select **Do not import settings** and click **OK**.
2. Follow the wizard to set **npm registry**. DevEco Studio has been preconfigured with the corresponding registry. Click **Start using DevEco Studio** to go to the next step.
>If the **Set up HTTP Proxy** page is displayed, it indicates that your network requires a proxy. In this case, set up the DevEco Studio proxy, npm proxy, and Gradle proxy according to [References](#section0384143616409), and then download the OpenHarmony SDK.
![](figures/en-us_image_0000001163314102.png)
3. Follow the wizard to download the SDK. By default, the OpenHarmony SDK will be downloaded. You can download the SDK to the default **user** directory or a local path that does not contain any Chinese characters. Then click **Next**.
>If you are not using DevEco Studio for the first time, the SDK download page may not be displayed. In this case, go to **Configure** \(or ![](figures/en-us_image_0000001208274069.png)\) \> **Settings** \> **SDK Manager** \> **OpenHarmony SDK** and click **OpenHarmony SDK Location** to download the SDK.
4. On the **Settings Confirmation** page, click **Next**. When the **License Agreement** dialog box appears, click **Accept**.
![](figures/en-us_image_0000001163472654.png)
5. After the OpenHarmony SDK and tools are downloaded, click **Finish** to access the DevEco Studio welcome page.
Setting up the development environment requires that your network can directly access the Internet.
> If you are not using DevEco Studio for the first time, the SDK download page may not be displayed. In this case, go to **Configure** (or ![en-us_image_0000001208274069](figures/en-us_image_0000001208274069.png)) > **Settings** > **SDK Manager** > **OpenHarmony SDK** and click **OpenHarmony SDK Location** to download the SDK.
4. On the **Settings Confirmation** page, click **Next**. When the **License Agreement** dialog box appears, click **Accept**.
Generally, only some enterprise networks rather than personal area networks or home networks require a proxy to access the Internet.
## References
If you are using DevEco Studio for the first time and the **Set up HTTP Proxy** page is displayed, it indicates that your network requires a proxy. In this case, set up the DevEco Studio proxy, npm proxy, and Gradle proxy.
Setting up the development environment requires that your network can directly access the Internet.
![](figures/en-us_image_0000001166582138.png)
Generally, only some enterprise networks rather than personal area networks or home networks require a proxy to access the Internet.
### Setting Up the DevEco Studio Proxy<a name="section10129720184214"></a>
If you are using DevEco Studio for the first time and the **Set up HTTP Proxy** page is displayed, it indicates that your network requires a proxy. In this case, set up the DevEco Studio proxy, npm proxy, and Gradle proxy.
1. Start DevEco Studio. On the **Set up HTTP Proxy** page that is displayed, select **Manual proxy configuration** and set the HTTP proxy.
>If this is not the first time you are using DevEco Studio:
>- On the welcome page, choose **Configure** \(or ![](figures/en-us_image_0000001212142015.png)\)** \> Settings \> Appearance & Behavior \> System Settings \> HTTP Proxy** to access the HTTP Proxy settings. \(For macOS, choose **Configure \> Preferences \> Appearance & Behavior \> System Settings \> HTTP Proxy**.\)
>- When on a project page, choose **File \> Settings \> Appearance & Behavior \> System Settings \> HTTP Proxy** to access the HTTP Proxy settings. \(For macOS, choose **DevEco Studio \> Preferences \> Appearance & Behavior \> System Settings \> HTTP Proxy**.\)
- **HTTP** parameters: **If you are not sure about the information, contact your network administrator.**
- **Host name**: Enter the host name or IP address of the proxy server.
- **Port number**: Enter the port number of the proxy server.
- **No proxy for**: Enter the URLs or IP addresses which the PC can directly connect to without a proxy server. Use commas \(,\) to separate URLs and IP addresses.
### Setting Up the DevEco Studio Proxy
- **Proxy authentication** parameters: Set the parameters only when the proxy server requires authentication.
- **Login**: Enter the user name used to access the proxy server.
- **Password**: Enter the password used to access the proxy server.
- **Remember**: Select this option to remember the password.
1. Start DevEco Studio. On the **Set up HTTP Proxy** page that is displayed, select **Manual proxy configuration** and set the HTTP proxy.
> If this is not the first time you are using DevEco Studio:
>
> - On the welcome page, choose **Configure** (or ![en-us_image_0000001212142015](figures/en-us_image_0000001212142015.png))** > Settings > Appearance & Behavior > System Settings > HTTP Proxy** to access the HTTP Proxy settings. (For macOS, choose **Configure > Preferences > Appearance & Behavior > System Settings > HTTP Proxy**.)
>
> - When on a project page, choose **File > Settings > Appearance & Behavior > System Settings > HTTP Proxy** to access the HTTP Proxy settings. (For macOS, choose **DevEco Studio > Preferences > Appearance & Behavior > System Settings > HTTP Proxy**.)
-**HTTP** parameters: **If you are not sure about the information, contact your network administrator.**
2. When you have finished, click **Check connection** and enter a URL to check the network connectivity. If the message "Connection successful" is displayed, it indicates that the proxy was set up successfully.
-**Host name**: Enter the host name or IP address of the proxy server.
3. Click **Next: Configure npm** to set up the npm proxy. For details, see [Setting Up the npm Proxy](#section19984059114316).
-**Port number**: Enter the port number of the proxy server.
-**No proxy for**: Enter the URLs or IP addresses which the PC can directly connect to without a proxy server. Use commas (,) to separate URLs and IP addresses.
-**Proxy authentication** parameters: Set the parameters only when the proxy server requires authentication.
-**Login**: Enter the user name used to access the proxy server.
-**Password**: Enter the password used to access the proxy server.
-**Remember**: Select this option to remember the password.
### Setting Up the npm Proxy<a name="section19984059114316"></a>
2. When you have finished, click **Check connection** and enter a URL to check the network connectivity. If the message "Connection successful" is displayed, it indicates that the proxy was set up successfully.
Follow the configuration wizard of DevEco Studio to configure the npm proxy information, which will be written into the **.npmrc** file in the **users/**_user name_ directory.
3. Click **Next: Configure npm** to set up the npm proxy. For details, see [Setting Up the npm Proxy](#setting-up-the-npm-proxy).
>The configuration wizard is displayed only the first time you install DevEco Studio. If the wizard is not displayed, manually add the proxy information to the **.npmrc** file in the **users/**_user name_ directory.
-**npm registry**: Set the address of the npm registry. You are advised to select this option.
-**HTTP proxy**: Proxy server information. By default, the value is the same as that of **HTTP proxy** of DevEco Studio.
-**Enable Https Proxy**: Indicates whether to configure HTTPS proxy. You are advised to select this option.
### Setting Up the npm Proxy
![](figures/en-us_image_0000001164577336.png)
Follow the configuration wizard of DevEco Studio to configure the npm proxy information, which will be written into the **.npmrc** file in the **users/**_user name_ directory.
> The configuration wizard is displayed only the first time you install DevEco Studio. If the wizard is not displayed, manually add the proxy information to the **.npmrc** file in the **users/**_user name_ directory.
-**npm registry**: Set the address of the npm registry. You are advised to select this option.
If your proxy server requires the user name and password for authentication, set the user name and password as follows. If your proxy server does not require authentication, skip this step and follow the instructions in [Configuring the SDK Information](#section1265592425017).
-**HTTP proxy**: Proxy server information. By default, the value is the same as that of **HTTP proxy** of DevEco Studio.
![](figures/en-us_image_0000001209817299.png)
-**Enable Https Proxy**: Indicates whether to configure HTTPS proxy. You are advised to select this option.
1. Go to the **Users** directory and open the **.npmrc** file.
2. Modify the npm proxy information. Add the **user** and **password** fields to **proxy** and **https-proxy**. Note that the values may vary depending on the proxy. The following is an example:
>If the password contains special characters, such as @, \#, and \*, the configuration may not take effect. You are advised to replace the special characters with ASCII codes and add "%" before the ASCII codes. Refer to the following for the mapping between common symbols and ASCII codes.
>- !: %21
>- @: %40
>- \#: %23
>- ¥: %24
>- &: %26
>- \*: %2A
If your proxy server requires the user name and password for authentication, set the user name and password as follows. If your proxy server does not require authentication, skip this step and follow the instructions in [Configuring the SDK Information](#configuring-the-sdk-information).
3. After the proxy is configured, open the CLI and run the following command to check whether the network is normal.
1. Go to the **Users** directory and open the **.npmrc** file.
If the following information is displayed after running the command, it indicates that the proxy has been set up successfully.
2. Modify the npm proxy information. Add the **user** and **password** fields to **proxy** and **https-proxy**. Note that the values may vary depending on the proxy. The following is an example:
4. When you are done, follow the instructions in [Configuring the SDK Information](#section1265592425017).
> If the password contains special characters, such as \@, \#, and \*, the configuration may not take effect. You are advised to replace the special characters with ASCII codes and add "%" before the ASCII codes. Refer to the following for the mapping between common symbols and ASCII codes.
>
> - !: %21
>
> - \@: %40
>
> - \#: %23
>
> - ¥: %24
>
> - &: %26
>
> - \*: %2A
3. After the proxy is configured, open the CLI and run the following command to check whether the network is normal.
### Setting Up the Gradle Proxy<a name="section164211820465"></a>
```
npm info express
```
If the following information is displayed after running the command, it indicates that the proxy has been set up successfully.
1. Open **This PC**, and enter **%userprofile%** in the address box to access the user profile. \(For macOS, choose **Go**\>**Home**.\)
>Before creating a **.gradle** folder in macOS, set the system to show hidden files.
### Setting Up the Gradle Proxy
3. Open the **.gradle** folder, create a **gradle** file, and change the file name extension to .properties.
4. Add the following script to the **gradle.properties** file and save the file:
1. Open **This PC**, and enter **%userprofile%** in the address box to access the user profile. (For macOS, choose **Go**>**Home**.)
Modify the host name, port number, user name, password, and proxy exceptions \(**nonProxyHosts**\) based on the actual condition. Separate values for **nonProxyHosts** with a vertical bar \(|\).
3. Open the **.gradle** folder, create a “gradle“ file, and change the file name extension to .properties.
4. Add the following script to the “gradle.properties“ file and save the file:
Modify the host name, port number, user name, password, and proxy exceptions (nonProxyHosts) based on the actual condition. Separate values for nonProxyHosts with a vertical bar (|).
-[DevEco Studio Evolution Roadmap](#DevEco-Studio-Evolution-Roadmap)
-[DevEco Studio Evolution Roadmap](#section187875207166)
## About the Document
## About the Document<a name="section189422248491"></a>
DevEco Studio is an integrated development environment (IDE) of HarmonyOS apps. As HarmonyOS is developed based on OpenHarmony, DevEco Studio can also be used to develop OpenHarmony apps.
DevEco Studio is an integrated development environment \(IDE\) of HarmonyOS apps. As HarmonyOS is developed based on OpenHarmony, DevEco Studio can also be used to develop OpenHarmony apps.
The process of developing an OpenHarmony app using DevEco Studio is the same as that of developing a HarmonyOS app. This document describes the differences between OpenHarmony and HarmonyOS app development.
The process of developing an OpenHarmony app using DevEco Studio is the same as that of developing a HarmonyOS app. This document describes the differences between OpenHarmony and HarmonyOS app development.
-**Environment setup**: You need to manually install the OpenHarmony SDK for the OpenHarmony app development. For details, see [Configuring the OpenHarmony SDK](../quick-start/configuring-openharmony-sdk.md).
-**Environment setup**: You need to manually install the OpenHarmony SDK for the OpenHarmony app development. For details, see [Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md).
-**Creating an OpenHarmony project**: Create a project by using the project wizard or by importing a sample project. For details, see [Using the Project Wizard to Create a Project](use-wizard-to-create-project.md).
-**Signature configuration for debugging**: To run an OpenHarmony app on a real device, you need to sign the app first. For instructions, see [Configuring the OpenHarmony App Signature](configuring-openharmony-app-signature.md).
-**App running on a real device**: Push the OpenHarmony HAP package to the real device for installation. For details, see [Installing and Running Your OpenHarmony App](installing-openharmony-app.md).
-**Creating an OpenHarmony project**: Create a project by using the project wizard or by importing a sample project. For details, see [Using the Project Wizard to Create a Project](../quick-start/use-wizard-to-create-project.md).
For details about how to use DevEco Studio, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387).
-**Signature configuration for debugging**: To run an OpenHarmony app on a real device, you need to sign the app first. For instructions, see [Configuring the OpenHarmony App Signature](../quick-start/configuring-openharmony-app-signature.md).
## Restrictions<a name="section65191625782"></a>
-**App running on a real device**: Push the OpenHarmony HAP package to the real device for installation. For details, see [Installing and Running Your OpenHarmony App](../quick-start/installing-openharmony-app.md).
- OpenHarmony supports only app development in eTS and JS.
- Developing OpenHarmony apps in DevEco Studio is supported on Windows.
For details about how to use DevEco Studio, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387).
## Restrictions
- OpenHarmony supports only app development in eTS and JS.
- Developing OpenHarmony apps in DevEco Studio is supported on Windows.
DevEco Studio serves as a development tool for both OpenHarmony and HarmonyOS apps. Refer to the following table for descriptions about the functions not supported for OpenHarmony.
DevEco Studio serves as a development tool for both OpenHarmony and HarmonyOS apps. Refer to the following table for descriptions about the functions not supported for OpenHarmony.
<trid="row15269933419"><tdclass="cellrowborder"valign="top"width="29.882988298829883%"headers="mcps1.1.4.1.1 "><pid="p152318351369"><aname="p152318351369"></a><aname="p152318351369"></a>Using DevEco Studio for log viewing and optimization</p>
<tdclass="cellrowborder"valign="top"width="36.02%"headers="mcps1.1.4.1.2 "><pid="p101251821838"><aname="p101251821838"></a><aname="p101251821838"></a>7.3 (7.2 at minimum)</p>
</td>
<tdclass="cellrowborder"valign="top"width="32.97%"headers="mcps1.1.4.1.3 "><pid="p0634643124719"><aname="p0634643124719"></a><aname="p0634643124719"></a>DevEco Studio has Gradle 7.3 preinstalled. No separate installation is required.</p>
<tdclass="cellrowborder"valign="top"width="32.97%"headers="mcps1.1.4.1.3 "><pid="p76347438478"><aname="p76347438478"></a><aname="p76347438478"></a>DevEco Studio has JDK 11 preinstalled. No separate installation is required.</p>
<tdclass="cellrowborder"valign="top"width="36.02%"headers="mcps1.1.4.1.2 "><pid="p141258211631"><aname="p141258211631"></a><aname="p141258211631"></a>3.1.0.0 (API Version 8 Beta)</p>
</td>
<tdclass="cellrowborder"valign="top"width="32.97%"headers="mcps1.1.4.1.3 "><pid="p363464312479"><aname="p363464312479"></a><aname="p363464312479"></a>This version is compatible with SDKs of earlier versions.</p>
<tdclass="cellrowborder"rowspan="3"valign="top"width="32.97%"headers="mcps1.1.4.1.3 "><pid="p14933418194918"><aname="p14933418194918"></a><aname="p14933418194918"></a>Update them to the latest version.</p>
<aname="ul1978261655712"></a><aname="ul1978261655712"></a><ulid="ul1978261655712"><li>Introduced the Chinese UI. By default, the UI is displayed in English. To enable the Chinese UI, go to <strongid="b121121320121217"><aname="b121121320121217"></a><aname="b121121320121217"></a>Settings</strong>, choose <strongid="b7112102015129"><aname="b7112102015129"></a><aname="b7112102015129"></a>Plugins</strong>><strongid="b5112152017128"><aname="b5112152017128"></a><aname="b5112152017128"></a>installed</strong>, and select <strongid="b9113182071210"><aname="b9113182071210"></a><aname="b9113182071210"></a>Chinese (Simplified)</strong>. Then, restart DevEco Studio for the settings to take effect.</li><li>Introduced support for OpenHarmony apps and services, with various debugging features, from breakpoint management and variable observation to stepping.</li></ul>
<aname="ul311913348114"></a><aname="ul311913348114"></a><ulid="ul311913348114"><li>Updated the OpenHarmony SDK to 3.1.0.0, whose API version is API 8 Beta and corresponding compilation and building plugin is 3.0.5.2.</li><li>Added an ability template that supports low-code development: <strongid="b736929122019"><aname="b736929122019"></a><aname="b736929122019"></a>[Standard]Empty Ability</strong>.</li><li>Added eTS component preview: allows previewing of eTS components; requires compileSdkVersion 8 or later.</li><li>Added eTS livee preview: allows viewing of the attribute changes in real time as you make them; requires compileSdkVersion 8 or later.</li></ul>
<tableid="simpletable19435134375015"><trid="strow1435543185020"><tdvalign="top"id="stentry64351943115013"><divclass="p"id="p13974162220455"><aname="p13974162220455"></a><aname="p13974162220455"></a><strongid="b0838112318282"><aname="b0838112318282"></a><aname="b0838112318282"></a>New Features</strong><aname="ul11381034104515"></a><aname="ul11381034104515"></a><ulid="ul11381034104515"><li>Added support for OpenHarmony SDK management. You can use SDK Manager to download and manage OpenHarmony SDKs.</li><li>Allowed for building of a single module during HAP compilation and building to accelerate building for multi-module projects; allowed for one-click re-building of HAPs, by automatically conducting the Clean Project operation before a HAP build.</li></ul>
</div>
<divclass="p"id="p556811306614"><aname="p556811306614"></a><aname="p556811306614"></a><strongid="b0183135142820"><aname="b0183135142820"></a><aname="b0183135142820"></a>Enhanced Features</strong><aname="ul834518400613"></a><aname="ul834518400613"></a><ulid="ul834518400613"><li>Updated the compilation and building plugin to version 3.0.3.2.</li><li>Improved the JSON editor, which now enables quick rectification of resource index errors and instant access to resource values.</li><li>Provided Ohos and Project (default) views for projects, which you can switch between easily.</li><li>Enabled OpenHarmony projects to support Ark build.</li><li>Moved the <strongid="b19966587296"><aname="b19966587296"></a><aname="b19966587296"></a>supportSystem "standard"</strong> field, which is exclusive to OpenHarmony projects, from the module-level <strongid="b596638162911"><aname="b596638162911"></a><aname="b596638162911"></a>build.gradle</strong> file to the project-level <strongid="b199671680295"><aname="b199671680295"></a><aname="b199671680295"></a>build.gradle</strong> file.</li></ul>
1. On the DevEco Studio welcome page, select **Configure** or click the ![](figures/en-us_image_0000001118018452.png) icon, and choose **Settings**\>**Version Control**\>**Git**. Then click **Test** to check whether the Git tool has been installed.
> This feature applies to OpenHarmony projects created using DevEco Studio 2.1 Release or later.
- If the tool has been installed, import a sample by referring to [2](#li5947194711181).
![](figures/en-us_image_0000001118018088.png)
After the OpenHarmony SDK is configured, you can get started to develop your app by **importing a sample project**.
- If the tool hasn't been installed, click **Download and Install**. DevEco Studio will automatically download and install it. Then import a sample by referring to [2](#li5947194711181).
![](figures/en-us_image_0000001164498191.png)
1. On the DevEco Studio welcome page, select **Configure** or click the ![en-us_image_0000001118018452](figures/en-us_image_0000001118018452.png) icon, and choose **Settings**>**Version Control**>**Git**. Then click **Test** to check whether the Git tool has been installed.
2.<aname="li5947194711181"></a>On the DevEco Studio welcome page, click **Import Sample** to import a sample project.
- If the tool has been installed, import a sample by referring to [ERROR:Invalid link:en-us_topic_0000001163914943.xml#xref1062745524418,link:#li5947194711181](#li5947194711181).
- If the tool hasn't been installed, click **Download and Install**. DevEco Studio will automatically download and install it. Then import a sample by referring to [ERROR:Invalid link:en-us_topic_0000001163914943.xml#xref2168151511810,link:#li5947194711181](#li5947194711181).
# Installing and Running Your OpenHarmony App<a name="EN-US_TOPIC_0000001115941596"></a>
You can install your OpenHarmony app in either of the following methods:
- DevEco Studio: Connect your device where the app is stored to DevEco Studio, and then click ![](figures/en-us_image_0000001239855207.png) to install the app.
- hdc: Run commands to install the app.
You can install your OpenHarmony app in either of the following methods:
You can manually obtain the hdc tool from the open-source repository. Then, run the tool commands to install an HAP file on the device.
The tool commands are as follows:
- App installation
**install \[-r/-d/-g\] _package_**
- DevEco Studio: Connect your device where the app is stored to DevEco Studio, and then click ![en-us_image_0000001239855207](figures/en-us_image_0000001239855207.png) to install the app.
Example:
- hdc: Run commands to install the app.
```
You can manually obtain the hdc tool from the open-source repository. Then, run the tool commands to install an HAP file on the device.
hdc_std install E:\hwadmin.hap
```
The tool commands are as follows:
- Log capturing
- App installation
**hilog**
**install [-r/-d/-g] _package_**
Example:
Example:
```
```
hdc_std install E:\hwadmin.hap
hdc_std hilog
```
```
- Log capturing
**hilog**
Example:
For details about how to use hdc and the command format, see [hdc\_std Usage Guidelines](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/oem_subsys_toolchain_hdc_guide.md).
```
hdc_std hilog
```
For details about how to use hdc and the command format, see [hdc_std Usage Guidelines](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/oem_subsys_toolchain_hdc_guide.md).
# Using the Project Wizard to Create a Project<a name="EN-US_TOPIC_0000001176969367"></a>
-[Prerequisites](#Prerequisites)
-[Prerequisites](#section13642104391619)
-[Procedure](#Procedure)
-[Procedure](#section132671712101714)
If you are using DevEco Studio 2.2 Beta1 or later, you can use the project wizard to create a project. If you are using DevEco Studio 2.1 Release, create a project by following instructions in [Importing a Sample to Create a Project](../quick-start/import-sample-to-create-project.md).
If you are using DevEco Studio 2.2 Beta1 or later, you can use the project wizard to create a project. If you are using DevEco Studio 2.1 Release, create a project by following instructions in [Importing a Sample to Create a Project](import-sample-to-create-project.md).
-**Project type**: project type, which can be an [atomic service](https://developer.harmonyos.com/en/docs/documentation/doc-guides/atomic-service-definition-0000001090840664) or an ordinary app that requires download before use.
-**Project type**: project type, which can be an [atomic service](https://developer.harmonyos.com/en/docs/documentation/doc-guides/atomic-service-definition-0000001090840664) or an ordinary app that requires download before use.
>- There is no app icon on the home screen while running or debugging an atomic service. Use the debugging and running functions of DevEco Studio as an alternative.
>- Atomic services are installation free. This is done by automatically adding the **installationFree** field to the **config.json** file, with its value set to **true**.
> If you're creating an atomic service:
>- If the value of the **installationFree** field of the entry module is set to **true**, the value of the **installationFree** field of all the related HAP modules is **true** by default. If the** installationFree field** of the entry module is set to **false**, the **installationFree** field of all the related HAP modules can be set to **true** or **false**.
>
>- When compiling and building an app, make sure that the size of each HAP package does not exceed 10 MB.
> - There is no app icon on the home screen while running or debugging an atomic service. Use the debugging and running functions of DevEco Studio as an alternative.
>
- **Bundle name**: bundle name. By default, this name will also be used as your app ID. Your app must have a unique ID to be released. If **Project type** is set to **Atomic service**, the **Bundle name** must end with **.hmservice**.
> - Atomic services are installation free. This is done by automatically adding the **installationFree** field to the **config.json** file, with its value set to **true**.
- **Save location**: local path for storing the project file.
>
- **Development mode**: development mode. The **Super Visual** option is available if the project template supports low-code development.
> - If the value of the **installationFree** field of the entry module is set to **true**, the value of the **installationFree** field of all the related HAP modules is **true** by default. If the** installationFree field** of the entry module is set to **false**, the **installationFree** field of all the related HAP modules can be set to **true** or **false**.
- **Language**: supported programming language.
>
- **Compatible API version**: earliest SDK version compatible with your app.
> - When compiling and building an app, make sure that the size of each HAP package does not exceed 10 MB.
-**Bundle name**: bundle name. By default, this name will also be used as your app ID. Your app must have a unique ID to be released. If **Project type** is set to **Atomic service**, the **Bundle name** must end with **.hmservice**.
-**Save location**: local path for storing the project file.
>If **compileSdkVersion 7** or later is configured for the OpenHarmony project, the corresponding module will be compiled using ArkCompiler by default. To use a compiler other than ArkCompiler, add the **arkEnable false** field to the **ohos** closure in the module-level **build.gradle** file.
-**Development mode**: development mode. The **Super Visual** option is available if the project template supports low-code development.
-**Language**: supported programming language.
- **Device Type**: device type supported by the project template.
-**Compatible API version**: earliest SDK version compatible with your app.
> If **compileSdkVersion 7** or later is configured for the OpenHarmony project, the corresponding module will be compiled using ArkCompiler by default. To use a compiler other than ArkCompiler, add the **arkEnable false** field to the **ohos** closure in the module-level **build.gradle** file.
-**Device Type**: device type supported by the project template.
4. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created.
4. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created.