Since HarmonyOSNEXT, I've always wanted to do one thing: make building packages for HarmonyOS as simple and convenient as installing APKs on Android! Now, after many days of development, testing, and verification, a convenient plugin has finally been completed. It has only one feature: one-click packaging and uploading, ultimately generating a download address and QR code. This allows you to release versions more flexibly and limit the testing scope, helping you to identify problems early, fix them promptly, and optimize the user experience.
Currently, there are four official methods for installing the generated package onto real devices for testing. The first is to directly run the installer or use the hdc command. This method is simple and convenient, making it suitable for small teams with few testers. However, it is not suitable for teams with many testers, nor is it suitable for remote scenarios. A large number of testers means many devices, which means running the installer on each device individually, consuming a lot of time and significantly reducing development efficiency. If the development team is located in location A while the testing team is located in location B, running the installer directly will be even more inconvenient.
Besides the first installation method, the official website also offers AppGallery invitation testing. This requires submitting the built-in package to the AppGallery backend, with a process similar to the official release. This method solves the drawbacks of having many testers, multiple devices, and remote work, allowing the testing team to conduct testing and verification very conveniently. However, the timeliness is very poor because although it is a test version, it still needs to be reviewed. Although the official review speed has been accelerated, it is still not timely, which can be extremely frustrating, especially when urgent verification is needed!
The third method is AppTest invitation testing, but it's currently limited and requires an application. Even if it's fully opened in the future, it must ultimately be uploaded to the AppTest client and still undergo review. Therefore, like the second method, testing and verification are not timely.
The fourth method, which is the one currently used by the plugin, is called internal team testing. Using internal testing, the application can be downloaded and installed without submitting it to the Huawei App Market, just like installing an Android APK, achieving timely testing and verification.
Internal team testing is certainly good, but the process is very cumbersome. It requires packaging all modules one by one, obtaining SHA256 for each module, and finally uploading and signing each module to meet the installation requirements. Therefore, my goal is to simplify the process and achieve one-click packaging.
The plugin has been uploaded to GitHub and you can download and try it out at the following address: github.com/AbnerMing88… After downloading the plugin, open your development tool DevEco Studio, go to the settings page, click on Plugins on the left, click the settings icon, and then click Install Plugin from Disk…
Select the downloaded plugin, then click "Apply" at the bottom, and then click "OK".
After installation, a small blue gadget button will appear in your IDE. This is the entry point for the beta packaging tool, located after the row of application run buttons.
After clicking, you will enter the plugin's main window.
The plugin has three functional areas. The top area is the most important and contains the core functionality, including basic configuration, internal test category selection, one-click update, and viewing update packages. The middle area breaks down the one-click update function, allowing you to implement the final packaging and upload step by step. The bottom area displays the command capital punishment results, where you can view the capital punishment process and final result of each function for easy and intuitive viewing.
Below, we will explain a few important functions one by one.
Because internal team testing requires key file information, please ensure that the information is configured correctly in the basic settings. This information will be stored locally on your computer and will not be uploaded remotely, so please fill it in with confidence. Of course, if you only want to experience basic functionality, you don't need to configure this information.
The purpose of setting the upload method is to specify where to store the generated application package for download and use. Currently, Tencent Cloud and Alibaba Cloud are provided. We will expand to other servers or local servers based on user demand. For Tencent Cloud and Alibaba Cloud, there's not much to say; just configure them according to the information provided. This information can be viewed in the official backend. It's crucial to ensure that the Bucket is set to both read and write. Of course, if you feel there's a risk, you can change it to read-only after uploading.
If you choose Alibaba Cloud, the final download link may lead to a download page instead of a viewing page. This is an Alibaba Cloud setting issue. You need to set up a static website or download the file directly and then open the downloaded page to install it. Tencent Cloud does not have this problem.
Internal testing category refers to the internal testing profile file applied for using AppGallery Connect. This is required if you want to download and install internal test packages. If you have not applied yet, please apply according to the official instructions. The application process is very simple and exactly the same as the application process for your official application.
One-click update, from building and packaging to uploading resource packages, is a seamless process that eliminates the need for multiple steps, greatly improving production efficiency! Going forward, you can focus solely on this feature!
Here, you can view historically updated packages, copy their links, or view QR codes. You can directly send the links or QR codes to testers for them to download and use.
Plugins allow you to perform single functions, such as clearing the cache, building and packaging, and generating SHA256, without any configuration. However, if you want to achieve the final internal test package download and installation, there are four prerequisites that must be met.
1. Log in to AppGallery Connect and select "Certificates, App ID and Profile".
2. In the left navigation bar, select "Certificates, App ID and Profile > Profile" to enter the "Profile" page, and click "Add" in the upper right corner.
3. Here, select internal testing. The other information is the same as the release type you applied for before.
| Select "Internal Testing".parameter | illustrate |
|---|---|
| Application name | Select the name of the application for which you wish to apply for internal testing. If you have not yet created an application, please go to the "APP ID" menu to create one. |
| package name | The application name will be automatically filled in after you select it. |
| Profile name | No more than 100 characters. |
| type | Select "Internal Testing". |
| Select certificate | Click "Select" to choose a distribution certificate. |
| Select device | Click "Select" to choose one or more test devices. A maximum of 100 devices can be selected; deleted devices cannot be selected. |
The internal test can be configured similarly to the official signature.
First, configure the internal test signature information by copying the official signature information. The name is customizable. Note that the `profile` field should be set to the internal test profile you created. All other information should be consistent with the official signature.
Configure category information, copy other category information, add internal test category information, name it as you like, and select internal test signature information in signingConfig.
Configure the modules information. Remember, under modules, you need to configure as many modules as you have, and the applyToProducts configuration under each module must be consistent. Also, configure the internal test product category information.
After configuring the above information, you can select your internal test category for packaging in the plugin. You only need to select it once, and the selection record will be automatically saved afterwards.
Because internal team testing requires key file information for signing, key information must be configured. When configuring, please use the original password and alias password; do not use encrypted passwords. Configure as follows:
Currently, only two cloud services are supported: Tencent Cloud and Alibaba Cloud. Please configure them according to the requirements. If you are unsure about these configuration details, please consult your server personnel. We will expand to other servers as needed in the future, or you can customize the internal upload method or use a local server.
Currently, all configuration information is done on a project-by-project basis. Each project only needs to be configured once. Afterwards, you only need to focus on the one-click update and viewing update packages functions. Also, all configuration data is stored locally on your computer and will not be uploaded remotely, so please use it with confidence!
After the one-click update, you can access all function areas or click to view the update package to send the link or QR code to others for testing and verification.
The mobile app will display your app icon, app name, and some update information. Click to download and install it on your phone.
Although the article contains a lot of information, the configuration is very simple and only needs to be configured once. Okay, if you have any questions about using it, please leave a message!