- Home
- Skills
- Openharmonyinsight
- Openharmony Skills
- Ohos App Build Debug
ohos-app-build-debug_skill
- Python
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openharmonyinsight/openharmony-skills --skill ohos-app-build-debug- SKILL.md5.3 KB
Overview
This skill builds, installs, launches, and debugs HarmonyOS/OpenHarmony applications using the DevEco Studio toolchain. It provides scripts to run hvigorw, install HAP files via hdc, launch apps, capture screenshots, and parse crash stacks with hstack. The scripts automatically detect DevEco Studio, configure JAVA_HOME and PATH, and cache detection results for convenience.
How this skill works
Scripts in the scripts/ directory detect DevEco Studio on the host, set up the toolchain environment (JAVA_HOME, PATH, HDC_SERVER_PORT), and expose command wrappers for common tasks. Build uses hvigorw to compile projects and produce HAP files; install uses hdc to push and install HAPs; launch starts or debugs applications on a connected device; parse_crash runs hstack to symbolize stacks. Environment detection also finds clang/llvm, profiler tools, and caches results for 24 hours.
When to use it
- When you need to compile an OHOS/OpenHarmony app with hvigorw
- When you want to install a HAP file onto a device via hdc
- When you need to launch or debug an app on a device
- When you need to parse crash stacks or symbolize traces with hstack
- When you want to capture device screenshots or verify DevEco Studio tools
Best practices
- Run env_detector.py before other scripts to confirm tool availability and paths
- Change to the OHOS project root before building to ensure correct project context
- Use absolute paths to scripts or set $SKILL_DIR to avoid path errors
- Combine build, install, launch in one-liners for quick deploy/test cycles
- Check the cached detection result if tools behave unexpectedly; re-run env_detector.py to refresh
Example use cases
- Build and install a development hap, then launch app for quick verification
- Run parse_crash.py against a saved stack trace to get symbolized function names
- Capture a screenshot after launching the app to validate UI state on device
- Run env_detector.py in CI or on a new machine to validate DevEco Studio and SDK toolchain
- Use the one-line chain to build, install, and launch during iterative development
FAQ
Verify standard install paths, set DEVECO_STUDIO_PATH to your DevEco Studio location, and re-run env_detector.py. Ensure the IDE version meets prerequisites.
How do I install a specific HAP file produced by the build?
Run install.py with -f and the HAP path (or pass the path shown by build.py). Example: python3 scripts/install.py -f entry/build/default/outputs/default/entry-default-signed.hap