Repository navigation
Build and Application Entry Points
Last updated: 2026-07-29
| Item | Current value | Source of truth |
|---|---|---|
| Gradle | 9.6.1 |
gradle/wrapper/gradle-wrapper.properties |
| Android Gradle Plugin | 9.3.1 |
gradle/libs.versions.toml |
| Kotlin | 2.4.10 |
gradle/libs.versions.toml |
| Java/Kotlin target | 21 |
app/build.gradle.kts |
| Android SDK |
compileSdk 37 / targetSdk 37 / minSdk 23
|
app/build.gradle.kts |
| Build Tools | 37.0.0 |
app/build.gradle.kts |
| NDK | 30.0.15729638 |
Build scripts in external/dadb/dadb-android. |
| CMake | 4.1.2 |
Build scripts in external/dadb/dadb-android. |
| C++ | C++17 |
external/dadb/dadb-android |
| scrcpy server |
4.1 with pinned SHA-256 |
app/build.gradle.kts |
Version numbers on this page are read from current build files, never inferred from old wiki text.
Screen-Remote/settings.gradle.kts defines one :app Android application module and uses includeBuild("../external/dadb") to substitute local included-build projects for dev.mobile:dadb and dev.mobile:dadb-android.
The build also:
- builds
external/dadb/dadb-helper, synchronizesdadb-helper.jarinto app-generated assets, and verifies the same versioned helper before remote feature use; - produces ABI outputs for
arm64-v8a,armeabi-v7a,x86, andx86_64, plus a universal APK by default; - supports overriding ABI outputs with
-PTARGET_ABI=<comma-separated ABIs>, for example-PTARGET_ABI=arm64-v8a,armeabi-v7a; - verifies the bundled scrcpy server SHA-256 before
preBuildandcheck; and - no longer builds app-local JNI code; adb command execution uses
dev.mobile:dadbAPIs directly.
Run from the Screen-Remote/ app subrepository:
./gradlew assembleDebug
./gradlew testDebugUnitTest
./gradlew :app:verifyScrcpyServerVersion
./gradlew assembleDebug -PTARGET_ABI=arm64-v8a,armeabi-v7aassembleDebug validates a complete debug APK build. testDebugUnitTest runs local JVM tests. For a boundary-specific change, run focused tests first, then broaden to the full unit suite and debug build.
updateScrcpyServer downloads and verifies the server declared in the build file. It is an explicit dependency-update action, not part of routine builds.
Both the app and external/dadb/dadb-android are Android Gradle projects. If command-line builds succeed but IDE sync reports an SDK location error, inspect:
Screen-Remote/local.propertiesexternal/dadb/local.properties
Both should identify the same Android SDK. Local SDK paths are developer-environment values; do not publish personal paths as wiki facts or commit them.
| Entry point | Responsibility |
|---|---|
app/ScreenRemoteApp.kt |
Initializes logging, settings observation, haptics, local decoder cache, dadb runtime root, ADB connection management, and mDNS discovery. |
app/MainActivity.kt |
Configures edge-to-edge, theme, and language, accepts browsable screen-remote:// Intents in singleTask mode, and hosts MainScreen plus the optional debug-log overlay. |
feature/session/ui/MainScreen.kt |
Top-level Compose routing for the sessions page, settings pages, management pages, and remote display. |
service/ScrcpyForegroundService.kt |
Coordinates an active remote session with Android foreground lifetime. |
AndroidManifest.xml registers ScreenRemoteApp, MainActivity, ScrcpyForegroundService, and FileProvider and declares the current platform capabilities for networking, foreground services, USB Host, overlays, and related behavior. The debug manifest additionally registers a read-only diagnostics provider protected by android.permission.DUMP; it is not packaged in release builds.
A built APK proves the compile, resource, and packaging paths. It does not replace device validation for:
- USB permission, TCP reachability, or Wireless Debugging pairing/connection;
- scrcpy server startup, socket order, metadata, and decoder output; or
- touch, audio, clipboard, Surface switching, and foreground/background lifecycle.
The canonical page for each subsystem owns those acceptance checks.
- 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. / 技术主题仅在完成逐页审核后加入侧边栏。