From 4696878a979bcf49bd5ecd8dc38765a61e85bada Mon Sep 17 00:00:00 2001 From: yangfl Date: Wed, 30 Oct 2019 22:14:30 +0800 Subject: [PATCH 1/2] Add manpage for scrcpy --- app/meson.build | 2 + app/scrcpy.1 | 231 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+) create mode 100644 app/scrcpy.1 diff --git a/app/meson.build b/app/meson.build index ccd05fee..34f642d4 100644 --- a/app/meson.build +++ b/app/meson.build @@ -134,6 +134,8 @@ executable('scrcpy', src, c_args: c_args, link_args: link_args) +install_man('scrcpy.1') + ### TESTS diff --git a/app/scrcpy.1 b/app/scrcpy.1 new file mode 100644 index 00000000..67db3569 --- /dev/null +++ b/app/scrcpy.1 @@ -0,0 +1,231 @@ +.TH "scrcpy" "1" +.SH NAME +scrcpy \- Display and control your Android device + + +.SH SYNOPSIS +.B scrcpy +.RI [ options ] + + +.SH DESCRIPTION +.B scrcpy +provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access. + + +.SH OPTIONS + +.TP +.BI "\-b, \-\-bit\-rate " value +Encode the video at the given bit\-rate, expressed in bits/s. Unit suffixes are supported: '\fBK\fR' (x1000) and '\fBM\fR' (x1000000). + +Default is 8000000. + +.TP +.BI "\-c, \-\-crop " width\fR:\fIheight\fR:\fIx\fR:\fIy +Crop the device screen on the server. + +The values are expressed in the device natural orientation (typically, portrait for a phone, landscape for a tablet). Any +.B \-\-max\-size +value is computed on the cropped size. + +.TP +.B \-f, \-\-fullscreen +Start in fullscreen. + +.TP +.BI "\-F, \-\-record\-format " format +Force recording format (either mp4 or mkv). + +.TP +.B \-h, \-\-help +Print this help. + +.TP +.BI "\-m, \-\-max\-size " value +Limit both the width and height of the video to \fIvalue\fR. The other dimension is computed so that the device aspect\-ratio is preserved. + +Default is 0 (unlimited). + +.TP +.B \-n, \-\-no\-control +Disable device control (mirror the device in read\-only). + +.TP +.B \-N, \-\-no\-display +Do not display device (only when screen recording is enabled). + +.TP +.BI "\-p, \-\-port " port +Set the TCP port the client listens on. + +Default is 27183. + +.TP +.BI "\-\-push\-target " path +Set the target directory for pushing files to the device by drag & drop. It is passed as\-is to "adb push". + +Default is "/sdcard/". + +.TP +.BI "\-r, \-\-record " file +Record screen to +.IR file . + +The format is determined by the +.B \-F/\-\-record\-format +option if set, or by the file extension (.mp4 or .mkv). + +.TP +.B \-\-render\-expired\-frames +By default, to minimize latency, scrcpy always renders the last available decoded frame, and drops any previous ones. This flag forces to render all frames, at a cost of a possible increased latency. + +.TP +.BI "\-s, \-\-serial " number +The device serial number. Mandatory only if several devices are connected to adb. + +.TP +.B \-S, \-\-turn\-screen\-off +Turn the device screen off immediately. + +.TP +.B \-t, \-\-show\-touches +Enable "show touches" on start, disable on quit. + +It only shows physical touches (not clicks from scrcpy). + +.TP +.B \-T, \-\-always\-on\-top +Make scrcpy window always on top (above other windows). + +.TP +.B \-v, \-\-version +Print the version of scrcpy. + +.TP +.B \-\-window\-title text +Set a custom window title. + + +.SH SHORTCUTS + +.TP +.B Ctrl+f +switch fullscreen mode + +.TP +.B Ctrl+g +resize window to 1:1 (pixel\-perfect) + +.TP +.B Ctrl+x, Double\-click on black borders +resize window to remove black borders + +.TP +.B Ctrl+h, Home, Middle\-click +Click on HOME + +.TP +.B Ctrl+b, Ctrl+Backspace, Right\-click (when screen is on) +Click on BACK + +.TP +.B Ctrl+s +Click on APP_SWITCH + +.TP +.B Ctrl+m +Click on MENU + +.TP +.B Ctrl+Up +Click on VOLUME_UP + +.TP +.B Ctrl+Down +Click on VOLUME_DOWN + +.TP +.B Ctrl+p +Click on POWER (turn screen on/off) + +.TP +.B Right\-click (when screen is off) +turn screen on + +.TP +.B Ctrl+o +turn device screen off (keep mirroring) + +.TP +.B Ctrl+n +expand notification panel + +.TP +.B Ctrl+Shift+n +collapse notification panel + +.TP +.B Ctrl+c +copy device clipboard to computer + +.TP +.B Ctrl+v +paste computer clipboard to device + +.TP +.B Ctrl+Shift+v +copy computer clipboard to device + +.TP +.B Ctrl+i +enable/disable FPS counter (print frames/second in logs) + +.TP +.B Drag & drop APK file +install APK from computer + + +.SH Environment variables + +.TP +.B ADB +Specify the path to adb. + +.TP +.B SCRCPY_SERVER_PATH +Specify the path to server binary. + + +.SH AUTHORS +.B scrcpy +is written by Romain Vimont. + +This manual page was written by +.MT mmyangfl@gmail.com +Yangfl +.ME +for the Debian Project (and may be used by others). + + +.SH "REPORTING BUGS" +Report bugs to +.UR https://github.com/Genymobile/scrcpy/issues +.UE . + +.SH COPYRIGHT +Copyright \(co 2018 Genymobile +.UR https://www.genymobile.com +Genymobile +.UE + +Copyright \(co 2018\-2019 +.MT rom@rom1v.com +Romain Vimont +.ME + +Licensed under the Apache License, Version 2.0. + +.SH WWW +.UR https://github.com/Genymobile/scrcpy +.UE From 3ea47423217775d2519fb5ac61edd55072639a64 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 31 Oct 2019 21:05:04 +0100 Subject: [PATCH 2/2] Call ninja without changing directory In build instructions, use: ninja -Cx ... instead of: cd x ninja ... --- BUILD.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/BUILD.md b/BUILD.md index 475580f8..3fef0f23 100644 --- a/BUILD.md +++ b/BUILD.md @@ -195,8 +195,7 @@ Then, build: ```bash meson x --buildtype release --strip -Db_lto=true -cd x -ninja +ninja -Cx ``` _Note: `ninja` [must][ninja-user] be run as a non-root user (only `ninja @@ -219,7 +218,7 @@ To run without installing: After a successful build, you can install _scrcpy_ on the system: ```bash -sudo ninja install # without sudo on Windows +sudo ninja -Cx install # without sudo on Windows ``` This installs two files: @@ -245,7 +244,6 @@ configuration: ```bash meson x --buildtype release --strip -Db_lto=true \ -Dprebuilt_server=/path/to/scrcpy-server.jar -cd x -ninja -sudo ninja install +ninja -Cx +sudo ninja -Cx install ```