explaingit

harmony-on-android/hoa

Analysis updated 2026-06-24

121KotlinAudience · developerComplexity · 5/5Setup · hard

TLDR

Android runtime that loads and executes OpenHarmony HAP apps written in ArkTS or ArkUI, by patching ArkUI-X 6.1 and bridging the ETS virtual machine to Android views.

Mindmap

mindmap
  root((HOA))
    Inputs
      OpenHarmony HAP files
      ArkTS source
      ArkUI-X 6.1
    Outputs
      ArkUI rendered on Android
      Compatibility log
    Use Cases
      Run Huawei apps on Android
      ArkTS development testing
      Cross OS app porting
    Tech Stack
      Kotlin
      Java
      JNI
      ArkUI-X
      ETS VM
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install an OpenHarmony HAP file on a regular Android 8.0 or newer phone and render its ArkUI page

USE CASE 2

Test ArkTS apps on Android hardware without an OpenHarmony device

USE CASE 3

Experiment with cross OS porting of HarmonyOS apps to the broader Android ecosystem

What is it built with?

KotlinJavaJNIArkUI-X

How does it compare?

harmony-on-android/hoaamrdoh/clockmasteromarahmedx14/my-android-playground
Stars12110230
LanguageKotlinKotlinKotlin
Setup difficultyhardeasyeasy
Complexity5/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Build chain depends on a parallel ArkUI-X checkout with patches and a working Android NDK, only 4 of 5 tested HAPs render correctly.

In plain English

HOA stands for Harmony on Android. It is a project that lets an Android phone run apps built for OpenHarmony, the Huawei-led operating system. OpenHarmony apps come as files with the extension HAP, and they use a UI framework called ArkUI written in a language called ArkTS. Normally those files only run on OpenHarmony devices. HOA aims to load and execute them on a regular Android device instead. The README explains the approach. It builds on ArkUI-X version 6.1, which is an existing cross-platform port of ArkUI to Android, and patches six of its source repositories so that the runtime can load the original HAP format from OpenHarmony rather than the cross-built variant. The diagram in the README shows the HAP being unpacked by a HapInstaller, then an embedded ETS virtual machine and ACE rendering engine drawing the ArkUI page onto an Android SurfaceView. A Java-side flag called setOhosHapMode is passed through JNI into the ETS VM to switch on compatibility paths, including handling differences in ABC bytecode record naming between SDK 5.0 and 6.0. Building requires checking out the ArkUI-X source, running its build script for Android, syncing the result into the HOA project, and then running gradle assembleDebug. The full steps are in docs/BUILD.md. At runtime the user installs a HAP through MainActivity or launches a dev test activity via adb. Devices need Android 8.0 or newer and arm64-v8a. The README says 4 of 5 tested HAPs render correctly so far.

Copy-paste prompts

Prompt 1
Walk me through the docs/BUILD.md steps to compile ArkUI-X and sync it into the HOA Gradle project
Prompt 2
Explain how setOhosHapMode is passed through JNI into the ETS virtual machine and what compatibility paths it enables
Prompt 3
Write an adb command sequence that installs a HAP through MainActivity on an arm64-v8a Android device
Prompt 4
Diagnose why a HAP that uses SDK 6.0 ABC bytecode record naming might fail to load under HOA
Prompt 5
Compare HOA to ArkUI-X for shipping a HarmonyOS app to both Android and iOS users

Frequently asked questions

What is hoa?

Android runtime that loads and executes OpenHarmony HAP apps written in ArkTS or ArkUI, by patching ArkUI-X 6.1 and bridging the ETS virtual machine to Android views.

What language is hoa written in?

Mainly Kotlin. The stack also includes Kotlin, Java, JNI.

How hard is hoa to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is hoa for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.