How to Mirror Android Screen to Ubuntu(GNU/Linux) Desktop With Scrcpy

 About Scrcpy

scrcpy is an application for displaying and controlling your Android device through USB connection (or over TCP/IP). It is cross-platform (GNU/Linux, macOS and Windows) and does not require any root access.

scrcpy displays only the device screen but offers great performance (30~60fps) and quality (1920×1080 or above). It’s got low latency (35~70ms) and a very low startup time (less than a second). It offers plenty of great features and is non-intrusive, with nothing left installed inside the device.

scrcpy works with Android devices with at least API 21 (Android 5.0) and adb debugging must be enabled on the device.

Scrcpy Features

  • Capture configuration - mirror Android device with reduced size, bit-rate, frame rate and cropped screen

  • Connection - wireless, multi-device or through SSH tunnel

  • Other mirroring options - read-only, turn screen off, show touches, etc.

  • Screen recording

  • Window configuration - change window title, position and size, border, etc.

  • Input control options

  • File drop

 

SetUp - Scrcpy

  1. Enble Universal Repository in your linux
    1. run terminal --> sudo add-apt-repository universe
    2. or  goto software manager and enable above selections and refresh software cache
      1. community maintained free and open-source software(universe)
      2. software restricted by copyright or legal issues(multiverse)
  2. Install the scrcpy package
    1. run terminal --> sudo add install scrcpy
  3. Create scrcpy desktop shortcut
    1. create scrcpy desktop shortcut
      1. Scrcpy doesn't provide a desktop shortcut by the default, but it doesn't mean we can't create it. Copy and paste this format to text editor 

        [Desktop Entry] Name=Scrcpy Comment=Mirror Android Screen on Linux Exec=scrcpy Type=Application Icon=/path/to/your/custom/icon Categories=AudioVideo;Audio;Development;
         


      2.  Save as something.desktop on ~/.local/share/applications.
      3. For icon section, it's better to copy it into ~/.local/share/icons (just create it if the folder doesn't exist), so you don't have to write the full path  

 

SetUp - USB

  1. Enable debugging developer options
    1. Settings > System > Developer Options > USB debugging
  2. Connect your phone to your computer via USB cable
  3. Open scrcpy and Allow USB debugging in your phone


    1. run terminal --> scrcpy

    2. or tap scrcpy icon

 

SetUp - Wireless

  1. Enable debugging developer options
    1. Settings > System > Developer Options > USB debugging 
  2. Enable Phone Visibility

    1.  
  3. For First time Connect your phone to your computer via USB cable
  4. Connect the device to the same Wi-Fi as your computer.
  5. Get your device IP address, in Settings → About phone → Status, or by executing this command:
    1.  adb shell ip route | awk '{print $9}'
  6. Enable adb over TCP/IP on your device
    1. adb tcpip 5555
  7. Unplug your device.
  8. Connect to your device
    1. adb connect DEVICE_IP:5555 (replace DEVICE_IP)
  9. Open scrcpy and Allow USB debugging in your phone
    1. run terminal --> scrcpy

Errors

  1. Not Enable debugging developer options or not Allow USB Access
    1.  

  2. Connected multiple devices
  3. Not Connect the device to the same Wi-Fi as your computer or IP address are wrong



 

Scrcpy Shortcut Keys




(or you can download & install assistive touch into your phone) 

 

 

 

For more :- 

 

 

 

 

 

 

 

 

 

Comments

Popular posts from this blog

Install Ubuntu (20.04.1 LTS) with Windows (Dual boot mode)

Connect GitHub to your machine using SSH