Skip to content

HarmonyOS App ​

Why must I build it myself? HarmonyOS's developer tools can only be downloaded after signing in with a Huawei account, and their license forbids redistribution. That rules out building the app on any public CI service, so no ready-to-install HAP is available; you build it from source. The same tools are required to sign and install the app on your device. Luker would ship a prebuilt HAP if the HarmonyOS ecosystem allowed it.

Luker provides a HarmonyOS app that runs the complete Luker server and interface directly on your device, without a cloud server or terminal tools.

Overview ​

After installing the app, opening it displays the full Luker interface — there is no separate address to open in a browser. The app bundles the complete Luker server and frontend as a standalone application.

Build from Source ​

Prerequisites ​

  • Node.js 24 or newer
  • DevEco Studio, installed and signed in once (it provides the HarmonyOS toolchain and hvigorw)

Set the package name ​

The package name is configured in harmony-app/AppScope/app.json5 and defaults to com.luker.hmos. AppGallery requires every HarmonyOS app to use a package name that is unique across all apps, including Android apps, so choose your own before building. If AppGallery reports that the name is already taken, choose another one and update the file to match.

A package name has at least three segments separated by dots, each using only letters, digits, and underscores. These words cannot be a segment on their own: oh, ohos, harmony, harmonyos, openharmony, system. For example, com.yourname.luker works and com.yourname.harmony does not.

The package name cannot be changed after the APP ID is created, and the value entered there must match this one.

macOS and Linux ​

bash
git clone https://github.com/funnycups/Luker.git
cd Luker
bash harmony-app/scripts/build.sh

Windows ​

powershell
git clone https://github.com/funnycups/Luker.git
cd Luker
powershell -ExecutionPolicy Bypass -File harmony-app\scripts\build.ps1

The build writes the unsigned HAP to harmony-app/entry/build/default/outputs/default/entry-default-unsigned.hap.

Sign and Install ​

1. Create the app ​

Sign in to AppGallery Connect and open Certificates, App ID and Profile. Select HarmonyOS and create an app. Enter the app name, the package name you set in harmony-app/AppScope/app.json5, and the remaining app information.

2. Create a signing certificate ​

Generate a key and a certificate signing request in DevEco Studio: choose Build → Generate Key and CSR, then set the keystore name and path, the keystore password, the key alias, and the key password.

Then create the certificate and the provisioning profile:

  1. Under Certificates, create a debug certificate and upload the .csr file. Download the resulting .cer file.
  2. Connect your device and run hdc shell bm get --udid to read its UDID. Under Devices, add the device with that UDID.
  3. Under Profile, create a debug profile for the package name you set, select the certificate and the device, then download the .p7b file.

3. Sign the HAP ​

Sign the built HAP with hap-sign-tool.jar from the HarmonyOS SDK:

bash
java -jar hap-sign-tool.jar sign-app \
  -keyAlias <key-alias> \
  -signAlg SHA256withECDSA \
  -mode localSign \
  -appCertFile <certificate>.cer \
  -profileFile <profile>.p7b \
  -inFile entry-default-unsigned.hap \
  -keystoreFile <keystore>.p12 \
  -outFile luker-signed.hap \
  -keyPwd <key-password> \
  -keystorePwd <keystore-password>

4. Install the HAP ​

Enable Developer options and USB debugging on the device, connect it, then install:

bash
hdc install -r luker-signed.hap

TIP

DevEco Studio can also sign and install the app for you: open the project, configure automatic signing under File → Project Structure → Signing Configs, then run the app on the connected device.

WARNING

A debug profile installs only on devices whose UDID is registered in it. To install on another device, add that device to the profile in AppGallery Connect and download the profile again.

Usage ​

After installation, open the Luker app:

  1. The app automatically starts the built-in Luker server
  2. Once the interface loads, you see the same Luker interface as the desktop version
  3. Configure API connections, import character cards, and start chatting — all operations are identical to the desktop version

You do not enter any address or port; the app handles it automatically.

Feature Differences from Desktop ​

The HarmonyOS version is functionally equivalent to the desktop version, with multiple API connections, character card management, world info, presets, and the rest.

Because mobile screen sizes and interaction methods differ, some interface layouts adapt to the mobile display.

Built upon SillyTavern