• Home
Name Date Size #Lines LOC

..--

adapter/native/syspara/12-May-2024-381263

frameworks/12-May-2024-1,3441,090

hals/12-May-2024-642469

interfaces/12-May-2024-3,2891,879

simulator/12-May-2024-6055

BUILD.gnD12-May-2024829 2219

LICENSED12-May-202410.1 KiB177150

README.mdD12-May-20242.3 KiB5638

README_zh.mdD12-May-20242.3 KiB6444

bundle.jsonD12-May-20241.8 KiB5858

README.md

1# syspara\_lite<a name="EN-US_TOPIC_0000001081867232"></a>
2
3-   [Introduction](#section469617221261)
4-   [Directory Structure](#section692981610397)
5-   [Constraints](#section741841418125)
6-   [Usage](#section1464106163817)
7-   [Repositories Involved](#section641143415335)
8
9## Introduction<a name="section469617221261"></a>
10
11The syspara\_lite module provides APIs for obtaining device information, such as the product name, brand name, and manufacturer name, based on the OpenHarmony Product Compatibility Specifications \(PCS\). It also provides APIs for setting and obtaining system attributes.
12
13## Directory Structure<a name="section692981610397"></a>
14
15```
16base/startup/syspara_lite/    # syspara_lite module
17├── frameworks             # Source files for the syspara_lite module
18├── hals                   # Header files for the hardware abstraction layer of the syspara_lite module
19└── interfaces             # External APIs for the syspara_lite module
20```
21
22## Constraints<a name="section741841418125"></a>
23
24-   The syspara\_lite module is developed using the C language.
25-   It supports mini-system devices \(reference memory ≥ 128 KB\), such as Hi3861 V100, and small-system devices \(reference memory ≥ 1 MB\), such as Hi3516D V300 and Hi3518E V300.
26-   The fields of system attributes are defined by original equipment manufacturers \(OEMs\). Currently, only default values are provided. The specific values need to be adjusted as required.
27
28## Usage<a name="section1464106163817"></a>
29
30To obtain the system attributes, use the following code:
31
32```
33char* value1 = GetDeviceType();
34printf("Device type =%s\n", value1);
35free(value1);
36char* value2 = GetManufacture();
37printf("Manufacture =%s\n", value2);
38free(value2);
39char* value3 = GetBrand();
40printf("GetBrand =%s\n", value3);
41free(value3);
42```
43
44## Repositories Involved<a name="section641143415335"></a>
45
46[Startup subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/startup.md)
47
48**[startup\_syspara\_lite](https://gitee.com/openharmony/startup_syspara_lite/blob/master/README.md)**
49
50[startup\_appspawn\_lite](https://gitee.com/openharmony/startup_appspawn_lite/blob/master/README.md)
51
52[startup\_bootstrap\_lite](https://gitee.com/openharmony/startup_bootstrap_lite/blob/master/README.md)
53
54[startup\_init\_lite](https://gitee.com/openharmony/startup_init_lite/blob/master/README.md)
55
56

README_zh.md

1# syspara系统属性组件<a name="ZH-CN_TOPIC_0000001081867232"></a>
2
3-   [简介](#section469617221261)
4-   [目录](#section692981610397)
5-   [约束](#section741841418125)
6-   [使用说明](#section1464106163817)
7-   [相关仓](#section641143415335)
8
9## 简介<a name="section469617221261"></a>
10
11系统属性组件,根据OpenHarmony产品兼容性规范提供获取设备信息的接口,如:产品名、品牌名、厂家名等,同时提供设置/读取系统属性的接口。
12
13## 目录<a name="section692981610397"></a>
14
15```
16base/startup/syspara_lite/    # 系统属性组件
17├── frameworks             # 系统属性组件源文件目录
18├── hals                   # 系统属性组件硬件抽象层头文件目录
19└── interfaces             # 系统属性组件对外接口目录
20```
21
22## 约束<a name="section741841418125"></a>
23
24-   使用C语言开发。
25-   同时支持轻量系统设备(参考内存≥128KB),如Hi3861V100以及小型系统设备(参考内存≥1MB),如Hi3516DV300、Hi3518EV300。
26-   系统属性各字段由OEM厂商负责定义,当前方案仅提供框架及默认值。具体值需产品方按需进行调整。
27
28## 使用说明<a name="section1464106163817"></a>
29
30获取系统属性
31
32```
33char* value1 = GetDeviceType();
34printf("Device type =%s\n", value1);
35free(value1);
36char* value2 = GetManufacture();
37printf("Manufacture =%s\n", value2);
38free(value2);
39char* value3 = GetBrand();
40printf("GetBrand =%s\n", value3);
41free(value3);
42```
43
44修改系统版本号
45
46```
47系统版本号参数定义在startup_init_lite仓库的/services/etc/param/ohos.para文件
48const.product.software.version参数的值即为展示的系统版本号
49等同于之前修改宏OHOS_DISPLAY_VERSION[]的值
50```
51
52## 相关仓<a name="section641143415335"></a>
53
54[启动恢复子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%90%AF%E5%8A%A8%E6%81%A2%E5%A4%8D%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
55
56**[startup\_syspara\_lite](https://gitee.com/openharmony/startup_syspara_lite/blob/master/README_zh.md)**
57
58[startup\_appspawn\_lite](https://gitee.com/openharmony/startup_appspawn_lite/blob/master/README_zh.md)
59
60[startup\_bootstrap\_lite](https://gitee.com/openharmony/startup_bootstrap_lite/blob/master/README_zh.md)
61
62[startup\_init\_lite](https://gitee.com/openharmony/startup_init_lite/blob/master/README_zh.md)
63
64