# Remote screen

https://github.com/Genymobile/scrcpy


```bash
# Drag and drop files in the scrcpy window (default is /sdcard/Download)
scrcpy --tcpip=192.168.66.178 --push-target=/sdcard/Documents/

# Window scaled to local optimized (no audio, etc)
scrcpy --tcpip=192.168.66.178 --no-audio

# Full optimized cmdline
scrcpy --tcpip=androidtv-01 --no-audio --max-size=1024 --push-target=/sdcard/Documents/

```

### Avoid the nagging USB authorization screen

```shell
# requires root
- Go to C:\Users<profile_name>.android\adbkey.pub
- Copy the file to any location in your phone using USB cable.
- Using Root Explorer, move the adbkey.pub onto this location: /data/misc/adb/
- rename it from adbkey.pub to adb_keys and allow read and write permissions
- Reboot the device.
```

### Keyboard
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 | 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  


### Copy-paste

Any time the Android clipboard changes, it is automatically synchronized to the computer clipboard.

Any Ctrl shortcut is forwarded to the device. In particular:

    Ctrl+c typically copies
    Ctrl+x typically cuts
    Ctrl+v typically pastes (after computer-to-device clipboard synchronization)

This typically works as you expect.

The actual behavior depends on the active application though. For example, Termux sends SIGINT on Ctrl+c instead, and K-9 Mail composes a new message.

To copy, cut and paste in such cases (but only supported on Android >= 7):

    MOD+c injects COPY
    MOD+x injects CUT
    MOD+v injects PASTE (after computer-to-device clipboard synchronization)

In addition, MOD+Shift+v injects the computer clipboard text as a sequence of key events. This is useful when the component does not accept text pasting (for example in Termux), but it can break non-ASCII content.

WARNING: Pasting the computer clipboard to the device (either via Ctrl+v or MOD+v) copies the content into the Android clipboard. As a consequence, any Android application could read its content. You should avoid pasting sensitive content (like passwords) that way.

Some Android devices do not behave as expected when setting the device clipboard programmatically. An option --legacy-paste is provided to change the behavior of Ctrl+v and MOD+v so that they also inject the computer clipboard text as a sequence of key events (the same way as MOD+Shift+v).

To disable automatic clipboard synchronization, use --no-clipboard-autosync