harmony-on-android

HOA runs OpenHarmony and HarmonyOS HAP apps directly on Android devices through an experimental ArkUI-X based compatibility runtime.

26.7.9.1
Published at
Jul 8, 2026
830
Stars
12,780
Download
Synced at
8h ago

Latest release

26.7.9.1Jul 8, 2026, 05:11 PM
Downloads slow? Switch the source anytime above

README

Project Overview

HOA brings OpenHarmony HAP packages to Android without repackaging them, building on ArkUI-X's Android toolchain. The app unpacks a HAP, loads its modules.abc bytecode, and uses libb.so to bridge the musl and bionic ABIs. It already renders ArkTS pages, loads closed-source OHOS .so files, and shows up in DevEco Studio as a device over HDC.

Item Value
Platform Android 11 and above
CPU architecture arm64-v8a
Package name app.hackeris.hoa
Current version 26.7.5.1
Runtime base ArkUI-X

ArkUI pages on Android, with not a single line of the HAP changed.

Key Features

  • HAP install and launch: parses the ZIP-structured HAP, streams it out, and starts the entry module
  • ArkTS rendering: the ETS VM executes modules.abc and the ACE engine draws the UI tree into an Android SurfaceView
  • Resource index parsing: reads both the V1 resources.index from OHOS 5.0 and the V2 format from SDK 6.0
  • Native so loading: libb.so supplies a musl ABI bridge and an ELF patch rewrites the libc.so dependency
  • C++ runtime: string, vector, map, thread, exception, and RTTI in libc++_shared are verified
  • HDC debugging: a daemon on port 8710 supports install, uninstall, shell, and file send
  • Process slots: up to five slots, each running one HAP in its own process
  • Permissions and lifecycle: ordinary permissions map automatically, and onCreate, onResume, onPause, onDestroy are wired up

Compatibility Status

Capability Status
ArkTS page rendering Supported
HAP install and launch Supported
resources.index parsing Supported, V1 and V2
Native .so loading Supported
HDC debugging Supported, port 8710
HDS components Partial, 70+ exported mocks
Background Service Not supported
Distributed features Not supported

Target Audience

  • Developers validating HAP compatibility
  • Engineers porting ArkUI to Android
  • HarmonyOS teams using HDC debugging
  • Enthusiasts exploring cross-platform runtimes
  • Android users testing HarmonyOS apps

Build and Run

  1. Set up the Android SDK, NDK, and CMake 3.22.1, and reserve about 100 GB of disk
  2. Run repo init against the HOA manifest and sync the source
  3. Run prebuilts_download.sh to fetch prebuilt artifacts
  4. Run build.sh, build_musl_bridge.sh, and sync_arkui_x.sh in order
  5. Build the arm64-v8a-only APK with ./gradlew assembleDebug
  6. Pick a HAP inside the app to launch, or debug with adb shell am start -n app.hackeris.hoa/.DevTestActivity --ez autoLaunch true

Core Advantages

  • No HAP changes: packages stay as they are, with no re-signing or decompiling
  • Existing toolchain: DevEco Studio sees the device over HDC and deploys directly
  • Execution, not emulation: ArkTS bytecode runs on the ETS VM instead of being translated through a WebView
  • Traceable gaps: unimplemented system APIs answer with mocks, which makes missing pieces easy to locate

System Requirements

Item Requirement
OS Android 11 (API 30) and above
CPU architecture arm64-v8a
Target SDK targetSdk 33
Build tools CMake 3.22.1, NDK with C++ shared STL
Disk space About 100 GB for source and artifacts
Debug tooling HDC or adb, default port 8710

Notes

  • Experimental: most HAPs still show a blank screen or crash, and apps that call unimplemented APIs cannot start
  • Unauthenticated HDC: the port 8710 daemon has no auth, so only enable it on a trusted LAN
  • Memory pressure: one process per HAP adds up quickly when several run at once, so restart the app after long sessions
  • arm64 only: no armeabi-v7a or x86 build exists, so 32-bit devices cannot install it

Release history

Sort