Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/RealComputer/GlassKit/llms.txt

Use this file to discover all available pages before exploring further.

Rokid Glasses are Android-based smart glasses with an outward-facing camera, a monochrome HUD, microphones, speakers, and a temple touchpad — and no touchscreen. This page covers where to get the hardware, how to connect via ADB for development, how to configure Wi-Fi for wireless debugging, common build and install commands, and how to set up a phone or emulator when you want to test without the glasses in hand.

Hardware Overview

Rokid Glasses run Android and can be developed for like any Android device. A few hardware characteristics shape how you build:
FeatureDetail
DisplayGreen monochrome binocular HUD, 480×640 portrait resolution
CameraOutward-facing; captures what the wearer sees
InputTemple touchpad — tap, double-tap, swipe forward, swipe backward
AudioMicrophones and speaker
ConnectivityWi-Fi only; no cellular, no USB data without dev cable
TouchscreenNone
On the HUD, black renders as transparent and white renders as green. Use black backgrounds with white foregrounds for standard UI; other colors render as green, transparent, or intermediate brightness levels.

Getting Rokid Glasses

Start with the official product page: If Rokid does not ship to your location, check third-party listings on eBay. If you are outside China, make sure the listing specifies the global or international version.

Getting the Development Cable

The dev cable is the easiest way to upload APKs and debug apps on-device. It gives you a direct ADB connection over a magnetic USB-A connector. Check the official page first: If the price looks unreasonably high, the cable is likely out of stock. Alternative sources:

APK Upload Without the Dev Cable

If you do not have the dev cable, you can still install APKs using community tools. These do not give you a direct ADB connection, so debugging is harder:
Without a direct ADB connection, adb logcat and interactive debugging are not available. For serious development, the dev cable is strongly recommended.

ADB Connection

1

Connect via cable

Plug the dev cable into both the glasses and your development machine. Confirm the device is visible:
adb devices
You should see the glasses listed as a device. If not, check that adb is installed (it ships with Android Studio) and that the cable is fully seated.
2

Check Wi-Fi status (optional)

If you want to switch to wireless ADB after the initial cable connection, first confirm Wi-Fi is enabled on the device:
adb shell cmd wifi status
3

Enable Wi-Fi and join a network (if needed)

If Wi-Fi is disabled or not connected, enable it and join your development network:
adb shell cmd wifi set-wifi-enabled enabled
adb shell 'cmd wifi connect-network "NETWORK_NAME" wpa2 "NETWORK_PASSWORD"'
adb shell cmd wifi status
Replace NETWORK_NAME and NETWORK_PASSWORD with your actual network credentials.
4

Switch to wireless ADB

Once the device is on the same network as your development machine, switch to a wireless ADB connection so you can unplug the cable:
adb shell ip route get 1.1.1.1 | grep -oE 'src [0-9.]+' | awk '{print $2}'
adb tcpip 5555
adb connect DEVICE_IP:5555
adb devices
Replace DEVICE_IP with the IP address printed by the first command.

Common ADB Commands

Once connected (by cable or wirelessly), these commands cover the typical development loop:
./gradlew :app:build
Replace com.example.example with your app’s package name.

Runtime Permissions on Device

Physical Rokid Glasses do not show an interactive Android permission dialog in the HUD. Runtime permission requests on-device behave as if they were accepted automatically.
Keep your normal Android runtime permission request code in place. It is required for phone and emulator testing, where the standard permission dialog does appear.

Phone and Emulator Testing

You can test most app flows on an Android phone or emulator before putting the glasses on. This is useful for rapid iteration, but confirm final behavior on physical Rokid Glasses — especially for camera and microphone, which are often unstable in the emulator. The Rokid Hello World starter app includes a viewport wrapper and touchpad navigation mapping with touchscreen controls, so phone and emulator testing works with the same codebase.

Touchpad Controls Reference

IntentRokid Glasses touchpadAndroid phone / emulator touchscreen
Select / OKTapTap
Back / cancelDouble-tapDouble-tap
NextSwipe forwardSwipe right
PreviousSwipe backwardSwipe left

Emulator Setup

Run this script to install a system image, create an AVD, and launch the emulator. It auto-detects your machine architecture for the correct ABI, routes audio through your machine, and maps your webcam as the back camera:
AVD=Test
API=36
ABI=$([ "$(uname -m)" = "arm64" ] && echo "arm64-v8a" || echo "x86_64")
IMG="system-images;android-$API;google_apis;$ABI"
DEVICE=pixel_9a

sdkmanager "$IMG"
echo no | avdmanager create avd -n "$AVD" -k "$IMG" --device "$DEVICE"

emulator @"$AVD" -allow-host-audio -camera-back webcam0
sdkmanager and avdmanager are included with Android Studio’s SDK tools. If the commands are not found, add the Android SDK’s cmdline-tools/latest/bin directory to your PATH.

Build docs developers (and LLMs) love