From c396758b4ed29cb4d4ad51e8bcdd1deecf5761d2 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 3 Mar 2020 21:39:27 +0100 Subject: [PATCH 1/9] Remove link to Windows 32 bits release Binaries created with MinGW (even a simple Hello World) are detected as malware by some anti-virus. For some reason, only the 32 bits version of scrcpy is impacted. Since users should use the 64 bits version by default anyway, remove the link to the 32 bits version from the main page. The 32 bits release is still available in the "releases" tab. See --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7be5f5f2..161b42f1 100644 --- a/README.md +++ b/README.md @@ -66,15 +66,12 @@ hard). ### Windows -For Windows, for simplicity, prebuilt archives with all the dependencies -(including `adb`) are available: +For Windows, for simplicity, a prebuilt archive with all the dependencies +(including `adb`) is available: - - [`scrcpy-win32-v1.12.1.zip`][direct-win32] - _(SHA-256: 0f4b3b063536b50a2df05dc42c760f9cc0093a9a26dbdf02d8232c74dab43480)_ - [`scrcpy-win64-v1.12.1.zip`][direct-win64] _(SHA-256: 57d34b6d16cfd9fe169bc37c4df58ebd256d05c1ea3febc63d9cb0a027ab47c9)_ -[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v1.12.1/scrcpy-win32-v1.12.1.zip [direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v1.12.1/scrcpy-win64-v1.12.1.zip It is also available in [Chocolatey]: From 24ade6ad7740a5428a531c5b22a8b72ed0987bd5 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sat, 14 Mar 2020 17:07:20 +0100 Subject: [PATCH 2/9] Simplify Chocolatey documentation --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 161b42f1..c8257b49 100644 --- a/README.md +++ b/README.md @@ -80,12 +80,7 @@ It is also available in [Chocolatey]: ```bash choco install scrcpy -``` - -You need `adb`, accessible from your `PATH`. If you don't have it yet: - -```bash -choco install adb +choco install adb # if you don't have it yet ``` You can also [build the app manually][BUILD]. From bc7508427b3a6a19a5603caa63d05a860dbacd8a Mon Sep 17 00:00:00 2001 From: Yogev Boaron Ben-Har Date: Sun, 8 Mar 2020 10:31:29 +0200 Subject: [PATCH 3/9] Add scoop instructions for Windows PR #1202 Signed-off-by: Romain Vimont --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index c8257b49..593dd2a9 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,15 @@ choco install scrcpy choco install adb # if you don't have it yet ``` +And in [Scoop]: + +```bash +scoop install scrcpy +scoop install adb # if you don't have it yet +``` + +[Scoop]: https://scoop.sh + You can also [build the app manually][BUILD]. From 7bb91638ad80ba20700529cf336ea533d8f058e7 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 23 Feb 2020 18:51:36 +0100 Subject: [PATCH 4/9] Improve FAQ --- FAQ.md | 149 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 127 insertions(+), 22 deletions(-) diff --git a/FAQ.md b/FAQ.md index 49382471..5135cc47 100644 --- a/FAQ.md +++ b/FAQ.md @@ -3,19 +3,102 @@ Here are the common reported problems and their status. -### On Windows, my device is not detected +## `adb` issues -The most common is your device not being detected by `adb`, or is unauthorized. -Check everything is ok by calling: +`scrcpy` execute `adb` commands to initialize the connection with the device. If +`adb` fails, then scrcpy will not work. - adb devices +In that case, it will print this error: -Windows may need some [drivers] to detect your device. +> ERROR: "adb push" returned with value 1 + +This is typically not a bug in _scrcpy_, but a problem in your environment. + +To find out the cause, execute: + +```bash +adb devices +``` + +### `adb` not found + +You need `adb` accessible from your `PATH`. + +On Windows, the current directory is in your `PATH`, and `adb.exe` is included +in the release, so it should work out-of-the-box. + + +### Device unauthorized + +Check [stackoverflow][device-unauthorized]. + +[device-unauthorized]: https://stackoverflow.com/questions/23081263/adb-android-device-unauthorized + + +### Device not detected + +If your device is not detected, you may need some [drivers] (on Windows). [drivers]: https://developer.android.com/studio/run/oem-usb.html -### I can only mirror, I cannot interact with the device +### Several devices connected + +If several devices are connected, you will encounter this error: + +> adb: error: failed to get feature set: more than one device/emulator + +the identifier of the device you want to mirror must be provided: + +```bash +scrcpy -s 01234567890abcdef +``` + +Note that if your device is connected over TCP/IP, you'll get this message: + +> adb: error: more than one device/emulator +> ERROR: "adb reverse" returned with value 1 +> WARN: 'adb reverse' failed, fallback to 'adb forward' + +This is expected (due to a bug on old Android versions, see [#5]), but in that +case, scrcpy fallbacks to a different method, which should work. + +[#5]: https://github.com/Genymobile/scrcpy/issues/5 + + +### Conflicts between adb versions + +> adb server version (41) doesn't match this client (39); killing... + +This error occurs when you use several `adb` versions simultaneously. You must +find the program using a different `adb` version, and use the same `adb` version +everywhere. + +You could overwrite the `adb` binary in the other program, or ask _scrcpy_ to +use a specific `adb` binary, by setting the `ADB` environment variable: + +```bash +set ADB=/path/to/your/adb +scrcpy +``` + + +### Device disconnected + +If _scrcpy_ stops itself with the warning "Device disconnected", then the +`adb` connection has been closed. + +Try with another USB cable or plug it into another USB port. See [#281] and +[#283]. + +[#281]: https://github.com/Genymobile/scrcpy/issues/281 +[#283]: https://github.com/Genymobile/scrcpy/issues/283 + + + +## Control issues + +### Mouse and keyboard do not work On some devices, you may need to enable an option to allow [simulating input]. In developer options, enable: @@ -29,18 +112,25 @@ In developer options, enable: ### Mouse clicks at wrong location On MacOS, with HiDPI support and multiple screens, input location are wrongly -scaled. See [issue 15]. +scaled. See [#15]. -[issue 15]: https://github.com/Genymobile/scrcpy/issues/15 +[#15]: https://github.com/Genymobile/scrcpy/issues/15 -A workaround is to build with HiDPI support disabled: +Open _scrcpy_ directly on the monitor you use it. -```bash -meson x --buildtype release -Dhidpi_support=false -``` -However, the video will be displayed at lower resolution. +### Special characters do not work +Injecting text input is [limited to ASCII characters][text-input]. A trick +allows to also inject some [accented characters][accented-characters], but +that's all. See [#37]. + +[text-input]: https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3Aunicode +[accented-characters]: https://blog.rom1v.com/2018/03/introducing-scrcpy/#handle-accented-characters +[#37]: https://github.com/Genymobile/scrcpy/issues/37 + + +## Client issues ### The quality is low on HiDPI display @@ -51,6 +141,11 @@ On Windows, you may need to configure the [scaling behavior]. [scaling behavior]: https://github.com/Genymobile/scrcpy/issues/40#issuecomment-424466723 +If your computer definition is far smaller than your screen, then you'll get +poor quality. See [#40]. + +[#40]: https://github.com/Genymobile/scrcpy/issues/40 + ### KWin compositor crashes @@ -61,19 +156,29 @@ As a workaround, [disable "Block compositing"][kwin]. [kwin]: https://github.com/Genymobile/scrcpy/issues/114#issuecomment-378778613 -### I get an error "Could not open video stream" +## Crashes + +### Exception There may be many reasons. One common cause is that the hardware encoder of your device is not able to encode at the given definition: -``` -ERROR: Exception on thread Thread[main,5,main] -android.media.MediaCodec$CodecException: Error 0xfffffc0e -... -Exit due to uncaughtException in main thread: -ERROR: Could not open video stream -INFO: Initial texture: 1080x2336 -``` +> ``` +> ERROR: Exception on thread Thread[main,5,main] +> android.media.MediaCodec$CodecException: Error 0xfffffc0e +> ... +> Exit due to uncaughtException in main thread: +> ERROR: Could not open video stream +> INFO: Initial texture: 1080x2336 +> ``` + +or + +> ``` +> ERROR: Exception on thread Thread[main,5,main] +> java.lang.IllegalStateException +> at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) +> ``` Just try with a lower definition: From 2cf022491f39d5d1d8d09330e9c5a5fba73567f4 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 3 Apr 2020 18:42:50 +0200 Subject: [PATCH 5/9] Add issue templates Closes #1157 --- .github/ISSUE_TEMPLATE/bug_report.md | 23 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..a295f1b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,23 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + + - [ ] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md). + - [ ] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues). + +**Environment** + - OS: [e.g. Debian, Windows, macOS...] + - scrcpy version: [e.g. 1.12.1] + - installation method: [e.g. manual build, apt, snap, brew, Windows release...] + +**Describe the bug** +A clear and concise description of what the bug is. + +On errors, please provide the output of the console (and `adb logcat` if relevant). +Format them between code blocks (delimited by ```). +Please do not post screenshots of your terminal, just post the content as text instead. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..524c370f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,22 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + + - [ ] I have checked that a similar [feature request](https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist. + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 2afbfc2c751ab2c9c5fdbd68289df54cb61e75da Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 3 Apr 2020 21:27:06 +0200 Subject: [PATCH 6/9] Add Android device and version in issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a295f1b0..29a2bf01 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -14,6 +14,8 @@ assignees: '' - OS: [e.g. Debian, Windows, macOS...] - scrcpy version: [e.g. 1.12.1] - installation method: [e.g. manual build, apt, snap, brew, Windows release...] + - device model: + - Android version: [e.g. 10] **Describe the bug** A clear and concise description of what the bug is. From 15e4da08a362d19eb98ff065c29091d25f043805 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 7 Apr 2020 10:37:19 +0200 Subject: [PATCH 7/9] Improve "low quality" section in FAQ --- FAQ.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FAQ.md b/FAQ.md index 5135cc47..d68a8011 100644 --- a/FAQ.md +++ b/FAQ.md @@ -132,7 +132,7 @@ that's all. See [#37]. ## Client issues -### The quality is low on HiDPI display +### The quality is low On Windows, you may need to configure the [scaling behavior]. @@ -141,8 +141,9 @@ On Windows, you may need to configure the [scaling behavior]. [scaling behavior]: https://github.com/Genymobile/scrcpy/issues/40#issuecomment-424466723 -If your computer definition is far smaller than your screen, then you'll get -poor quality. See [#40]. +If the definition of your client window is far smaller than that of your device +screen, then you'll get poor quality. This is especially visible on text. See +[#40]. [#40]: https://github.com/Genymobile/scrcpy/issues/40 From 9b9e717c41beeba765cdcef7f833f22989c2f614 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 7 Apr 2020 10:38:13 +0200 Subject: [PATCH 8/9] Explain master and dev branches in BUILD People may not guess that `master` is not the development branch. --- BUILD.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/BUILD.md b/BUILD.md index e35d07d0..9f49216e 100644 --- a/BUILD.md +++ b/BUILD.md @@ -8,6 +8,22 @@ case, use the [prebuilt server] (so you will not need Java or the Android SDK). [prebuilt server]: #prebuilt-server +## Branches + +### `master` + +The `master` branch concerns the latest release, and is the home page of the +project on Github. + + +### `dev` + +`dev` is the current development branch. Every commit present in `dev` will be +in the next release. + +If you want to contribute code, please base your commits on the latest `dev` +branch. + ## Requirements From cdd8edbbb68d6cecdced5036d8e3a3c8583ac512 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 7 Apr 2020 22:52:14 +0200 Subject: [PATCH 9/9] Add a note about prebuilt server in BUILD.md Mention that it works with a matching client version. --- BUILD.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BUILD.md b/BUILD.md index 9f49216e..8b845583 100644 --- a/BUILD.md +++ b/BUILD.md @@ -263,3 +263,6 @@ meson x --buildtype release --strip -Db_lto=true \ ninja -Cx sudo ninja -Cx install ``` + +The server only works with a matching client version (this server works with the +`master` branch).