hz-vr-debug
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVR Debug Skill
VR调试技能
Debug Meta Quest VR and MR applications using the command-line interface. This skill covers viewing application logs, capturing device state, diagnosing crashes, and resolving common issues encountered during Quest development.
metavr使用命令行界面调试Meta Quest VR和MR应用。本技能涵盖查看应用日志、捕获设备状态、诊断崩溃以及解决Quest开发过程中遇到的常见问题。
metavrWhen to Use This Skill
何时使用本技能
Use this skill when you need to:
- Debug an application running on a connected Meta Quest device
- View real-time or historical application logs (logcat)
- Capture screenshots of the VR/MR view
- Diagnose application crashes, rendering glitches, or performance problems
- Investigate tracking, controller, audio, or permission issues
- Pull diagnostic files from the device for offline analysis
This skill is relevant for any Meta Quest headset (Quest 2, Quest 3, Quest 3S, Quest Pro) running Horizon OS.
在以下场景中使用本技能:
- 调试已连接的Meta Quest设备上运行的应用
- 查看实时或历史应用日志(logcat)
- 捕获VR/MR视图的截图
- 诊断应用崩溃、渲染故障或性能问题
- 排查跟踪、控制器、音频或权限相关问题
- 从设备拉取诊断文件用于离线分析
本技能适用于所有运行Horizon OS的Meta Quest头戴设备(Quest 2、Quest 3、Quest 3S、Quest Pro)。
Prerequisites
前提条件
Before using this skill, ensure the following are in place:
- metavr CLI ready via -- The
npxCLI is invoked on demand; no global install required:metavrmetavr wraps ADB and adds Quest-specific device management, log viewing, screenshot capture, and file management. Examples below use the barebashnpx -y metavr --versioncommand. Ifmetavris not on PATH, invoke the same CLI viametavr(published as the npm packagenpx -y metavr <args>).@meta-quest/metavr - Meta Quest device connected via USB -- Use a USB-C cable that supports data transfer (not charge-only).
- Developer mode enabled -- Developer mode must be turned on in the Meta Horizon app on your phone, under your headset's settings.
- ADB authorization accepted -- The first time you connect, you must put on the headset and accept the "Allow USB debugging" prompt.
使用本技能前,请确保满足以下条件:
- 通过准备好metavr CLI --
npxCLI可按需调用,无需全局安装:metavrmetavr封装了ADB,并添加了Quest专属的设备管理、日志查看、截图捕获和文件管理功能。以下示例使用裸bashnpx -y metavr --version命令。如果metavr不在PATH中,可通过metavr调用相同的CLI(发布为npm包npx -y metavr <args>)。@meta-quest/metavr - Meta Quest设备通过USB连接 -- 使用支持数据传输的USB-C线缆(仅充电线缆不可用)。
- 已启用开发者模式 -- 必须在手机端的Meta Horizon应用中,进入头戴设备的设置开启开发者模式。
- 已接受ADB授权 -- 首次连接时,需戴上头戴设备并接受“允许USB调试”提示。
Quick Start Workflow
快速开始流程
The fastest way to begin debugging a Quest application:
bash
undefined开始调试Quest应用的最快方式:
bash
undefined1. Verify the device is connected and recognized
1. 验证设备已连接并被识别
metavr device list
metavr device list
2. List applications currently installed
2. 列出当前已安装的应用
metavr app list
metavr app list
3. View live logs (most recent 100 lines)
3. 查看实时日志(最近100行)
metavr log
metavr log
4. Capture a screenshot of the current VR view
4. 捕获当前VR视图的截图
metavr capture screenshot
If `metavr device list` returns no devices, check the USB cable, developer mode, and ADB authorization.metavr capture screenshot
如果`metavr device list`未返回任何设备,请检查USB线缆、开发者模式和ADB授权状态。Key Debugging Commands
核心调试命令
Device Commands
设备命令
| Command | Description |
|---|---|
| List all connected Quest devices |
| Show device model, OS version, and more |
| Show battery level and charging status |
| Wake the device from sleep |
| Reboot the device |
| Connect to a device over WiFi |
| 命令 | 描述 |
|---|---|
| 列出所有已连接的Quest设备 |
| 显示设备型号、OS版本等详细信息 |
| 显示电池电量和充电状态 |
| 将设备从睡眠状态唤醒 |
| 重启设备 |
| 通过WiFi连接设备 |
Log Commands
日志命令
| Command | Description |
|---|---|
| View the last 100 log lines |
| View the last 500 log lines |
| Filter logs by tag |
| Filter by severity (V, D, I, W, E, F) |
| Full logcat with advanced filtering options |
| Stream logs continuously |
| 命令 | 描述 |
|---|---|
| 查看最近100行日志 |
| 查看最近500行日志 |
| 按标签过滤日志 |
| 按严重程度过滤(V、D、I、W、E、F) |
| 带有高级过滤选项的完整logcat日志 |
| 持续流式输出日志 |
Application Commands
应用命令
| Command | Description |
|---|---|
| List installed applications |
| Show detailed info about an app |
| Launch an application by package name |
| Force-stop a running application |
| Clear application data and cache |
| Install an APK to the device |
| Uninstall an application |
| 命令 | 描述 |
|---|---|
| 列出已安装的应用 |
| 显示应用的详细信息 |
| 通过包名启动应用 |
| 强制停止运行中的应用 |
| 清除应用数据和缓存 |
| 向设备安装APK |
| 卸载应用 |
Capture Commands
捕获命令
| Command | Description |
|---|---|
| Capture a screenshot of the current VR/MR view |
| Save screenshot to a specific file |
| 命令 | 描述 |
|---|---|
| 捕获当前VR/MR视图的截图 |
| 将截图保存到指定文件 |
File Commands
文件命令
| Command | Description |
|---|---|
| List files on the device |
| Pull a file from the device |
| Push a file to the device |
| Delete a file on the device |
| Create a directory on the device |
| 命令 | 描述 |
|---|---|
| 列出设备上的文件 |
| 从设备拉取文件 |
| 向设备推送文件 |
| 删除设备上的文件 |
| 在设备上创建目录 |
Common Debugging Workflow
常见调试流程
A typical debugging session follows this pattern:
典型的调试会话遵循以下模式:
1. Connect and Verify
1. 连接并验证
bash
metavr device list
metavr device info <device_id>Confirm the device is recognized, check the OS version, and note the battery level. A low battery can cause thermal throttling that affects performance tests.
bash
metavr device list
metavr device info <device_id>确认设备已被识别,检查OS版本并记录电池电量。低电量可能导致热节流,影响性能测试结果。
2. Identify the Application
2. 定位目标应用
bash
metavr app listFind the package name for the application you want to debug. Package names typically follow the pattern .
com.company.appnamebash
metavr app list找到要调试的应用的包名。包名通常遵循的格式。
com.company.appname3. Reproduce and Capture Logs
3. 复现问题并捕获日志
bash
undefinedbash
undefinedStart logging before reproducing the issue
在复现问题前启动日志记录
metavr adb logcat --follow
Put on the headset and reproduce the issue. The logs stream in real time to your terminal. Press Ctrl+C to stop.metavr adb logcat --follow
戴上头戴设备并复现问题。日志会实时流式输出到终端。按Ctrl+C停止记录。4. Capture Visual State
4. 捕获视觉状态
bash
undefinedbash
undefinedTake a screenshot at the moment of the issue
在问题发生时截取屏幕
metavr capture screenshot
undefinedmetavr capture screenshot
undefined5. Analyze and Diagnose
5. 分析与诊断
Review the captured logs for errors, warnings, and crash signatures. Look for:
- -- Unhandled Java/Kotlin exceptions
FATAL EXCEPTION - or
native crash/SIGABRT-- Native code crashesSIGSEGV - -- Application Not Responding (frozen UI thread)
ANR - or
OOM-- Memory exhaustionOutOfMemoryError
查看捕获的日志,寻找错误、警告和崩溃特征。重点关注:
- -- 未处理的Java/Kotlin异常
FATAL EXCEPTION - 或
native crash/SIGABRT-- 原生代码崩溃SIGSEGV - -- 应用无响应(UI线程冻结)
ANR - 或
OOM-- 内存耗尽OutOfMemoryError
6. Iterate
6. 迭代调试
Make code changes, rebuild, deploy, and test again:
bash
metavr app stop com.example.myapp
metavr app launch com.example.myapp
metavr log --tag Unity --level W修改代码、重新构建、部署并再次测试:
bash
metavr app stop com.example.myapp
metavr app launch com.example.myapp
metavr log --tag Unity --level WSymptom-to-Diagnosis Decision Trees
症状到诊断的决策树
When a developer reports a problem, use these decision trees to systematically diagnose the root cause. Start with the reported symptom and follow the branches.
当开发者报告问题时,使用以下决策树系统地诊断根本原因。从报告的症状开始,按照分支排查。
App Crashes on Launch
应用启动时崩溃
App crashes on launch
├── Does `metavr app launch <pkg>` show "Error: Activity not found"?
│ └── YES → Package name is wrong or app is not installed.
│ Run `metavr app list` to verify the correct package name.
├── Does logcat show `FATAL EXCEPTION` in the first 5 seconds?
│ ├── YES, with `ClassNotFoundException` or `NoClassDefFoundError`
│ │ └── Missing native library or wrong ABI. Check the APK is built for ARM64.
│ │ Run: `metavr adb shell getprop ro.product.cpu.abi` → must show "arm64-v8a"
│ ├── YES, with `SecurityException` or `Permission denied`
│ │ └── Missing manifest permission. Check the logcat message for which permission.
│ │ Common: hand tracking, scene, camera permissions not declared.
│ └── YES, with `NullPointerException` or other Java exception
│ └── Application code bug. Read the stack trace for the failing class and method.
├── Does logcat show `native crash` / `SIGSEGV` / `SIGABRT`?
│ ├── Check if the crash is in a Unity/Unreal library (libunity.so, libUE4.so)
│ │ └── Engine bug or incompatible SDK version. Check Meta XR SDK release notes
│ │ for known issues with your engine version.
│ └── Check if the crash is in your own native code
│ └── Debug with `metavr adb logcat --buffer crash` for the tombstone, then use
│ `addr2line` or `ndk-stack` on the crash address.
└── No crash visible in logs?
└── Check if the app is being killed by the system.
Run: `metavr adb logcat --tag ActivityManager --level W`
Look for "Force stopping" or "Process died" messages. Common cause: OOM killer
triggered by excessive memory usage on launch.应用启动时崩溃
├── `metavr app launch <pkg>`是否显示"Error: Activity not found"?
│ └── 是 → 包名错误或应用未安装。
│ 运行`metavr app list`验证正确的包名。
├── logcat是否在启动后前5秒内显示`FATAL EXCEPTION`?
│ ├── 是,且包含`ClassNotFoundException`或`NoClassDefFoundError`
│ │ └── 缺少原生库或ABI错误。检查APK是否为ARM64架构。
│ │ 运行:`metavr adb shell getprop ro.product.cpu.abi` → 必须显示"arm64-v8a"
│ ├── 是,且包含`SecurityException`或`Permission denied`
│ │ └── 缺少清单权限。查看logcat消息确认具体权限。
│ │ 常见情况:未声明手部跟踪、场景、相机权限。
│ └── 是,且包含`NullPointerException`或其他Java异常
│ └── 应用代码存在bug。查看堆栈跟踪定位出错的类和方法。
├── logcat是否显示`native crash`/`SIGSEGV`/`SIGABRT`?
│ ├── 检查崩溃是否发生在Unity/Unreal库(libunity.so、libUE4.so)中
│ │ └── 引擎bug或SDK版本不兼容。查看Meta XR SDK发布说明
│ │ 确认你的引擎版本是否存在已知问题。
│ └── 检查崩溃是否发生在你自己的原生代码中
│ └── 使用`metavr adb logcat --buffer crash`获取崩溃日志,然后使用
│ `addr2line`或`ndk-stack`分析崩溃地址。
└── 日志中未显示崩溃信息?
└── 检查应用是否被系统终止。
运行:`metavr adb logcat --tag ActivityManager --level W`
寻找"Force stopping"或"Process died"消息。常见原因:启动时内存占用过高触发OOM杀手。App Freezes / ANR (Application Not Responding)
应用冻结/ANR(应用无响应)
App freezes or ANR dialog appears
├── Does logcat show "ANR in <package>"?
│ ├── YES, with "Reason: Input dispatching timed out"
│ │ └── The main/UI thread is blocked. Check for:
│ │ - Synchronous network calls on the main thread
│ │ - Large file I/O on the main thread
│ │ - Deadlocks between threads
│ │ Run: `metavr adb shell kill -3 <pid>` to dump thread stacks, then
│ │ `metavr files pull /data/anr/traces.txt ./` to retrieve the ANR trace.
│ └── YES, with "Reason: executing service"
│ └── A background service is taking too long. Check the service implementation.
└── No ANR, but app appears frozen?
├── Is the render loop still running? (Check VrApi logs for frame submission)
│ ├── YES → The app is rendering but not processing input. Check input system.
│ └── NO → The render thread is blocked or crashed silently.
│ Check: `metavr adb logcat --tag VrApi` for "FPS" lines stopping.
└── Is the device overheating?
Run: `metavr device battery` — if battery temperature > 40°C, thermal
throttling may have halted the app. Let device cool down and retry.应用冻结或弹出ANR对话框
├── logcat是否显示"ANR in <package>"?
│ ├── 是,且包含"Reason: Input dispatching timed out"
│ │ └── 主线程/UI线程被阻塞。检查以下情况:
│ │ - 主线程上的同步网络调用
│ │ - 主线程上的大文件I/O操作
│ │ - 线程间死锁
│ │ 运行:`metavr adb shell kill -3 <pid>`导出线程堆栈,然后
│ │ `metavr files pull /data/anr/traces.txt ./`获取ANR跟踪文件。
│ └── 是,且包含"Reason: executing service"
│ └── 后台服务执行时间过长。检查服务实现。
└── 无ANR提示但应用看似冻结?
├── 渲染循环是否仍在运行?(检查VrApi日志中的帧提交信息)
│ ├── 是 → 应用正在渲染但未处理输入。检查输入系统。
│ └── 否 → 渲染线程被阻塞或静默崩溃。
│ 检查:`metavr adb logcat --tag VrApi`中是否停止输出"FPS"相关日志。
└── 设备是否过热?
运行:`metavr device battery` — 如果电池温度>40°C,热节流可能导致应用暂停。待设备冷却后重试。Black Screen in Headset
头戴设备显示黑屏
Black screen after app launch
├── Is the app actually running?
│ Run: `metavr adb shell pidof <package>` — if empty, app crashed silently.
│ └── Check crash logs: `metavr adb logcat --buffer crash`
├── Is VrApi initialized?
│ Check: `metavr adb logcat --tag VrApi | grep "VrApi" | head -20`
│ ├── No VrApi output → XR session never started. Check OpenXR/OVR initialization code.
│ └── VrApi output exists → Frames are being submitted but may be empty.
│ └── Check: rendering pipeline, camera setup, shader compilation errors.
├── Unity-specific: "Shader compiler" or "Compiling shaders" in logs?
│ └── Shader warmup can cause a black screen for several seconds on first launch.
│ Use shader prewarming/variant preloading to avoid this.
└── Is the correct rendering API being used?
Check: `metavr adb logcat --tag Unity --level E` for Vulkan/GLES errors.
Quest requires OpenGL ES 3.0 minimum. Vulkan is preferred on Quest 3.应用启动后显示黑屏
├── 应用是否实际在运行?
│ 运行:`metavr adb shell pidof <package>` — 如果无输出,说明应用静默崩溃。
│ └── 检查崩溃日志:`metavr adb logcat --buffer crash`
├── VrApi是否已初始化?
│ 检查:`metavr adb logcat --tag VrApi | grep "VrApi" | head -20`
│ ├── 无VrApi输出 → XR会话从未启动。检查OpenXR/OVR初始化代码。
│ └── 有VrApi输出 → 帧已提交但可能为空。
│ └── 检查:渲染管线、相机设置、着色器编译错误。
├── Unity专属问题:日志中是否有"Shader compiler"或"Compiling shaders"?
│ └── 首次启动时着色器预热可能导致黑屏数秒。
│ 使用着色器预加载/变体预加载避免此问题。
└── 是否使用了正确的渲染API?
检查:`metavr adb logcat --tag Unity --level E`中的Vulkan/GLES错误。
Quest要求最低OpenGL ES 3.0。Quest 3优先推荐使用Vulkan。Frame Drops / Stuttering
掉帧/卡顿
App stutters or drops frames
├── Check current FPS:
│ `metavr adb logcat --tag VrApi | grep FPS`
│ ├── FPS consistently below 72 → GPU or CPU bottleneck.
│ │ ├── Check GPU: use Perfetto or OVR Metrics Tool. Look for GPU completion
│ │ │ time > 13.8ms (72Hz) or > 11.1ms (90Hz).
│ │ └── Check CPU: look for game thread or render thread exceeding frame budget.
│ └── FPS mostly stable but periodic drops
│ ├── Check for GC pauses: `metavr adb logcat --tag dalvikvm --level D`
│ │ or `metavr adb logcat --regex "GC_|clamp"` → reduce allocations per frame.
│ ├── Check for thermal throttling: `metavr adb logcat --tag ThermalService --level W`
│ │ → sustained heavy load causes CPU/GPU frequency reduction.
│ └── Check for asset loading on main thread: large textures or models loaded
│ synchronously will cause frame spikes. Use async loading.
└── Only stutters in specific scenes?
└── Profile that scene. Common causes: too many draw calls (>100), unculled
off-screen geometry, expensive shaders, excessive overdraw, uncompressed textures.应用卡顿或掉帧
├── 检查当前FPS:
│ `metavr adb logcat --tag VrApi | grep FPS`
│ ├── FPS持续低于72 → GPU或CPU瓶颈。
│ │ ├── 检查GPU:使用Perfetto或OVR Metrics Tool。查看GPU完成
│ │ │ 时间是否>13.8ms(72Hz)或>11.1ms(90Hz)。
│ │ └── 检查CPU:查看游戏线程或渲染线程是否超出帧预算。
│ └── FPS基本稳定但周期性掉帧
│ ├── 检查GC停顿:`metavr adb logcat --tag dalvikvm --level D`
│ │ 或`metavr adb logcat --regex "GC_|clamp"` → 减少每帧的内存分配。
│ ├── 检查热节流:`metavr adb logcat --tag ThermalService --level W`
│ │ → 持续高负载会导致CPU/GPU降频。
│ └── 检查主线程上的资源加载:同步加载大纹理或模型会导致帧突增。使用异步加载。
└── 仅特定场景卡顿?
└── 分析该场景。常见原因:绘制调用过多(>100)、未剔除的屏外几何体、高开销着色器、过度绘制、未压缩纹理。Tracking Issues
跟踪问题
Controllers or hands not tracking correctly
├── Are controllers paired and connected?
│ `metavr device info <id>` — check controller connection status.
├── Is hand tracking enabled in device settings?
│ Check: Settings > Movement Tracking > Hand and Body Tracking.
├── Does the app request the correct tracking mode?
│ ├── For hand tracking: manifest must include
│ │ `com.oculus.permission.HAND_TRACKING` and
│ │ `com.oculus.handtracking.frequency` set to "HIGH" if needed.
│ └── For controller tracking: ensure the app is not forcing hand-tracking-only mode.
└── Tracking works but is jittery or delayed?
├── Check lighting: tracking cameras need adequate, even lighting. Very bright
│ or very dim environments degrade tracking quality.
└── Check for occlusion: hands or controllers held outside the tracking camera
FOV will lose tracking. The camera FOV is approximately 110 degrees.控制器或手部跟踪异常
├── 控制器是否已配对并连接?
│ `metavr device info <id>` — 检查控制器连接状态。
├── 设备设置中是否已启用手部跟踪?
│ 检查:设置 > 移动跟踪 > 手部与身体跟踪。
├── 应用是否请求了正确的跟踪模式?
│ ├── 手部跟踪:清单必须包含
│ │ `com.oculus.permission.HAND_TRACKING`,且
│ │ `com.oculus.handtracking.frequency`按需设置为"HIGH"。
│ └── 控制器跟踪:确保应用未强制启用仅手部跟踪模式。
└── 跟踪正常但抖动或延迟?
├── 检查光照:跟踪摄像头需要充足、均匀的光照。过亮或过暗环境会降低跟踪质量。
└── 检查遮挡:手部或控制器移出跟踪摄像头视野会丢失跟踪。摄像头视野约为110度。Audio Issues
音频问题
No audio or wrong audio output
├── Is audio playing through the headset speakers?
│ └── Check: Settings > Sound — ensure headset speakers are selected, not Bluetooth.
├── Does the app use spatial audio?
│ ├── Check for FMOD/Wwise initialization errors in logcat.
│ └── Check that audio sources have correct 3D settings and are not muted.
├── Audio is distorted or crackling?
│ └── Audio buffer underruns. Check for CPU overload causing audio thread starvation.
│ Reduce audio complexity or increase buffer size.
└── Audio plays from wrong position?
└── Check spatial audio source positions match visual object positions.
Common issue: audio listener not attached to the camera/head transform.无声音或音频输出异常
├── 音频是否通过头戴设备扬声器播放?
│ └── 检查:设置 > 声音 — 确保选择头戴设备扬声器而非蓝牙设备。
├── 应用是否使用空间音频?
│ ├── 检查logcat中的FMOD/Wwise初始化错误。
│ └── 检查音频源的3D设置是否正确且未静音。
├── 音频失真或有爆音?
│ └── 音频缓冲区不足。检查CPU过载导致音频线程资源不足。
│ 降低音频复杂度或增大缓冲区大小。
└── 音频播放位置错误?
└── 检查空间音频源位置是否与视觉对象位置匹配。
常见问题:音频监听器未绑定到相机/头部变换组件。Gotchas
常见陷阱
These are common debugging pitfalls specific to Quest development.
- Logcat buffer overflow -- On Quest, the logcat ring buffer fills quickly because the OS and other apps generate constant output. If you do not start logging before reproducing the issue, the crash logs may already be evicted. Start before reproducing.
metavr adb logcat --follow - USB cable quality matters -- Many USB-C cables are charge-only and do not carry data. If shows nothing, try a different cable before troubleshooting software. The cable that came with the Quest works for data.
metavr device list - WiFi debugging disconnects -- WiFi ADB connections () drop after the device sleeps. You must reconnect after waking the device. USB is more reliable for sustained debugging sessions.
metavr device connect <ip> - Release builds strip logs -- If your app uses (release builds), some log output is suppressed. Debug with a debug build when investigating issues. Do not ship debuggable builds to the store.
android:debuggable="false" - Multiple logcat tags for the same component -- Unity uses tags ,
Unity, andil2cppdepending on the scripting backend. Unreal usesmono,UE, andLogVR. Filter broadly at first, then narrow down.LogOnline - OVR Metrics Tool overlay conflicts -- The OVR Metrics Tool overlay can interfere with your app's rendering or input. If your app behaves oddly, disable the metrics overlay and retest before filing a bug.
以下是Quest开发中特有的常见调试误区。
- Logcat缓冲区溢出 -- 在Quest设备上,Logcat环形缓冲区会快速填满,因为系统和其他应用会持续生成输出。如果不在复现问题前启动日志记录,崩溃日志可能已被覆盖。复现前先启动。
metavr adb logcat --follow - USB线缆质量至关重要 -- 许多USB-C线缆仅支持充电,不传输数据。如果无输出,先尝试更换线缆再排查软件问题。Quest附带的线缆支持数据传输。
metavr device list - WiFi调试易断开 -- WiFi ADB连接()在设备睡眠后会断开。设备唤醒后需重新连接。USB连接在持续调试会话中更可靠。
metavr device connect <ip> - 发布版构建会剥离日志 -- 如果应用使用(发布版构建),部分日志输出会被抑制。排查问题时使用调试版构建。不要将可调试构建发布到应用商店。
android:debuggable="false" - 同一组件对应多个Logcat标签 -- Unity根据脚本后端使用、
Unity和il2cpp标签。Unreal使用mono、UE和LogVR标签。先宽泛过滤,再逐步缩小范围。LogOnline - OVR Metrics Tool覆盖层冲突 -- OVR Metrics Tool覆盖层可能干扰应用的渲染或输入。如果应用行为异常,先禁用指标覆盖层再重新测试,然后再提交bug。
Tips and Best Practices
技巧与最佳实践
Filtering Logs Effectively
高效过滤日志
Use severity filters to cut through noise:
bash
undefined使用严重程度过滤减少冗余信息:
bash
undefinedShow only errors
仅显示错误
metavr log --level E
metavr log --level E
Show warnings and above
显示警告及以上级别
metavr log --level W
Filter by tag to focus on specific subsystems:
```bash
metavr adb logcat --tag VrApi
metavr adb logcat --tag UnityUse advanced filters with :
metavr adb logcatbash
undefinedmetavr log --level W
按标签过滤以聚焦特定子系统:
```bash
metavr adb logcat --tag VrApi
metavr adb logcat --tag Unity使用进行高级过滤:
metavr adb logcatbash
undefinedComplex filter expressions
复杂过滤表达式
metavr adb logcat --filter "Unity:W ActivityManager:I"
metavr adb logcat --filter "Unity:W ActivityManager:I"
Regex pattern matching
正则表达式匹配
metavr adb logcat --regex "error|exception"
metavr adb logcat --regex "error|exception"
Specific log buffer
指定日志缓冲区
metavr adb logcat --buffer crash
See [logcat-filtering.md](references/logcat-filtering.md) for a full guide on log filtering techniques.metavr adb logcat --buffer crash
查看[logcat-filtering.md](references/logcat-filtering.md)获取日志过滤技术的完整指南。Searching for Crash Signatures
搜索崩溃特征
When investigating crashes, search the log output for known patterns:
bash
metavr log | grep -i "fatal\|crash\|exception\|anr"Common crash-related tags include , , and .
AndroidRuntimeDEBUGlibc排查崩溃时,在日志输出中搜索已知模式:
bash
metavr log | grep -i "fatal\|crash\|exception\|anr"常见的崩溃相关标签包括、和。
AndroidRuntimeDEBUGlibcChecking Permissions
检查权限
Many Horizon OS features require specific manifest permissions. If a feature silently fails, check that the application manifest includes the required permissions. Common ones:
- -- Hand tracking access
com.oculus.permission.HAND_TRACKING - -- Scene API spatial data access
com.oculus.permission.USE_SCENE - -- Microphone access
android.permission.RECORD_AUDIO - -- Camera access (for mixed reality)
android.permission.CAMERA
许多Horizon OS功能需要特定的清单权限。如果某个功能静默失败,检查应用清单是否包含所需权限。常见权限:
- -- 手部跟踪访问权限
com.oculus.permission.HAND_TRACKING - -- 场景API空间数据访问权限
com.oculus.permission.USE_SCENE - -- 麦克风访问权限
android.permission.RECORD_AUDIO - -- 相机访问权限(用于混合现实)
android.permission.CAMERA
Performance Debugging
性能调试
If the application stutters or drops frames:
bash
undefined如果应用卡顿或掉帧:
bash
undefinedCheck device battery and thermal state
检查设备电池和热状态
metavr device battery
metavr device battery
Watch for thermal throttling messages in logs
在日志中查看热节流消息
metavr adb logcat --tag ThermalService --level W
metavr adb logcat --tag ThermalService --level W
Check VrApi frame timing
检查VrApi帧时序
metavr adb logcat --tag VrApi | grep FPS
See [common-issues.md](references/common-issues.md) for a catalog of known issues and their solutions.metavr adb logcat --tag VrApi | grep FPS
查看[common-issues.md](references/common-issues.md)获取已知问题及其解决方案的目录。References
参考资料
Skill References
技能参考
- Logcat Filtering Guide -- Detailed guide to filtering and interpreting device logs
- Screenshots and Video Capture -- Capturing visual state from the device
- Common Issues and Diagnostics -- Catalog of common Quest development issues and solutions
- Logcat过滤指南 -- 过滤和解读设备日志的详细指南
- 截图与视频捕获 -- 从设备捕获视觉状态的方法
- 常见问题与诊断 -- Quest开发常见问题及解决方案目录