Skip to main content

xg-glass CLI: init/build/install/run xg.glass smart-glasses Android host apps.

Project description

xg-glass

This is a minimal command-line tool for driving an Android host project based on xg.glass:

  • xg-glass init <dir>: generate a developer project from a template (default: ./templates/kotlin-app, using includeBuild)
  • xg-glass build: build the phone host APK (for RayNeo, it will auto-generate and package the glasses host APK into assets before building)
  • xg-glass install: install onto the phone via adb install
  • xg-glass run: launch the app via adb shell monkey

Install from PyPI

pip install xg-glass

From PyPI, commands that operate inside an already-generated project work out of the box because they read xg-glass.yaml:

cd /path/to/generated-project
xg-glass build
xg-glass install
xg-glass run

Commands that create or synthesize a project need an xg-glass-sdk repository checkout because the template and SDK sources are not bundled in the wheel:

git clone https://github.com/hkust-spark/xg-glass-sdk
xg-glass init /path/to/myapp --sdk /path/to/xg-glass-sdk --template /path/to/xg-glass-sdk/templates/kotlin-app
xg-glass run /path/to/MyEntry.kt --sdk /path/to/xg-glass-sdk

From a repository checkout (contributors)

From the repository root (where xg-glass lives):

  • xg-glass init /path/to/myapp
  • cd /path/to/myapp
  • <path-to-sdk-repo>/xg-glass build
  • <path-to-sdk-repo>/xg-glass install
  • <path-to-sdk-repo>/xg-glass run

xg-glass.yaml (scalable)

xg-glass init generates xg-glass.yaml in the project root, and xg-glass build/install/run will read it automatically:

  • sdkPath
  • entryClass
  • rayneoMercuryAarDir
  • variant
  • module
  • applicationId

Bare-file quick mode (Quick mode)

You can use a single .kt file to trigger "temporary init → build → install → run":

  • xg-glass run /path/to/MyEntry.kt

Constraints:

  • The .kt file must contain a package ... line
  • The .kt file must contain a top-level class/object (used to infer the entry class)

Optional:

  • --entry-class <fqcn>: skip inference and specify the entry class explicitly
  • --sdk <path/to/sdk-repo>: specify the SDK path
  • --save ./myapp: persist the temporary project as a real project (so you can continue development)
  • --keep-tmp: keep the temporary directory for debugging
  • --sim: build a simulator-compatible APK (x86_64) and enable simulator backend

Options

  • --project: specify the project root (default: current directory)
  • --variant: default debug
  • --serial: specify the adb device serial (optional)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xg_glass-0.1.0.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xg_glass-0.1.0-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

Details for the file xg_glass-0.1.0.tar.gz.

File metadata

  • Download URL: xg_glass-0.1.0.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for xg_glass-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7bde4f46e8e2032ce93cf63e4db79ce5b1deebab8b537d28c506a6cd21204f24
MD5 1ed6ab5300647f50a4b3a08140cc5ec5
BLAKE2b-256 cfa598f7d9235757141ce6b1f44234cc730c83b80abc8f4792161adfff225205

See more details on using hashes here.

File details

Details for the file xg_glass-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xg_glass-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for xg_glass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9cbe431a7a8d0e95e007010254b75c81427137e71c29c890f133b2db36eab62
MD5 7f7bd6ea6b4c96cd6121fcf40f7a947d
BLAKE2b-256 071780c545339d88e63f8ad8c55917ca886857cd226f47d26cf783a8ab732ad0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page