Develop on HarmonyOS 2in1/laptop: Difference between revisions
Created page with "Other than mobile and tablets, HarmonyOS also has laptops now, see https://consumer.huawei.com/cn/harmonyos-computer/ . * MateBook Pro * MateBook Fold Ultimate Design * MateBook 14 There was a https://gitcode.com/OpenHarmonyPCDeveloper/DevBox project to include sdk and others. But it was deprecated now. There is a new project, https://harmonybrew.atomgit.com . If you have installed GitNext and DevBox, you need to uninstall them first. Turn on "Developer Options". S..." |
mNo edit summary |
||
| Line 65: | Line 65: | ||
$ pkill sshd | $ pkill sshd | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Install packages for development | |||
<syntaxhighlight lang="shell"> | |||
$ brew install git cmake ninja less htop | |||
</syntaxhighlight> | |||
A useful setup ssh config | |||
* https://gist.githubusercontent.com/nezticle/059d661cd1e3fb40e67d903d207ec7f5/raw/c32c031eefa97f8b3086fce9a50fbe6875cbc58c/.zshrc | |||
Reference: | Reference: | ||
Revision as of 15:44, 2 July 2026
Other than mobile and tablets, HarmonyOS also has laptops now, see https://consumer.huawei.com/cn/harmonyos-computer/ .
- MateBook Pro
- MateBook Fold Ultimate Design
- MateBook 14
There was a https://gitcode.com/OpenHarmonyPCDeveloper/DevBox project to include sdk and others. But it was deprecated now.
There is a new project, https://harmonybrew.atomgit.com .
If you have installed GitNext and DevBox, you need to uninstall them first.
Turn on "Developer Options".
Settings->Privacy & security->Advanced options, turn on "Run extensions from non-AppGallery sources".
Install HarmonyBrew via HiShell app
$ zsh -c "$(curl -fsSL https://harmonybrew.atomgit.com/install.sh)"Add HarmonyBrew into PATH
echo >> ~/.zshrc
echo 'eval "$(/storage/Users/currentUser/.harmonybrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/storage/Users/currentUser/.harmonybrew/bin/brew shellenv)"Install ohos-sdk
$ brew install ohos-sdkInstall openssh
$ brew install opensshLaunch sshd service, can't use port 22
$ sshd -p 8022Use ssh-keygen to generate a ssh key for your client, and copy public key to ~/.ssh/authorized_keys .
$ mkdir -p ~/.ssh && echo "ssh-ed25519 AAAA..." >> ~/.ssh/authorized_keysConnect from your client machine
$ ssh ohos@<this-device-ip> -p 8022(any username works; use ohos as convention)
To stop sshd
$ pkill sshdInstall packages for development
$ brew install git cmake ninja less htopA useful setup ssh config
Reference: