#!/bin/bash # 冷启动 GlassRemote 并拉取 BLE 诊断日志(需 iPhone 已信任开发者证书) set -e UDID=D469A28E-D29F-54A0-8936-0EA41BA02DA2 BID=com.glassmouse.GlassRemote echo ">>> launch" xcrun devicectl device process launch --device "$UDID" "$BID" > /tmp/launch.out 2>&1 & sleep 8 echo ">>> pull log" xcrun devicectl device copy from --device "$UDID" \ --source Documents/ble_log.txt \ --domain-type appDataContainer \ --domain-identifier "$BID" \ --destination /tmp/ble_log.txt 2>&1 echo "COPY_EXIT=$?" echo "=== LOG ===" cat /tmp/ble_log.txt 2>&1 || echo "(无日志文件:App 可能仍未启动)"