A very simple padel scorer for Huawei Band 8 / 9 / 10 with an optional Android phone scoreboard.
- Band: tap the top half when team A wins a point and the bottom half when team B does. The band shows the points (0 / 15 / 30 / 40 / AD), games and sets, flashes the side that scored and vibrates (longer vibration when a game or set is won).
- Phone: a big dark scoreboard that updates live from the band, shows each set's result, announces finished sets, and keeps a list of past matches.
band-app/ Huawei Band app (HarmonyOS "lite wearable", JavaScript) -> DevEco Studio
phone-app/ Android scoreboard app (Kotlin + Jetpack Compose) -> Android Studio
tools/ Tests for the scoring logic
| On the band | What it does |
|---|---|
| Tap the top half | Point to team A (lime) |
| Tap the bottom half | Point to team B (cyan) |
| Tap the middle strip | Undo the last point (up to 30 back) |
| Long-press the middle strip | Back to the start screen (the match is saved) |
| Start screen → RESUME | Continue the saved match |
| Start screen → ADVANTAGE | New match, normal deuce / advantage |
| Start screen → GOLDEN PT | New match, golden point at 40-40 |
| Winner screen: tap / long-press | Tap: finish. Long-press: undo the winning point |
The middle strip shows the games of the current set (4 - 3) and either the set
number or DEUCE / GOLDEN / TIE-BREAK. Small dots next to each team show sets won.
Rules used: best of 3 sets, sets to 6 games with a 2-game lead, tie-break (first to 7, lead of 2) at 6-6. The match is saved after every point, so it survives the app closing or the band going to sleep.
On the phone, tap a team name to rename it (e.g. to the players' names), and tap the status chip at the top right to reconnect to the band.
Huawei bands don't run Android apps. Band 8, 9 and 10 run Huawei's small
"lite wearable" app platform. Apps for it are written in JavaScript and built
with Huawei DevEco Studio, not Android Studio. That's what band-app/ is.
- Band 8 / 9 / 10: screen is 194 × 368. The layout was designed for that size.
- Band 11 or anything newer: it should work if DevEco Studio lists it as a lite wearable target. Most sizes in the layout are percentages, so a slightly different screen will still fit.
So you need two tools: DevEco Studio for the band and Android Studio for the phone.
- Install DevEco Studio from https://developer.huawei.com/consumer/en/deveco-studio/ and sign in with a (free) Huawei developer account. Use a version that offers Lite Wearable projects.
- Create a project: File → New → Create Project → Lite Wearable → Empty Ability (JS).
Set the bundle name to
com.padelscore.band. - Copy the code in:
- Copy everything in
band-app/entry/src/main/js/default/into your project'sentry/src/main/js/<folder>/. The folder is calleddefaultorMainAbility, depending on the DevEco version. Replace the template's files. - In your project's
entry/src/main/config.json, make thepageslist match the one inband-app/entry/src/main/config.json:"pages/index/index", "pages/match/match". Keep the rest of the template's config.
- Copy everything in
- Try it on the simulator first: open
pages/match/match.hmland use the Previewer, or start the Lite Wearable simulator (Tools → Device Manager). You can tap and score there with no band at all. - Get your band's UDID: on the phone, install HUAWEI DevEco Assistant from AppGallery. Open it, go to the Lite Wearable tab and tap Connect. With the band paired in Huawei Health, it shows the band model and its UDID. Tap Copy.
- Sign the app: a real band only installs apps signed for that exact band.
- In DevEco: Build → Generate Key and CSR. This makes a key store (
.p12) and a certificate request (.csr). Note the passwords. - In AppGallery Connect:
- Users and permissions → Device management → Add device: paste the UDID.
- Certificates: create a debug certificate from the
.csr. Download the.cer. - Create a HarmonyOS app with bundle name
com.padelscore.band. - Create a debug profile for it with the certificate and your band selected.
Download the
.p7b.
- In DevEco: File → Project Structure → Project → Signing Configs. Fill in
the
.p12, its passwords, the.cerand the.p7b, then click OK. Newer DevEco versions can also do most of this with Automatically generate signature.
- In DevEco: Build → Generate Key and CSR. This makes a key store (
- Build and install:
- Build → Build Hap(s)/APP(s) → Build Hap(s). The signed file is in
entry/build/.../outputs/.../*-signed.hap. - Copy the signed
.hapto the phone (into a folder namedhapsin the phone's internal storage). In DevEco Assistant tap Install watch app and pick it. - The app icon appears in the band's app list.
- Install errors: 40 / invalid configuration file usually means
config.jsondoesn't match what the band expects. A version error means the band's software is older than the API level inbuild-profile.json5. - To install it permanently and share it with friends, publish it on AppGallery (it can be a private / test release).
- Build → Build Hap(s)/APP(s) → Build Hap(s). The signed file is in
Font sizes: some lite wearables only render text at 30 px and 38 px, so the point numbers use 38 px. If your band shows bigger fonts in the previewer, you can raise
.numand.gamesinpages/match/match.css.
- Open the
phone-app/folder in Android Studio (File → Open). Let Gradle sync. - Plug in your phone (with USB debugging on) and press Run ▶.
The phone needs the Huawei Health app installed and paired with your band. That's how the phone talks to the band.
Until you finish step 3, the app opens and shows an empty scoreboard with a status like "Wear Engine error". That's expected.
The band sends the score to the phone through Huawei Wear Engine. Huawei only lets approved apps use it, so this is a one-time setup:
- Apply for Wear Engine: in the Huawei Developer console go to
Wear Engine → Apply for Wear Engine service. Register the phone app
(
com.padelscore.phone) and its signing certificate fingerprint. To get the fingerprint, run./gradlew signingReportinphone-app/and copy the SHA-256. Approval can take a few days. - Phone app: in
phone-app/app/src/main/AndroidManifest.xmlreplaceREPLACE_WITH_YOUR_APP_IDwith your AppGallery Connect app ID. InWatchLink.ktreplaceREPLACE_WITH_BAND_APP_FINGERPRINTwith the band app's fingerprint. The Wear Engine docs show where to find it (it comes from the band app's signing profile). - Band app: download the official
wearengine.jsfor lite wearables from the Wear Engine SDK download page. Use it to replaceband-app/.../common/wearengine.js, which is only a placeholder that does nothing. Then incommon/phone-link.jsreplaceREPLACE_WITH_PHONE_APP_SHA256_FINGERPRINTwith the phone app's SHA-256 fingerprint from step 1. Use the format the Wear Engine docs ask for. - Rebuild and reinstall both apps. Open the phone app. The status should say "Connected to …". Then start a match on the band.
Every point, undo and new match on the band sends the full score to the phone. If the phone is out of range, the band carries on scoring normally. The phone catches up with the next point.
The scoring rules are tested with Node.js (no device needed):
node tools/test-score.mjs
- The band code is written in plain old JavaScript (ES5 style) on purpose, because the band's JS engine is very small.
- The band app and the phone app were written without access to Huawei
hardware or the Huawei SDKs. The scoring logic is tested. The first build in
DevEco Studio / Android Studio may still need small fixes, e.g. a newer Wear
Engine version number in
phone-app/app/build.gradle.kts.