Skip to content

A Linux GUI application to display and control your Android devices on PC.

License

Notifications You must be signed in to change notification settings

neilchennc/ScrSndCpy-Linux

Repository files navigation

ScrSndCpy (Linux)

ScrSndCpy = Screen Sound Copy

A Linux (Ubuntu/Debian) GUI application to display screen, audio and control your Android devices on PC by executing scrcpy (passing commands and parameters to scrcpy).

Screenshot

Looking for Windows version? Click here

About scrcpy

scrcpy (Screen Copy) is an application provides display and control of Android devices connected via USB or over TCP/IP (requires at least Android 5.0) which developed by Genymobile.

It does NOT require any root access.

Requirements

  • Linux (Ubuntu/Debian)

  • Android 5.0+ (Audio forwarding must Android 11+)

Download

  • ScrSndCpy-v1.3.tar.xz (Built on Ubuntu 20.04.6)

    SHA-256: fe236d311f2b997d7149aef9ed1a5d959da2a3849958483cda671465221782b7

How to use

Preparation

Method 1: Connect via USB

  • Plug the device into a USB port on your computer

  • Your device will popup a USB debugging confirmation dialog, click "Allow" button

  • In ScrSndCpy, select a device from the list

  • Click Play button

Method 2: Connect via Wi-Fi (TCP/IP)

Setup (only for the first time)

You have to enable tcp port on your device with following steps

  • Plug the device into a USB port on your computer

  • Enable adb over TCP/IP on your device with command:

    adb tcpip 5555
  • Unplug your device

Connect

  • Connect to Wi-Fi access point, note that your PC must connect to the same access point (network segment)

  • In the ScrSndCpy, enter Android device's IP address

  • Click Play button

  • Your device will popup a USB debugging confirmation dialog, click "Allow" button

  • Click Play button again

Shortcuts (references from scrcpy 2.2)

Actions can be performed on the scrcpy window using keyboard and mouse shortcuts.

In the following list, MOD is the shortcut modifier. By default, it's (left) Alt or (left) Super.

It can be changed using --shortcut-mod. Possible keys are lctrl, rctrl, lalt, ralt, lsuper and rsuper. For example:

# use RCtrl for shortcuts
scrcpy --shortcut-mod=rctrl

# use either LCtrl+LAlt or LSuper for shortcuts
scrcpy --shortcut-mod=lctrl+lalt,lsuper

Super is typically the Windows or Cmd key.

Action Shortcut
Switch fullscreen mode MOD+f
Rotate display left MOD+ (left)
Rotate display right MOD+ (right)
Resize window to 1:1 (pixel-perfect) MOD+g
Resize window to remove black borders MOD+w | Double-left-click¹
Click on HOME MOD+h | Middle-click
Click on BACK MOD+b | MOD+Backspace | Right-click²
Click on APP_SWITCH MOD+s | 4th-click³
Click on MENU (unlock screen)⁴ MOD+m
Click on VOLUME_UP MOD+ (up)
Click on VOLUME_DOWN MOD+ (down)
Click on POWER MOD+p
Power on Right-click²
Turn device screen off (keep mirroring) MOD+o
Turn device screen on MOD+Shift+o
Rotate device screen MOD+r
Expand notification panel MOD+n | 5th-click³
Expand settings panel MOD+n+n | Double-5th-click³
Collapse panels MOD+Shift+n
Copy to clipboard⁵ MOD+c
Cut to clipboard⁵ MOD+x
Synchronize clipboards and paste⁵ MOD+v
Inject computer clipboard text MOD+Shift+v
Enable/disable FPS counter (on stdout) MOD+i
Pinch-to-zoom Ctrl+click-and-move
Drag & drop APK file Install APK from computer
Drag & drop non-APK file Push file to device

¹Double-click on black borders to remove them.
²Right-click turns the screen on if it was off, presses BACK otherwise.
³4th and 5th mouse buttons, if your mouse has them.
⁴For react-native apps in development, MENU triggers development menu.
⁵Only on Android >= 7.

Shortcuts with repeated keys are executed by releasing and pressing the key a second time. For example, to execute "Expand settings panel":

  1. Press and keep pressing MOD.
  2. Then double-press n.
  3. Finally, release MOD.

All Ctrl+key shortcuts are forwarded to the device, so they are handled by the active application.

You can check out scrcpy for more introductions, functions and controls.

Development environment

  • OS: Ubuntu 20.04

  • Graphic lib: GTK3

  • UI design: Glade

  • Language: C

  • IDE: Visual Studio Code

Build

Install build tools and GTK3

sudo apt update

# build-essential
sudo apt install build-essential

# GTK3
sudo apt install libgtk-3-dev

Clone the project

git clone https://github.com/neilchennc/ScrSndCpy-Linux.git
cd ScrSndCpy-Linux

Build

make

Run

./ScrSndCpy

About

A Linux GUI application to display and control your Android devices on PC.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published