scrcpy screen capture


On Linux
adb tcpip 5555
Allow on phone

On Linux
adb connect 192.168.xx.xx:5555
Allow on phone

Disonnect usb cable

On Linux
scrcpy

===================
adb kill-server
adb devices
adb usb
=
================
adb connect usb
=
==================
https://github.com/Genymobile/scrcpy#wireless
Connection
Wireless

Scrcpy uses adb to communicate with the device,
and adb can connect to a device over TCP/IP:

Connect the device to the same Wi-Fi as your computer.
Get your device IP address (in Settings → About phone → Status).
Enable adb over TCP/IP on your device: adb tcpip 5555.
Unplug your device.
Connect to your device: adb connect DEVICE_IP:5555 (replace DEVICE_IP).
Run scrcpy as usual.
It may be useful to decrease the bit-rate and the definition:

scrcpy --bit-rate 2M --max-size 800
scrcpy -b2M -m800 # short version
=====================
Rotation
The window may be rotated:

scrcpy --rotation 1
Possibles values are:

0: no rotation
1: 90 degrees counterclockwise
2: 180 degrees
3: 90 degrees clockwise
The rotation can also be changed dynamically with
MOD+← (left) and MOD+→ (right).

Note that scrcpy manages 3 different rotations:

MOD+r requests the device to switch between portrait
and landscape (the current running app may refuse,
if it does support the requested orientation).
--lock-video-orientation changes the mirroring
orientation (the orientation of the video sent from
the device to the computer). This affects the recording.
--rotation (or MOD+←/MOD+→) rotates only the window content.
This affects only the display, not the recording.
=====================
Audio forwarding
Audio is not forwarded by scrcpy. Use sndcpy.

Also see issue #14.

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:

  1. use RCtrl for shortcuts
    scrcpy --shortcut-mod=rctrl

  2. 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-click¹
Click on HOME MOD+h | Middle-click
Click on BACK MOD+b | Right-click²
Click on APP_SWITCH MOD+s
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
Collapse notification panel 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
¹Double-click on black borders to remove them.
²Right-click turns the screen on if it was off, presses BACK otherwise.
³Only on Android >= 7.

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