未验证 提交 0c857541 编写于 作者: O openharmony_ci 提交者: Gitee

!4134 增加readme中缺失的英文文档

Merge pull request !4134 from wusongqing/E0518V4
......@@ -31,3 +31,15 @@ This repository stores device and application development documents provided by
OpenHarmony_v1.x_release: OpenHarmony v1.1.4 LTS. [Learn more](en/release-notes/OpenHarmony-v1-1-4-LTS.md)
[More versions](en/release-notes/)
## Third-Party Open-Source Software and License Notice
Third-party license: [Third-Party Open-Source Software and License Notice](en/contribute/third-party-open-source-software-and-license-notice.md)
## How to Contribute
A great open-source project wouldn't be possible without the hard work of many contributors. We'd like to invite anyone from around the world to [participate](en/contribute/how-to-contribute.md) in this exciting journey, and we're grateful for your time, passion, and efforts!
You can evaluate available documents, make simple modifications, provide feedback on document quality, and contribute your original content. For details, see [Documentation Contribution](en/contribute/documentation-contribution.md).
Excellent contributors will be awarded and the contributions will be publicized in the developer community.
\ No newline at end of file
......@@ -4,7 +4,7 @@
- [Code of Conduct](code-of-conduct.md)
- [Code Contribution](code-contribution.md)
- [Contribution Process](contribution-process.md)
- [Auto-Test](../readme/test_subsystem.md)
- [Auto-Test](../readme/test.md)
- [Documentation Contribution](documentation-contribution.md)
- [Writing Instructions](writing-instructions.md)
- [Communication in Community](communication-in-community.md)
......
# Overview
This project stores OpenHarmony documentation, including the quick start guide, development guides, and API reference. We appreciate your contribution to the OpenHarmony documentation.
## Contents
- [OpenHarmony Overview](OpenHarmony-Overview.md)
- Device development
- Mini and Small System Development Guidelines \(Reference Memory < 128 MB\)
- Device development
- **overview**: [Device Development Overview](device-dev/Readme-EN.md)
- **quick-start**: [Quick Start](device-dev/quick-start/Readme-EN.md) \(covering environment setup, source code acquisition, build, and burning\)
- Basic development capabilities
- **Kernel**: [Kernel for Mini Systems](device-dev/kernel/kernel-mini.md)
- **Kernel:**[Kernel for Small Systems](device-dev/kernel/kernel-small.md)
- **Drivers**: [drivers](device-dev/driver/Readme-EN.md)
- **Subsystems**: [subsystems](device-dev/subsystems/Readme-EN.md) \(such as compilation and building, graphics, DFX, and XTS\)
- **Security**: [privacy and security](device-dev/security/Readme-EN.md)
- **guide**:
- [WLAN-connected Products](device-dev/guide/device-wlan.md) \(LED peripheral control and third-party SDK integration\)
- [Screenless Cameras](device-dev/guide/device-iotcamera-control.md) \(camera control\)
- [Cameras with a Screen](device-dev/guide/device-camera.md) \(screen and camera control, visual application development\)
- **porting**:
- [Third-Party Library Porting Guide for Mini and Small Systems](device-dev/porting/porting-thirdparty.md)
- [Mini System SoC Porting Guide](device-dev/porting/porting-minichip.md)
- [Small System SoC Porting Guide](device-dev/porting/porting-smallchip.md)
- **bundles**:
- [HPM Bundle Development Specifications](device-dev/bundles/bundles-standard-rules.md)
- [HPM Bundle Development Guidelines](device-dev/bundles/bundles-guide.md)
- [HPM User Guide](device-dev/bundles/bundles-demo.md)
- Standard System Development Guidelines \(Reference Memory ≥ 128 MB\)
- Device development
- **overview**: [Device Development Overview](device-dev/Readme-EN.md)
- **quick-start**: [Quick Start](device-dev/quick-start/quickstart-standard.md) \(covering environment setup, source code acquisition, build, and burning\)
- Basic development capabilities
- **Kernel**: [Kernel for the Standard System](device-dev/kernel/kernel-standard.md)
- **Drivers**: [Drivers](device-dev/driver/Readme-EN.md)
- **Subsystems**: [Subsystems](device-dev/subsystems/Readme-EN.md) \(such as compilation and building, graphics, DFX, and XTS\)
- **Security**: [Privacy and Security](device-dev/security/Readme-EN.md)
- **guide**:
- [Development Guidelines on Clock Apps](device-dev/guide/device-clock-guide.md)
- [Development Example for Platform Drivers](device-dev/guide/device-driver-demo.md)
- [Development Example for Peripheral Drivers](device-dev/guide/device-outerdriver-demo.md)
- **porting**:
- [Standard System SoC Porting Guide](device-dev/porting/standard-system-porting-guide.md)
- [A Method for Rapidly Porting the OpenHarmony Linux Kernel ](device-dev/porting/porting-linux-kernel.md)
- **bundles**:
- [HPM Bundle Development Specifications](device-dev/bundles/bundles-standard-rules.md)
- [HPM Bundle Development Guidelines](device-dev/bundles/bundles-guide.md)
- [HPM User Guide](device-dev/bundles/bundles-demo.md)
- [FAQs](device-dev/faqs/Readme-EN.md)
- App development
- **Overview**: [Application Development Overview](application-dev/application-dev-guide.md)
- **quick-start**: [Quick Start](application-dev/quick-start/Readme-EN.md)
- **ui**: [UI](application-dev/ui/Readme-EN.md)
- **media**: [Media](application-dev/media/Readme-EN.md)
- **security**: [Security](application-dev/security/Readme-EN.md)
- **connectivity**: [Connectivity](application-dev/connectivity/Readme-EN.md)
- **Database**[Data Management](application-dev/database/Readme-CN.md)
- **usb**: [USB Service](application-dev//usb/Readme-EN.md)
- **dfx**: [DFX](application-dev/dfx/Readme-EN.md)
- **reference**: [Development References](application-dev/reference/Readme-EN.md)
- **glossary**: [Glossary](glossary.md)
## Version Change History
For details, see [OpenHarmony Release Notes](release-notes/Readme.md).
## Third-Party Open-Source Software and License Notice
3rd-Party-License: [Third-Party Open-Source Software and License Notice](contribute/third-party-open-source-software-and-license-notice.md)
## How to Contribute
A great open-source project wouldn't be possible without the hard work of many contributors. We'd like to invite anyone from around the world to [participate](en/contribute/how-to-contribute.md) in this exciting journey, and we're grateful for your time, passion, and efforts!
You can evaluate available documents, make simple modifications, provide feedback on document quality, and contribute your original content. For details, see [Documentation Contribution](en/contribute/documentation-contribution.md).
Excellent contributors will be awarded and the contributions will be publicized in the developer community.
# OpenHarmony Documentation
This repository stores a complete range of OpenHarmony documentation. The content outline is as follows:
- OpenHarmony Development
- [Device Development](device-dev/Readme-EN.md)
- [Application Development](application-dev/Readme-EN.md)
- [Release Notes](release-notes/Readme.md)
- [Subsystems](./readme)
- OpenHarmony Contribution
- [Contribution Guide](contribute/contribution-guide.md)
- [OpenHarmony Part and API Design Reference](./design)
# Compilation and Building<a name="EN-US_TOPIC_0000001162500073"></a>
The compilation and building subsystem provides a framework based on Generate Ninja (GN) and Ninja. This subsystem allows you to:
- Build products based on different chipset platforms, for example, Hi3516D V300.
- Package capabilities required by a product by assembling modules based on the product configuration.
## Basic Concepts<a name="section175012297491"></a>
It is considered best practice to learn the following basic concepts before you start building:
- Platform
A combination of development boards and kernels. Supported subsystems and components vary with the platform.
- Subsystem
OpenHarmony is designed with a layered architecture, which consists of the kernel layer, system service layer, framework layer, and application layer from the bottom up. System functions are developed by the level of system, subsystem, and component. In a multi-device deployment scenario, you can customize subsystems and components as required. A subsystem is a logical concept and is a flexible combination of components.
- Component
A component is a reusable software unit that contains source code, configuration files, resource files, and build scripts. A component can be built independently, integrated in binary mode, and then tested independently.
- GN
GN is a system used to generate build files for Ninja.
- Ninja
Ninja is a small high-speed build system.
## Working Principles<a name="section193961322175011"></a>
The compilation and build process of OpenHarmony is as follows:
- Parsing commands: Parse the name of the product to build and load related configurations.
- Running GN: Configure the toolchain and global options based on the parsed product name and compilation type.
- Running Ninja: Start building and generate a product distribution.
## Building a Mini or Small System<a name="section119041639115811"></a>
See [build\_lite](https://gitee.com/openharmony/build_lite/blob/master/README.md).
## Building a Standard System<a name="section8750514195912"></a>
See the readme of the **build** repository.
## Repositories Involved<a name="section44651652878"></a>
**Compilation and building**
[build\_lite](https://gitee.com/openharmony/build_lite)
[build](https://gitee.com/openharmony/build)
# Customization
## Introduction
When you develop OpenHarmony devices or applications for specific industries or regions, you may need to customize the system to meet the requirements of specific scenarios. This is where the customization subsystem comes into the picture. This subsystem provides enterprise device management and policy configuration.
| Module Name | Description |
| :--------------: | ------------------------------------------------------------ |
| Config Policy Kit | Provides APIs for service modules to obtain the configuration directory or configuration file path at different configuration levels.|
| EnterpriseDeviceManagement Kit| Provides the management application development framework, management mode setting, and enterprise device management capabilities for developing Mobile Device Management (MDM) applications. You can leverage the system-level management APIs for your applications in the enterprise context.|
## System Architecture
**Figure 1** Customization subsystem
![](figures/customization-subsystem.png)
- Application layer
System applications, extended applications, and third-party applications invoke interfaces at the interface layer to configure functions or obtain specific data.
- Interface layer
The EnterpriseDeviceManagement Kit provides system-level management APIs for applications in the enterprise context. The Config Policy Kit provides APIs for service modules to obtain the configuration directory or configuration file path at different configuration levels.
- Service layer
EnterpriseDeviceManagerService provides specific implementation capabilities for EnterpriseDeviceManagement Kit at the interface layer to help ensure normal service running.
## Directory Structure
The source code of the Customization subsystem is stored in **/base/customization**. The directory structure is as follows:
```
/base/customization/
├── config_policy # Code repository of the Config Policy Kit
│ ├── frameworks # Core code of the Config Policy Kit
│ │ ├── config_policy # Module of the Config Policy Kit
│ │ │ └── src # Implementation code
│ ├── interfaces # Interfaces of the Config Policy Kit
│ │ ├── inner_api # Interfaces between Config Policy Kit subsystems
│ │ └── kits # JavaScript interfaces of the Config Policy Kit
│ └── test # Test code
├── enterprise_device_management # Code repository of the EnterpriseDeviceManagement Kit
│ ├── common # Common code
│ ├── etc # Configuration files of the processes contained in the EnterpriseDeviceManagement Kit
│ ├── interfaces # EdmKits code
│ │ └── inner_api # Subsystem interfaces
│ │ └── kits # Developer interfaces
│ ├── profile # Configuration files of the system services contained in the EnterpriseDeviceManagement Kit
│ └── services # Code for implementing the EnterpriseDeviceManagement Kit
```
## Repositories Involved
**Customization**
[customization_config_policy](https://gitee.com/openharmony/customization_config_policy)
[customization_enterprise_device_management](https://gitee.com/openharmony/customization_enterprise_device_management)
[applications_admin_provisioning](https://gitee.com/openharmony/applications_admin_provisioning)
此差异已折叠。
# Network Management<a name="ZH-CN_TOPIC_0000001162422291"></a>
## Introduction<a name="section104mcpsimp"></a>
As a mandatory component for device networking, the network management subsystem manages different types of network connections in a unified manner and provides network protocol stack capabilities. An application can call APIs to obtain connection information of a data network, query and subscribe to connection status, and transfer data by using the network protocol stack.
The network management subsystem consists of the following components:
- Basic network connection management component: provides basic network connection management and corresponding JavaScript and native APIs to implement functions, such as managing network connection priorities, querying network connection information, observing network connection status changes, performing DNS resolution, and managing physical networks.
- Network protocol stack component: provides basic network protocol stacks including HTTP, HTTPS, TCP, and UDP stacks, and corresponding JavaScript APIs.
**Figure 1** System architecture
![](figures/en_architecture-of-netmanager-subsystem.png)
## Directory Structure<a name="section119mcpsimp"></a>
```
foundation/communication/
├── netmanager_base # Basic network connection management
└── netstack # Network protocol stacks
```
## Usage<a name="section128mcpsimp"></a>
### Receiving Network Status Change Notifications<a name="section1458213210369"></a>
1. Import the **connection** namespace from **@ohos.net.connection.d.ts**.
2. Call **createNetConnection()** to create a **NetConnection object**. You can specify the network capability, network type, and timeout interval (optional).
3. Call the **on()** method of the object to subscribe to concerned events by specifying **type** and **callback**.
4. Call the **register()** method of the object to subscribe to status change notifications of the specified network.
5. When the network is available, the callback will be invoked to return the **netAvailable** event.
6. Call the **unregister()** method of the object to unsubscribe from the notifications if required.
```
// Import the package name.
import connection from '@ohos.net.connection'
let netCap = {
// Set the network type to cellular network.
bearerTypes: [connection.NetBearType.BEARER_CELLULAR],
// Set the network capability to Internet.
networkCap: [connection.NetCap.NET_CAPABILITY_INTERNET],
};
let netSpec = {
netCapabilities: netCap,
};
// Set the timeout interval to 10s.
let timeout = 10 * 1000;
// Create a NetConnection object.
let conn = connection.createNetConnection(netSpec, timeout);
// Subscribe to on_netAvailable events.
conn.on('netAvailable', (data=> {
console.log("net is available, netId is " + data.netId);
}));
// Register a listener for network status changes.
conn.register((err, data) => {});
// When the network is not used, call the unregister method to cancel the subscription.
conn.unregister((err, data) => {});
```
### Sending a Network Request<a name="section750135512369"></a>
1. Import the **http** namespace from **@ohos.net.http.d.ts**.
2. Call the **createHttp** method to create an **HttpRequest** object.
3. Call the **on()** method of the object to subscribe to the HTTP response header. This method returns a response earlier than the request. You can subscribe to HTTP Response Header events based on service requirements.
4. Call the **request()** method of the object with the URL and optional parameters of the HTTP request to initiate a network request.
5. Parse the returned result based on service requirements.
6. Call the **destroy()** method to destroy the request.
```
// Import the package name.
import http from '@ohos.net.http';
// Each httpRequest corresponds to an HttpRequestTask object and cannot be reused.
let httpRequest = http.createHttp();
// Subscribe to the HTTP response header, which is returned earlier than httpRequest. You can subscribe to HTTP Response Header events based on service requirements.
httpRequest.on('headersReceive', (data) => {
console.info('header: ' + data.header);
});
httpRequest.request(
// Set the URL of the HTTP request. You need to define the URL. Set the parameters of the GET request in extraData.
"EXAMPLE_URL",
{
method: 'POST', // Optional. The default value is GET.
// You can add the header field based on service requirements.
header: {
'Content-Type': 'application/json'
},
// This field is used to transfer data when the POST request is used.
extraData: {
"data": "data to send",
},
connectTimeout: 60000, // Optional. The default value is 60 seconds.
readTimeout: 60000, // Optional. The default value is 60 seconds.
},(err, data) => {
if (!err) {
// data.result contains the HTTP response. Parse the response based on service requirements.
console.info('Result:' + data.result);
console.info('code:' + data.responseCode);
// data.header contains the HTTP response header. Parse the content based on service requirements.
console.info('header:' + data.header);
console.info('header:' + data.cookies);
} else {
console.info('error:' + err);
}
// Call the destroy() method to release resources after the call is complete.
httpRequest.destroy();
}
);
```
## Repositories Involved<a name="section152mcpsimp"></a>
**Network Management Subsystem**
[communication_netmanager_base](https://gitee.com/openharmony/communication_netmanager_base/blob/master/README_zh.md)
[communication_netstack](https://gitee.com/openharmony/communication_netstack/blob/master/README_zh.md)
# Security<a name="EN-US_TOPIC_0000001087014383"></a>
## Introduction<a name="section11660541593"></a>
The security subsystem provides system, data, and application security capabilities to protect system and user data of OpenHarmony.
It implemens application integrity verification, application permission management, device authentication, OpenHarmony Universal KeyStore (HUKS) key management, and data transfer management.
## Architecture<a name="section342962219551"></a>
**Figure 1** Security subsystem architecture<a name="fig4460722185514"></a>
![](figures/security_subsustem_architecture.png)
The security subsystem consists of the following functional modules:
- Interface layer: provides APIs to developers, some of which are only available for system applications
- Application permission management: implements permission management for the application framework subsystem and provides APIs for applications to request permissions and query the permission granting status.
- Application integrity verification: verifies application integrity during application signing and installation.
- Device authentication: provides key agreement and trusted device management capabilities for interconnections between devices in a distributed network.
- HUKS key management: provides the key management service for basic device authentication.
- Data transfer management: provides API definitions related to data transfer management and control.
## Directory Structure<a name="section92711824195113"></a>
```
/base/security
├── appverify # Application integrity verification
├── dataclassification # Data transfer management
├── device_auth # Device authentication
├── huks # HUKS key management
└── permission # Permission management
```
## Constraints<a name="section7715171045219"></a>
- In the current version, application permission management is available only for local applications. (The stub mode is used for joint commissioning of upper-layer distributed services.)
- Device authentication includes authentication for devices with the same account and peer-to-peer device authentication. Currently, only the latter is available. (The stub mode is used for joint commissioning of upper-layer distributed services.)
- OpenHarmony-specific certificates are used for application integrity verification. The corresponding public key certificates and private keys are preset in the open-source code repositories of OpenHarmony to provide offline signing and verification capabilities for the open-source community. The public key certificates and the corresponding private keys need to be replaced in commercial versions that are based on OpenHarmony.
## Usage<a name="section2057642312536"></a>
#### Application Permission Management
In OpenHarmony, applications and system services run in independent sandboxes. Both processes and data are isolated from each other to protect the security of application data. However, services or applications running in the sandboxes provide some APIs to implement specific functionalities. To access these APIs across processes, applications in other sandboxes need the required permissions, which are granted and managed based on a permission management mechanism.
Application permission management provides a mechanism for defining permissions, allowing system services and applications to define new permissions for their sensitive APIs. To access these APIs, other applications need the required permissions.
Application permission management also allows applications to request permissions that are defined by the system or other applications. Upon obtaining the permissions, applications can access the sensitive APIs provided by the system or other applications.
In addition, application permission management allows users to view and manage the permission granting status.
#### Application Integrity Verification
OpenHarmony allows installation of applications. To ensure the integrity and trustworthiness of the applications to be installed in OpenHarmony, the applications must be signed and their signatures must be verified.
After developing an application and generating the installation package during the application development process, you must sign the installation package to prevent it from being tampered with when released on devices. The OpenHarmony application integrity verification module provides the signing tool, specifications for generating the signing certificate, and required public key certificate for you to sign the application packages. A public key certificate and a corresponding private key are preset in OpenHarmony to ease your operation. You need to replace the public key certificate and private key in your commercial version of OpenHarmony.
In the application installation process, the OpenHarmony application framework subsystem installs applications. Upon receiving an application installation package, the application framework subsystem parses the signature of the installation package, and verifies the signature using the application integrity verification APIs. The application can be installed only after the verification is successful. During the verification, the application integrity verification module uses the preset public key certificate to verify the signature.
#### Device Authentication and HUKS
A unified device binding and authentication solution that covers 1+8+N devices is available. Generally, device authentication provides support for cross-device communication implemented by DSoftBus, rather than directly interacting with applications. Device authentication provides the following functionalities:
- Building and maintaining unified trust relationship for a group of devices using different accounts
Devices with different accounts can set up a local trust group after a trust relationship is built by certain means such as scanning a QR code. Services can call APIs to query the group information.
- Implementing unified device authentication
A unified authentication solution is provided to discover devices and perform connection authentication and key agreement for encrypted, end-to-end sessions through DSoftBus for the devices in a trust group.
HUKS provides credentials for device authentication and algorithms for key agreement protocols.
#### Data Transfer Management
In OpenHarmony, the data transfer management module provides cross-device data transfer management and control policies for distributed services. The data transfer management module defines a sef of APIs to provide management and control policies for cross-device data transfer and obtain the highest risk level of data to be sent to the peer device.
## Repositories Involved<a name="section155556361910"></a>
Security subsystem
base/security
......@@ -2,7 +2,7 @@
## OpenHarmony 3.x Releases
- [OpenHarmony v3.1 Release (2022-03-30)](OpenHarmony-v3.1-release.md)
- [OpenHarmony 3.1 Beta (2021-12-31)](OpenHarmony-v3.1-beta.md)
- [OpenHarmony 3.0.2 LTS (2022-01-12)](OpenHarmony-v3.0.2-LTS.md)
- [OpenHarmony 3.0.2 LTS (2022-03-18)](OpenHarmony-v3.0.2-LTS.md)
- [OpenHarmony 3.0.1 LTS (2022-01-12)](OpenHarmony-v3.0.1-LTS.md)
- [OpenHarmony 3.0 LTS (2021-09-30)](OpenHarmony-v3.0-LTS.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册