Skip to content

Device test packages and packaging

Compile both components with build.py at the toolkit root, then generate the complete ZIP with matching Studio. Use the original Studio file for scanning and retesting. Do not manually add, remove, replace, or repackage its contents. The official outputs of the matching SDK and Studio define the package.

Generate the final package#

  1. Build components using the guide, then select the outputs according to Studio's update instructions. For custom GMP, keep matching .gmp, .review.json, and .review-source.enc files. Confirm any Web MMPKG is updated.
  2. Check the current Studio combination, wait for packaging, and keep the complete ZIP shown beside the QR code.
  3. Follow the scanning guide for device validation. The following sections explain this ZIP's contents, attachments, and limits.

Purpose of each official build artifact#

This table explains common artifacts in matching releases; it is not a manual package-assembly checklist. Use the complete SDK and Studio outputs as authoritative.

One ZIP for desktop preview and device runtimeThe GMP in the Studio ZIP runs in the simulator or on the glasses. The MMPKG runs in the App or the Studio Web host; review.json and source.enc save build information and do not participate in glasses execution.MEMOMIND / PACKAGE ROLESOne ZIP for desktop preview and device runtimeStudio ZIP · Based on selected componentsGMPCompiled glassesprogramExecuted bysimulator / glassesMMPKGWeb Pages andResourcesLoaded by Studio /AppBuild attachmentsreview.json +source.encManifest, source,and buildinformationValidate desktop and devices with the same ZIPStudio generates aQR codeCheck currentcomponents andversionsWait for ZIPpackaging to finishScan and downloadin AppDownload andvalidate the fullZIPInstall Web andglasses componentsRetest on phoneand glassesVerify core featuresand recoveryRecord deviceversions and resultsSource encryption is not GMP encryption. Do not manually edit Studio's ZIP. After source,dependency, or component changes, rebuild, package, scan, and retest.
One ZIP for desktop preview and device runtimeThe GMP in the Studio ZIP runs in the simulator or on the glasses. The MMPKG runs in the App or the Studio Web host; review.json and source.enc save build information and do not participate in glasses execution.MEMOMIND / PACKAGE ROLESOne ZIP for desktoppreview and device runtimeStudio ZIP · Based onselected componentsGMPCompiled glasses programExecuted by simulator /glassesMMPKGWeb Pages and ResourcesLoaded by Studio / AppBuild attachmentsreview.json + source.encManifest, source, and buildinformationValidate desktop and deviceswith the same ZIPStudio generates a QRcodeCheck current componentsand versionsWait for ZIP packaging tofinishScan and download in AppDownload and validate thefull ZIPInstall Web and glassescomponentsRetest on phone andglassesVerify core features andrecoveryRecord device versions andresultsSource encryption is not GMPencryption. Do not manually editStudio's ZIP. After source,dependency, or component changes,rebuild, package, scan, and retest.
Runtime components and build attachments share one ZIP. The phone sends only required runtime components to the glasses.
PartPurposeRuntime location
.gmp (when a custom glasses component is included)Compiled glasses plugin image.Executed by the Studio simulator or glasses firmware.
.mmpkg (when required by the combination)Web page, JavaScript, resources and manifest.Studio Web host or mobile phone App WebView.
review.jsonBuild attachment manifest, digests, and association information.For Studio and App validation, not glasses business code.
source.encCompressed and encrypted glasses source, all dependency headers read by GCC, and build records.Saved in the complete ZIP; not sent to the glasses for execution.

How source files and headers are collected#

GlassSDK records a source snapshot and complete build information. Direct, indirect, and system headers actually read by GCC are preserved unchanged, regardless of whether their functions are referenced. External shared directories contribute only dependencies, not their entire contents.

Protection boundaries of build sidecars#

Ordinary ZIP tools can read outer runtime files. Encryption protects the glasses source attachment; it does not guarantee that GMP or Web JavaScript cannot be analyzed. Studio and the App run without the source-decryption private key.

File digests detect inconsistent package contents; they do not prove the binary was built from those sources. Do not edit, replace, or borrow another version's attachments. Rebuild and generate a new complete ZIP after source or dependency changes.

Final checks before scanning#

  • Confirm that Studio has finished packing and displays the current QR code; Do not select a source code directory or only one GMP to replace the full ZIP.
  • Check the package's application name, version, Web permissions, and both selected components.
  • Keep verified files. After source, component, or configuration changes, rebuild, repackage, and retest on devices.

Build-package and device-runtime limits#

LevelCurrent Limit
GMP v2 / XIP BuildFlash code and read-only constants ≤500 KiB (512000 B); static RAM strictly <100 KiB (102400 B). The GMP package also includes a 120 B header, relocation metadata, and initial RAM data. Its total validation limit is 3 MiB−64 KiB, and storage also depends on available cache capacity. The entire GMP is not limited to ≤500 KiB.
C function stack limitThe SDK compiler checks that each function has a static stack frame ≤1024 B. Exceeding the limit or using dynamic stack allocation (such as VLA/alloca) fails the build and prompts you to use managed malloc. This check does not calculate recursion, full call chains or the total stack depth of Host callbacks.
Runtime budgetThe display task and Flash worker each have an 8192 B stack. Plugin callbacks share the display-task/Host-call stack; each callback does not get its own stack. Check malloc failures and release allocations according to lifecycle. Moving data to the heap still consumes RAM.
MMPKG packagingbuild-mmpkg.mjs: package ≤10 MiB, total extracted content ≤30 MiB, each file ≤10 MiB, and at most 500 files.

Reference files in the toolkit#

  • GlassSDK/docs/REVIEW_PACKAGES.md
  • PhoneSDK/docs/web-plugin/package-format.md
  • GlassSDK/docs/ABI.md
  • GlassSDK/build-host/tools/gmp_xip_pack.py
  • GlassSDK/build-host/tools/xip_compile.py