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
- htop
- kbd
- libidn2
- libunistring
- lz4
- make
- ncnn
- ncurses
- openssh
- openssl
- readline
- sl
- strace
- stream
- tar
- tree
- vim
- vkpeak
- xxhash
- yyjson
- 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
,coreutils
andncurses
from homebrew - Run
./create-hnp.sh
to 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_HOME
env var is a correct directory to SDK - Run
./build-linux.sh -b
to create hnp packages - Run
./build-linux.sh -s
to 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
.