Termux for HarmonyOS Computer. Working in Progress.
It can run some basic commands on Huawei MateBook Pro now:
Bundled packages:
- bash
- binutils
- busybox
- c-ares
- coremark
- curl
- fastfetch
- fish
- htop
- kbd
- libevent
- libidn2
- libunistring
- lz4
- make
- ncnn
- ncurses
- openssh
- openssl
- pcre2
- readline
- sl
- strace
- stream
- tar
- tmux
- tree
- vim
- vkpeak
- xxhash
- yyjson
Terminal features:
- Basic escape sequence support
- Paste via context menu (right-click to activate)
- Copy/paste in command line via pbcopy/pbpaste using OSC52 escape sequence
- Connect your MateBook Pro to Mac, and do the following steps on Mac
- Clone this repo recursively, and cd into this repo
- Setup code signing in DevEco-Studio, ignore warnings if any
- Install
wget,coreutilsmakegsedandncursesfrom homebrew - (M-series User)
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/make/libexec/gnubin:$PATH" - Run
./create-hnp.shto create hnp packages - Run
./build-macos.sh - Run
./push.sh ./entry/build/default/outputs/default/entry-default-signed.hap - Input command in the text input of the application, press enter
- Connect your MateBook Pro to a Linux machine, and do the following steps
- Clone this repo recursively, and cd into this repo
- Setup code signing in DevEco-Studio, ignore warnings if any
- Setup DevEco Command Line Tools, and make sure
$TOOL_HOMEenv var is a correct directory to SDK - Run
./build-linux.sh -bto create hnp packages - Run
./build-linux.sh -sto signing - Run
./build-linux.sh -p - Input command in the text input of the application, press enter
By examining CodeArts IDE, we found that it utilizes HNP packages for native programs. You need to package .hnp files into the .hap, and add them to module.json5 like:
{
"module": {
"hnpPackages": [
{
"package": "busybox.hnp",
"type": "private"
}
]
}
}Then, you need to add the .hnp files to .hap and sign the .hap manually. You can refer to sign.py to see how it is done. The .hnp packages are unpacked under /data/app automatically and symlinks are created under /data/app/bin.

