ArticleslgStudy

science

App (file format)

App (file format) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand App (file format) rather than just read about it. In short: The HarmonyOS App Pack or the App file, identified with the file extension .app, is the file format used by the HarmonyOS operating system. It functions as a native HarmonyOS app for distribution and installation through Huawei AppGallery, or for distribution through Huawei Ability Gallery in respect of installation-free apps under both former classic dual-framework and current HarmonyOS Next system of unified OpenH…

App (file format) — main illustration
App (file format) — illustration

Key takeaways

  • App (file format) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect App (file format) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of App (file format) from memory before moving on to harder problems.

Reference excerpt

The HarmonyOS App Pack or the App file, identified with the file extension .app, is the file format used by the HarmonyOS operating system. It functions as a native HarmonyOS app for distribution and installation through Huawei AppGallery, or for distribution through Huawei Ability Gallery in respect of installation-free apps under both former classic dual-framework and current HarmonyOS Next system of unified OpenHarmony app framework. The App file is also used by a number of other open source HarmonyOS-based operating systems such as OpenHarmony and Oniro-based operating systems for distribution and installation of applications, video games and middleware. Including non OpenHarmony-based operating systems, such as GNU Linux-based Unity Operating System that supports the app file format.

Each HarmonyOS app contains one or more HarmonyOS Ability Package (HAP) files with the file extension ".hap", and the pack.info file that describes the attributes of the App file. Most HarmonyOS apps contain at least one HAP file of the entry type, which is the main module of the app, and additional HAP files of the feature type, which is used to implement a specific app feature.

Overview

App Pack and HAP files HarmonyOS apps are distributed as a software package file known as the App Pack or the App file, suffixed with .app, which is analogous to other software packages such as apk used by the Android operating system, msi in Microsoft Windows, or a deb package in Debian-based operating systems. To make a HarmonyOS app, a software development tool such as DevEco Studio is required to code and pack HarmonyOS Ability Package (HAP) and associated files into an app package. The HAP files may consist of resources, third-party libraries and configuration files. They are classified into two types of modules, i.e., entry and feature. The entry type of the HAP files is the main module and must be included into an app package, while the feature type of the HAP files is additional modules for implementing the features of the apps. Moreover, an App file that contains different builds and specifications optimized for the various devices may contain more than one HAP file of the entry type. Historically, the development of the HAP format has gone through two phases. The first stage, after decompression, there was a non-executable APK as the program entrance to connect with AOSP file libraries of binaries to interact with AOSP base of HarmonyOS 1.0.1 with API 5 for TVs and HarmonyOS 2.0 with API 6 for phones and tablets, which is caused by the imperfect ecology of the early development of the new app file format during dual framework of OpenHarmony L3-L5 that consists of EMUI Android base convergence. During early app development, third party developers facilitated development for mixed packaging of APK and HAP. Since introduction of HAR libraries on HarmonyOS 3.1 API 9 with ArkUI declarative programming framework and ArkTS evolved from eTS on 3.0, as primary programming language replacing Java binaries in the second stage of HAP, APKs was eliminated after decompression on HarmonyOS 3.1 Developer Preview API 9 Stage model Ability, and HAP cannot be converted into APKs by simple unpacking and packaging, therefore HAP file format is not a casing of the APK. Prior to packing into an App Pack, HAP files are allowed to run directly on a real device or an emulator for developers to debug and verify the apps during the development phase. After development, the apps containing signature information can be distributed to different devices with AppGallery Connect, a tool kit of services for creation, development, distribution and maintenance of an app.

Shared packages

For sharing code and resources in an App Pack, the operating system offers two kinds of shared packages: Harmony Archive (HAR), which is a static shared package, and Harmony Shared Package (HSP), which is a dynamic shared package. Both HAR and HSP enable sharing of code, C++ libraries, resources, and configuration files. In HAR, the code and resources are compiled together with invoking modules, possibly resulting in multiple copies of the same code and resources. In contrast, HSP allows independent compilation, leading to only one copy of code and resources in the build product. When multiple HAPs reference the same HAR, the HSP can be used instead to share some state variables and reduce the size of an App Pack. However, the HSP has some restrictions; for example, it does not support the declaration of abilities in its configuration file and its invoking modules must be in the same stage model as with the HSP. On OpenHarmony 4.1 API 11 improvements with System-level HSP that supports OTA upgrades within the App Package Management system. Also, the API 11 upgrade under Public Basic Class Library supports the creation of Workers within HSP and HAR that is something a user give a task and continue in the process, while the worker, or multiple workers also known as Thread pools, process the task on a different thread. A call back method is initiated when a special method provided on the initial call gets called.

App file structure The structure of the App file after built and packaged in a stage model usually contains the following files and folders.

entry.hap and feature.hap: the basic modules of both entry and feature types for installing an app, containing the following folders and files. ets: a folder storing bytecode files generated after the code build. libs: a folder storing the dependency files of the main module. resources: a folder containing resource files such as graphics, multimedia, character strings, and layouts. resources.index: a file providing a resource index table generated when an app is built. app.json5 and module.json5: JSON files with configuration information for build tools, operating system and application markets. pack.info: a file describing the attributes of the App Pack.

See also apk (file format) .ipa .exe

References

Illustrations

App (file format): HarmonyOS Shared Packages
HarmonyOS Shared Packages

Worked examples

Example 1 — a first encounter with App (file format)

Start with the simplest possible case. Write down what App (file format) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to App (file format) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about App (file format) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of App (file format)

In research
App (file format) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses App (file format) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
App (file format) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Archive formats, Embedded operating systems, Mobile operating systems, so understanding it makes those chapters shorter.
In everyday life
Look for App (file format) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “App (file format)” →

How to study App (file format) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what App (file format) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain App (file format) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is App (file format) in simple terms?

The HarmonyOS App Pack or the App file, identified with the file extension .app, is the file format used by the HarmonyOS operating system. It functions as a native HarmonyOS app for distribution and installation through Huawei AppGallery, or for distribution through Huawei Ability Gallery in respe…

Why does App (file format) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study App (file format)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on App (file format).

Tags

  • Archive formats
  • Embedded operating systems
  • Mobile operating systems

Keep exploring