1e41f4b71Sopenharmony_ci# Power-off Charging Animation Customization
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## Overview
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci### Introduction
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciBy default, the OpenHarmony provides the animation that displays information such as the battery level during power-off charging. However, some vendors may expect to use custom power-off charging animations for their products. To address this requirement, OpenHarmony provides the function of customizing power-off charging animations.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci### Constraints
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci 
12e41f4b71Sopenharmony_ciThe configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci## How to Develop
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci### Setting Up the Environment
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci**Hardware requirements:**
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ciDevelopment board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci**Environment requirements:**
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ciFor details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci### Getting Started with Development
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ciThe following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate power-off charging animation customization.
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci1. Create the `animation` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci2. Create a target folder by referring to the [default folder of power-off charging animation configuration](https://gitee.com/openharmony/powermgr_battery_manager/tree/master/charger/sa_profile), and install it in `//vendor/hihope/rk3568/animation`. The content is as follows:
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ci    ```text
35e41f4b71Sopenharmony_ci    profile
36e41f4b71Sopenharmony_ci    ├── BUILD.gn
37e41f4b71Sopenharmony_ci    ├── animation.json
38e41f4b71Sopenharmony_ci    ```
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci3. Create the `resources` folder by referring to [default folder of power-off charging animation image resources](https://gitee.com/openharmony/powermgr_battery_manager/tree/master/charger/resources) to store the images that form the animation, and install the folder in `//vendor/hihope/rk3568/animation`. The content is as follows:
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci    ```text
43e41f4b71Sopenharmony_ci    animation
44e41f4b71Sopenharmony_ci    ├── resources
45e41f4b71Sopenharmony_ci    ├── profile
46e41f4b71Sopenharmony_ci    ```
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci4. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_battery_manager/blob/master/charger/resources/BUILD.gn) in the default folder of power-off charging animation configuration, and put it to the `//vendor/hihope/rk3568/animation/resource` directory. The configuration is as follows:
49e41f4b71Sopenharmony_ci    ```gn
50e41f4b71Sopenharmony_ci    import("//build/ohos.gni")
51e41f4b71Sopenharmony_ci
52e41f4b71Sopenharmony_ci    ohos_prebuilt_etc("resources_config0") {
53e41f4b71Sopenharmony_ci        source = "loop00000.png"                                        # Image resource
54e41f4b71Sopenharmony_ci        relative_install_dir = "poweroff_charger_animation/resources"
55e41f4b71Sopenharmony_ci        install_images = [ chipset_base_dir ]                           # Required configuration for installing the resources folder in the vendor directory.
56e41f4b71Sopenharmony_ci        part_name = "product_rk3568"
57e41f4b71Sopenharmony_ci    }
58e41f4b71Sopenharmony_ci    ```
59e41f4b71Sopenharmony_ci
60e41f4b71Sopenharmony_ci5. Write the custom **animation.json** file by referring to the [animation.json](https://gitee.com/openharmony/powermgr_battery_manager/blob/master/charger/sa_profile/animation.json) file in the default folder of power-off charging animation image resources.  The configuration is as follows:
61e41f4b71Sopenharmony_ci
62e41f4b71Sopenharmony_ci    ```json
63e41f4b71Sopenharmony_ci    {
64e41f4b71Sopenharmony_ci        "animation": {
65e41f4b71Sopenharmony_ci            "components": [
66e41f4b71Sopenharmony_ci                {
67e41f4b71Sopenharmony_ci                    "type": "UIImageView",
68e41f4b71Sopenharmony_ci                    "id": "Charging_Animation_Image",
69e41f4b71Sopenharmony_ci                    "x": 200,
70e41f4b71Sopenharmony_ci                    "y": 480,
71e41f4b71Sopenharmony_ci                    "w": 400,
72e41f4b71Sopenharmony_ci                    "h": 400,
73e41f4b71Sopenharmony_ci                    "resPath": "/system/etc/charger/resources/",
74e41f4b71Sopenharmony_ci                    "imgCnt": 62,
75e41f4b71Sopenharmony_ci                    "updInterval": 60,
76e41f4b71Sopenharmony_ci                    "filePrefix": "loop"
77e41f4b71Sopenharmony_ci                },
78e41f4b71Sopenharmony_ci                {
79e41f4b71Sopenharmony_ci                    "type": "UILabel",
80e41f4b71Sopenharmony_ci                    "id": "Charging_Percent_Label",
81e41f4b71Sopenharmony_ci                    "text": "",
82e41f4b71Sopenharmony_ci                    "x": 326,
83e41f4b71Sopenharmony_ci                    "y": 616,
84e41f4b71Sopenharmony_ci                    "w": 68,
85e41f4b71Sopenharmony_ci                    "h": 48,
86e41f4b71Sopenharmony_ci                    "fontSize": 32,
87e41f4b71Sopenharmony_ci                    "fontColor": "#ffffffe6",
88e41f4b71Sopenharmony_ci                    "bgColor": "#00000000"
89e41f4b71Sopenharmony_ci                    "align": "center"
90e41f4b71Sopenharmony_ci                }
91e41f4b71Sopenharmony_ci            ]
92e41f4b71Sopenharmony_ci        },
93e41f4b71Sopenharmony_ci        "lackpowerChargingPrompt": {
94e41f4b71Sopenharmony_ci            "components": [
95e41f4b71Sopenharmony_ci                {
96e41f4b71Sopenharmony_ci                    "type": "UILabel",
97e41f4b71Sopenharmony_ci                    "id": "LackPower_Charging_Label",
98e41f4b71Sopenharmony_ci                    "text": "Low battery level",
99e41f4b71Sopenharmony_ci                    "x": 229,
100e41f4b71Sopenharmony_ci                    "y": 1037,
101e41f4b71Sopenharmony_ci                    "w": 250,
102e41f4b71Sopenharmony_ci                    "h": 45,
103e41f4b71Sopenharmony_ci                    "fontSize": 42,
104e41f4b71Sopenharmony_ci                    "fontColor": "#ff0000ff",
105e41f4b71Sopenharmony_ci                    "bgColor": "#00000000",
106e41f4b71Sopenharmony_ci                    "align": "center"
107e41f4b71Sopenharmony_ci                }
108e41f4b71Sopenharmony_ci            ]
109e41f4b71Sopenharmony_ci        },
110e41f4b71Sopenharmony_ci        "lackpowerNotChargingPrompt": {
111e41f4b71Sopenharmony_ci            "components": [
112e41f4b71Sopenharmony_ci                {
113e41f4b71Sopenharmony_ci                    "type": "UILabel",
114e41f4b71Sopenharmony_ci                    "id": "LackPower_Not_Charging_Label",
115e41f4b71Sopenharmony_ci                    "text": "Low battery level. Please connect the power supply.",
116e41f4b71Sopenharmony_ci                    "x": 110,
117e41f4b71Sopenharmony_ci                    "y": 1037,
118e41f4b71Sopenharmony_ci                    "w": 500,
119e41f4b71Sopenharmony_ci                    "h": 45,
120e41f4b71Sopenharmony_ci                    "fontSize": 42,
121e41f4b71Sopenharmony_ci                    "fontColor": "#ff0000ff",
122e41f4b71Sopenharmony_ci                    "bgColor": "#00000000",
123e41f4b71Sopenharmony_ci                    "align": "center"
124e41f4b71Sopenharmony_ci                }
125e41f4b71Sopenharmony_ci            ]
126e41f4b71Sopenharmony_ci        }
127e41f4b71Sopenharmony_ci    }
128e41f4b71Sopenharmony_ci    ``` 
129e41f4b71Sopenharmony_ci
130e41f4b71Sopenharmony_ci    **Table 1** Description of the power-off charging animation configuration
131e41f4b71Sopenharmony_ci    | Item| Description|
132e41f4b71Sopenharmony_ci    | -------- | -------- |
133e41f4b71Sopenharmony_ci    | animation | Animation configuration.|
134e41f4b71Sopenharmony_ci    | lackpowerChargingPrompt| Prompt for the **Charging** state in the low battery level.|
135e41f4b71Sopenharmony_ci    | lackpowerNotChargingPrompt | Prompt for the **Not charging** state in the low battery level.|
136e41f4b71Sopenharmony_ci    | components | Component set.|
137e41f4b71Sopenharmony_ci    | type | Component type.|
138e41f4b71Sopenharmony_ci    | id | Component ID.|
139e41f4b71Sopenharmony_ci    | text | Text content of a component.|
140e41f4b71Sopenharmony_ci    | x | X coordinate of the component.|
141e41f4b71Sopenharmony_ci    | y | Y coordinate of the component.|
142e41f4b71Sopenharmony_ci    | w | Component width, in pixels.|
143e41f4b71Sopenharmony_ci    | h | Component height, in pixels.|
144e41f4b71Sopenharmony_ci    | fontSize | Font size of the text.|
145e41f4b71Sopenharmony_ci    | fontColor | Font color of the text.|
146e41f4b71Sopenharmony_ci    | align | Text alignment mode.|
147e41f4b71Sopenharmony_ci    | imgCnt | Number of images.|
148e41f4b71Sopenharmony_ci    | updInterval | Image updating interval, in ms.|
149e41f4b71Sopenharmony_ci    | filePrefix | Prefix of an image file name.|
150e41f4b71Sopenharmony_ci    | resPath | Resource file path of the component.|
151e41f4b71Sopenharmony_ci
152e41f4b71Sopenharmony_ci
153e41f4b71Sopenharmony_ci
154e41f4b71Sopenharmony_ci6. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_battery_manager/blob/master/charger/sa_profile/BUILD.gn) file in the default folder of power-off charging animation configuration to pack the `animation_config.json` file to the `//vendor/etc/charger` directory. The configuration is as follows:
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_ci    ```gn
157e41f4b71Sopenharmony_ci    import("//build/ohos.gni")
158e41f4b71Sopenharmony_ci
159e41f4b71Sopenharmony_ci    ohos_prebuilt_etc("animation_config") {
160e41f4b71Sopenharmony_ci        source = "animation.json"             # Reference build/ohos.gni.
161e41f4b71Sopenharmony_ci        relative_install_dir = "animation/resources"
162e41f4b71Sopenharmony_ci        install_images = [ chipset_base_dir ] # Required configuration for installing the battery_config.json file in the vendor directory.
163e41f4b71Sopenharmony_ci        part_name = "product_rk3568"          # Set part_name to product_rk3568 for subsequent build.
164e41f4b71Sopenharmony_ci    }
165e41f4b71Sopenharmony_ci    ```
166e41f4b71Sopenharmony_ci
167e41f4b71Sopenharmony_ci7. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
168e41f4b71Sopenharmony_ci
169e41f4b71Sopenharmony_ci    ```json
170e41f4b71Sopenharmony_ci    {
171e41f4b71Sopenharmony_ci    "parts": {
172e41f4b71Sopenharmony_ci        "product_rk3568": {
173e41f4b71Sopenharmony_ci        "module_list": [
174e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/default_app_config:default_app_config",
175e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/image_conf:custom_image_conf",
176e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
177e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
178e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/etc:product_etc_conf",
179e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/battery/profile:battery_config",
180e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/animation/profile:animation_config", # Add the configuration for building of animation_config.
181e41f4b71Sopenharmony_ci            "//vendor/hihope/rk3568/animation/resource/resources_config" # Add the configuration for building of image resources.
182e41f4b71Sopenharmony_ci        ]
183e41f4b71Sopenharmony_ci        }
184e41f4b71Sopenharmony_ci    },
185e41f4b71Sopenharmony_ci    "subsystem": "product_hihope"
186e41f4b71Sopenharmony_ci    }
187e41f4b71Sopenharmony_ci    ```
188e41f4b71Sopenharmony_ci    In the preceding code, `//vendor/hihope/rk3568/animation/` is the folder path, `profile` is the folder name, and `animation_config` is the build target.
189e41f4b71Sopenharmony_ci
190e41f4b71Sopenharmony_ci8. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
191e41f4b71Sopenharmony_ci
192e41f4b71Sopenharmony_ci    ```shell
193e41f4b71Sopenharmony_ci    ./build.sh --product-name rk3568 --ccache
194e41f4b71Sopenharmony_ci    ``` 
195e41f4b71Sopenharmony_ci
196e41f4b71Sopenharmony_ci9. Burn the customized version to the DAYU200 development board.
197e41f4b71Sopenharmony_ci
198e41f4b71Sopenharmony_ci### Debugging and Verification
199e41f4b71Sopenharmony_ci1. Modify the code configuration.
200e41f4b71Sopenharmony_ci    Code path: `base/startup/init/services/init/init_config.c`
201e41f4b71Sopenharmony_ci    Function: `ReadConfig`
202e41f4b71Sopenharmony_ci    Before the modification:
203e41f4b71Sopenharmony_ci    ```c
204e41f4b71Sopenharmony_ci    void ReadConfig(void)
205e41f4b71Sopenharmony_ci    {
206e41f4b71Sopenharmony_ci        // parse cfg
207e41f4b71Sopenharmony_ci        char buffer[32] = {0}; // 32 reason max leb
208e41f4b71Sopenharmony_ci        uint32_t len = sizeof(buffer);
209e41f4b71Sopenharmony_ci        SystemReadParam("ohos.boot.mode", buffer, &len);
210e41f4b71Sopenharmony_ci        INIT_LOGI("ohos.boot.mode %s", buffer);
211e41f4b71Sopenharmony_ci        if (strcmp(buffer, "charger_mode") == 0) {
212e41f4b71Sopenharmony_ci            // Execute this branch process for product customization.
213e41f4b71Sopenharmony_ci            ParseInitCfg(INIT_CONFIGURATION_FILE, NULL);
214e41f4b71Sopenharmony_ci            ReadFileInDir(OTHER_CHARGE_PATH, ".cfg", ParseInitCfg, NULL);
215e41f4b71Sopenharmony_ci            ParseInitCfgByPriority();
216e41f4b71Sopenharmony_ci        } else if (strcmp(buffer, "charger") == 0) {
217e41f4b71Sopenharmony_ci            ParseInitCfg(INIT_CONFIGURATION_FILE, NULL);
218e41f4b71Sopenharmony_ci            ReadFileInDir(OTHER_CHARGE_PATH, ".cfg", ParseInitCfg, NULL);
219e41f4b71Sopenharmony_ci        } else if (InUpdaterMode() == 0) {
220e41f4b71Sopenharmony_ci            ParseInitCfg(INIT_CONFIGURATION_FILE, NULL);
221e41f4b71Sopenharmony_ci            ParseInitCfgByPriority();
222e41f4b71Sopenharmony_ci        } else {
223e41f4b71Sopenharmony_ci            ReadFileInDir("/etc", ".cfg", ParseInitCfg, NULL);
224e41f4b71Sopenharmony_ci        }
225e41f4b71Sopenharmony_ci    }
226e41f4b71Sopenharmony_ci    ```
227e41f4b71Sopenharmony_ci    After the modification:
228e41f4b71Sopenharmony_ci    ```c
229e41f4b71Sopenharmony_ci    void ReadConfig(void)
230e41f4b71Sopenharmony_ci    {
231e41f4b71Sopenharmony_ci        // parse cfg
232e41f4b71Sopenharmony_ci        char buffer[32] = {0}; // 32 reason max leb
233e41f4b71Sopenharmony_ci        uint32_t len = sizeof(buffer);
234e41f4b71Sopenharmony_ci        SystemReadParam("ohos.boot.mode", buffer, &len);
235e41f4b71Sopenharmony_ci        INIT_LOGI("ohos.boot.mode %s", buffer);
236e41f4b71Sopenharmony_ci        ParseInitCfg(INIT_CONFIGURATION_FILE, NULL);
237e41f4b71Sopenharmony_ci        ReadFileInDir(OTHER_CHARGE_PATH, ".cfg", ParseInitCfg, NULL);
238e41f4b71Sopenharmony_ci        ParseInitCfgByPriority();
239e41f4b71Sopenharmony_ci    }
240e41f4b71Sopenharmony_ci    ```
241e41f4b71Sopenharmony_ci
242e41f4b71Sopenharmony_ci2. Use the hdc tool to run the following commands to force the development board to enter the power-off charging state.
243e41f4b71Sopenharmony_ci    ```shell
244e41f4b71Sopenharmony_ci    hdc shell
245e41f4b71Sopenharmony_ci    reboot charge
246e41f4b71Sopenharmony_ci    ```
247e41f4b71Sopenharmony_ci
248e41f4b71Sopenharmony_ci    ![animation_initial_power](figures/animation_initial_power.jpg)
249e41f4b71Sopenharmony_ci
250e41f4b71Sopenharmony_ci3. Go to the custom battery level configuration directory. The path of DAYU200 is used as an example.
251e41f4b71Sopenharmony_ci    ```shell
252e41f4b71Sopenharmony_ci    cd /data/service/el0/battery/battery
253e41f4b71Sopenharmony_ci    ```
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ci4. Change the battery power, and observe the number change on the charging animation.
256e41f4b71Sopenharmony_ci    ```shell
257e41f4b71Sopenharmony_ci    cat capacity
258e41f4b71Sopenharmony_ci    ```
259e41f4b71Sopenharmony_ci    Change the current battery power to **3**.
260e41f4b71Sopenharmony_ci    ```shell
261e41f4b71Sopenharmony_ci    echo 3 > capacity
262e41f4b71Sopenharmony_ci    ```
263e41f4b71Sopenharmony_ci    ![animation_charing_power](figures/animation_charing_power.jpg)
264e41f4b71Sopenharmony_ci
265e41f4b71Sopenharmony_ci5. Switch to the **Not charging** state. The device is powered off.
266e41f4b71Sopenharmony_ci    ```shell
267e41f4b71Sopenharmony_ci    echo Not charging > status
268e41f4b71Sopenharmony_ci    ```
269e41f4b71Sopenharmony_ci
270e41f4b71Sopenharmony_ci6. Change the charging status when the battery level is extremely low (1% by default). This can trigger the mapping animation or device shutdown.
271e41f4b71Sopenharmony_ci    
272e41f4b71Sopenharmony_ci    1. Go to the custom battery level configuration directory.
273e41f4b71Sopenharmony_ci    ```shell
274e41f4b71Sopenharmony_ci    cd /data/service/el0/battery/battery
275e41f4b71Sopenharmony_ci    cat capacity
276e41f4b71Sopenharmony_ci    ```
277e41f4b71Sopenharmony_ci    2. Change the current battery power to **1**.
278e41f4b71Sopenharmony_ci    ```shell
279e41f4b71Sopenharmony_ci    echo 1 > capacity
280e41f4b71Sopenharmony_ci    ```
281e41f4b71Sopenharmony_ci    3. Check the charging status.
282e41f4b71Sopenharmony_ci    ```shell
283e41f4b71Sopenharmony_ci    cat status
284e41f4b71Sopenharmony_ci    ```
285e41f4b71Sopenharmony_ci    The current status is **Charging**.
286e41f4b71Sopenharmony_ci
287e41f4b71Sopenharmony_ci    ![animation_low_power](figures/animation_low_power.jpg)
288e41f4b71Sopenharmony_ci
289e41f4b71Sopenharmony_ci    4. Switch to the **Not charging** state.
290e41f4b71Sopenharmony_ci    ```shell
291e41f4b71Sopenharmony_ci    echo Not charging > status
292e41f4b71Sopenharmony_ci    ```
293e41f4b71Sopenharmony_ci    ![animation_low_power2](figures/animation_low_power2.jpg)
294e41f4b71Sopenharmony_ci
295e41f4b71Sopenharmony_ci7. Test the power-off animation customization function by changing related images. The procedure is the same as that described above.
296e41f4b71Sopenharmony_ci
297e41f4b71Sopenharmony_ci    1. Initial state
298e41f4b71Sopenharmony_ci
299e41f4b71Sopenharmony_ci    ![animation_charging_power2](figures/animation_charging_power2.jpg)
300e41f4b71Sopenharmony_ci
301e41f4b71Sopenharmony_ci    2. %3 battery power
302e41f4b71Sopenharmony_ci
303e41f4b71Sopenharmony_ci    ![animation_initial_power2](figures/animation_initial_power2.jpg)
304e41f4b71Sopenharmony_ci
305e41f4b71Sopenharmony_ci    3. 1% battery power, **Charging** state
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ci    ![animation_low_power](figures/animation_low_power.jpg)
308e41f4b71Sopenharmony_ci
309e41f4b71Sopenharmony_ci    4. 1% battery power, **Not charging** state
310e41f4b71Sopenharmony_ci
311e41f4b71Sopenharmony_ci    ![animation_low_power2](figures/animation_low_power2.jpg)
312e41f4b71Sopenharmony_ci
313e41f4b71Sopenharmony_ci    5. When the battery level is higher than 1%, the system switches to the **Not charging** state.
314e41f4b71Sopenharmony_ci    ```shell
315e41f4b71Sopenharmony_ci    echo 3 > capacity
316e41f4b71Sopenharmony_ci    echo Not charging > status
317e41f4b71Sopenharmony_ci    ```
318e41f4b71Sopenharmony_ci
319e41f4b71Sopenharmony_ci
320e41f4b71Sopenharmony_ci
321e41f4b71Sopenharmony_ci## Reference
322e41f4b71Sopenharmony_ciDuring development, you can refer to the [default power-off animation configuration](https://gitee.com/openharmony/powermgr_battery_manager/blob/master/charger/sa_profile/animation.json), as shown below:
323e41f4b71Sopenharmony_ci
324e41f4b71Sopenharmony_ci 
325e41f4b71Sopenharmony_ci```json
326e41f4b71Sopenharmony_ci{
327e41f4b71Sopenharmony_ci        "animation": {
328e41f4b71Sopenharmony_ci            "components": [
329e41f4b71Sopenharmony_ci                {
330e41f4b71Sopenharmony_ci                    "type": "UIImageView",
331e41f4b71Sopenharmony_ci                    "id": "Charging_Animation_Image",
332e41f4b71Sopenharmony_ci                    "x": 180,
333e41f4b71Sopenharmony_ci                    "y": 410,
334e41f4b71Sopenharmony_ci                    "w": 400,
335e41f4b71Sopenharmony_ci                    "h": 400,
336e41f4b71Sopenharmony_ci                    "resPath": "/system/etc/charger/resources/",
337e41f4b71Sopenharmony_ci                    "imgCnt": 62,
338e41f4b71Sopenharmony_ci                    "updInterval": 60,
339e41f4b71Sopenharmony_ci                    "filePrefix": "loop"
340e41f4b71Sopenharmony_ci                },
341e41f4b71Sopenharmony_ci                {
342e41f4b71Sopenharmony_ci                    "type": "UILabel",
343e41f4b71Sopenharmony_ci                    "id": "Charging_Percent_Label",
344e41f4b71Sopenharmony_ci                    "text": "",
345e41f4b71Sopenharmony_ci                    "x": 365,
346e41f4b71Sopenharmony_ci                    "y": 580,
347e41f4b71Sopenharmony_ci                    "w": 65,
348e41f4b71Sopenharmony_ci                    "h": 43,
349e41f4b71Sopenharmony_ci                    "fontSize": 32,
350e41f4b71Sopenharmony_ci                    "fontColor": "#ffffffe6",
351e41f4b71Sopenharmony_ci                    "bgColor": "#00000000",
352e41f4b71Sopenharmony_ci                    "align": "center"
353e41f4b71Sopenharmony_ci                }
354e41f4b71Sopenharmony_ci            ],
355e41f4b71Sopenharmony_ci        },
356e41f4b71Sopenharmony_ci        "lackpowerChargingPrompt": {
357e41f4b71Sopenharmony_ci            "components": [
358e41f4b71Sopenharmony_ci                {
359e41f4b71Sopenharmony_ci                    "type": "UILabel",
360e41f4b71Sopenharmony_ci                    "id": "LackPower_Charging_Label",
361e41f4b71Sopenharmony_ci                    "text": "Low battery level",
362e41f4b71Sopenharmony_ci                    "x": 229,
363e41f4b71Sopenharmony_ci                    "y": 1037,
364e41f4b71Sopenharmony_ci                    "w": 250,
365e41f4b71Sopenharmony_ci                    "h": 45,
366e41f4b71Sopenharmony_ci                    "fontSize": 42,
367e41f4b71Sopenharmony_ci                    "fontColor": "#ff0000ff",
368e41f4b71Sopenharmony_ci                    "bgColor": "#00000000",
369e41f4b71Sopenharmony_ci                    "align": "center"
370e41f4b71Sopenharmony_ci                }
371e41f4b71Sopenharmony_ci            ]
372e41f4b71Sopenharmony_ci        },
373e41f4b71Sopenharmony_ci        "lackpowerNotChargingPrompt": {
374e41f4b71Sopenharmony_ci            "components": [
375e41f4b71Sopenharmony_ci                {
376e41f4b71Sopenharmony_ci                    "type": "UILabel",
377e41f4b71Sopenharmony_ci                    "id": "LackPower_Not_Charging_Label",
378e41f4b71Sopenharmony_ci                    "text": "Low battery level. Please connect the power supply.",
379e41f4b71Sopenharmony_ci                    "x": 110,
380e41f4b71Sopenharmony_ci                    "y": 1037,
381e41f4b71Sopenharmony_ci                    "w": 500,
382e41f4b71Sopenharmony_ci                    "h": 45,
383e41f4b71Sopenharmony_ci                    "fontSize": 42,
384e41f4b71Sopenharmony_ci                    "fontColor": "#ff0000ff",
385e41f4b71Sopenharmony_ci                    "bgColor": "#00000000",
386e41f4b71Sopenharmony_ci                    "align": "center"
387e41f4b71Sopenharmony_ci                }
388e41f4b71Sopenharmony_ci            ]
389e41f4b71Sopenharmony_ci        }
390e41f4b71Sopenharmony_ci    }
391e41f4b71Sopenharmony_ci``` 
392e41f4b71Sopenharmony_ci
393e41f4b71Sopenharmony_ciPacking path: /system/etc/charger/resource
394