Skip to main content

Paths, Artifacts, and Configuration Quick Reference

Build Artifacts

PathDescription
build/lib/libaiden.aC++ SDK static library
build/lib/libaiden_image.aImage processing static library
build/lib/libcjson.acJSON static library
build/bin/Application binaries directory
build-host/tests/aiden_testshost-native unit test binary
pico-sdk/output/image/Full firmware build output directory

Important Source Paths

PathDescription
src/aiden_sdk.hC++ SDK API
src/frame_service_main.cppFrame Service entry point
src/audio_service_main.cppAudio Service entry point
src/config_web.cppConfig Web entry point
src/agent/cmd/daemonGo Agent daemon
src/agent/cmd/otaOTA CLI
src/agent/cmd/abctlA/B metadata diagnostic tool
src/agent/internal/agentAgent runtime and tool implementation
src/agent/internal/otaOTA manifest, download, slot, health and state machine
tests/Unit tests

Device Default Paths

PathDescription
/oem/usr/bin/Application binary installation directory
/oem/usr/model/VAD models and weights updated with OEM/OTA
/userdata/agent/agent.tomlAgent main configuration
/userdata/agent/skills/Agent skills directory
/userdata/agent/memory/Agent memory persistence directory
/userdata/system/envDevice-wide environment file loaded by service launchers and SSH login shells
/userdata/ota/Mount point for the dedicated OTA partition; configuration, state, download cache, and health marker
/oem/etc/ota_pubkey.pemOTA manifest Ed25519 public key
/userdata/wpa_supplicant.confWi-Fi configuration
/run/frame_service/frame_service.sockFrame Service socket
/run/audio_service/audio_service.sockAudio Service socket
/var/log/frame_service/frame_service.logFrame Service log
/var/log/adb/adb-startup.logadb delayed startup log
/var/log/audio_service/audio_service.logAudio Service log
/userdata/agent/log/agent.logAgent log (includes init script and runtime output)
/userdata/agent/log/llm-http-YYYYMMDDHHMMSSmmm.logLLM HTTP request/response log (JSONL format, organized by session)
/run/agent/storage_levelCurrent StorageMonitor level used by deployment-side log guards

Configuration Files

FileDescription
overlay/etc/aiden_boot.confSystem boot behavior configuration (controls service startup order, network settings, debug flags)
overlay/etc/aiden_frame_service.confFrame Service init configuration template
overlay/etc/aiden_audio_service.confAudio Service init configuration template
overlay/etc/init.d/S20oemslotSlot-aware /oem mount script
overlay/etc/init.d/S49ntpntpd daemon startup + step one-shot sync subcommand
overlay/etc/init.d/S50ntp_watchdogNTP sync periodic check, triggers S49ntp step when not synced
overlay/etc/init.d/S53adb_serverDelayed one-shot adb start-server bootstrap
overlay/etc/init.d/S54otaBoot-time OTA health one-shot
overlay/etc/init.d/S99rtcinitRTC invalid-date calibration script replacing the SDK default
overlay/etc/profile.d/aiden-env.shSSH/login shell environment loader snippet
overlay/oem/usr/bin/aiden-env-runService environment launcher
overlay/oem/usr/lib/aiden-log.shShared UTC event logger for first-party init/watchdog scripts
overlay/oem/usr/model/VAD models and weights, updated with OEM partition
overlay/oem/usr/share/aiden/audio/voice-notifications/Bundled Chinese and English PCM WAV fallback played when final TTS is unavailable
overlay/userdata/agent/agent.tomlAgent default configuration template
overlay/userdata/system/envDefault system environment template
overlay/userdata/wpa_supplicant.confWi-Fi default configuration template

Common Commands

# Build
./build.sh
make test

# Full firmware
./build_image.sh
./upgrade_tool/upgrade_tool uf ./update.img

# Service status
/etc/init.d/S52frame_service status
/etc/init.d/S53audio_service status
/etc/init.d/S53agent status

# Frame debugging
frame_service_cli --socket /run/frame_service/frame_service.sock health
frame_service_cli --socket /run/frame_service/frame_service.sock screenshot --out /tmp/screenshot.bmp

# Audio debugging
audio_service_cli --socket /run/audio_service/audio_service.sock health
audio_service_cli --socket /run/audio_service/audio_service.sock get-volume

# Agent API
curl http://<device-ip>:8080/api/tools
curl http://<device-ip>:8080/api/storage/status
curl http://<device-ip>:8080/api/storage/monitor/status
curl -X POST -H 'Content-Type: application/json' -d '{"force":false,"targets":[]}' http://<device-ip>:8080/api/storage/cleanup

# OTA
/oem/usr/bin/ota status
/oem/usr/bin/ota update
/oem/usr/bin/abctl read /dev/block/by-name/misc

# Log viewing
tail -f /userdata/agent/log/agent.log
jq . /userdata/agent/log/llm-http-$(date +%Y%m%d)*.log

Agent Logs

/userdata/agent/log/agent.log

Agent main log, contains all output from init script and runtime.

The path follows the runtime config directory: <CONFIG_DIR>/log/agent.log. The default config directory is /userdata/agent. The former /var/log/agent/agent.log is not migrated or used as a fallback.

When StorageMonitor reports critical or emergency, S53agent trims this file to the configured storage.degraded_mode.max_agent_log_mb limit while preserving the newest content.

Session start event:

2026-08-05T06:30:00Z [INFO] [agent] [session] session_started session_id=abc123def456 reason=time_gap_long

/userdata/agent/log/llm-http-{YYYYMMDDHHMMSSmmm}.log

LLM HTTP request/response log (JSONL format), separate file per session.

Format:

{"ts":"15:00:00","kind":"request","status":0,"body":"{\"model\":\"...\",\"messages\":[...]}"}
{"ts":"15:00:00","kind":"response","status":200,"body":"{\"choices\":[...]}"}

Fields:

  • ts - Timestamp (HH:MM:SS)
  • kind - request, response, stream, error
  • status - HTTP status code (0 for requests)
  • body - Request/response body (JSON string)

Common queries:

# View specific session
jq . /userdata/agent/log/llm-http-20260620090405123.log

# Only view responses
jq 'select(.kind | test("response|stream"))' llm-http-*.log

# Extract non-streaming response content
jq -r 'select(.kind == "response") | .body | fromjson' llm-http-*.log

# Count request types
jq -r '.kind' llm-http-*.log | sort | uniq -c

EDID Files

edid/ directory contains commonly used EDIDs:

  • 1080p30.hex
  • 720p30.hex
  • 720p60.hex
  • hdmi_1080p30_cta.hex
  • hdmi_1080p60_cta.hex
  • hdmi_720p60_cta.hex
  • hdmi_720p60_1080p30_cta.hex
  • phone_vrt_552x1200p30.hex
  • phone_vrt_640x1200p30.hex