-
Notifications
You must be signed in to change notification settings - Fork 8
URL Scheme Automation EN
Screen Remote accepts navigation, session, device-management, and settings actions from external apps, AI, or MCP tools through the browsable screen-remote:// URL scheme. app/MainActivity.kt and app/deeplink/ own the entry contract. MainActivity uses singleTask, so both cold launches and an existing instance parse a new Intent.
- A session selector resolves in order to a case-sensitive session id, the first case-sensitive matching session name, or a valid
host:porttransient target. IPv6 endpoints require brackets and URL encoding. - A
scrcpyURL clones the saved session's effective profile configuration, overrides only fields explicitly supplied by the URL, and creates an in-memory runtime session. It does not modify the saved session or profile. - A direct endpoint creates a transient TCP session. Management URLs can likewise use a saved session or a transient endpoint.
- A new-session URL only prefills the editor and still requires the user to save. A command-management URL only prefills the command and never executes it automatically.
| Purpose | URL form |
|---|---|
| Sessions / actions page |
screen-remote://open/sessions, screen-remote://open/actions
|
| Settings page | `screen-remote://open/settings[/about |
| Add / edit session |
screen-remote://session/new?..., screen-remote://session/edit/{selector}
|
| Start remote control | screen-remote://session/{selector}/scrcpy?... |
| Open device management | `screen-remote://session/{selector}/manage/{device |
| File path / command prefill | Append an encoded path to the file route, or pass command= to the command route |
| Change a global setting | screen-remote://setting/{setting}/{value} |
| ADB / diagnostics / disconnect |
screen-remote://adb/keys/generate, screen-remote://diagnostics/logs, screen-remote://remote/disconnect
|
New-session parameters include name, address, color, profileId, useProfileDefaults, comma-separated backupAddresses and groupIds, plus any remote-control parameters.
Remote-control URLs support:
maxSize, videoBitRate, maxFps, videoEncoder, videoDecoder, audio, audioBitRate, audioEncoder, audioDecoder, gameMode, compatibilityMode, fullScreen, floatingBall, hardwareDecoding, followOrientation, clipboard, turnScreenOff, powerOffOnClose, cleanupOnDisconnect, stayAwake, keepDeviceAwake, showTouches, ignoreVideoEncoderConstraints, displayId, newDisplayEnabled, newDisplay, virtualDisplaySystemDecorations, preserveVirtualDisplayContent, startApp, codecOptions, and tunnelMode.
Compatibility aliases are enableAudio, useFullScreen, showFloatingBall, enableHardwareDecoding, followRemoteOrientation, and clipboardSync. Parameter names are normalized case-insensitively to their canonical names; routes, selectors, and enum values remain case-sensitive. Boolean values accept on/true/1/yes and off/false/0/no. Enabling compatibilityMode always disables audio and automatic clipboard synchronization.
Mutable global settings are debugmode, activitylog, audiolog, videolog, controllog, eventlog, shelllog, managementlog, haptic, performancestats, autoupdate, updatechannel, theme, and language. Enum values are respectively stable|prerelease, system|light|dark, and auto|chinese|english.
- Scheme, host, path, and parameters use allowlists; URL authorities reject credentials, ports, and fragments.
- External callers must UTF-8 URL-encode path segments, endpoints, file paths, commands, and query values.
- An unsupported or invalid URL records an English warning and performs no partial action.
- Debug builds additionally expose a read-only diagnostics provider protected by the system
android.permission.DUMPpermission. It reports devices, session, sockets, codecs, logs, metrics, and a dynamic URL catalog. Release builds do not contain this provider.
-
app/deeplink/ScreenRemoteDeepLink.kt,ScrcpyUrlParameters.kt,UrlRuntimeSession.kt -
feature/session/ui/MainScreen.kt,feature/session/viewmodel/MainViewModel.kt -
ScreenRemoteDeepLinkTest,ScrcpyUrlParametersTest,UrlRuntimeSessionTest
- 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. / 技术主题仅在完成逐页审核后加入侧边栏。