Files
escrcpy/reference/scrcpy/develop.html

71 lines
76 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>scrcpy for developers | Escrcpy</title>
<meta name="description" content="Control your Android device with graphical scrcpy.">
<meta name="generator" content="VitePress v1.6.4">
<link rel="preload stylesheet" href="/assets/style.B6yeczxp.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.CZryc5Rv.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.BqCWZvX6.js">
<link rel="modulepreload" href="/assets/chunks/framework.DCs21iJA.js">
<link rel="modulepreload" href="/assets/reference_scrcpy_develop.md.D0BjYAa1.lean.js">
<link rel="icon" href="/images/logo.ico">
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5328953201873088" async crossorigin="anonymous"></script>
<script src="https://hm.baidu.com/hm.js?4984552ac1c9b6041c7f9edffff4089f" async></script>
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-9817b453><!--[--><!--]--><!--[--><span tabindex="-1" data-v-be61f584></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-be61f584>Skip to content</a><!--]--><!----><header class="VPNav" data-v-9817b453 data-v-eed4f207><div class="VPNavBar" data-v-eed4f207 data-v-9d1f2fc8><div class="wrapper" data-v-9d1f2fc8><div class="container" data-v-9d1f2fc8><div class="title" data-v-9d1f2fc8><div class="VPNavBarTitle has-sidebar" data-v-9d1f2fc8 data-v-dbe18516><a class="title" href="/" data-v-dbe18516><!--[--><!--]--><!--[--><img class="VPImage logo" src="/images/logo.ico" alt="Escrcpy" data-v-a01a0873><!--]--><span data-v-dbe18516>Escrcpy</span><!--[--><!--]--></a></div></div><div class="content" data-v-9d1f2fc8><div class="content-body" data-v-9d1f2fc8><!--[--><!--]--><div class="VPNavBarSearch search" data-v-9d1f2fc8><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-9d1f2fc8 data-v-b0b87db3><span id="main-nav-aria-label" class="visually-hidden" data-v-b0b87db3> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/guide" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Guide</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/reference" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Reference</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/help" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Help</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/changelog" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Changelog</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/donate" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Donate</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/contact" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Contact</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://blog.viarotel.eu.org/en" target="_blank" rel="noreferrer" tabindex="0" data-v-b0b87db3 data-v-edc9346e><!--[--><span data-v-edc9346e>Blog</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-9d1f2fc8 data-v-49693ac3 data-v-6a86309e><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-6a86309e><span class="text" data-v-6a86309e><span class="vpi-languages option-icon" data-v-6a86309e></span><!----><span class="vpi-chevron-down text-icon" data-v-6a86309e></span></span></button><div class="menu" data-v-6a86309e><div class="VPMenu" data-v-6a86309e data-v-365b7ead><!----><!--[--><!--[--><div class="items" data-v-49693ac3><p class="title" data-v-49693ac3>English</p><!--[--><div class="VPMenuLink" data-v-49693ac3 data-v-55441cd4><a class="VPLink link" href="/zhHans/reference/scrcpy/develop" data-v-55441cd4><!--[--><span data-v-55441cd4>简体中文</span><!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-9d1f2fc8 data-v-3b15b7e4><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-3b15b7e4 data-v-2c9ff1e5 data-v-5138627f><span class="check" data-v-5138627f><span class="icon" data-v-5138627f><!--[--><span class="vpi-sun sun" data-v-2c9ff1e5></span><span class="vpi-moon moon" data-v-2c9ff1e5></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-9d1f2fc8 data-v-a6378528 data-v-dff5ffb3><!--[--><a class="VPSocialLink no-icon" href="https://github.com/viarotel/viarotel.github.io" aria-label="github" target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon" href="https://gitee.com/viarotel" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="https://gitee.com/favicon.ico" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><a class="VPSocialLink no-icon" href="https://gitcode.com/viarotel-org" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="/images/logo-gitcode.png" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><a class="VPSocialLink no-icon" href="https://space.bilibili.com/274990176" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="https://static.hdslb.com/images/favicon.ico" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><a class="VPSocialLink no-icon" href="https://juejin.cn/user/1275089219751944" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="https://lf3-cdn-tos.bytescm.com/obj/static/xitu_juejin_web//static/favicons/favicon-32x32.png" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-9d1f2fc8 data-v-6e3e860c data-v-6a86309e><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-6a86309e><span class="vpi-more-horizontal icon" data-v-6a86309e></span></button><div class="menu" data-v-6a86309e><div class="VPMenu" data-v-6a86309e data-v-365b7ead><!----><!--[--><!--[--><div class="group translations" data-v-6e3e860c><p class="trans-title" data-v-6e3e860c>English</p><!--[--><div class="VPMenuLink" data-v-6e3e860c data-v-55441cd4><a class="VPLink link" href="/zhHans/reference/scrcpy/develop" data-v-55441cd4><!--[--><span data-v-55441cd4>简体中文</span><!--]--></a></div><!--]--></div><div class="group" data-v-6e3e860c><div class="item appearance" data-v-6e3e860c><p class="label" data-v-6e3e860c>Appearance</p><div class="appearance-action" data-v-6e3e860c><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-6e3e860c data-v-2c9ff1e5 data-v-5138627f><span class="check" data-v-5138627f><span class="icon" data-v-5138627f><!--[--><span class="vpi-sun sun" data-v-2c9ff1e5></span><span class="vpi-moon moon" data-v-2c9ff1e5></span><!--]--></span></span></button></div></div></div><div class="group" data-v-6e3e860c><div class="item social-links" data-v-6e3e860c><div class="VPSocialLinks social-links-list" data-v-6e3e860c data-v-dff5ffb3><!--[--><a class="VPSocialLink no-icon" href="https://github.com/viarotel/viarotel.github.io" aria-label="github" target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon" href="https://gitee.com/viarotel" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="https://gitee.com/favicon.ico" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><a class="VPSocialLink no-icon" href="https://gitcode.com/viarotel-org" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="/images/logo-gitcode.png" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><a class="VPSocialLink no-icon" href="https://space.bilibili.com/274990176" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="https://static.hdslb.com/images/favicon.ico" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><a class="VPSocialLink no-icon" href="https://juejin.cn/user/1275089219751944" aria-label target="_blank" rel="noopener" data-v-dff5ffb3 data-v-a52e095d><img src="https://lf3-cdn-tos.bytescm.com/obj/static/xitu_juejin_web//static/favicons/favicon-32x32.png" style="width: 20px; height: 20px;" class="hover:opacity-100 opacity-70 duration-500" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-9d1f2fc8 data-v-c7526f04><span class="container" data-v-c7526f04><span class="top" data-v-c7526f04></span><span class="middle" data-v-c7526f04></span><span class="bottom" data-v-c7526f04></span></span></button></div></div></div></div><div class="divider" data-v-9d1f2fc8><div class="divider-line" data-v-9d1f2fc8></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-9817b453 data-v-4c3725dc><div class="container" data-v-4c3725dc><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-4c3725dc><span class="vpi-align-left menu-icon" data-v-4c3725dc></span><span class="menu-text" data-v-4c3725dc>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-4c3725dc data-v-66fc616b><button data-v-66fc616b>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-9817b453 data-v-bd0e6ecb><div class="curtain" data-v-bd0e6ecb></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-bd0e6ecb><span class="visually-hidden" id="sidebar-aria-label" data-v-bd0e6ecb> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-59a30664><section class="VPSidebarItem level-0 collapsible is-link" data-v-59a30664 data-v-ecd3b3ec><div class="item" tabindex="0" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/guide/index" data-v-ecd3b3ec><!--[--><h2 class="text" data-v-ecd3b3ec>Guide</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-ecd3b3ec><span class="vpi-chevron-right caret-icon" data-v-ecd3b3ec></span></div></div><div class="items" data-v-ecd3b3ec><!--[--><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/guide/started" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Quick Start</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/guide/milestones" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Milestones</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/guide/operation" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Operation</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/guide/preferences" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Preferences</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/guide/window-arrangement" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Window Arrangement</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-59a30664><section class="VPSidebarItem level-0 collapsible is-link has-active" data-v-59a30664 data-v-ecd3b3ec><div class="item" tabindex="0" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/index" data-v-ecd3b3ec><!--[--><h2 class="text" data-v-ecd3b3ec>Reference</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-ecd3b3ec><span class="vpi-chevron-right caret-icon" data-v-ecd3b3ec></span></div></div><div class="items" data-v-ecd3b3ec><!--[--><section class="VPSidebarItem level-1 collapsible is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" tabindex="0" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/gnirehtet/index" data-v-ecd3b3ec><!--[--><h3 class="text" data-v-ecd3b3ec>Gnirehtet</h3><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-ecd3b3ec><span class="vpi-chevron-right caret-icon" data-v-ecd3b3ec></span></div></div><div class="items" data-v-ecd3b3ec><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/gnirehtet/api" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>API</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1 collapsible is-link has-active" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" tabindex="0" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/index" data-v-ecd3b3ec><!--[--><h3 class="text" data-v-ecd3b3ec>Scrcpy</h3><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-ecd3b3ec><span class="vpi-chevron-right caret-icon" data-v-ecd3b3ec></span></div></div><div class="items" data-v-ecd3b3ec><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/audio" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Audio</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/build" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Build</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/camera" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Camera</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/connection" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Connection</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/control" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Control</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/develop" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Develop</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/device" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Device</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/gamepad" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Gamepad</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/keyboard" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Keyboard</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/linux" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Linux</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/macos" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Macos</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/mouse" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Mouse</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/otg" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Otg</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/recording" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Recording</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/shortcuts" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Shortcuts</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/tunnels" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Tunnels</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/v4l2" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Video4Linux</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/video" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Video</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/virtual_display" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Virtual_display</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/window" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Window</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/reference/scrcpy/windows" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Windows</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><div class="no-transition group" data-v-59a30664><section class="VPSidebarItem level-0 collapsible is-link" data-v-59a30664 data-v-ecd3b3ec><div class="item" tabindex="0" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/help/index" data-v-ecd3b3ec><!--[--><h2 class="text" data-v-ecd3b3ec>Help</h2><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-ecd3b3ec><span class="vpi-chevron-right caret-icon" data-v-ecd3b3ec></span></div></div><div class="items" data-v-ecd3b3ec><!--[--><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/help/escrcpy" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Escrcpy</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/help/scrcpy" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Scrcpy</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-59a30664><section class="VPSidebarItem level-0" data-v-59a30664 data-v-ecd3b3ec><!----><div class="items" data-v-ecd3b3ec><!--[--><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/changelog" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Changelog</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/donate" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Donate</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ecd3b3ec data-v-ecd3b3ec><div class="item" data-v-ecd3b3ec><div class="indicator" data-v-ecd3b3ec></div><a class="VPLink link link" href="/contact" data-v-ecd3b3ec><!--[--><p class="text" data-v-ecd3b3ec>Contact</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-9817b453 data-v-2389cf18><div class="VPDoc has-sidebar has-aside" data-v-2389cf18 data-v-91ce183a><!--[--><!--]--><div class="container" data-v-91ce183a><div class="aside" data-v-91ce183a><div class="aside-curtain" data-v-91ce183a></div><div class="aside-container" data-v-91ce183a><div class="aside-content" data-v-91ce183a><div class="VPDocAside" data-v-91ce183a data-v-3a3fb532><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3a3fb532 data-v-2eb0377b><div class="content" data-v-2eb0377b><div class="outline-marker" data-v-2eb0377b></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-2eb0377b>On this page</div><ul class="VPDocOutlineItem root" data-v-2eb0377b data-v-5298d51f><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3a3fb532></div><!--[--><!--[--><!--[--><!--[--><!----><!--]--><!--]--><!--]--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-91ce183a><div class="content-container" data-v-91ce183a><!--[--><!--]--><main class="main" data-v-91ce183a><div style="position:relative;" class="vp-doc _reference_scrcpy_develop" data-v-91ce183a><div><h1 id="scrcpy-for-developers" tabindex="-1">scrcpy for developers <a class="header-anchor" href="#scrcpy-for-developers" aria-label="Permalink to &quot;scrcpy for developers&quot;"></a></h1><h2 id="overview" tabindex="-1">Overview <a class="header-anchor" href="#overview" aria-label="Permalink to &quot;Overview&quot;"></a></h2><p>This application is composed of two parts:</p><ul><li>the server (<code>scrcpy-server</code>), to be executed on the device,</li><li>the client (the <code>scrcpy</code> binary), executed on the host computer.</li></ul><p>The client is responsible to push the server to the device and start its execution.</p><p>The client and the server establish communication using separate sockets for video, audio and controls. Any of them may be disabled (but not all), so there are 1, 2 or 3 socket(s).</p><p>The server initially sends the device name on the first socket (it is used for the scrcpy window title), then each socket is used for its own purpose. All reads and writes are performed from a dedicated thread for each socket, both on the client and on the server.</p><p>If video is enabled, then the server sends a raw video stream (H.264 by default) of the device screen, with some additional headers for each packet. The client decodes the video frames, and displays them as soon as possible, without buffering (unless <code>--video-buffer=delay</code> is specified) to minimize latency. The client is not aware of the device rotation (which is handled by the server), it just knows the dimensions of the video frames it receives.</p><p>Similarly, if audio is enabled, then the server sends a raw audio stream (OPUS by default) of the device audio output (or the microphone if <code>--audio-source=mic</code> is specified), with some additional headers for each packet. The client decodes the stream, attempts to keep a minimal latency by maintaining an average buffering. The <a href="https://blog.rom1v.com/2023/03/scrcpy-2-0-with-audio/" target="_blank" rel="noreferrer">blog post</a> of the scrcpy v2.0 release gives more details about the audio feature.</p><p>If control is enabled, then the client captures relevant keyboard and mouse events, that it transmits to the server, which injects them to the device. This is the only socket which is used in both direction: input events are sent from the client to the device, and when the device clipboard changes, the new content is sent from the device to the client to support seamless copy-paste.</p><p>Note that the client-server roles are expressed at the application level:</p><ul><li>the server <em>serves</em> video and audio streams, and handle requests from the client,</li><li>the client <em>controls</em> the device through the server.</li></ul><p>However, by default (when <code>--force-adb-forward</code> is not set), the roles are reversed at the network level:</p><ul><li>the client opens a server socket and listen on a port before starting the server,</li><li>the server connects to the client.</li></ul><p>This role inversion guarantees that the connection will not fail due to race conditions without polling.</p><h2 id="server" tabindex="-1">Server <a class="header-anchor" href="#server" aria-label="Permalink to &quot;Server&quot;"></a></h2><h3 id="privileges" tabindex="-1">Privileges <a class="header-anchor" href="#privileges" aria-label="Permalink to &quot;Privileges&quot;"></a></h3><p>Capturing the screen requires some privileges, which are granted to <code>shell</code>.</p><p>The server is a Java application (with a <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Server.java#L193" target="_blank" rel="noreferrer"><code>public static void main(String... args)</code></a> method), compiled against the Android framework, and executed as <code>shell</code> on the Android device.</p><p>To run such a Java application, the classes must be <a href="https://en.wikipedia.org/wiki/Dalvik_(software)" target="_blank" rel="noreferrer"><em>dexed</em></a> (typically, to <code>classes.dex</code>). If <code>my.package.MainClass</code> is the main class, compiled to <code>classes.dex</code>, pushed to the device in <code>/data/local/tmp</code>, then it can be run with:</p><pre><code>adb shell CLASSPATH=/data/local/tmp/classes.dex app_process / my.package.MainClass
</code></pre><p><em>The path <code>/data/local/tmp</code> is a good candidate to push the server, since it&#39;s readable and writable by <code>shell</code>, but not world-writable, so a malicious application may not replace the server just before the client executes it.</em></p><p>Instead of a raw <em>dex</em> file, <code>app_process</code> accepts a <em>jar</em> containing <code>classes.dex</code> (e.g. an <a href="https://en.wikipedia.org/wiki/Android_application_package" target="_blank" rel="noreferrer">APK</a>). For simplicity, and to benefit from the gradle build system, the server is built to an (unsigned) APK (renamed to <code>scrcpy-server.jar</code>).</p><h3 id="hidden-methods" tabindex="-1">Hidden methods <a class="header-anchor" href="#hidden-methods" aria-label="Permalink to &quot;Hidden methods&quot;"></a></h3><p>Although compiled against the Android framework, <a href="https://stackoverflow.com/a/31908373/1987178" target="_blank" rel="noreferrer">hidden</a> methods and classes are not directly accessible (and they may differ from one Android version to another).</p><p>They can be called using reflection though. The communication with hidden components is provided by <a href="https://github.com/Genymobile/scrcpy/tree/master/server/src/main/java/com/genymobile/scrcpy/wrappers" target="_blank" rel="noreferrer"><em>wrappers</em> classes</a> and <a href="https://github.com/Genymobile/scrcpy/tree/master/server/src/main/aidl" target="_blank" rel="noreferrer">aidl</a>.</p><h3 id="execution" tabindex="-1">Execution <a class="header-anchor" href="#execution" aria-label="Permalink to &quot;Execution&quot;"></a></h3><p>The server is started by the client basically by executing the following commands:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> push</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> scrcpy-server</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /data/local/tmp/scrcpy-server.jar</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:27183</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> localabstract:scrcpy</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> shell</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> CLASSPATH=/data/local/tmp/scrcpy-server.jar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app_process</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> com.genymobile.scrcpy.Server</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2.1</span></span></code></pre></div><p>The first argument (<code>2.1</code> in the example) is the client scrcpy version. The server fails if the client and the server do not have the exact same version. The protocol between the client and the server may change from version to version (see <a href="#protocol">protocol</a> below), and there is no backward or forward compatibility (there is no point to use different client and server versions). This check allows to detect misconfiguration (running an older or newer server by mistake).</p><p>It is followed by any number of arguments, in the form of <code>key=value</code> pairs. Their order is irrelevant. The possible keys and associated value types can be found in the <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Options.java#L181" target="_blank" rel="noreferrer">server</a> and <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/app/src/server.c#L226" target="_blank" rel="noreferrer">client</a> code.</p><p>For example, if we execute <code>scrcpy -m1920 --no-audio</code>, then the server execution will look like this:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># scid is a random number to identify different clients running on the same device</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> shell</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> CLASSPATH=/data/local/tmp/scrcpy-server.jar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app_process</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> com.genymobile.scrcpy.Server</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2.1</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> scid=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">12345678</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> log_level=info</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> audio=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> max_size=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1920</span></span></code></pre></div><h3 id="components" tabindex="-1">Components <a class="header-anchor" href="#components" aria-label="Permalink to &quot;Components&quot;"></a></h3><p>When executed, its <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Server.java#L193" target="_blank" rel="noreferrer"><code>main()</code></a> method is executed (on the &quot;main&quot; thread). It parses the arguments, establishes the connection with the client and starts the other &quot;components&quot;:</p><ul><li>the <strong>video</strong> streamer: it captures the video screen and send encoded video packets on the <em>video</em> socket (from the <em>video</em> thread).</li><li>the <strong>audio</strong> streamer: it uses several threads to capture raw packets, submits them to encoding and retrieve encoded packets, which it sends on the <em>audio</em> socket.</li><li>the <strong>controller</strong>: it receives <em>control messages</em> (typically input events) on the <em>control</em> socket from one thread, and sends <em>device messages</em> (e.g. to transmit the device clipboard content to the client) on the same <em>control socket</em> from another thread. Thus, the <em>control</em> socket is used in both directions (contrary to the <em>video</em> and <em>audio</em> sockets).</li></ul><h3 id="screen-video-encoding" tabindex="-1">Screen video encoding <a class="header-anchor" href="#screen-video-encoding" aria-label="Permalink to &quot;Screen video encoding&quot;"></a></h3><p>The encoding is managed by <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java" target="_blank" rel="noreferrer"><code>ScreenEncoder</code></a>.</p><p>The video is encoded using the <a href="https://developer.android.com/reference/android/media/MediaCodec.html" target="_blank" rel="noreferrer"><code>MediaCodec</code></a> API. The codec encodes the content of a <code>Surface</code> associated to the display, and writes the encoding packets to the client (on the <em>video</em> socket).</p><p>On device rotation (or folding), the encoding session is <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java#L179" target="_blank" rel="noreferrer">reset</a> and restarted.</p><p>New frames are produced only when changes occur on the surface. This avoids to send unnecessary frames, but by default there might be drawbacks:</p><ul><li>it does not send any frame on start if the device screen does not change,</li><li>after fast motion changes, the last frame may have poor quality.</li></ul><p>Both problems are <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java#L246-L247" target="_blank" rel="noreferrer">solved</a> by the flag <a href="https://developer.android.com/reference/android/media/MediaFormat.html#KEY_REPEAT_PREVIOUS_FRAME_AFTER" target="_blank" rel="noreferrer"><code>KEY_REPEAT_PREVIOUS_FRAME_AFTER</code></a>.</p><h3 id="audio-encoding" tabindex="-1">Audio encoding <a class="header-anchor" href="#audio-encoding" aria-label="Permalink to &quot;Audio encoding&quot;"></a></h3><p>Similarly, the audio is <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/AudioCapture.java" target="_blank" rel="noreferrer">captured</a> using an <a href="https://developer.android.com/reference/android/media/AudioRecord" target="_blank" rel="noreferrer"><code>AudioRecord</code></a>, and <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/AudioEncoder.java" target="_blank" rel="noreferrer">encoded</a> using the <a href="https://developer.android.com/reference/android/media/MediaCodec.html" target="_blank" rel="noreferrer"><code>MediaCodec</code></a> asynchronous API.</p><p>More details are available on the <a href="https://blog.rom1v.com/2023/03/scrcpy-2-0-with-audio/" target="_blank" rel="noreferrer">blog post</a> introducing the audio feature.</p><h3 id="input-events-injection" tabindex="-1">Input events injection <a class="header-anchor" href="#input-events-injection" aria-label="Permalink to &quot;Input events injection&quot;"></a></h3><p><em>Control messages</em> are received from the client by the <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Controller.java" target="_blank" rel="noreferrer"><code>Controller</code></a> (run in a separate thread). There are several types of input events:</p><ul><li>keycode (cf <a href="https://developer.android.com/reference/android/view/KeyEvent.html" target="_blank" rel="noreferrer"><code>KeyEvent</code></a>),</li><li>text (special characters may not be handled by keycodes directly),</li><li>mouse motion/click,</li><li>mouse scroll,</li><li>other commands (e.g. to switch the screen on or to copy the clipboard).</li></ul><p>Some of them need to inject input events to the system. To do so, they use the <em>hidden</em> method <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/wrappers/InputManager.java#L34" target="_blank" rel="noreferrer"><code>InputManager.injectInputEvent()</code></a> (exposed by the <a href="https://github.com/Genymobile/scrcpy/blob/ffe0417228fb78ab45b7ee4e202fc06fc8875bf3/server/src/main/java/com/genymobile/scrcpy/wrappers/InputManager.java#L27" target="_blank" rel="noreferrer"><code>InputManager</code> wrapper</a>).</p><h2 id="client" tabindex="-1">Client <a class="header-anchor" href="#client" aria-label="Permalink to &quot;Client&quot;"></a></h2><p>The client relies on <a href="https://www.libsdl.org" target="_blank" rel="noreferrer">SDL</a>, which provides cross-platform API for UI, input events, threading, etc.</p><p>The video and audio streams are decoded by <a href="https://ffmpeg.org/" target="_blank" rel="noreferrer">FFmpeg</a>.</p><h3 id="initialization" tabindex="-1">Initialization <a class="header-anchor" href="#initialization" aria-label="Permalink to &quot;Initialization&quot;"></a></h3><p>The client parses the command line arguments, then <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/app/src/main.c#L81-L82" target="_blank" rel="noreferrer">runs one of two code paths</a>:</p><ul><li>scrcpy in &quot;normal&quot; mode (<a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/app/src/scrcpy.c#L292-L293" target="_blank" rel="noreferrer"><code>scrcpy.c</code></a>)</li><li>scrcpy in <a href="/reference/scrcpy/otg">OTG mode</a> (<a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/app/src/usb/scrcpy_otg.c#L51-L52" target="_blank" rel="noreferrer"><code>scrcpy_otg.c</code></a>)</li></ul><p>In the remaining of this document, we assume that the &quot;normal&quot; mode is used (read the code for the OTG mode).</p><p>On startup, the client:</p><ul><li>opens the <em>video</em>, <em>audio</em> and <em>control</em> sockets;</li><li>pushes and starts the server on the device;</li><li>initializes its components (demuxers, decoders, recorder…).</li></ul><h3 id="video-and-audio-streams" tabindex="-1">Video and audio streams <a class="header-anchor" href="#video-and-audio-streams" aria-label="Permalink to &quot;Video and audio streams&quot;"></a></h3><p>Depending on the arguments passed to <code>scrcpy</code>, several components may be used. Here is an overview of the video and audio components:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span> V4L2 sink</span></span>
<span class="line"><span> /</span></span>
<span class="line"><span> decoder</span></span>
<span class="line"><span> / \</span></span>
<span class="line"><span> VIDEO -------------&gt; demuxer display</span></span>
<span class="line"><span> \</span></span>
<span class="line"><span> recorder</span></span>
<span class="line"><span> /</span></span>
<span class="line"><span> AUDIO -------------&gt; demuxer</span></span>
<span class="line"><span> \</span></span>
<span class="line"><span> decoder --- audio player</span></span></code></pre></div><p>The <em>demuxer</em> is responsible to extract video and audio packets (read some header, split the video stream into packets at correct boundaries, etc.).</p><p>The demuxed packets may be sent to a <em>decoder</em> (one per stream, to produce frames) and to a recorder (receiving both video and audio stream to record a single file). The packets are encoded on the device (by <code>MediaCodec</code>), but when recording, they are <em>muxed</em> (asynchronously) into a container (MKV or MP4) on the client side.</p><p>Video frames are sent to the screen/display to be rendered in the scrcpy window. They may also be sent to a <a href="/reference/scrcpy/v4l2">V4L2 sink</a>.</p><p>Audio &quot;frames&quot; (an array of decoded samples) are sent to the audio player.</p><h3 id="controller" tabindex="-1">Controller <a class="header-anchor" href="#controller" aria-label="Permalink to &quot;Controller&quot;"></a></h3><p>The <em>controller</em> is responsible to send <em>control messages</em> to the device. It runs in a separate thread, to avoid I/O on the main thread.</p><p>On SDL event, received on the main thread, the <em>input manager</em> creates appropriate <em>control messages</em>. It is responsible to convert SDL events to Android events. It then pushes the <em>control messages</em> to a queue hold by the controller. On its own thread, the controller takes messages from the queue, that it serializes and sends to the client.</p><h2 id="protocol" tabindex="-1">Protocol <a class="header-anchor" href="#protocol" aria-label="Permalink to &quot;Protocol&quot;"></a></h2><p>The protocol between the client and the server must be considered <em>internal</em>: it may (and will) change at any time for any reason. Everything may change (the number of sockets, the order in which the sockets must be opened, the data format on the wire…) from version to version. A client must always be run with a matching server version.</p><p>This section documents the current protocol in scrcpy v2.1.</p><h3 id="connection" tabindex="-1">Connection <a class="header-anchor" href="#connection" aria-label="Permalink to &quot;Connection&quot;"></a></h3><p>Firstly, the client sets up an adb tunnel:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># By default, a reverse redirection: the computer listens, the device connects</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reverse</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> localabstract:scrcpy_</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">SCI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">D</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:27183</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># As a fallback (or if --force-adb forward is set), a forward redirection:</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># the device listens, the computer connects</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:27183</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> localabstract:scrcpy_</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">SCI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">D</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span></code></pre></div><p>(<code>&lt;SCID&gt;</code> is a 31-bit random number, so that it does not fail when several scrcpy instances start &quot;at the same time&quot; for the same device.)</p><p>Then, up to 3 sockets are opened, in that order:</p><ul><li>a <em>video</em> socket</li><li>an <em>audio</em> socket</li><li>a <em>control</em> socket</li></ul><p>Each one may be disabled (respectively by <code>--no-video</code>, <code>--no-audio</code> and <code>--no-control</code>, directly or indirectly). For example, if <code>--no-audio</code> is set, then the <em>video</em> socket is opened first, then the <em>control</em> socket.</p><p>On the <em>first</em> socket opened (whichever it is), if the tunnel is <em>forward</em>, then a <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/DesktopConnection.java#L93" target="_blank" rel="noreferrer">dummy byte</a> is sent from the device to the client. This allows to detect a connection error (the client connection does not fail as long as there is an adb forward redirection, even if nothing is listening on the device side).</p><p>Still on this <em>first</em> socket, the device sends some <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/DesktopConnection.java#L151" target="_blank" rel="noreferrer">metadata</a> to the client (currently only the device name, used as the window title, but there might be other fields in the future).</p><p>You can read the <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/app/src/server.c#L465-L466" target="_blank" rel="noreferrer">client</a> and <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/DesktopConnection.java#L63" target="_blank" rel="noreferrer">server</a> code for more details.</p><p>Then each socket is used for its intended purpose.</p><h3 id="video-and-audio" tabindex="-1">Video and audio <a class="header-anchor" href="#video-and-audio" aria-label="Permalink to &quot;Video and audio&quot;"></a></h3><p>On the <em>video</em> and <em>audio</em> sockets, the device first sends some <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Streamer.java#L33-L51" target="_blank" rel="noreferrer">codec metadata</a>:</p><ul><li>On the <em>video</em> socket, 12 bytes: <ul><li>the codec id (<code>u32</code>) (H264, H265 or AV1)</li><li>the initial video width (<code>u32</code>)</li><li>the initial video height (<code>u32</code>)</li></ul></li><li>On the <em>audio</em> socket, 4 bytes: <ul><li>the codec id (<code>u32</code>) (OPUS, AAC or RAW)</li></ul></li></ul><p>Then each packet produced by <code>MediaCodec</code> is sent, prefixed by a 12-byte <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Streamer.java#L83" target="_blank" rel="noreferrer">frame header</a>:</p><ul><li>config packet flag (<code>u1</code>)</li><li>key frame flag (<code>u1</code>)</li><li>PTS (<code>u62</code>)</li><li>packet size (<code>u32</code>)</li></ul><p>Here is a schema describing the frame header:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span> [. . . . . . . .|. . . .]. . . . . . . . . . . . . . . ...</span></span>
<span class="line"><span> &lt;-------------&gt; &lt;-----&gt; &lt;-----------------------------...</span></span>
<span class="line"><span> PTS packet raw packet</span></span>
<span class="line"><span> size</span></span>
<span class="line"><span> &lt;---------------------&gt;</span></span>
<span class="line"><span> frame header</span></span>
<span class="line"><span></span></span>
<span class="line"><span>The most significant bits of the PTS are used for packet flags:</span></span>
<span class="line"><span></span></span>
<span class="line"><span> byte 7 byte 6 byte 5 byte 4 byte 3 byte 2 byte 1 byte 0</span></span>
<span class="line"><span> CK...... ........ ........ ........ ........ ........ ........ ........</span></span>
<span class="line"><span> ^^&lt;-------------------------------------------------------------------&gt;</span></span>
<span class="line"><span> || PTS</span></span>
<span class="line"><span> | `- key frame</span></span>
<span class="line"><span> `-- config packet</span></span></code></pre></div><h3 id="controls" tabindex="-1">Controls <a class="header-anchor" href="#controls" aria-label="Permalink to &quot;Controls&quot;"></a></h3><p>Controls messages are sent via a custom binary protocol.</p><p>The only documentation for this protocol is the set of unit tests on both sides:</p><ul><li><code>ControlMessage</code> (from client to device): <a href="https://github.com/Genymobile/scrcpy/blob/master/app/tests/test_control_msg_serialize.c" target="_blank" rel="noreferrer">serialization</a> | <a href="https://github.com/Genymobile/scrcpy/blob/master/server/src/test/java/com/genymobile/scrcpy/ControlMessageReaderTest.java" target="_blank" rel="noreferrer">deserialization</a></li><li><code>DeviceMessage</code> (from device to client) <a href="https://github.com/Genymobile/scrcpy/blob/master/server/src/test/java/com/genymobile/scrcpy/DeviceMessageWriterTest.java" target="_blank" rel="noreferrer">serialization</a> | <a href="https://github.com/Genymobile/scrcpy/blob/master/app/tests/test_device_msg_deserialize.c" target="_blank" rel="noreferrer">deserialization</a></li></ul><h2 id="standalone-server" tabindex="-1">Standalone server <a class="header-anchor" href="#standalone-server" aria-label="Permalink to &quot;Standalone server&quot;"></a></h2><p>Although the server is designed to work for the scrcpy client, it can be used with any client which uses the same protocol.</p><p>For simplicity, some <a href="https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786e1f7d09b9c202feabc6949/server/src/main/java/com/genymobile/scrcpy/Options.java#L309-L329" target="_blank" rel="noreferrer">server-specific options</a> have been added to produce raw streams easily:</p><ul><li><code>send_device_meta=false</code>: disable the device metata (in practice, the device name) sent on the <em>first</em> socket</li><li><code>send_frame_meta=false</code>: disable the 12-byte header for each packet</li><li><code>send_dummy_byte</code>: disable the dummy byte sent on forward connections</li><li><code>send_codec_meta</code>: disable the codec information (and initial device size for video)</li><li><code>raw_stream</code>: disable all the above</li></ul><p>Concretely, here is how to expose a raw H.264 stream on a TCP socket:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> push</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> scrcpy-server-v2.1</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /data/local/tmp/scrcpy-server-manual.jar</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:1234</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> localabstract:scrcpy</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> shell</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> CLASSPATH=/data/local/tmp/scrcpy-server-manual.jar</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app_process</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> com.genymobile.scrcpy.Server</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2.1</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tunnel_forward=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> audio=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> control=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cleanup=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> raw_stream=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> max_size=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1920</span></span></code></pre></div><p>As soon as a client connects over TCP on port 1234, the device will start streaming the video. For example, VLC can play the video (although you will experience a very high latency, more details <a href="https://code.videolan.org/rom1v/vlc/-/merge_requests/20" target="_blank" rel="noreferrer">here</a>):</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>vlc -Idummy --demux=h264 --network-caching=0 tcp://localhost:1234</span></span></code></pre></div><h2 id="hack" tabindex="-1">Hack <a class="header-anchor" href="#hack" aria-label="Permalink to &quot;Hack&quot;"></a></h2><p>For more details, go read the code!</p><p>If you find a bug, or have an awesome idea to implement, please discuss and contribute 😉</p><h3 id="debug-the-server" tabindex="-1">Debug the server <a class="header-anchor" href="#debug-the-server" aria-label="Permalink to &quot;Debug the server&quot;"></a></h3><p>The server is pushed to the device by the client on startup.</p><p>To debug it, enable the server debugger during configuration:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">meson</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> setup</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -Dserver_debugger=true</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or, if x is already configured</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">meson</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> configure</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -Dserver_debugger=true</span></span></code></pre></div><p>Then recompile, and run scrcpy.</p><p>For Android &lt; 11, it will start a debugger on port 5005 on the device and wait: Redirect that port to the computer:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:5005</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:5005</span></span></code></pre></div><p>For Android &gt;= 11, first find the listening port:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> jdwp</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># press Ctrl+C to interrupt</span></span></code></pre></div><p>Then redirect the resulting PID:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">adb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tcp:5005</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> jdwp:XXXX</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # replace XXXX</span></span></code></pre></div><p>In Android Studio, <em>Run</em> &gt; <em>Debug</em> &gt; <em>Edit configurations...</em> On the left, click on <code>+</code>, <em>Remote</em>, and fill the form:</p><ul><li>Host: <code>localhost</code></li><li>Port: <code>5005</code></li></ul><p>Then click on <em>Debug</em>.</p></div></div></main><footer class="VPDocFooter" data-v-91ce183a data-v-add8d755><!--[--><!--]--><div class="edit-info" data-v-add8d755><!----><div class="last-updated" data-v-add8d755><p class="VPLastUpdated" data-v-add8d755 data-v-eea50909>Last updated: <time datetime="2026-01-14T20:22:11.000Z" data-v-eea50909></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-add8d755><span class="visually-hidden" id="doc-footer-aria-label" data-v-add8d755>Pager</span><div class="pager" data-v-add8d755><a class="VPLink link pager-link prev" href="/reference/scrcpy/control" data-v-add8d755><!--[--><span class="desc" data-v-add8d755>Previous page</span><span class="title" data-v-add8d755>Control</span><!--]--></a></div><div class="pager" data-v-add8d755><a class="VPLink link pager-link next" href="/reference/scrcpy/device" data-v-add8d755><!--[--><span class="desc" data-v-add8d755>Next page</span><span class="title" data-v-add8d755>Device</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-9817b453 data-v-a856a06d><div class="container" data-v-a856a06d><p class="message" data-v-a856a06d>
Released under the MIT License.
</p><p class="copyright" data-v-a856a06d>Copyright © 2025-2026 viarotel</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"changelog.md\":\"DJGKmpPz\",\"contact.md\":\"wCdBQQsL\",\"donate.md\":\"YP9XO0P-\",\"guide_index.md\":\"DCdNujTC\",\"guide_milestones.md\":\"1hFjGiU1\",\"guide_operation.md\":\"U4IGaxbb\",\"guide_preferences.md\":\"CvCNEQ9z\",\"guide_started.md\":\"DfNCD2Mw\",\"guide_window-arrangement.md\":\"DimdYkFv\",\"help_escrcpy.md\":\"Cvab3e9J\",\"help_index.md\":\"BnI44JUE\",\"help_scrcpy.md\":\"BZR8BpYs\",\"index.md\":\"IC6zmb8t\",\"reference_gnirehtet_api.md\":\"Hzpb-HKQ\",\"reference_gnirehtet_index.md\":\"BLn5S9JV\",\"reference_index.md\":\"CzD5Vjh-\",\"reference_scrcpy_audio.md\":\"BaotpOCN\",\"reference_scrcpy_build.md\":\"DOY7erMA\",\"reference_scrcpy_camera.md\":\"C5XkPo1F\",\"reference_scrcpy_connection.md\":\"DHoRnTWT\",\"reference_scrcpy_control.md\":\"BKw8xi_Q\",\"reference_scrcpy_develop.md\":\"D0BjYAa1\",\"reference_scrcpy_device.md\":\"Cj3aFuiC\",\"reference_scrcpy_gamepad.md\":\"iS9k-UnC\",\"reference_scrcpy_index.md\":\"yt3yIHv_\",\"reference_scrcpy_keyboard.md\":\"BBaD6ZXx\",\"reference_scrcpy_linux.md\":\"Bfj3xL_X\",\"reference_scrcpy_macos.md\":\"BDJcipAf\",\"reference_scrcpy_mouse.md\":\"DdpsvLe2\",\"reference_scrcpy_otg.md\":\"DSLDrByS\",\"reference_scrcpy_recording.md\":\"oKjk6mFG\",\"reference_scrcpy_shortcuts.md\":\"CCA1_3Un\",\"reference_scrcpy_tunnels.md\":\"BeTltxCa\",\"reference_scrcpy_v4l2.md\":\"cchNr5b-\",\"reference_scrcpy_video.md\":\"yMcy3wCZ\",\"reference_scrcpy_virtual_display.md\":\"DQgO2N2x\",\"reference_scrcpy_window.md\":\"D61X2y64\",\"reference_scrcpy_windows.md\":\"lVtnA6Yw\",\"zhhans_changelog.md\":\"2UW2E_TH\",\"zhhans_contact.md\":\"CCg_jFk1\",\"zhhans_donate.md\":\"3YTsyMh5\",\"zhhans_guide_index.md\":\"DWr8THre\",\"zhhans_guide_milestones.md\":\"CvKOnQB_\",\"zhhans_guide_operation.md\":\"CdDgxjKU\",\"zhhans_guide_preferences.md\":\"DXoyDpdK\",\"zhhans_guide_started.md\":\"BXNGuqTY\",\"zhhans_guide_window-arrangement.md\":\"BgdSckbs\",\"zhhans_help_escrcpy.md\":\"BYNNY1vZ\",\"zhhans_help_index.md\":\"1GFSvM9R\",\"zhhans_help_scrcpy.md\":\"jD_BqM2f\",\"zhhans_index.md\":\"C5iYqc8t\",\"zhhans_reference_gnirehtet_api.md\":\"CtUVwR1f\",\"zhhans_reference_gnirehtet_index.md\":\"DkS_2H8-\",\"zhhans_reference_index.md\":\"kh4bHD-L\",\"zhhans_reference_scrcpy_audio.md\":\"DEjGuAFf\",\"zhhans_reference_scrcpy_build.md\":\"DDj2ebgV\",\"zhhans_reference_scrcpy_camera.md\":\"Bfg00I6t\",\"zhhans_reference_scrcpy_connection.md\":\"C2vGXY3V\",\"zhhans_reference_scrcpy_control.md\":\"D4_gF6Gn\",\"zhhans_reference_scrcpy_develop.md\":\"BdZ53gsD\",\"zhhans_reference_scrcpy_device.md\":\"CFrt6NbV\",\"zhhans_reference_scrcpy_gamepad.md\":\"NQu5I2hh\",\"zhhans_reference_scrcpy_index.md\":\"BI18DFaK\",\"zhhans_reference_scrcpy_keyboard.md\":\"DOeBO5tZ\",\"zhhans_reference_scrcpy_linux.md\":\"BtUmgySu\",\"zhhans_reference_scrcpy_macos.md\":\"DF5gjsKx\",\"zhhans_reference_scrcpy_mouse.md\":\"C2F6-tKj\",\"zhhans_reference_scrcpy_otg.md\":\"ja6XiM_Z\",\"zhhans_reference_scrcpy_recording.md\":\"BAGcZuho\",\"zhhans_reference_scrcpy_shortcuts.md\":\"C1_uEjQW\",\"zhhans_reference_scrcpy_tunnels.md\":\"B4ANpapT\",\"zhhans_reference_scrcpy_v4l2.md\":\"CcxfP7JY\",\"zhhans_reference_scrcpy_video.md\":\"5rEcp_hj\",\"zhhans_reference_scrcpy_virtual_display.md\":\"BeOBejN2\",\"zhhans_reference_scrcpy_window.md\":\"C7wOBIau\",\"zhhans_reference_scrcpy_windows.md\":\"dzu0gvhb\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Escrcpy\",\"description\":\"Control your Android device with graphical scrcpy.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":{\"src\":\"/images/logo.ico\",\"alt\":\"Escrcpy\"},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/viarotel/viarotel.github.io\"},{\"icon\":{\"svg\":\"<img src=\\\"https://gitee.com/favicon.ico\\\" style=\\\"width: 20px; height: 20px;\\\" class=\\\"hover:opacity-100 opacity-70 duration-500\\\" />\"},\"link\":\"https://gitee.com/viarotel\"},{\"icon\":{\"svg\":\"<img src=\\\"/images/logo-gitcode.png\\\" style=\\\"width: 20px; height: 20px;\\\" class=\\\"hover:opacity-100 opacity-70 duration-500\\\" />\"},\"link\":\"https://gitcode.com/viarotel-org\"},{\"icon\":{\"svg\":\"<img src=\\\"https://static.hdslb.com/images/favicon.ico\\\" style=\\\"width: 20px; height: 20px;\\\" class=\\\"hover:opacity-100 opacity-70 duration-500\\\" />\"},\"link\":\"https://space.bilibili.com/274990176\"},{\"icon\":{\"svg\":\"<img src=\\\"https://lf3-cdn-tos.bytescm.com/obj/static/xitu_juejin_web//static/favicons/favicon-32x32.png\\\" style=\\\"width: 20px; height: 20px;\\\" class=\\\"hover:opacity-100 opacity-70 duration-500\\\" />\"},\"link\":\"https://juejin.cn/user/1275089219751944\"}],\"footer\":{\"message\":\"\\n Released under the MIT License. \\n \",\"copyright\":\"Copyright © 2025-2026 viarotel\"},\"search\":{\"provider\":\"local\",\"options\":{\"locales\":{\"root\":{\"translations\":{\"button\":{\"buttonText\":\"Search\",\"buttonAriaLabel\":\"Search\"},\"modal\":{\"displayDetails\":\"Display detailed list\",\"resetButtonTitle\":\"Reset search\",\"backButtonTitle\":\"Close search\",\"noResultsText\":\"No results for\",\"footer\":{\"selectText\":\"to select\",\"selectKeyAriaLabel\":\"enter\",\"navigateText\":\"to navigate\",\"navigateUpKeyAriaLabel\":\"up arrow\",\"navigateDownKeyAriaLabel\":\"down arrow\",\"closeText\":\"to close\",\"closeKeyAriaLabel\":\"escape\"}}}},\"zhHans\":{\"translations\":{\"button\":{\"buttonText\":\"搜索文档\",\"buttonAriaLabel\":\"搜索文档\"},\"modal\":{\"displayDetails\":\"显示详细列表\",\"resetButtonTitle\":\"清除查询条件\",\"backButtonTitle\":\"关闭搜索\",\"noResultsText\":\"无法找到相关结果\",\"footer\":{\"selectText\":\"选择\",\"selectKeyAriaLabel\":\"进行选择\",\"navigateText\":\"切换\",\"navigateUpKeyAriaLabel\":\"向上\",\"navigateDownKeyAriaLabel\":\"下降\",\"closeText\":\"关闭\",\"closeKeyAriaLabel\":\"esc\"}}}}}}},\"sidebar\":{\"/\":{\"base\":\"/\",\"items\":[{\"text\":\"Guide\",\"link\":\"guide/index.md\",\"items\":[{\"text\":\"Quick Start\",\"link\":\"guide/started\"},{\"text\":\"Milestones\",\"link\":\"guide/milestones\"},{\"text\":\"Operation\",\"link\":\"guide/operation\"},{\"text\":\"Preferences\",\"link\":\"guide/preferences\"},{\"text\":\"Window Arrangement\",\"link\":\"guide/window-arrangement\"}],\"collapsed\":false},{\"text\":\"Reference\",\"link\":\"reference/index.md\",\"items\":[{\"text\":\"Gnirehtet\",\"link\":\"reference/gnirehtet/index.md\",\"items\":[{\"text\":\"API\",\"link\":\"reference/gnirehtet/api\"}],\"collapsed\":false},{\"text\":\"Scrcpy\",\"link\":\"reference/scrcpy/index.md\",\"items\":[{\"text\":\"Audio\",\"link\":\"reference/scrcpy/audio\"},{\"text\":\"Build\",\"link\":\"reference/scrcpy/build\"},{\"text\":\"Camera\",\"link\":\"reference/scrcpy/camera\"},{\"text\":\"Connection\",\"link\":\"reference/scrcpy/connection\"},{\"text\":\"Control\",\"link\":\"reference/scrcpy/control\"},{\"text\":\"Develop\",\"link\":\"reference/scrcpy/develop\"},{\"text\":\"Device\",\"link\":\"reference/scrcpy/device\"},{\"text\":\"Gamepad\",\"link\":\"reference/scrcpy/gamepad\"},{\"text\":\"Keyboard\",\"link\":\"reference/scrcpy/keyboard\"},{\"text\":\"Linux\",\"link\":\"reference/scrcpy/linux\"},{\"text\":\"Macos\",\"link\":\"reference/scrcpy/macos\"},{\"text\":\"Mouse\",\"link\":\"reference/scrcpy/mouse\"},{\"text\":\"Otg\",\"link\":\"reference/scrcpy/otg\"},{\"text\":\"Recording\",\"link\":\"reference/scrcpy/recording\"},{\"text\":\"Shortcuts\",\"link\":\"reference/scrcpy/shortcuts\"},{\"text\":\"Tunnels\",\"link\":\"reference/scrcpy/tunnels\"},{\"text\":\"Video4Linux\",\"link\":\"reference/scrcpy/v4l2\"},{\"text\":\"Video\",\"link\":\"reference/scrcpy/video\"},{\"text\":\"Virtual_display\",\"link\":\"reference/scrcpy/virtual_display\"},{\"text\":\"Window\",\"link\":\"reference/scrcpy/window\"},{\"text\":\"Windows\",\"link\":\"reference/scrcpy/windows\"}],\"collapsed\":false}],\"collapsed\":false},{\"text\":\"Help\",\"link\":\"help/index.md\",\"items\":[{\"text\":\"Escrcpy\",\"link\":\"help/escrcpy\"},{\"text\":\"Scrcpy\",\"link\":\"help/scrcpy\"}],\"collapsed\":false},{\"text\":\"Changelog\",\"link\":\"changelog\"},{\"text\":\"Donate\",\"link\":\"donate\"},{\"text\":\"Contact\",\"link\":\"contact\"}]},\"/zhHans/\":{\"base\":\"/zhHans/\",\"items\":[{\"text\":\"指引\",\"link\":\"guide/index.md\",\"items\":[{\"text\":\"快速上手\",\"link\":\"guide/started\"},{\"text\":\"里程碑\",\"link\":\"guide/milestones\"},{\"text\":\"操作指南\",\"link\":\"guide/operation\"},{\"text\":\"偏好设置\",\"link\":\"guide/preferences\"},{\"text\":\"窗口编排\",\"link\":\"guide/window-arrangement\"}],\"collapsed\":false},{\"text\":\"参考手册\",\"link\":\"reference/index.md\",\"items\":[{\"text\":\"Gnirehtet\",\"link\":\"reference/gnirehtet/index.md\",\"items\":[{\"text\":\"API接口文档\",\"link\":\"reference/gnirehtet/api\"}],\"collapsed\":false},{\"text\":\"Scrcpy\",\"link\":\"reference/scrcpy/index.md\",\"items\":[{\"text\":\"Audio音频\",\"link\":\"reference/scrcpy/audio\"},{\"text\":\"Build编译\",\"link\":\"reference/scrcpy/build\"},{\"text\":\"Camera相机\",\"link\":\"reference/scrcpy/camera\"},{\"text\":\"Connection连接\",\"link\":\"reference/scrcpy/connection\"},{\"text\":\"Control控制\",\"link\":\"reference/scrcpy/control\"},{\"text\":\"Develop开发者指南\",\"link\":\"reference/scrcpy/develop\"},{\"text\":\"Device设备控制\",\"link\":\"reference/scrcpy/device\"},{\"text\":\"Gamepad游戏手柄\",\"link\":\"reference/scrcpy/gamepad\"},{\"text\":\"Keyboard键盘\",\"link\":\"reference/scrcpy/keyboard\"},{\"text\":\"Linux平台指南\",\"link\":\"reference/scrcpy/linux\"},{\"text\":\"MacOS平台指南\",\"link\":\"reference/scrcpy/macos\"},{\"text\":\"Mouse鼠标\",\"link\":\"reference/scrcpy/mouse\"},{\"text\":\"OTG\",\"link\":\"reference/scrcpy/otg\"},{\"text\":\"Recording录制\",\"link\":\"reference/scrcpy/recording\"},{\"text\":\"Shortcuts快捷键\",\"link\":\"reference/scrcpy/shortcuts\"},{\"text\":\"Tunnels隧道连接\",\"link\":\"reference/scrcpy/tunnels\"},{\"text\":\"Video4Linux视频流监控\",\"link\":\"reference/scrcpy/v4l2\"},{\"text\":\"Video视频\",\"link\":\"reference/scrcpy/video\"},{\"text\":\"VirtualDisplay虚拟显示\",\"link\":\"reference/scrcpy/virtual_display\"},{\"text\":\"Window窗口控制\",\"link\":\"reference/scrcpy/window\"},{\"text\":\"Windows平台指南\",\"link\":\"reference/scrcpy/windows\"}],\"collapsed\":false}],\"collapsed\":false},{\"text\":\"帮助\",\"link\":\"help/index.md\",\"items\":[{\"text\":\"Escrcpy\",\"link\":\"help/escrcpy\"},{\"text\":\"Scrcpy\",\"link\":\"help/scrcpy\"}],\"collapsed\":false},{\"text\":\"更新日志\",\"link\":\"changelog\"},{\"text\":\"捐赠项目\",\"link\":\"donate\"},{\"text\":\"联系我们\",\"link\":\"contact\"}]}}},\"locales\":{\"root\":{\"lang\":\"en-US\",\"label\":\"English\",\"description\":\"Control your Android device with graphical scrcpy.\",\"themeConfig\":{\"docFooter\":{\"prev\":\"Previous page\",\"next\":\"Next page\"},\"outline\":{\"label\":\"On this page\"},\"lastUpdated\":{\"text\":\"Last updated\"},\"langMenuLabel\":\"Change language\",\"returnToTopLabel\":\"Return to top\",\"sidebarMenuLabel\":\"Menu\",\"darkModeSwitchLabel\":\"Appearance\",\"lightModeSwitchTitle\":\"Switch to light theme\",\"darkModeSwitchTitle\":\"Switch to dark theme\",\"nav\":[{\"text\":\"Guide\",\"link\":\"/guide\"},{\"text\":\"Reference\",\"link\":\"/reference\"},{\"text\":\"Help\",\"link\":\"/help\"},{\"text\":\"Changelog\",\"link\":\"/changelog\"},{\"text\":\"Donate\",\"link\":\"/donate\"},{\"text\":\"Contact\",\"link\":\"/contact\"},{\"text\":\"Blog\",\"link\":\"https://blog.viarotel.eu.org/en\"}]}},\"zhHans\":{\"lang\":\"zh-CN\",\"label\":\"简体中文\",\"description\":\"Graphical frontend for scrcpy to control your Android devices.\",\"themeConfig\":{\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"},\"outline\":{\"label\":\"页面导航\"},\"lastUpdated\":{\"text\":\"最后更新于\"},\"langMenuLabel\":\"多语言\",\"returnToTopLabel\":\"回到顶部\",\"sidebarMenuLabel\":\"菜单\",\"darkModeSwitchLabel\":\"主题\",\"lightModeSwitchTitle\":\"切换到浅色模式\",\"darkModeSwitchTitle\":\"切换到深色模式\",\"nav\":[{\"text\":\"Guide\",\"link\":\"/zhHans/guide\"},{\"text\":\"Reference\",\"link\":\"/zhHans/reference\"},{\"text\":\"Help\",\"link\":\"/zhHans/help\"},{\"text\":\"Changelog\",\"link\":\"/zhHans/changelog\"},{\"text\":\"Donate\",\"link\":\"/zhHans/donate\"},{\"text\":\"Contact\",\"link\":\"/zhHans/contact\"},{\"text\":\"Blog\",\"link\":\"https://blog.viarotel.eu.org/\"}]}}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
</body>
</html>