Jump to content

HarmonyOS Emulator on Linux

From Qt Wiki
Revision as of 20:42, 26 September 2026 by Liang Qi (talk | contribs) (Liang Qi moved page Emulator on Linux to HarmonyOS Emulator on Linux)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

There are Emulator in DevEco Studio on Windows(x64)/macOS(x64)/macOS(arm64).

Since 26.0.0 release, there are Emulator on Linux, both x64 and arm64. (Note: it's only available in China now, hope it will be released globally soon.)

With Emulator on Linux, you can use hdc to install unsigned HAP package.

Download

Go to Download: Command Line Tools page, "Command Line Tools 26.0.0 Release" item in Linux (64-bit) and Linux (ARM64) tab. Latest version is 26.0.0.851, file name is commandline-tools-linux-x64-26.0.0.851.zip and commandline-tools-linux-arm64-26.0.0.851.zip .

Install

I use commandline-tools-linux-x64-26.0.0.851.zip as example on Linux x64.

$ mkdir ~/harmonyos
$ cd ~/harmonyos
$ unzip ~/Downloads/commandline-tools-linux-x64-26.0.0.851.zip
$ cd ~/harmonyos/command-line-tools/emulator
$ ./Emulator -license accept
$ mkdir images
$ mkdir instances
$ ./Emulator -imageList -deviceType 2in1 # list available images for 2in1
$ ./Emulator -imageList -deviceType table # list available images for table
$ ./Emulator -imageList -deviceType phone # list available images for phone
$ ./Emulator -install -deviceType 2in1 -osVersion "HarmonyOS 7.0.0(26.0.0)" -imageRoot ~/harmonyos/command-line-tools/emulator/images
$ ./Emulator -create MateBookPro -deviceType 2in1 -osVersion "HarmonyOS 7.0.0(26.0.0)" -instancePath ~/harmonyos/command-line-tools/emulator/instances -imageRoot ~/harmonyos/command-line-tools/emulator/images -screenProfile "MateBook Pro" -storage 8 -memory 16

Run Emulator

$ export QT_QPA_PLATFORM=xcb # if you are on a Wayland session, it needs XWayland was enabled
$ ./Emulator --start MateBookPro -path ~/harmonyos/command-line-tools/emulator/instances -imageRoot ~/harmonyos/command-line-tools/emulator/images -hdcport 11111

You can use hdc to work with Emulator. Happy Hacking!

References