README.md
1# Bundle Management Framework<a name="EN-US_TOPIC_0000001061838370"></a>
2
3- [Introduction](#section11660541593)
4- [Directory Structure](#section1464106163817)
5- [Repositories Involved](#section93061357133720)
6
7## Introduction<a name="section11660541593"></a>
8
9The bundle management framework is provided by OpenHarmony for you to manage application bundles \(installation packages\). The following figure shows the architecture of the bundle management framework.
10
11**Figure 1** Bundle management framework architecture<a name="fig1047932418305"></a>
12
13
14- **BundleKit** includes external APIs provided by the Bundle Manager Service, including the APIs for application installation and uninstallation, bundle information query, and bundle state change listeners.
15- The **bundle scanning sub-module** parses pre-installed or installed bundles on the local device and extracts information from them for the bundle management sub-module to manage and make the information persistent for storage.
16
17- The **bundle installation sub-module** installs, uninstalls, and updates a bundle.
18- The **bundle installation service** is an independent process used to create or delete installation directories and has high permissions.
19
20- The **bundle management sub-module** manages information related to application bundles and stores persistent bundle information.
21
22- The **bundle security management sub-module** verifies signatures, and grants and manages permissions.
23
24## Directory Structure<a name="section1464106163817"></a>
25
26```
27/foundation/appexecfwk/appexecfwk_lite
28 ├── frameworks
29 │ └── bundle_lite # Client code used for communication between the BundleKit and Bundle Manager Service
30 ├── interfaces
31 │ ├── kits
32 │ │ └── bundle_lite # BundleKit APIs exposed externally
33 │ └── innerkits
34 │ └── bundlemgr_lite # Core implementation code of BundleKit and internal APIs provided by the Bundle Manager Service for other subsystems
35 ├── services
36 │ └── bundlemgr_lite # Implementation code of the Bundle Manager Service
37 └── utils
38 └── bundle_lite # Utility code used during the implementation of the Bundle Manager Service
39```
40
41- The Bundle Manager Service is running in the foundation process.
42- The Bundle Manager Service is registered with **sa\_manager**. **sa\_manager** runs in the foundation process and sets up a thread runtime environment for the service. For details about how to create and use the Bundle Manager Service, see [SA Framework](en-us_topic_0000001051589563.md).
43- The Bundle Manager Service starts upon OS startup.
44- You can use the bm tool to install the specified HAP. \(Taking **hispark\_taurus** as an example, you can obtain the bm tool from the **out/hispark\_taurus/ipcamera\_hispark\_taurus/dev\_tools/bin directory** after the version building.\)
45
46```
47./bin/bm install -p /nfs/xxxx.hap
48```
49
50## Repositories Involved<a name="section93061357133720"></a>
51
52[Application framework](https://gitee.com/openharmony/docs/blob/master/en/readme/application-framework.md)
53
54[aafwk\_aafwk\_lite](https://gitee.com/openharmony/aafwk_aafwk_lite/blob/master/README.md)
55
56**appexecfwk\_appexecfwk\_lite**
57
58