# oh_utils **Repository Path**: forantar/oh_utils ## Basic Information - **Project Name**: oh_utils - **Description**: Utility scripts for working with `OpenHarmony`. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-07-23 - **Last Updated**: 2025-12-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # oh Automates the tasks to clone, sync and build `openharmony`. Before all, add `oh_utils` to `PATH`: ``` export PATH=/path/to/oh_utils:$PATH ``` Get help: ``` oh --help ``` Configure the env to build `openharmony`: ``` oh --setup-env # dump and export the env vars: oh --dump-env ``` Edit the generated `config` to meet your task: ``` /path/to/oh_utils/config ``` Refer to the `config.template`: ``` /path/to/oh_utils/config.template ``` Run the `oh` building pipeline: ``` oh -a ``` It will create an `openharmony` folder in the `BUILDS_PATH` dir (provided in the `config`). Find the `openharmony` folder name in the `oh` pipeline console log. Every pipeline log can also be found in the global log: ``` /path/to/oh_utils/.log # to list it: oh --log ``` Run the `oh` building pipeline with `cron`: Note that cron runs in the `root` env, so make sure you have the `repo` tool in the root `PATH`: ``` sudo which repo /usr/local/bin/repo ``` ``` crontab -e # add the line: 0 4 * * * /path/to/oh_utils/oh -a ``` For example, build the `ace_engine` target in an `openharmony` workspace: ``` cd /path/to/openharmony oh -b ace ``` ## `openharmony` git mirror Create an `openharmony` git mirror: https://gitee.com/rri_opensource/koala_projects/wikis/OpenHarmony/Configure%20shared%20mirror%20of%20OH%20repo Mount it to `/path/to/oh_mirror` and define as `OH_MIRROR` in `/path/to/oh_utils/config`. Run the mirror update with `cron`: Note that cron runs in the `root` env, so make sure you have the `repo` tool in the root `PATH`: ``` sudo which repo /usr/local/bin/repo ``` ``` crontab -e # add the line: 0 0 * * * /path/to/oh_utils/oh --update-oh-mirror /path/to/oh_mirror ``` # rk Flashes the build artifacts or `openharmony` downloaded images to the `dayu200 rk3568` dev board. Get help: ``` rk --help ``` For example: ``` rk --flash-image /path/to/img.tar.gz ``` # docker/*** Decorized tools, which do their job in a virtualized environment (docker container). The main tool is "docker/ubuntu-2204-koala/bash". (see details in [docker/README.md](docker/README.md))