Merge branch 'master' into dev

This commit is contained in:
Romain Vimont 2020-04-12 00:31:57 +02:00
commit 1c6207f8ce
5 changed files with 205 additions and 32 deletions

25
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,25 @@
---
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...]
- device model:
- Android version: [e.g. 10]
**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.

View file

@ -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.

View file

@ -8,6 +8,22 @@ case, use the [prebuilt server] (so you will not need Java or the Android SDK).
[prebuilt server]: #prebuilt-server [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 ## Requirements
@ -247,3 +263,6 @@ meson x --buildtype release --strip -Db_lto=true \
ninja -Cx ninja -Cx
sudo ninja -Cx install sudo ninja -Cx install
``` ```
The server only works with a matching client version (this server works with the
`master` branch).

154
FAQ.md
View file

@ -3,19 +3,102 @@
Here are the common reported problems and their status. 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. `scrcpy` execute `adb` commands to initialize the connection with the device. If
Check everything is ok by calling: `adb` fails, then scrcpy will not work.
In that case, it will print this error:
> 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 devices
```
Windows may need some [drivers] to detect your device. ### `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 [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]. On some devices, you may need to enable an option to allow [simulating input].
In developer options, enable: In developer options, enable:
@ -29,20 +112,27 @@ In developer options, enable:
### Mouse clicks at wrong location ### Mouse clicks at wrong location
On MacOS, with HiDPI support and multiple screens, input location are wrongly 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.
### The quality is low on HiDPI display ### 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 Windows, you may need to configure the [scaling behavior]. On Windows, you may need to configure the [scaling behavior].
@ -51,6 +141,12 @@ On Windows, you may need to configure the [scaling behavior].
[scaling behavior]: https://github.com/Genymobile/scrcpy/issues/40#issuecomment-424466723 [scaling behavior]: https://github.com/Genymobile/scrcpy/issues/40#issuecomment-424466723
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
### KWin compositor crashes ### KWin compositor crashes
@ -61,19 +157,29 @@ As a workaround, [disable "Block compositing"][kwin].
[kwin]: https://github.com/Genymobile/scrcpy/issues/114#issuecomment-378778613 [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 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: device is not able to encode at the given definition:
``` > ```
ERROR: Exception on thread Thread[main,5,main] > ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffc0e > android.media.MediaCodec$CodecException: Error 0xfffffc0e
... > ...
Exit due to uncaughtException in main thread: > Exit due to uncaughtException in main thread:
ERROR: Could not open video stream > ERROR: Could not open video stream
INFO: Initial texture: 1080x2336 > 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: Just try with a lower definition:

View file

@ -66,15 +66,12 @@ hard).
### Windows ### Windows
For Windows, for simplicity, prebuilt archives with all the dependencies For Windows, for simplicity, a prebuilt archive with all the dependencies
(including `adb`) are available: (including `adb`) is available:
- [`scrcpy-win32-v1.12.1.zip`][direct-win32]
_(SHA-256: 0f4b3b063536b50a2df05dc42c760f9cc0093a9a26dbdf02d8232c74dab43480)_
- [`scrcpy-win64-v1.12.1.zip`][direct-win64] - [`scrcpy-win64-v1.12.1.zip`][direct-win64]
_(SHA-256: 57d34b6d16cfd9fe169bc37c4df58ebd256d05c1ea3febc63d9cb0a027ab47c9)_ _(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 [direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v1.12.1/scrcpy-win64-v1.12.1.zip
It is also available in [Chocolatey]: It is also available in [Chocolatey]:
@ -83,14 +80,18 @@ It is also available in [Chocolatey]:
```bash ```bash
choco install scrcpy choco install scrcpy
choco install adb # if you don't have it yet
``` ```
You need `adb`, accessible from your `PATH`. If you don't have it yet: And in [Scoop]:
```bash ```bash
choco install adb 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]. You can also [build the app manually][BUILD].