{"id":47246,"date":"2024-09-17T15:14:02","date_gmt":"2024-09-17T15:14:02","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=47246"},"modified":"2024-09-17T15:14:02","modified_gmt":"2024-09-17T15:14:02","slug":"scrcpy-2-7-gamepad-support","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2024\/09\/scrcpy-2-7-gamepad-support\/","title":{"rendered":"Scrcpy 2.7 Adds Gamepad Support for Gaming on Android"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-43768\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>Scrcpy, Android screen mirroring and controlling app, released version 2.7 few days ago.<\/p>\n<p>Scrcpy is a popular free and open-source application for Windows, Linux, and macOS. It can mirror the Android screen on PC, and allows to control the device with keyboard and mouse.<\/p>\n<p>With the new 2.7 release, user can now <b>use game controllers (e.g., PS4\/PS5, or XBox gamepad), which are connected into the computer, to play Android games.<\/b><\/p>\n<div id=\"attachment_43769\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy20.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-43769\" class=\"size-large wp-image-43769\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy20-600x341.webp\" alt=\"\" width=\"600\" height=\"341\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy20-600x341.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy20-300x171.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy20-768x437.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/scrcpy20.webp 1202w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-43769\" class=\"wp-caption-text\">Scrcpy on Ubuntu<\/p><\/div>\n<p><!--more--><\/p>\n<p>The gamepad support is disabled by default, because the default UHID mode is not supported on all devices, especially with old Android versions.<\/p>\n<p><b>To enable this feature<\/b>, user can start scrcpy with either <code>-G<\/code> or <code>--gamepad=uhid<\/code> flag:<\/p>\n<pre>scrcpy --gamepad=uhid<\/pre>\n<p>This mode enables the feature via the <a href=\"https:\/\/kernel.org\/doc\/Documentation\/hid\/uhid.txt\" target=\"_blank\" rel=\"noopener\">UHID<\/a> kernel module. As mentioned, it may however not work on old Android versions.<\/p>\n<p>For choice, user can <b>enable gamepad support via AOAv2<\/b> protocol. It&#8217;s <b>A<\/b>ndroid <b>O<\/b>pen <b>A<\/b>ccessory protocol works at the USB level directly. Which, <b>however works only over USB<\/b>.<\/p>\n<pre>scrcpy --gamepad=aoa<\/pre>\n<p>This mode does not use the scrcpy server, does not require adb (USB debugging). It however has issues including does not detect multiple physical gamepads, only work in OTG mode for Windows.<\/p>\n<p>The gamepad support can work without mirroring Android screen and\/or audio to your computer. In the case, start scrcpy with command:<\/p>\n<pre>scrcpy --no-video --no-audio --gamepad=uhid<\/pre>\n<p>Or, user can start the feature in in OTG mode, so the game controller works as it was plugged directly to the Android device.<\/p>\n<pre>scrcpy --otg --gamepad=aoa<\/pre>\n<p>Scrcpy 2.7 now accepts floating point values for <code>--max-fps<\/code> option. Meaning it can now capture at a frame rate lower than 1 fps, which might be useful for creating a timelapse.<\/p>\n<p>Other changes include:<\/p>\n<ul>\n<li>Fix support for ONYX devices.<\/li>\n<li>Update SDL to 2.30.7 in Windows.<\/li>\n<li>And various other fixes.<\/li>\n<\/ul>\n<h3>How to Get Scrcpy 2.7<\/h3>\n<p>Scrcpy is available in Ubuntu repositories, but outdated. For the latest version, see the official guide via link below:<\/p>\n<div class=\"wp-block-buttons aligncenter\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-to-vivid-purple-gradient-background has-text-color has-background\" href=\"https:\/\/github.com\/Genymobile\/scrcpy\/blob\/master\/doc\/linux.md\" target=\"_blank\" rel=\"noreferrer noopener\">Install Scrcpy in Linux<\/a><\/div>\n<\/div>\n<p>If you&#8217;re new to this app, then here&#8217;s also a <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2023\/03\/scrcpy-2-0-install-android-remote-control\/\" rel=\"noopener\" target=\"_blank\">step by step guide<\/a> to set it up in Ubuntu.<\/p>","protected":false},"excerpt":{"rendered":"<p>Scrcpy, Android screen mirroring and controlling app, released version 2.7 few days ago. Scrcpy is a popular free and open-source application for Windows, Linux, and macOS. It can mirror the Android screen on PC, and allows to control the device with keyboard and mouse. With the new 2.7 release, user can now use game controllers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":43768,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[2051,2189],"class_list":["post-47246","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-android","tag-android-remote-control"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/47246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=47246"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/47246\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/43768"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=47246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=47246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=47246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}