-
Notifications
You must be signed in to change notification settings - Fork 8
Layered Troubleshooting Method
星冉 edited this page Jul 21, 2026
·
1 revision
中文 · Logging System and Maintenance
Find the last layer proven successful, then inspect the next one. Do not infer every component from a final “black screen” or “disconnected” symptom, and do not use reconnection as the default fix for an unknown failure.
| Layer | Success evidence | Failure entry |
|---|---|---|
| 1. Configuration/identity | Session, candidate, transport id, tunnel, and codec configuration are explicit | Session Configuration and Connection Lifecycle |
| 2. ADB | Actual winner verifies and the same object is in the registry | ADB Connection Lifecycle |
| 3. Server/tunnel | Old resources are gone; new SCID, forward/direct mode, and server startup align | Runtime Main Path |
| 4. Sockets | Video → optional audio → control are present and dummy byte confirmed | Runtime Main Path |
| 5. Metadata/codec | Header is exact, codec id/size valid, MIME pair compatible | Encoding and Decoding |
| 6. Decoder/Surface/audio | Configure/start, output, Surface, and AudioTrack work | Encoding and Decoding; Interaction Performance |
| 7. Control/UI | Sender/receiver active; pointer, clipboard, and menu routes work | Interaction Performance; Clipboard |
-
SessionState: the overall phase where the run stopped. - The last relevant
SessionEvent: the structured fact or action request that occurred. -
SessionComponentStateSnapshot: the component that failed to reach its expected state.
Only then use logcat, file logs, and event-monitor projections to reconstruct timing. Monitor state and log strings never override formal session facts.
-
ADBC: candidates, connection, verification, registry, and lanes. -
ADBP: Wireless Debugging pairing. -
USBC: USB scan, permission, and detach. -
SCLI/SSVR/SKPK: client orchestration, server shell, packet/metadata. -
SEVT: cross-module event projections. -
VDEC/ADEC: video/audio decoders. -
RDSP/CTRL/TOCH/FCTL: Surface, control, touch, floating menu. -
SSVC: foreground ADB protection. -
MGMT: management pages.
Correlate one attempt by session id, transport device id, SCID, local port, and socket type. If these identities disagree within a trace, investigate crossed resources or stale tasks first.
- USB missing: interface scan → permission → refreshed authorized
UsbDevice; after unplug, inspect detach matching and registry removal. - Pairing succeeds but connection fails: inspect TLS connect service/port, trust material, and ADB verification instead of repeating pairing-code diagnosis.
- Management works but no remote image: ADB passed; continue with server, sockets, metadata, and decoder.
-
Connectedbut black screen: inspect video metadata, decoder output, and Surface; socket connected is not media ready. - Audio missing: separate configuration disabled, server codec id
0, header error, and decoder/AudioTrack failure. - Control disconnects while idle: confirm control socket
soTimeout=0and an emptyINJECT_TEXTkeepalive everyCONTROL_KEEPALIVE_INTERVAL_MS(currently 3s). Prevention does not replace real disconnect recovery. - Reconnect after explicit exit: inspect cleanup trigger, socket-close classification, and cancellation of old reconnect work.
- One management feature fails: inspect its command, permission, parsing, or ROM difference instead of promoting it to remote-session failure.
- Reproduction steps, expected result, and actual result.
- Controller and target Android/device plus connection transport.
- Redacted session configuration, candidate order, and actual winner.
- Complete relevant logs from before the action through post-failure cleanup, not only the last exception.
-
SessionState, component snapshot, SCID/port/socket set. - Topic-specific codec/size/Surface or management-command facts.
- Code or tests explain the root cause; it did not merely disappear after retry.
- Failure and cancellation clean resources completely, with healthy ADB retained only according to ownership rules.
- The fix preserves scrcpy socket order and creates no second state system.
- A minimal automated regression exists; hardware/ROM behavior has an explicit device matrix.
- Logs diagnose without exposing secrets, and current wiki facts are updated.
- Overview / 总览
- Quick Start / 快速开始
- Connection & Pairing / 连接设备与配对
- Session Management / 会话管理
- Remote Control / 远程控制
- Settings / 设置
- Management Features / 管理功能
- FAQ / 常见问题
- Overview / 总览
- Technical Index / 技术文档索引
- Audit Checklist / 初始化与更新清单
- Conventions / 文档维护约定
- Architecture / 架构
- Module Map / 模块地图与边界
- Runtime Path / 运行时主链路
- Session State / 会话状态与事件
- Session Lifecycle / 会话配置与连接生命周期
- ADB, USB & Wireless / ADB、USB 与无线
- ADB Lifecycle / ADB 连接生命周期
- Pairing / 设备配对与无线调试
- Codecs / 编码与解码
- Remote Interaction / 远程交互性能与悬浮菜单
- Clipboard / 剪贴板同步
- Management / 管理功能
- Events & Shell / 事件、监控与 Shell
- Logging / 日志系统与维护
- Troubleshooting / 分层排障方法
- UI Design / UI 设计系统
- Bilingual Copy / 双语与文案
- Remote UI Analysis / 远程 UI 布局分析
- Engineering Rules / 工程与验证规则
- External Research / 外部研究与取舍
Technical topics appear here only after their page-level audit is complete. / 技术主题仅在完成逐页审核后加入侧边栏。