HarmonyOS is Huawei's proprietary operating system built on a distributed microkernel with cross-platform architecture support. Application development is done in ArkTS and C++ in the DevEco Studio environment with the ArkUI framework. The system is designed for seamless integration of smartphones, tablets, watches, and IoT devices. According to Huawei, HarmonyOS is installed on over 700 million devices worldwide.
Key takeaways
HarmonyOS is a distributed operating system developed by Huawei and first announced in 2019 as a response to restricted access to Google services on new company devices. HarmonyOS is built on its own microkernel, different from Linux, and is designed for seamless operation between devices: smartphones, tablets, smartwatches, televisions, automotive systems, and IoT devices.
According to Huawei (HarmonyOS Ecosystem Report, 2026), the system is installed on over 700 million devices, including 300 million smartphones. The Chinese market accounts for 95% of installations. Starting with HarmonyOS 5.0 (NEXT, 2024), the system has completely abandoned Android AOSP compatibility — all applications must be written in ArkTS or C++ using ArkUI.
The key feature of HarmonyOS is its distributed architecture: an application can run on multiple devices simultaneously, moving the interface between screens. For example, a user launches navigation on a phone while the interface displays on a car screen — without recompilation or additional code.
HarmonyOS 1.0 (2019) — first version for Smart Screen, not for smartphones. HarmonyOS 2.0 (2021) — opened for smartphones, tablets, and watches, support for AOSP applications. HarmonyOS 3.0 (2022) — improved distributed architecture, Super Device, Multiscreen Collaboration. HarmonyOS 4.0 (2023) — ArkUI 3.0, Live View, improved performance. HarmonyOS NEXT (5.0, 2024) — complete abandonment of AOSP, native HarmonyOS applications only.
| HarmonyOS version | Year | Key innovation |
|---|---|---|
| 1.0 | 2019 | First version for Smart Screen TV |
| 2.0 | 2021 | Smartphones, tablets, AOSP compatibility |
| 3.0 | 2022 | Super Device, Multiscreen Collaboration |
| 4.0 | 2023 | ArkUI 3.0, Live View, Celia Voice Assistant |
| NEXT (5.0) | 2024 | Complete abandonment of AOSP, microkernel, ArkTS-only |
The HarmonyOS architecture is fundamentally different from Android and iOS. Instead of the monolithic Linux kernel, HarmonyOS uses its own microkernel, implementing a minimal set of privileged functions: memory management, process scheduling, and inter-process communication. All other services run in user space.
The HarmonyOS microkernel comprises about 10,000 lines of code (the Linux kernel has over 20 million). A smaller codebase means a smaller attack surface. The system uses formal verification — mathematical proof of kernel code correctness. HarmonyOS supports Trusted Execution Environment (TEE) at the hardware level for biometrics, payments, and encryption keys. Inter-process communication is implemented via IPC, 5 times more performant than Binder in Android.
The HarmonyOS architecture consists of four layers: Kernel Subsystem (microkernel + drivers), System Service Layer (system services: distributed data, file system, security), Framework Layer (ArkUI, multimedia, telephony, AI services), and Application Layer (user applications). Each layer is isolated from the layer below via IPC.
HarmonyOS provides a Distributed File System (DFS) that unifies the storage of all user devices into a single virtual space. An application accesses files by URI without specifying a device — the system routes the request to the device where the file is physically stored. DFS supports end-to-end encryption and automatic replication of frequently used data.
// Working with HarmonyOS distributed file system
#include <dfs/storage_manager.h>
#include <uri/uri_helper.h>
using namespace OHOS::Storage;
// Getting a file URI on a distributed device
Uri GetDistributedFileUri(const std::string& localPath) {
DistributedFileManager manager;
auto deviceList = manager.GetOnlineDevices();
for (const auto& device : deviceList) {
Uri uri = manager.GetFileUri(device.deviceId, localPath);
if (uri.IsValid()) {
return uri; // File found on one of the devices
}
}
return Uri::Empty();
}
// Reading data from a remote device
std::string ReadDistributedFile(const Uri& uri) {
DistributedFile file(uri);
if (!file.Open(OpenMode::READ_ONLY)) {
return "";
}
char buffer[4096];
size_t bytesRead = file.Read(buffer, sizeof(buffer));
file.Close();
return std::string(buffer, bytesRead);
}In the example, DistributedFileManager searches for a file on all user's online devices and returns a distributed URI. DistributedFile physically opens the file on the remote device via IPC, transparently to the application. The developer does not need to know where the data is stored — the system routes the request automatically.
ArkUI is the declarative UI framework of HarmonyOS developed by Huawei. The interface is described as a hierarchy of components with reactive data binding, similar to SwiftUI (iOS) or Jetpack Compose (Android). ArkTS is a development language based on TypeScript with additional static typing and integration with ArkUI via decorators @Component, @State, @Prop, @Link.
ArkTS extends TypeScript with UI framework harmonization: @Component — a decorator for declaring a UI component, build() — a required method returning a tree of UI elements, @State — a reactive variable whose changes automatically redraw the component, @Prop — an input property from the parent, @Link — two-way binding. All ArkUI components use a chaining syntax with modifiers (.width, .height, .backgroundColor).
// ArkTS — user profile screen on ArkUI
@Component
struct ProfileScreen {
@State userName: string = "Anna Petrova";
@State avatarUrl: Resource = $r("media.avatar_default");
@State isLoading: boolean = false;
@Prop onEditClick: () => void;
aboutToAppear(): void {
this.loadUserData();
}
async loadUserData(): Promise<void> {
this.isLoading = true;
try {
const data = await UserService.getProfile();
this.userName = data.name;
this.avatarUrl = data.avatarUrl;
} catch (error) {
console.error("Loading error", error);
} finally {
this.isLoading = false;
}
}
build(): void {
Column() {
if (this.isLoading) {
LoadingProgress()
.width('50%')
.height('50%');
} else {
Stack({ alignContent: Alignment.Center }) {
Image(this.avatarUrl)
.width('100%')
.height('100%')
.objectFit(ImageFit.Cover);
Column() {
Text(this.userName)
.fontSize('24fp')
.fontWeight(FontWeight.Bold)
.fontColor(Color.White);
Button("Edit", {
type: ButtonType.Capsule,
stateEffect: true
})
.onClick(() => {
this.onEditClick();
})
.margin({ top: '12vp' });
}
.alignItems(HorizontalAlign.Center)
.width('100%');
}
.width('100%')
.height('300vp');
}
}
.padding('16vp')
.width('100%')
.height('100%');
}
}
// Application entry point
@Entry
@Component
struct MainApp {
build(): void {
Column() {
ProfileScreen({
onEditClick: () => {
console.info("Open profile editor");
}
});
}
.width('100%')
.height('100%');
}
}The ProfileScreen component in ArkTS demonstrates: @State for reactive variables, @Prop for input callback, Column/Stack/Text/Image/Button as basic UI components, asynchronous data loading via async/await. LoadingProgress is displayed during loading. All sizes are specified in vp (virtual pixels) — adaptive units similar to pt in iOS or dp in Android.
ArkUI supports responsive design through a Breakpoints system (xs, sm, md, lg, xl) corresponding to screen width. Components automatically rearrange when switching from phone to tablet or watch. GridRow and GridCol are adaptive containers that change the number of columns depending on the breakpoint. Size units: vp (virtual pixels), fp (font pixels — scale with font settings), lpx (logical pixels for watches).
| Device type | Breakpoint | Diagonal | Unit |
|---|---|---|---|
| Smartwatch | xs | 1.2"–2.0" | lpx |
| Smartphone | sm | 4.7"–6.9" | vp |
| Tablet | md | 7.0"–12.0" | vp |
| Laptop | lg | 13.0"–16.0" | vp |
| Monitor / TV | xl | 24.0"–65.0" | vp |
DevEco Studio is the official integrated development environment (IDE) for HarmonyOS, based on IntelliJ IDEA Community Edition. It includes a code editor with ArkTS and C++ support, a visual ArkUI editor (drag-and-drop), a HarmonyOS device emulator, Preview for instant UI viewing, and Profiler for performance analysis.
DevEco Studio includes an emulator based on QEMU, supporting smartphones (various screen sizes), tablets, watches, and televisions. The emulator simulates a distributed environment: you can run multiple virtual devices and test across-device interaction. The emulator requires virtualization (Hyper-V on Windows, KVM on Linux).
ArkUI Preview is an instant UI viewing feature without building or starting the emulator. Code changes appear in Preview within 1-2 seconds. All standard components and animations are supported. Preview works with different breakpoints for responsiveness testing. Live Preview connects to a real device via USB or Wi-Fi for on-device testing.
The HarmonyOS SDK includes: ArkUI (UI components), Multimedia Kit (audio/video capture and playback), Connectivity Kit (Bluetooth, Wi-Fi, NFC), Location Kit (geolocation), Sensor Kit (sensors), AI Kit (ML Kit with on-device inferencing on Huawei NPU). API versions: API 9 (HarmonyOS 3.x), API 10 (4.x), API 11 (NEXT).
// Initializing camera on HarmonyOS via Multimedia Kit
import multimedia.CameraManager;
import multimedia.CameraInput;
import multimedia.PreviewOutput;
@Component
struct CameraView {
@State isPreviewActive: boolean = false;
cameraManager: CameraManager = CameraManager.getInstance();
cameraInput?: CameraInput;
previewOutput?: PreviewOutput;
async startPreview(): Promise<void> {
try {
// Requesting camera permission
const granted = await Permissions.request("ohos.permission.CAMERA");
if (!granted) return;
// Getting camera (0 — rear, 1 — front)
const camera = await this.cameraManager.getCamera(0);
// Creating camera input
this.cameraInput = await this.cameraManager.createCameraInput(camera);
await this.cameraInput.open();
// Starting preview on Surface (ArkUI XComponent)
this.previewOutput = await this.cameraManager.createPreviewOutput({
width: 1920,
height: 1080
});
await this.previewOutput.start();
this.isPreviewActive = true;
} catch (error) {
console.error("Camera error: " + error.message);
}
}
async stopPreview(): Promise<void> {
await this.previewOutput?.stop();
await this.cameraInput?.close();
this.isPreviewActive = false;
}
}The CameraView component demonstrates working with Multimedia Kit: requesting permission via Permissions.request, obtaining a camera via CameraManager, creating CameraInput and PreviewOutput. ArkUI Surface (via XComponent) displays the video stream. All operations are asynchronous with error handling via try/catch.
Distributed architecture of HarmonyOS is the main difference from competitors. An application can consist of multiple atomic services (Atomic Services), each running on the optimal device. The user starts a task on one device and continues on another without losing context.
Atomic Service is the minimum deployment unit on HarmonyOS. Each service implements one or more Ability (analogous to Activity in Android). Page Ability — a screen with UI, Service Ability — a background task, Data Ability — data access. An application can delegate an Ability to another device: for example, the UI displays on a tablet while AI processing runs on a phone with NPU.
The Distributed Data Management (DDM) system synchronizes application state between devices. DDM uses Distributed Data Objects — reactive objects that automatically replicate across all user devices. Data changes on one device are instantly reflected on all others. DDM supports encryption and takes network connection into account (Bluetooth, Wi-Fi, cellular data).
| Technology | Purpose | Analogue |
|---|---|---|
| Distributed Data Objects | Reactive data synchronization between devices | iCloud / Firebase |
| Distributed File System | Unified file space across devices | iCloud Drive |
| Ability Distribute | Screen delegation to another device | — |
| Super Device | Unifying devices into a single system | Apple Continuity |
| Multiscreen Collaboration | Working with one application on multiple screens | Sidecar (iPad + Mac) |
Super Device is a HarmonyOS feature that allows uniting up to 7 Huawei devices into a single computing environment. The user drags device icons in the Super Device interface: speakers become audio output, a tablet becomes a second screen, a watch becomes a heart rate monitor for a fitness app on the phone. All devices sync via a Distributed Bus with latency under 5 ms.
Huawei AppGallery is the official HarmonyOS app store, the third largest in the world after Google Play and App Store. According to Huawei (2026), AppGallery has over 580 million monthly active users. Developer registration is free for individuals (unlike Apple's $99).
The developer builds the application in DevEco Studio (.hap format — HarmonyOS Ability Package). Publishing via AppGallery Connect: upload the HAP file, fill in the description (name, icon, screenshots), configure the pricing model. Average moderation time is 1-3 business days. Huawei checks security (static analysis), API compatibility, and policy compliance.
AppGallery supports: paid applications (Huawei commission 15-30%), subscriptions (15% commission), advertising via Huawei Ads Kit, and in-app purchases via IAP Kit. Huawei Pay is a payment gateway for the Chinese market supporting Alipay and WeChat Pay. International developers receive payments via PayPal or bank transfer.
| Requirement | Description |
|---|---|
| Format | HAP (HarmonyOS Ability Package) or App Pack (multiple HAPs) |
| Signature | Digital signature via DevEco Studio (Huawei Certificate) |
| Target API | API 9+ for HarmonyOS 3.x, API 11+ for HarmonyOS NEXT |
| Size | Up to 4 GB for App Pack, up to 200 MB for base HAP |
| Languages | Mandatory support for Simplified Chinese for China |
| Policy | Compliance with Huawei Rules for Developers and GDPR for EU |
HMS Core is a set of services replacing Google Play Services on Huawei devices without Google. Includes: Push Kit (push notifications), Map Kit (maps with navigation), Location Kit (geolocation), Ads Kit (advertising), Analytics Kit (analytics), Account Kit (authorization via Huawei ID). HMS Core is available on devices with HarmonyOS and on Huawei Android devices (via AppGallery).
Frequently asked questions
The primary language is ArkTS, a TypeScript extension with ArkUI integration. For performance-critical modules, C++ is used via Native API (NAPI). Java is supported for legacy applications on HarmonyOS 3-4. ArkTS and C++ are recommended by Huawei for all new projects starting with HarmonyOS NEXT.
HarmonyOS uses its own microkernel (not Linux), distributed across-device architecture, unified DFS file system, and reactive DDM synchronization. HarmonyOS NEXT has completely abandoned AOSP compatibility and does not support APK applications. All applications are written in ArkTS or C++.
ArkUI is a declarative UI framework for HarmonyOS in ArkTS and C++. The interface is described via @Component with build() method and reactive variables (@State). ArkUI supports adaptive layout through Breakpoints (xs-xl), GridRow/GridCol, and custom Canvas rendering for GPU computations.
The official store is Huawei AppGallery. Developer registration is free. The application is distributed in HAP (HarmonyOS Ability Package) or App Pack format. Moderation takes 1-3 days. The store commission is 15-30% depending on the monetization model. Simplified Chinese support is mandatory for China.
DevEco Studio is the official IDE for HarmonyOS based on IntelliJ IDEA. It includes an ArkTS/C++ editor, visual ArkUI editor, QEMU-based emulator, Preview for instant UI viewing, Profiler for CPU/memory, and integration with AppGallery Connect for CI/CD. Supports Windows, macOS, and Linux.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also