Debug a native card application
Follow one launch from the package on your development machine to the first frame accepted by the guest shell. The commands below use the Remote Counter example. The local inspection works on Linux. Guest commands require the development tools and a running Vela simulator. Build Remote Counter
Inspect the package before installation
Run these commands in the directory containing your own counter.vapp. The first line lists archive entries and their uncompressed sizes. The remaining lines show the embedded manifest and inspect the actual packaged executable, which can differ from the last binary in your build directory.
python3 -m zipfile -l counter.vapp
unzip -p counter.vapp manifest.json | python3 -m json.tool
work=$(mktemp -d)
unzip -p counter.vapp bin/app > "$work/app"
wc -c counter.vapp "$work/app"
readelf -hW "$work/app"
readelf -lW "$work/app"
Look for exactly two regular files named manifest.json and bin/app. The manifest limit is 4,096 bytes. The uncompressed executable limit is 8,388,608 bytes. The complete archive limit is 8,454,144 bytes, including ZIP overhead. Compression can shrink the archive while leaving the executable over its limit.
The ELF header must report little-endian ELF64 and the machine configured for your guest, either x86-64 or AArch64. Genesis accepts a statically linked executable with a loadable segment. An executable with an INTERP or DYNAMIC program header fails package validation. Match the manifest's id to the launch command. Package field reference
Observe the first frame
From a Vela development workspace, use the package's actual path for installation.
./tools/vela sim status
./tools/vela install counter.vapp
./tools/vela applications
./tools/vela launch org.example.counter
./tools/vela status
./tools/vela sim remote right
./tools/vela status
./tools/vela logs
sim status identifies the running guest and architecture. status reports the shell screen, current application, app_ready and app_frames. A launch request starts the process. Its first valid output frame makes it ready. For Remote Counter, sending Right changes the value and produces another frame. An application can stay on one frame while waiting for input.
In the guest journal, look for a VELA_APP line with your application ID and state=starting, then state=ready. The shell also records launch_to_frame_us. This measures from the shell's launch timing point to acceptance of the first frame. It excludes package installation and the physical panel's display latency.
Diagnose the first missing step
| Symptom | Evidence to inspect | Next action |
|---|---|---|
| The simulator is running but installation rejects the executable | Guest architecture from sim status, machine and program headers from readelf |
Select the matching static toolchain and rebuild the package. |
| Install reports that the ID already exists | Compare applications with the manifest ID |
Launch the installed copy, or use a separate development session for the rebuild. The current installer keeps one version per ID. |
| The process starts, then returns Home after roughly four seconds | Journal startup timeout and absence of state=ready |
Present a valid initial frame before waiting for a key. Flush buffered stdout. |
| Home reappears after an update | Journal reports an invalid frame or process exit | Check the wire bytes. Send one complete newline-terminated frame, printable ASCII, a title up to 48 characters and a body up to 120. Keep debug text off stdout. |
| OK works but Home never reaches the app | Check the shell screen after sending Home | Use the defined app keys for app navigation. The shell handles Home and Back. |
| The process exits on a file, socket or platform call | Journal exit signal and the operation immediately before it | Remove the dependency from the card process or mark the feature as requiring a future service. Keep the existing sandbox in place. |
When reporting a problem, include the app ID, version, guest architecture, package digest, the command you ran and the relevant lifecycle lines. sha256sum counter.vapp identifies the package. Review logs before sharing them.
