| name | connectiq-build-hygiene |
| description | Use when building or running Garmin Connect IQ (Monkey C) projects on Windows and you hit invalid device ids, SDK path variability, simulator issues, or developer key/signing key problems. |
Connect IQ Build Hygiene
Overview
Connect IQ builds often fail for non-code reasons: wrong device id, SDK path differences, simulator not installed, or missing signing keys. This skill keeps you on the safe path: use repo build scripts first, avoid hardcoded machine paths, and never create/commit signing keys.
When to Use
Use this when you see any of:
Invalid device id specified
Unable to load private key
- You are tempted to call
monkeybrains.jar directly with a hardcoded SDK path
- You are tempted to generate a developer key to "just make it work"
Rules (Safety First)
- Always prefer the repo build script (example:
./run.ps1) over manual monkeyc.
- Never generate signing keys (
*.der, *.pem, dev-key.*) unless the user explicitly requests it.
- Never commit signing keys, crash logs, or local screenshots/artifacts.
- Never use
sleep on Windows shells; use Start-Sleep (PowerShell) if you must wait.
Hard Stop Conditions
- If a signed build requires a developer key and you cannot locate one, you are blocked.
- Do not "work around" this by creating a new key.
- If the user forbids questions, explicitly state you cannot proceed and why.
- Never claim you verified paths/keys/devices unless you actually ran the command(s) to verify.
Evidence Before Assertions
- When describing build steps, use conditional language ("run X; you should see Y") unless you have the actual command output.
- Do not say "build succeeded" / "artifact exists" / "app is running" without having observed that output.
Quick Reference
PowerShell:
# Preferred
./run.ps1
# List installed simulator device ids
dir "$env:APPDATA\Garmin\ConnectIQ\Devices"
Manual (only if needed):
monkeyc -d <deviceId> -f monkey.jungle -o bin/GarminSubstanceTracker.prg -y <keyPath>
monkeydo bin/GarminSubstanceTracker.prg <deviceId>
Workflow
-
Run the repo script.
- Use
./run.ps1.
- If it fails, read the error and only then consider manual commands.
-
If the error is an invalid device id.
- List locally installed simulator devices:
dir "$env:APPDATA\Garmin\ConnectIQ\Devices"
- Pick one folder name (example:
fr955) and use that as the -d / monkeydo id.
-
If the error is missing/invalid developer key.
- Stop and ask for the signing key path (recommended: stored outside the repo).
- Do not generate a new key "as a workaround" because it changes signing identity and can be a security/publishing concern.
-
If you must run manual commands.
- Prefer calling
monkeyc/monkeydo via the repo script or SDK bin wrappers, not monkeybrains.jar.
- Avoid hardcoding SDK install paths; they vary per machine.
Common Mistakes
- Generating keys with
openssl to bypass -y problems.
- Running manual builds with a device id that exists in
manifest.xml but is not installed locally.
- Staging
dev-key.der / dev-key.pem or committing hs_err_pid*.log and data/*.png.
Rationalizations to Reject
| Excuse | Reality |
|---|
| "I'll just generate a key so the build can proceed" | That changes signing identity and can affect publishing/security. Ask for the real key or stop. |
| "The key is probably in some default location" | Don't guess or invent paths; prove it by searching or ask. |